Port tutorial analyses to SimplifiedSpec and reuse SimplifiedUnitAnalysis defaults while preserving unitAnalysis compatibility#2043
Conversation
Agent-Logs-Url: https://github.com/goblint/analyzer/sessions/04ac7a0b-b764-4f8a-b7c0-f96bcb75fc44 Co-authored-by: michael-schwarz <13812333+michael-schwarz@users.noreply.github.com>
SimplifiedSpec registration/interface
Agent-Logs-Url: https://github.com/goblint/analyzer/sessions/4163237d-68cb-41e2-ac46-468ac7eb3df5 Co-authored-by: michael-schwarz <13812333+michael-schwarz@users.noreply.github.com>
SimplifiedSpec registration/interfaceSimplifiedSpec while preserving unitAnalysis compatibility
|
@copilot: Modules missing from src/goblint_lib.ml: {'SimplifiedUnitAnalysis'} |
Agent-Logs-Url: https://github.com/goblint/analyzer/sessions/51579562-8e2a-4d5d-af08-de4f4244ecb5 Co-authored-by: michael-schwarz <13812333+michael-schwarz@users.noreply.github.com>
michael-schwarz
left a comment
There was a problem hiding this comment.
The SimplifiedUnitAnalysis should be used to reduce boilerplate in the other analyses.
This is already addressed in commit |
|
@copilot: The tutorial analysis should, where feasible, not define everything from scratch but build on the |
Agent-Logs-Url: https://github.com/goblint/analyzer/sessions/c85e631b-65eb-4b46-9ad9-79625a27c3fb Co-authored-by: michael-schwarz <13812333+michael-schwarz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/goblint/analyzer/sessions/c85e631b-65eb-4b46-9ad9-79625a27c3fb Co-authored-by: michael-schwarz <13812333+michael-schwarz@users.noreply.github.com>
Implemented in |
SimplifiedSpec while preserving unitAnalysis compatibilitySimplifiedSpec and reuse SimplifiedUnitAnalysis defaults while preserving unitAnalysis compatibility
There was a problem hiding this comment.
Pull request overview
Ports multiple tutorial analyses from Analyses.MCPSpec to the SimplifiedAnalysis.SimplifiedSpec interface, adds a reusable SimplifiedUnitAnalysis.DefaultSpec to reduce boilerplate, and registers the simplified analyses via MCPRegistry.registered_simplified_analysis while keeping UnitAnalysis compatibility intact.
Changes:
- Export
SimplifiedUnitAnalysisfromgoblint_liband add a new tutorialsimplifiedUnitanalysis plus a reusableDefaultSpec. - Port tutorial analyses (
constants,signs,taintand solutions) toSimplifiedSpecand update their registrations. - Reuse
SimplifiedUnitAnalysis.DefaultSpecin the signs tutorial analyses to reduce duplicated no-op transfer functions.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/goblint_lib.ml | Exposes SimplifiedUnitAnalysis from the library interface. |
| src/analyses/tutorials/simplifiedUnitAnalysis.ml | Adds DefaultSpec and a minimal simplifiedUnit simplified analysis. |
| src/analyses/tutorials/signs.ml | Ports tutorial signs analysis to SimplifiedSpec and reuses DefaultSpec. |
| src/analyses/tutorials/solution/signsSol.ml | Ports solution signs analysis to SimplifiedSpec and reuses DefaultSpec. |
| src/analyses/tutorials/solution/signsExtendSol.ml | Ports extended solution signs analysis to SimplifiedSpec and reuses DefaultSpec. |
| src/analyses/tutorials/constants.ml | Ports constants tutorial analysis to SimplifiedSpec. |
| src/analyses/tutorials/taint.ml | Ports taint tutorial analysis skeleton to SimplifiedSpec. |
| src/analyses/tutorials/solution/taintSol.ml | Ports taint solution analysis to SimplifiedSpec. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Should be squashed once the time to merge comes. |
This PR ports tutorial analyses to the
SimplifiedSpecinterface while preserving compatibility for analyses that depend onUnitAnalysis.Spec.In addition, based on review feedback, it introduces reusable default transfer-function behavior in
SimplifiedUnitAnalysisand applies it where feasible to reduce boilerplate in tutorial analyses.What changed
unitAnalysis.mlin its originalMCPSpec-compatible form.simplifiedUnitAnalysis.ml) and exported it fromsrc/goblint_lib.ml.SimplifiedUnitAnalysis.DefaultSpecfor shared no-op/default simplified transfer functions.SimplifiedUnitAnalysis.DefaultSpecwhere feasible:src/analyses/tutorials/signs.mlsrc/analyses/tutorials/solution/signsSol.mlsrc/analyses/tutorials/solution/signsExtendSol.mlcontext,threadenter).Validation
make nativein this environment (blocked by missingopam/dune).