-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Probabilistic model checking with sample and discrete distributions a…
…nd other changes
- Loading branch information
Showing
25 changed files
with
279 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
*** | ||
*** Sample strategy with discrete distributions | ||
*** and related probabilistic strategies | ||
*** | ||
|
||
mod FOO is | ||
protecting FLOAT . | ||
protecting INT . | ||
protecting LIST{Float} . | ||
|
||
sort Foo . | ||
|
||
op <_> : Float -> Foo [ctor] . | ||
op <<_>> : Int -> Foo [ctor] . | ||
|
||
vars F G : Float . | ||
vars N M : Int . | ||
|
||
rl [set] : < F > => < G > [nonexec] . | ||
rl [iset] : << N >> => << M >> [nonexec] . | ||
rl [null] : F => 0.0 [nonexec] . | ||
endm | ||
|
||
smod FOO-STRAT is | ||
protecting FOO . | ||
|
||
strats ex-choice ex-bernou ex-unif ex-matchrew @ Foo . | ||
strat ex-unif : Int @ Foo . | ||
|
||
vars F G : Float . | ||
vars N M : Int . | ||
|
||
sd ex-choice := choice(1.0 : set[G <- 1.0], 2.0 : set[G <- 2.0]) . | ||
sd ex-bernou := sample G := bernoulli(0.9) in set[G <- G] . | ||
sd ex-unif := sample M := uniform(1, 3) in iset[M <- M] . | ||
sd ex-unif(N) := sample M := uniform(1, N) in iset[M <- M] . | ||
sd ex-matchrew := amatchrew F with weight F by F using null . | ||
endsm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Sample operator with discrete distributions | ||
#+ for: prism storm | ||
|
||
umaudemc pcheck sample '< 0.0 >' @steady ex-bernou --assign strategy --fraction | ||
umaudemc pcheck sample '<< 0 >>' @steady ex-unif --assign strategy --fraction | ||
umaudemc pcheck sample '<< 0 >>' @steady 'ex-unif(7)' --assign strategy --fraction | ||
|
||
umaudemc pcheck sample '< 0.0 >' @steady ex-choice --assign strategy --fraction | ||
umaudemc pcheck sample '1.0 2.0 3.0 4.0' @steady ex-matchrew --assign strategy --fraction | ||
umaudemc pcheck sample '1.0 2.0 3.0 4.0' @steady 'amatchrew F with weight 1 by F using null' --assign strategy --fraction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
9/10 < 1.0 > | ||
1/10 < 0.0 > | ||
1/3 << 1 >> | ||
1/3 << 2 >> | ||
1/3 << 3 >> | ||
1/7 << 1 >> | ||
1/7 << 2 >> | ||
1/7 << 3 >> | ||
1/7 << 4 >> | ||
1/7 << 5 >> | ||
1/7 << 6 >> | ||
1/7 << 7 >> | ||
2/3 < 2.0 > | ||
1/3 < 1.0 > | ||
2/5 1.0 2.0 3.0 0.0 | ||
3/10 1.0 2.0 0.0 4.0 | ||
1/5 1.0 0.0 3.0 4.0 | ||
1/10 0.0 2.0 3.0 4.0 | ||
1/4 0.0 2.0 3.0 4.0 | ||
1/4 1.0 0.0 3.0 4.0 | ||
1/4 1.0 2.0 0.0 4.0 | ||
1/4 1.0 2.0 3.0 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
9/10 < 1.0 > | ||
1/10 < 0.0 > | ||
1/3 << 1 >> | ||
1/3 << 2 >> | ||
1/3 << 3 >> | ||
1/7 << 1 >> | ||
1/7 << 2 >> | ||
1/7 << 3 >> | ||
1/7 << 4 >> | ||
1/7 << 5 >> | ||
1/7 << 6 >> | ||
1/7 << 7 >> | ||
2/3 < 2.0 > | ||
1/3 < 1.0 > | ||
2/5 1.0 2.0 3.0 0.0 | ||
3/10 1.0 2.0 0.0 4.0 | ||
1/5 1.0 0.0 3.0 4.0 | ||
1/10 0.0 2.0 3.0 4.0 | ||
1/4 0.0 2.0 3.0 4.0 | ||
1/4 1.0 0.0 3.0 4.0 | ||
1/4 1.0 2.0 0.0 4.0 | ||
1/4 1.0 2.0 3.0 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.13.1' | ||
__version__ = '0.14.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.