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

Re-introduce sampling of the derivative into CLI #619

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

linusheck
Copy link
Contributor

@linusheck linusheck commented Sep 9, 2024

When we changed storm-pars's CLI interface, we accidentally removed the derivative sampling option. I reintroduced it under the "sampling" mode:

dtmc

const p1;
const p2;
const p3;

// this isnt simple :)
module test
	s : [0..5] init 0;
	
	[] s=0 -> p1 : (s'=1) + p2 : (s'=2) + 1-p1-p2 : (s'=3);
	[] s=1 -> p1 : (s'=2) + p2 : (s'=3) + 1-p1-p2 : (s'=4);
	[] s=2 -> 0.5 : (s'=0) + 0.5 : (s'=5);
	[] s=3 -> 0.5 : (s'=1) + 0.5 : (s'=5);
	[] s=4 -> 1 : (s'=4);
	[] s=5 -> 1 : (s'=5);
endmodule

label "target" = s=4;
storm-pars --prism non_graph_preserving.pm -prop "P=? [F \"target\"]" --mode sampling  --samples "p1=0.1,p2=0.1" --sample-derivative

=>

Model checking property "1": P=? [F "target"] ...
Derivative w.r.t. p1:
Result (initial states) for instance [p1=1/10, p2=1/10]: 0.02889586935
Time for model checking: 0.000s.

Derivative w.r.t. p2:
Result (initial states) for instance [p1=1/10, p2=1/10]: -0.5451254454
Time for model checking: 0.000s.

Overall time for sampling all instances: 0.000s

@sjunges
Copy link
Contributor

sjunges commented Sep 9, 2024

Great, thanks!

@sjunges
Copy link
Contributor

sjunges commented Sep 10, 2024

The code still does not report the actual model checking results on the CLI, does it?

@glatteis
Copy link

The code still does not report the actual model checking results on the CLI, does it?

Nope :D didn’t interpret your first comment like that. Will change it so it also reports the original results :)

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.

3 participants