Browse Source
Added pp files to Beauquier.
Added pp files to Beauquier.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@501 bbc10eb1-c90d-0410-af57-cb519fbb1720master
7 changed files with 145 additions and 103 deletions
-
7prism-examples/self-stabilisation/beauquier/.autopp
-
35prism-examples/self-stabilisation/beauquier/.beauquierN.nm.pp
-
50prism-examples/self-stabilisation/beauquier/beauquier11.nm
-
30prism-examples/self-stabilisation/beauquier/beauquier3.nm
-
38prism-examples/self-stabilisation/beauquier/beauquier5.nm
-
42prism-examples/self-stabilisation/beauquier/beauquier7.nm
-
46prism-examples/self-stabilisation/beauquier/beauquier9.nm
@ -0,0 +1,7 @@ |
|||||
|
#!/bin/csh |
||||
|
|
||||
|
foreach N ( 3 5 7 9 11 ) |
||||
|
echo "Generating for N=$N" |
||||
|
prismpp .beauquierN.nm.pp $N >! beauquier$N.nm |
||||
|
unix2dos beauquier$N.nm |
||||
|
end |
||||
@ -0,0 +1,35 @@ |
|||||
|
#const N# |
||||
|
// self stabilisation algorithm Beauquier, Gradinariu and Johnen |
||||
|
// gxn/dxp 18/07/02 |
||||
|
|
||||
|
mdp |
||||
|
|
||||
|
// module of process 1 |
||||
|
module process1 |
||||
|
|
||||
|
d1 : bool; // probabilistic variable |
||||
|
p1 : bool; // deterministic variable |
||||
|
|
||||
|
[] d1=d#N# & p1=p#N# -> 0.5 : (d1'=!d1) & (p1'=p1) + 0.5 : (d1'=!d1) & (p1'=!p1); |
||||
|
[] d1=d#N# & !p1=p#N# -> (d1'=!d1); |
||||
|
|
||||
|
endmodule |
||||
|
|
||||
|
// add further processes through renaming |
||||
|
#for i=2:N# |
||||
|
module process#i# = process1 [ p1=p#i#, p#N#=p#i-1#, d1=d#i#, d#N#=d#i-1# ] endmodule |
||||
|
#end# |
||||
|
|
||||
|
// cost - 1 in each state (expected steps) |
||||
|
rewards "steps" |
||||
|
true : 1; |
||||
|
endrewards |
||||
|
|
||||
|
// initial states - any state with more than 1 token, that is all states |
||||
|
init |
||||
|
true |
||||
|
endinit |
||||
|
|
||||
|
// formula, for use in properties: number of tokens |
||||
|
formula num_tokens = #+ i=1:N#(p#i#=p#func(mod, i, N)+1#?1:0)#end#; |
||||
|
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue