Skip to content
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

Added option to limit the number of explored states #521

Merged
merged 2 commits into from
May 24, 2024

Conversation

tquatmann
Copy link
Member

Added option --build:state limit <number> which, if set, stops expanding new states once the given <number> of states has been found.

This is useful for, e.g., debugging models that normally would be too large.
If there are unexplored states, a label "unexplored" is added and assigned to them. This even allows to calculate the probability to exit the fraction of the explored state space.

$ storm --prism resources/examples/testfiles/dtmc/crowds-5-5.pm --state-limit 8500 --prop 'P=? [F "unexplored"]' 
Storm 1.8.2 (dev)
DEBUG BUILD

Date: Fri Apr 12 13:51:26 2024
Command line arguments: --prism ../resources/examples/testfiles/dtmc/crowds-5-5.pm --state-limit 8500 --prop 'P=? [F "unexplored"]'
Current working directory: /Users/tim/storm/build

Time for model input parsing: 0.010s.

Time for model construction: 0.060s.

-------------------------------------------------------------- 
Model type: 	DTMC (sparse)
States: 	8500
Transitions: 	15006
Reward Models:  none
State Labels: 	3 labels
   * unexplored -> 140 item(s)
   * deadlock -> 1120 item(s)
   * init -> 1 item(s)
Choice Labels: 	none
-------------------------------------------------------------- 

Model checking property "1": P=? [F "unexplored"] ...
Result (for initial states): 0.001353870181
Time for model checking: 0.016s.

Note: the "unexplored" label does not exist if all states are explored.

Added option `--build:state limit <number>` which, if set, stops expanding new states once the given `<number>` of states has been found.
This is useful for, e.g., debugging models that normally would be too large. Unexplored states get a label `"unexplored"` assigned to them. This even allows to calculate the probability to exit the fraction of the explored state space
@@ -90,7 +90,8 @@ PrismNextStateGenerator<ValueType, StateType>::PrismNextStateGenerator(storm::pr
std::make_pair(this->program.getLabelExpression(expressionOrLabelAndBool.first.getLabel()), expressionOrLabelAndBool.second));
} else {
// If the label is not present in the program and is not a special one, we raise an error.
STORM_LOG_THROW(expressionOrLabelAndBool.first.getLabel() == "init" || expressionOrLabelAndBool.first.getLabel() == "deadlock",
STORM_LOG_THROW(expressionOrLabelAndBool.first.getLabel() == "init" || expressionOrLabelAndBool.first.getLabel() == "deadlock" ||
Copy link
Contributor

Choose a reason for hiding this comment

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

With now three special labels, it may make sense to write a helper function that does this check (I think I saw it somewhere above as well)

@sjunges
Copy link
Contributor

sjunges commented Apr 13, 2024

LGTM. One nitpicky comment :-)

@tquatmann tquatmann merged commit a8cc933 into moves-rwth:master May 24, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants