-
Notifications
You must be signed in to change notification settings - Fork 83
Support PRISM models with Intervals and CLI Extensions #739
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
Support PRISM models with Intervals and CLI Extensions #739
Conversation
Note: storm::Interval's don't default construct to [0,0], but to ]0,0[.
|
I had to do some more extensive CLI updates in The old code had to set the right
We now use |
|
For testing the CLI re-implementation, I compiled a list of commands that should cover most of the functionality affected by this PR. I Here is my command list for future reference. set -e # fail on first error
STORMBIN=./build/bin
TESTFILES=./resources/examples/testfiles
$STORMBIN/storm;
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]'
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --prism2jani
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' -bisim
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --exact
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --exact -bisim
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --buildstateval --exportresult res.json; cat res.json; rm res.json
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P>0.5 [ F "one"]' --counterexample
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --exportbuild crowds5_5.drn; head -n20 crowds5_5.drn; rm crowds5_5.drn
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --exact --exportbuild crowds5_5.drn; head -n20 crowds5_5.drn; rm crowds5_5.drn
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine hybrid
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine hybrid --ddlib cudd
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine hybrid --exact
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine dd
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine dd --exact
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine dd -bisim
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine dd -bisim --exact
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine dd-to-sparse
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine dd-to-sparse -bisim
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine automatic
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine expl
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine abs
$STORMBIN/storm --prism $TESTFILES/dtmc/die.pm --prop 'P=? [ F "one"]' --engine abs --abstraction:method games
$STORMBIN/storm --explicit-drn $TESTFILES/ma/jobscheduler.drn --prop 'Tmax=? [F "all_jobs_finished" ]'
$STORMBIN/storm --prism $TESTFILES/imdp/robot.prism -const delta=0.01 --buildfull;
$STORMBIN/storm --prism $TESTFILES/imdp/robot.prism -const delta=0.01 --buildfull --exportbuild robot.drn; cat robot.drn; rm robot.drn
$STORMBIN/storm --prism $TESTFILES/imdp/robot.prism -const delta=0.1 --buildfull --prop 'Pmax=? [F "goal1"]' --minmax:method vi;
$STORMBIN/storm-pars --prism $TESTFILES/pdtmc/parametric_die_2.pm --prop 'P=? [ F "one" ]' --mode solutionfunction
$STORMBIN/storm-pars --prism $TESTFILES/pdtmc/parametric_die_2.pm --prop 'P=? [ F "one" ]' --mode solutionfunction --engine dd
$STORMBIN/storm-pomdp --prism $TESTFILES/pomdp/maze2.prism -const sl=0 --prop 'Rmin=? [F "goal"]' --buildfull --belief-exploration
$STORMBIN/storm-pomdp --prism $TESTFILES/pomdp/maze2.prism -const sl=0 --prop 'Rmin=? [F "goal"]' --buildfull --belief-exploration --exact
echo "done"
|
|
Hey Tim, the fact that the expression-evaluator for state building does not take the interval but just the bounds into account (as far as I can see) confuses me a bit: Does this mean that one can always evaluate the lower bound and the upper bound independently of each other? I am not sure if that works well for all kinds of operations, say 1/x with x in [-1,1] is not [-1,1] ? |
| result.first = preprocessSparseModelBisimulation(result.first, input, bisimulationSettings); | ||
| result.second = true; | ||
| if constexpr (storm::IsIntervalType<ValueType>) { | ||
| STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Bisimulation not supported for interval models."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@linusheck did you look into this?
| "Only partial choice information is available. You might want to build the model with choice origins using " | ||
| "--buildchoicelab or --buildchoiceorig."); | ||
| if constexpr (storm::IsIntervalType<ValueType>) { | ||
| STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Scheduler export for interval models is not supported."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This relates to #741
|
I really like the changes in particular regarding the model handling :-) |
|
Thanks for looking through this!
Yes, lower bound and upper bound are evaluated independently. As far as I understand the PRISM specification this should be no issue as there are no expressions of type "interval". Please correct me if I'm wrong, though :) |
I see; the only arithmetic thus happens due to the composition/while flattening. As long as everything is nonnegative, this is not an issue. |
|
LGTM! |
This PR adds support for building prism models with intervals as documented here
It also extends/revises model-handling for CLI to incorporate intervals.
Addresses parts of #469