Skip to content

merging of equivalent states as preprocessing - #1016

Merged
tquatmann merged 12 commits into
stormchecker:masterfrom
tquatmann:feature/goal-state-merge
Sep 11, 2026
Merged

tquatmann merged 12 commits into
stormchecker:masterfrom
tquatmann:feature/goal-state-merge

Conversation

@tquatmann

Copy link
Copy Markdown
Contributor
  • 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

Relates to #996

* 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
Comment thread src/storm-pars/transformer/SparseParametricModelSimplifier.cpp Outdated
@tquatmann tquatmann added this to the 1.15 milestone Aug 17, 2026
…merge

# Conflicts:
#	src/storm-pars/transformer/SparseParametricDtmcSimplifier.cpp
#	src/storm-pars/transformer/SparseParametricMdpSimplifier.cpp
#	src/storm/transformer/GoalStateMerger.cpp
@tquatmann
tquatmann requested a balanced review from Copilot September 4, 2026 18:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GoalStateMerger to merge equivalent states based on a supported input formula and expose it via API/CLI preprocessing.
  • Add a new CLI option --merge-equivalent-states and 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.

Comment thread src/storm-pars/transformer/SparseParametricModelSimplifier.cpp Outdated
Comment thread src/storm/transformer/GoalStateMerger.cpp Outdated
Comment thread src/storm/transformer/GoalStateMerger.cpp Outdated
Comment thread src/storm/transformer/GoalStateMerger.cpp Outdated
Comment thread src/storm/api/transformation.h Outdated
Comment thread src/test/storm/transformer/GoalStateMergerTest.cpp Outdated
Comment thread src/storm/transformer/GoalStateMerger.cpp Outdated

@volkm volkm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I only have minor mostly code-style comments. Feel free to ignore some of them.

Comment thread src/storm/api/transformation.h Outdated
Comment thread src/storm/api/transformation.h Outdated
Comment thread src/storm/api/transformation.h Outdated
Comment thread src/storm-cli-utilities/model-handling.h Outdated
Comment thread src/storm-pars/transformer/SparseParametricModelSimplifier.cpp
Comment thread src/test/storm/transformer/GoalStateMergerTest.cpp Outdated
Comment thread src/storm/transformer/GoalStateMerger.cpp
Comment thread src/storm/transformer/GoalStateMerger.cpp Outdated
Comment thread src/storm/transformer/GoalStateMerger.cpp Outdated
Comment thread src/storm/transformer/GoalStateMerger.cpp
@tquatmann

Copy link
Copy Markdown
Contributor Author

Thanks for the review!

I'm overusing init-statements in if conditions -- it seems 😄

@volkm

volkm commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Might also just be me not understanding two things in one line ;)
Thanks for addressing my nitpicky comments.

@tquatmann
tquatmann merged commit a87a38b into stormchecker:master Sep 11, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants