merging of equivalent states as preprocessing - #1016
Conversation
* extends the GoalStateMerger so that it can now merge states based on an input formula (e.g. all prob0/prob1 states * adds a CLI option --merge-equivalent-states to invoke that as a preprocessing * Simplifies SparseParametricModelSimplifier by calling the new GoalStateMerger
…merge # Conflicts: # src/storm-pars/transformer/SparseParametricDtmcSimplifier.cpp # src/storm-pars/transformer/SparseParametricMdpSimplifier.cpp # src/storm/transformer/GoalStateMerger.cpp
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Extends goal/sink state merging to work as a formula-driven preprocessing step and consolidates parametric model simplification around the updated GoalStateMerger.
Changes:
- Generalize
GoalStateMergerto merge equivalent states based on a supported input formula and expose it via API/CLI preprocessing. - Add a new CLI option
--merge-equivalent-statesand wire it into the preprocessing pipeline. - Consolidate parametric DTMC/MDP simplifiers into
SparseParametricModelSimplifier, updating tests and call sites accordingly.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/storm/transformer/GoalStateMergerTest.cpp | Adds regression tests validating formula-driven merging preserves results. |
| src/test/storm-pars/modelchecker/region/monotonicity/OrderExtenderTest.cpp | Switches to consolidated SparseParametricModelSimplifier. |
| src/test/storm-pars/modelchecker/region/monotonicity/MonotonicityHelperTest.cpp | Switches to consolidated SparseParametricModelSimplifier. |
| src/test/storm-pars/modelchecker/region/monotonicity/MonotonicityCheckerTest.cpp | Switches to consolidated SparseParametricModelSimplifier. |
| src/test/storm-pars/modelchecker/region/monotonicity/AssumptionMakerTest.cpp | Switches to consolidated SparseParametricModelSimplifier. |
| src/test/storm-pars/modelchecker/region/monotonicity/AssumptionCheckerTest.cpp | Switches to consolidated SparseParametricModelSimplifier. |
| src/test/storm-pars/modelchecker/SparseDtmcParameterLiftingMonotonicityTest.cpp | Switches to consolidated SparseParametricModelSimplifier. |
| src/test/storm-pars/derivative/SparseDerivativeInstantiationModelCheckerTest.cpp | Switches to consolidated SparseParametricModelSimplifier. |
| src/test/storm-pars/derivative/GradientDescentInstantiationSearcherTest.cpp | Switches to consolidated SparseParametricModelSimplifier. |
| src/storm/utility/graph.cpp | Adds missing template instantiation for performProb1A (rational reward model). |
| src/storm/transformer/GoalStateMerger.h | Refactors merger to be value-type based and adds mergeForFormula. |
| src/storm/transformer/GoalStateMerger.cpp | Implements formula-driven merging and model-component rebuild incl. valuations/labels/origins. |
| src/storm/settings/modules/TransformationSettings.h | Declares new merge-equivalent-states setting. |
| src/storm/settings/modules/TransformationSettings.cpp | Registers new CLI option and getter. |
| src/storm/modelchecker/multiobjective/pcaa/StandardPcaaWeightVectorChecker.cpp | Adapts to new GoalStateMerger<ValueType> result model type. |
| src/storm/modelchecker/multiobjective/constraintbased/SparseCbQuery.cpp | Adapts to new GoalStateMerger<ValueType> result model type. |
| src/storm/api/transformation.h | Adds mergeEquivalentStatesForFormula API helper around GoalStateMerger. |
| src/storm-pars/transformer/SparseParametricModelSimplifier.h | Removes virtual interface pieces; consolidates simplifier roles. |
| src/storm-pars/transformer/SparseParametricModelSimplifier.cpp | Re-implements simplification pipeline using GoalStateMerger + eliminations. |
| src/storm-pars/transformer/SparseParametricMdpSimplifier.h | Removed (functionality consolidated). |
| src/storm-pars/transformer/SparseParametricMdpSimplifier.cpp | Removed (functionality consolidated). |
| src/storm-pars/transformer/SparseParametricDtmcSimplifier.h | Removed (functionality consolidated). |
| src/storm-pars/transformer/SparseParametricDtmcSimplifier.cpp | Removed (functionality consolidated). |
| src/storm-pars/modelchecker/region/ValidatingSparseParameterLiftingModelChecker.cpp | Uses consolidated simplifier instead of DTMC/MDP variants. |
| src/storm-pars/modelchecker/region/SparseMdpParameterLiftingModelChecker.cpp | Uses consolidated simplifier instead of MDP variant. |
| src/storm-pars/modelchecker/region/SparseDtmcParameterLiftingModelChecker.cpp | Uses consolidated simplifier instead of DTMC variant. |
| src/storm-pars-cli/storm-pars.cpp | Uses consolidated simplifier in CLI model simplification path. |
| src/storm-pars-cli/sampling.h | Removes includes of removed DTMC/MDP simplifiers. |
| src/storm-cli-utilities/model-handling.h | Wires --merge-equivalent-states preprocessing before bisimulation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
volkm
left a comment
There was a problem hiding this comment.
LGTM.
I only have minor mostly code-style comments. Feel free to ignore some of them.
|
Thanks for the review! I'm overusing init-statements in |
|
Might also just be me not understanding two things in one line ;) |
Relates to #996