Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Shared: Model generator cleanup. #19311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Apr 28, 2025
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2a8fe53
Shared: Remove --with-mixed-summaries logic.
michaelnebel Apr 15, 2025
fa5162f
Shared: Remove the backwards compatbility flag.
michaelnebel Apr 15, 2025
ae70c76
Shared: Use the CaptureSummaryModels instead of CaptureMixedSummaryMo…
michaelnebel Apr 15, 2025
2357a69
Shared: Remove the --with-mixed-neutrals logic.
michaelnebel Apr 15, 2025
f78be91
Shared: Re-factor the model generator and put the heuristic queries i…
michaelnebel Apr 15, 2025
2a0097e
C#/Java/Rust: Use Mixed flow from capture summary models queries and …
michaelnebel Apr 15, 2025
7801fc3
C#: Re-factor tests to use the new implementations.
michaelnebel Apr 15, 2025
da99c75
C#: Rename some of the model generator tests.
michaelnebel Apr 15, 2025
539a06d
C#: Re-factor the heuristic summary test to use heuristic-summary tag…
michaelnebel Apr 15, 2025
1d6c367
C#: Change the capture neutral model test to use the content/heuristi…
michaelnebel Apr 16, 2025
08f7caa
Java: Adjust model generator test cases to the new implementation.
michaelnebel Apr 16, 2025
7e51dae
Java: Change the heuristic summary test tag to heuristic-summary.
michaelnebel Apr 16, 2025
71d0409
Java: Convert the model generator neutral test to use the combined ne…
michaelnebel Apr 16, 2025
2155396
Rust: Adjust tests.
michaelnebel Apr 16, 2025
32125d2
C#/Java/Rust: Add change notes.
michaelnebel Apr 16, 2025
d187a7d
Java: Update integration test that tracks queries not included in a q…
michaelnebel Apr 22, 2025
f6135d5
Shared: Address review comments.
michaelnebel Apr 23, 2025
d05f604
C++: Adjust the model generator queries to the new shared implementat…
michaelnebel Apr 24, 2025
a589014
C++: Update model generator tests.
michaelnebel Apr 24, 2025
de12222
C#/Rust: Update integration test expected output.
michaelnebel Apr 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Shared: Remove the --with-mixed-neutrals logic.
  • Loading branch information
michaelnebel committed Apr 25, 2025
commit 2357a69d55ff72850e5328f17185a5714d67520c
18 changes: 3 additions & 15 deletions 18 misc/scripts/models-as-data/generate_flow_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def __init__ (self, language):
self.generateSources = False
self.generateSummaries = False
self.generateNeutrals = False
self.generateMixedNeutrals = False
self.generateTypeBasedSummaries = False
self.dryRun = False
self.dirname = "modelgenerator"
Expand All @@ -52,7 +51,6 @@ def printHelp(self):
--with-sources
--with-summaries
--with-neutrals
--with-mixed-neutrals. Should only be used in conjunction with --with-summaries.
--with-typebased-summaries (Experimental)
If none of these flags are specified, all models are generated except for the type based models.

Expand Down Expand Up @@ -100,10 +98,6 @@ def make(language):
sys.argv.remove("--with-neutrals")
generator.generateNeutrals = True

if "--with-mixed-neutrals" in sys.argv:
sys.argv.remove("--with-mixed-neutrals")
generator.generateMixedNeutrals = True

if "--with-typebased-summaries" in sys.argv:
sys.argv.remove("--with-typebased-summaries")
generator.generateTypeBasedSummaries = True
Expand All @@ -116,8 +110,7 @@ def make(language):
not generator.generateSources and
not generator.generateSummaries and
not generator.generateNeutrals and
not generator.generateTypeBasedSummaries and
not generator.generateMixedNeutrals):
not generator.generateTypeBasedSummaries):
generator.generateSinks = generator.generateSources = generator.generateSummaries = generator.generateNeutrals = True

n = len(sys.argv)
Expand Down Expand Up @@ -171,11 +164,7 @@ def makeContent(self):
if self.generateNeutrals:
neutralAddsTo = self.getAddsTo("CaptureNeutralModels.ql", helpers.neutralModelPredicate)

mixedNeutralAddsTo = {}
if self.generateMixedNeutrals:
mixedNeutralAddsTo = self.getAddsTo("CaptureMixedNeutralModels.ql", helpers.neutralModelPredicate)

return helpers.merge(summaryAddsTo, sinkAddsTo, sourceAddsTo, neutralAddsTo, mixedNeutralAddsTo)
return helpers.merge(summaryAddsTo, sinkAddsTo, sourceAddsTo, neutralAddsTo)

def makeTypeBasedContent(self):
if self.generateTypeBasedSummaries:
Expand Down Expand Up @@ -210,8 +199,7 @@ def run(self):
if (self.generateSinks or
self.generateSources or
self.generateSummaries or
self.generateNeutrals or
self.generateMixedNeutrals):
self.generateNeutrals):
self.save(content, ".model.yml")

if self.generateTypeBasedSummaries:
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.