diff --git a/prism-examples/self-stabilisation/herman/.autopp b/prism-examples/self-stabilisation/herman/.autopp new file mode 100755 index 00000000..9e11e6f6 --- /dev/null +++ b/prism-examples/self-stabilisation/herman/.autopp @@ -0,0 +1,7 @@ +#!/bin/csh + +foreach N ( 3 5 7 11 13 15 17 19 21 ) + echo "Generating for N=$N" + prismpp .hermanN.pm.pp $N >! herman$N.pm + unix2dos herman$N.pm +end diff --git a/prism-examples/self-stabilisation/herman/.hermanN.pm.pp b/prism-examples/self-stabilisation/herman/.hermanN.pm.pp new file mode 100644 index 00000000..80157436 --- /dev/null +++ b/prism-examples/self-stabilisation/herman/.hermanN.pm.pp @@ -0,0 +1,36 @@ +#const N# +// herman's self stabilising algorithm [Her90] +// gxn/dxp 13/07/02 + +// the procotol is synchronous with no nondeterminism (a DTMC) +dtmc + +// module for process 1 +module process1 + + // Boolean variable for process 1 + x1 : [0..1]; + + [step] (x1=x#N#) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); + [step] !(x1=x#N#) -> (x1'=x#N#); + +endmodule + +// add further processes through renaming +#for i=2:N# +module process#i# = process1 [ x1=x#i#, x#N#=x#i-1# ] endmodule +#end# + +// cost - 1 in each state (expected number of steps) +rewards "steps" + + true : 1; + +endrewards + +// set of initial states: all (i.e. any possible initial configuration of tokens) +init true endinit + +// formula, for use in properties: number of tokens +// (i.e. number of processes that have the same value as the process to their left) +formula num_tokens = #+ i=1:N#(x#i#=x#func(mod, i, N)+1#?1:0)#end#; diff --git a/prism-examples/self-stabilisation/herman/auto b/prism-examples/self-stabilisation/herman/auto index 3c999842..33e96302 100755 --- a/prism-examples/self-stabilisation/herman/auto +++ b/prism-examples/self-stabilisation/herman/auto @@ -1,6 +1,6 @@ -#!/bin/csh - -prism herman7.pm herman7.pctl -prop 1 -const k=0 -prism herman7.pm herman7.pctl -prop 2 -const k=0 -prism herman7.pm herman7.pctl -prop 3 -const k=1:2:7 -prism herman7.pm herman7.pctl -prop 4 -const k=1:2:7 +#!/bin/csh + +prism herman7.pm herman.pctl -prop 1 -const k=0 +prism herman7.pm herman.pctl -prop 2 -const k=0 +prism herman7.pm herman.pctl -prop 3 -const k=1:2:7 +prism herman7.pm herman.pctl -prop 4 -const k=1:2:7 diff --git a/prism-examples/self-stabilisation/herman/herman3.pctl b/prism-examples/self-stabilisation/herman/herman.pctl similarity index 65% rename from prism-examples/self-stabilisation/herman/herman3.pctl rename to prism-examples/self-stabilisation/herman/herman.pctl index 49577235..e4321b61 100644 --- a/prism-examples/self-stabilisation/herman/herman3.pctl +++ b/prism-examples/self-stabilisation/herman/herman.pctl @@ -1,13 +1,13 @@ const int k; -// States with k tokens - where only k processes have the same value as the process to its left -label "k_tokens" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x1?1:0) = k; +// States with k tokens +label "k_tokens" = num_tokens=k; // Stable states - where only one process has a token -label "stable" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x1?1:0) = 1; +label "stable" = num_tokens=1; // A stable state is reached with probability 1 -"init" => P>=1 [ true U "stable" ] +"init" => P>=1 [ F "stable" ] // Maximum expected time to reach a stable state (for all configurations) R=? [ F "stable" {"init"}{max} ] diff --git a/prism-examples/self-stabilisation/herman/herman11.pctl b/prism-examples/self-stabilisation/herman/herman11.pctl deleted file mode 100644 index 6d143a94..00000000 --- a/prism-examples/self-stabilisation/herman/herman11.pctl +++ /dev/null @@ -1,19 +0,0 @@ -const int k; - -// States with k tokens - where only k processes have the same value as the process to its left -label "k_tokens" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x1?1:0) = k; - -// Stable states - where only one process has a token -label "stable" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x1?1:0) = 1; - -// A stable state is reached with probability 1 -"init" => P>=1 [ true U "stable" ] - -// Maximum expected time to reach a stable state (for all configurations) -R=? [ F "stable" {"init"}{max} ] - -// Maximum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{max} ] - -// Minimum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{min} ] diff --git a/prism-examples/self-stabilisation/herman/herman11.pm b/prism-examples/self-stabilisation/herman/herman11.pm index 8ca9aa53..0b65b382 100644 --- a/prism-examples/self-stabilisation/herman/herman11.pm +++ b/prism-examples/self-stabilisation/herman/herman11.pm @@ -1,42 +1,42 @@ -// herman's self stabilising algorithm [Her90] -// gxn/dxp 13/07/02 - -// the procotol is synchronous with no non-determinism (a DTMC) -dtmc - -// module for process 1 -module process1 - - // Boolean variable for process 1 - x1 : [0..1]; - - [step] (x1=x11) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); - [step] !(x1=x11) -> (x1'=x11); - -endmodule - -// add further processes through renaming -module process2 = process1[x1=x2, x11=x1 ] endmodule -module process3 = process1[x1=x3, x11=x2 ] endmodule -module process4 = process1[x1=x4, x11=x3 ] endmodule -module process5 = process1[x1=x5, x11=x4 ] endmodule -module process6 = process1[x1=x6, x11=x5 ] endmodule -module process7 = process1[x1=x7, x11=x6 ] endmodule -module process8 = process1[x1=x8, x11=x7 ] endmodule -module process9 = process1[x1=x9, x11=x8 ] endmodule -module process10 = process1[x1=x10, x11=x9 ] endmodule -module process11 = process1[x1=x11, x11=x10 ] endmodule - -// cost - 1 in each state (expected steps) -rewards - - true : 1; - -endrewards - -// any initial state (consider any possible initial configuration of tokens) -init - - true - -endinit +// herman's self stabilising algorithm [Her90] +// gxn/dxp 13/07/02 + +// the procotol is synchronous with no nondeterminism (a DTMC) +dtmc + +// module for process 1 +module process1 + + // Boolean variable for process 1 + x1 : [0..1]; + + [step] (x1=x11) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); + [step] !(x1=x11) -> (x1'=x11); + +endmodule + +// add further processes through renaming +module process2 = process1 [ x1=x2, x11=x1 ] endmodule +module process3 = process1 [ x1=x3, x11=x2 ] endmodule +module process4 = process1 [ x1=x4, x11=x3 ] endmodule +module process5 = process1 [ x1=x5, x11=x4 ] endmodule +module process6 = process1 [ x1=x6, x11=x5 ] endmodule +module process7 = process1 [ x1=x7, x11=x6 ] endmodule +module process8 = process1 [ x1=x8, x11=x7 ] endmodule +module process9 = process1 [ x1=x9, x11=x8 ] endmodule +module process10 = process1 [ x1=x10, x11=x9 ] endmodule +module process11 = process1 [ x1=x11, x11=x10 ] endmodule + +// cost - 1 in each state (expected number of steps) +rewards "steps" + + true : 1; + +endrewards + +// set of initial states: all (i.e. any possible initial configuration of tokens) +init true endinit + +// formula, for use in properties: number of tokens +// (i.e. number of processes that have the same value as the process to their left) +formula num_tokens = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x1?1:0); diff --git a/prism-examples/self-stabilisation/herman/herman13.pctl b/prism-examples/self-stabilisation/herman/herman13.pctl deleted file mode 100644 index 0939c2b6..00000000 --- a/prism-examples/self-stabilisation/herman/herman13.pctl +++ /dev/null @@ -1,19 +0,0 @@ -const int k; - -// States with k tokens - where only k processes have the same value as the process to its left -label "k_tokens" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x1?1:0) = k; - -// Stable states - where only one process has a token -label "stable" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x1?1:0) = 1; - -// A stable state is reached with probability 1 -"init" => P>=1 [ true U "stable" ] - -// Maximum expected time to reach a stable state (for all configurations) -R=? [ F "stable" {"init"}{max} ] - -// Maximum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{max} ] - -// Minimum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{min} ] diff --git a/prism-examples/self-stabilisation/herman/herman13.pm b/prism-examples/self-stabilisation/herman/herman13.pm index 351bc895..badc6142 100644 --- a/prism-examples/self-stabilisation/herman/herman13.pm +++ b/prism-examples/self-stabilisation/herman/herman13.pm @@ -1,44 +1,44 @@ -// herman's self stabilising algorithm [Her90] -// gxn/dxp 13/07/02 - -// the procotol is synchronous with no non-determinism (a DTMC) -dtmc - -// module for process 1 -module process1 - - // Boolean variable for process 1 - x1 : [0..1]; - - [step] (x1=x13) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); - [step] !(x1=x13) -> (x1'=x13); - -endmodule - -// add further processes through renaming -module process2 = process1[x1=x2, x13=x1 ] endmodule -module process3 = process1[x1=x3, x13=x2 ] endmodule -module process4 = process1[x1=x4, x13=x3 ] endmodule -module process5 = process1[x1=x5, x13=x4 ] endmodule -module process6 = process1[x1=x6, x13=x5 ] endmodule -module process7 = process1[x1=x7, x13=x6 ] endmodule -module process8 = process1[x1=x8, x13=x7 ] endmodule -module process9 = process1[x1=x9, x13=x8 ] endmodule -module process10 = process1[x1=x10, x13=x9 ] endmodule -module process11 = process1[x1=x11, x13=x10 ] endmodule -module process12 = process1[x1=x12, x13=x11 ] endmodule -module process13 = process1[x1=x13, x13=x12 ] endmodule - -// cost - 1 in each state (expected steps) -rewards - - true : 1; - -endrewards - -// any initial state (consider any possible initial configuration of tokens) -init - - true - -endinit +// herman's self stabilising algorithm [Her90] +// gxn/dxp 13/07/02 + +// the procotol is synchronous with no nondeterminism (a DTMC) +dtmc + +// module for process 1 +module process1 + + // Boolean variable for process 1 + x1 : [0..1]; + + [step] (x1=x13) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); + [step] !(x1=x13) -> (x1'=x13); + +endmodule + +// add further processes through renaming +module process2 = process1 [ x1=x2, x13=x1 ] endmodule +module process3 = process1 [ x1=x3, x13=x2 ] endmodule +module process4 = process1 [ x1=x4, x13=x3 ] endmodule +module process5 = process1 [ x1=x5, x13=x4 ] endmodule +module process6 = process1 [ x1=x6, x13=x5 ] endmodule +module process7 = process1 [ x1=x7, x13=x6 ] endmodule +module process8 = process1 [ x1=x8, x13=x7 ] endmodule +module process9 = process1 [ x1=x9, x13=x8 ] endmodule +module process10 = process1 [ x1=x10, x13=x9 ] endmodule +module process11 = process1 [ x1=x11, x13=x10 ] endmodule +module process12 = process1 [ x1=x12, x13=x11 ] endmodule +module process13 = process1 [ x1=x13, x13=x12 ] endmodule + +// cost - 1 in each state (expected number of steps) +rewards "steps" + + true : 1; + +endrewards + +// set of initial states: all (i.e. any possible initial configuration of tokens) +init true endinit + +// formula, for use in properties: number of tokens +// (i.e. number of processes that have the same value as the process to their left) +formula num_tokens = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x1?1:0); diff --git a/prism-examples/self-stabilisation/herman/herman15.pctl b/prism-examples/self-stabilisation/herman/herman15.pctl deleted file mode 100644 index d5a1a1b0..00000000 --- a/prism-examples/self-stabilisation/herman/herman15.pctl +++ /dev/null @@ -1,19 +0,0 @@ -const int k; - -// States with k tokens - where only k processes have the same value as the process to its left -label "k_tokens" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x14?1:0)+(x14=x15?1:0)+(x15=x1?1:0) = k; - -// Stable states - where only one process has a token -label "stable" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x14?1:0)+(x14=x15?1:0)+(x15=x1?1:0) = 1; - -// A stable state is reached with probability 1 -"init" => P>=1 [ true U "stable" ] - -// Maximum expected time to reach a stable state (for all configurations) -R=? [ F "stable" {"init"}{max} ] - -// Maximum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{max} ] - -// Minimum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{min} ] diff --git a/prism-examples/self-stabilisation/herman/herman15.pm b/prism-examples/self-stabilisation/herman/herman15.pm index 9381dde6..921aca1b 100644 --- a/prism-examples/self-stabilisation/herman/herman15.pm +++ b/prism-examples/self-stabilisation/herman/herman15.pm @@ -1,46 +1,46 @@ -// herman's self stabilising algorithm [Her90] -// gxn/dxp 13/07/02 - -// the procotol is synchronous with no non-determinism (a DTMC) -dtmc - -// module for process 1 -module process1 - - // Boolean variable for process 1 - x1 : [0..1]; - - [step] (x1=x15) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); - [step] !(x1=x15) -> (x1'=x15); - -endmodule - -// add further processes through renaming -module process2 = process1[x1=x2, x15=x1 ] endmodule -module process3 = process1[x1=x3, x15=x2 ] endmodule -module process4 = process1[x1=x4, x15=x3 ] endmodule -module process5 = process1[x1=x5, x15=x4 ] endmodule -module process6 = process1[x1=x6, x15=x5 ] endmodule -module process7 = process1[x1=x7, x15=x6 ] endmodule -module process8 = process1[x1=x8, x15=x7 ] endmodule -module process9 = process1[x1=x9, x15=x8 ] endmodule -module process10 = process1[x1=x10, x15=x9 ] endmodule -module process11 = process1[x1=x11, x15=x10 ] endmodule -module process12 = process1[x1=x12, x15=x11 ] endmodule -module process13 = process1[x1=x13, x15=x12 ] endmodule -module process14 = process1[x1=x14, x15=x13 ] endmodule -module process15 = process1[x1=x15, x15=x14 ] endmodule - -// cost - 1 in each state (expected steps) -rewards - - true : 1; - -endrewards - -// any initial state (consider any possible initial configuration of tokens) -init - - true - -endinit +// herman's self stabilising algorithm [Her90] +// gxn/dxp 13/07/02 + +// the procotol is synchronous with no nondeterminism (a DTMC) +dtmc + +// module for process 1 +module process1 + + // Boolean variable for process 1 + x1 : [0..1]; + + [step] (x1=x15) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); + [step] !(x1=x15) -> (x1'=x15); + +endmodule + +// add further processes through renaming +module process2 = process1 [ x1=x2, x15=x1 ] endmodule +module process3 = process1 [ x1=x3, x15=x2 ] endmodule +module process4 = process1 [ x1=x4, x15=x3 ] endmodule +module process5 = process1 [ x1=x5, x15=x4 ] endmodule +module process6 = process1 [ x1=x6, x15=x5 ] endmodule +module process7 = process1 [ x1=x7, x15=x6 ] endmodule +module process8 = process1 [ x1=x8, x15=x7 ] endmodule +module process9 = process1 [ x1=x9, x15=x8 ] endmodule +module process10 = process1 [ x1=x10, x15=x9 ] endmodule +module process11 = process1 [ x1=x11, x15=x10 ] endmodule +module process12 = process1 [ x1=x12, x15=x11 ] endmodule +module process13 = process1 [ x1=x13, x15=x12 ] endmodule +module process14 = process1 [ x1=x14, x15=x13 ] endmodule +module process15 = process1 [ x1=x15, x15=x14 ] endmodule + +// cost - 1 in each state (expected number of steps) +rewards "steps" + + true : 1; + +endrewards + +// set of initial states: all (i.e. any possible initial configuration of tokens) +init true endinit + +// formula, for use in properties: number of tokens +// (i.e. number of processes that have the same value as the process to their left) +formula num_tokens = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x14?1:0)+(x14=x15?1:0)+(x15=x1?1:0); diff --git a/prism-examples/self-stabilisation/herman/herman17.pctl b/prism-examples/self-stabilisation/herman/herman17.pctl deleted file mode 100644 index 481314e2..00000000 --- a/prism-examples/self-stabilisation/herman/herman17.pctl +++ /dev/null @@ -1,19 +0,0 @@ -const int k; - -// States with k tokens - where only k processes have the same value as the process to its left -label "k_tokens" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x14?1:0)+(x14=x15?1:0)+(x15=x16?1:0)+(x16=x17?1:0)+(x17=x1?1:0) = k; - -// Stable states - where only one process has a token -label "stable" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x14?1:0)+(x14=x15?1:0)+(x15=x16?1:0)+(x16=x17?1:0)+(x17=x1?1:0) = 1; - -// A stable state is reached with probability 1 -"init" => P>=1 [ true U "stable" ] - -// Maximum expected time to reach a stable state (for all configurations) -R=? [ F "stable" {"init"}{max} ] - -// Maximum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{max} ] - -// Minimum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{min} ] diff --git a/prism-examples/self-stabilisation/herman/herman17.pm b/prism-examples/self-stabilisation/herman/herman17.pm index f70db3fa..6bbdd937 100644 --- a/prism-examples/self-stabilisation/herman/herman17.pm +++ b/prism-examples/self-stabilisation/herman/herman17.pm @@ -1,48 +1,48 @@ -// herman's self stabilising algorithm [Her90] -// gxn/dxp 13/07/02 - -// the procotol is synchronous with no non-determinism (a DTMC) -dtmc - -// module for process 1 -module process1 - - // Boolean variable for process 1 - x1 : [0..1]; - - [step] (x1=x17) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); - [step] !(x1=x17) -> (x1'=x17); - -endmodule - -// add further processes through renaming -module process2 = process1[x1=x2, x17=x1 ] endmodule -module process3 = process1[x1=x3, x17=x2 ] endmodule -module process4 = process1[x1=x4, x17=x3 ] endmodule -module process5 = process1[x1=x5, x17=x4 ] endmodule -module process6 = process1[x1=x6, x17=x5 ] endmodule -module process7 = process1[x1=x7, x17=x6 ] endmodule -module process8 = process1[x1=x8, x17=x7 ] endmodule -module process9 = process1[x1=x9, x17=x8 ] endmodule -module process10 = process1[x1=x10, x17=x9 ] endmodule -module process11 = process1[x1=x11, x17=x10 ] endmodule -module process12 = process1[x1=x12, x17=x11 ] endmodule -module process13 = process1[x1=x13, x17=x12 ] endmodule -module process14 = process1[x1=x14, x17=x13 ] endmodule -module process15 = process1[x1=x15, x17=x14 ] endmodule -module process16 = process1[x1=x16, x17=x15 ] endmodule -module process17 = process1[x1=x17, x17=x16 ] endmodule - -// cost - 1 in each state (expected steps) -rewards - - true : 1; - -endrewards - -// any initial state (consider any possible initial configuration of tokens) -init - - true - -endinit +// herman's self stabilising algorithm [Her90] +// gxn/dxp 13/07/02 + +// the procotol is synchronous with no nondeterminism (a DTMC) +dtmc + +// module for process 1 +module process1 + + // Boolean variable for process 1 + x1 : [0..1]; + + [step] (x1=x17) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); + [step] !(x1=x17) -> (x1'=x17); + +endmodule + +// add further processes through renaming +module process2 = process1 [ x1=x2, x17=x1 ] endmodule +module process3 = process1 [ x1=x3, x17=x2 ] endmodule +module process4 = process1 [ x1=x4, x17=x3 ] endmodule +module process5 = process1 [ x1=x5, x17=x4 ] endmodule +module process6 = process1 [ x1=x6, x17=x5 ] endmodule +module process7 = process1 [ x1=x7, x17=x6 ] endmodule +module process8 = process1 [ x1=x8, x17=x7 ] endmodule +module process9 = process1 [ x1=x9, x17=x8 ] endmodule +module process10 = process1 [ x1=x10, x17=x9 ] endmodule +module process11 = process1 [ x1=x11, x17=x10 ] endmodule +module process12 = process1 [ x1=x12, x17=x11 ] endmodule +module process13 = process1 [ x1=x13, x17=x12 ] endmodule +module process14 = process1 [ x1=x14, x17=x13 ] endmodule +module process15 = process1 [ x1=x15, x17=x14 ] endmodule +module process16 = process1 [ x1=x16, x17=x15 ] endmodule +module process17 = process1 [ x1=x17, x17=x16 ] endmodule + +// cost - 1 in each state (expected number of steps) +rewards "steps" + + true : 1; + +endrewards + +// set of initial states: all (i.e. any possible initial configuration of tokens) +init true endinit + +// formula, for use in properties: number of tokens +// (i.e. number of processes that have the same value as the process to their left) +formula num_tokens = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x14?1:0)+(x14=x15?1:0)+(x15=x16?1:0)+(x16=x17?1:0)+(x17=x1?1:0); diff --git a/prism-examples/self-stabilisation/herman/herman19.pctl b/prism-examples/self-stabilisation/herman/herman19.pctl deleted file mode 100644 index 93fb30ce..00000000 --- a/prism-examples/self-stabilisation/herman/herman19.pctl +++ /dev/null @@ -1,19 +0,0 @@ -const int k; - -// States with k tokens - where only k processes have the same value as the process to its left -label "k_tokens" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x14?1:0)+(x14=x15?1:0)+(x15=x16?1:0)+(x16=x17?1:0)+(x17=x18?1:0)+(x18=x19?1:0)+(x19=x1?1:0) = k; - -// Stable states - where only one process has a token -label "stable" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x14?1:0)+(x14=x15?1:0)+(x15=x16?1:0)+(x16=x17?1:0)+(x17=x18?1:0)+(x18=x19?1:0)+(x19=x1?1:0) = 1; - -// A stable state is reached with probability 1 -"init" => P>=1 [ true U "stable" ] - -// Maximum expected time to reach a stable state (for all configurations) -R=? [ F "stable" {"init"}{max} ] - -// Maximum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{max} ] - -// Minimum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{min} ] diff --git a/prism-examples/self-stabilisation/herman/herman19.pm b/prism-examples/self-stabilisation/herman/herman19.pm index 157b54c3..8a0dcf6c 100644 --- a/prism-examples/self-stabilisation/herman/herman19.pm +++ b/prism-examples/self-stabilisation/herman/herman19.pm @@ -1,50 +1,50 @@ -// herman's self stabilising algorithm [Her90] -// gxn/dxp 13/07/02 - -// the procotol is synchronous with no non-determinism (a DTMC) -dtmc - -// module for process 1 -module process1 - - // Boolean variable for process 1 - x1 : [0..1]; - - [step] (x1=x19) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); - [step] !(x1=x19) -> (x1'=x19); - -endmodule - -// add further processes through renaming -module process2 = process1[x1=x2, x19=x1 ] endmodule -module process3 = process1[x1=x3, x19=x2 ] endmodule -module process4 = process1[x1=x4, x19=x3 ] endmodule -module process5 = process1[x1=x5, x19=x4 ] endmodule -module process6 = process1[x1=x6, x19=x5 ] endmodule -module process7 = process1[x1=x7, x19=x6 ] endmodule -module process8 = process1[x1=x8, x19=x7 ] endmodule -module process9 = process1[x1=x9, x19=x8 ] endmodule -module process10 = process1[x1=x10, x19=x9 ] endmodule -module process11 = process1[x1=x11, x19=x10 ] endmodule -module process12 = process1[x1=x12, x19=x11 ] endmodule -module process13 = process1[x1=x13, x19=x12 ] endmodule -module process14 = process1[x1=x14, x19=x13 ] endmodule -module process15 = process1[x1=x15, x19=x14 ] endmodule -module process16 = process1[x1=x16, x19=x15 ] endmodule -module process17 = process1[x1=x17, x19=x16 ] endmodule -module process18 = process1[x1=x18, x19=x17 ] endmodule -module process19 = process1[x1=x19, x19=x18 ] endmodule - -// cost - 1 in each state (expected steps) -rewards - - true : 1; - -endrewards - -// any initial state (consider any possible initial configuration of tokens) -init - - true - -endinit +// herman's self stabilising algorithm [Her90] +// gxn/dxp 13/07/02 + +// the procotol is synchronous with no nondeterminism (a DTMC) +dtmc + +// module for process 1 +module process1 + + // Boolean variable for process 1 + x1 : [0..1]; + + [step] (x1=x19) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); + [step] !(x1=x19) -> (x1'=x19); + +endmodule + +// add further processes through renaming +module process2 = process1 [ x1=x2, x19=x1 ] endmodule +module process3 = process1 [ x1=x3, x19=x2 ] endmodule +module process4 = process1 [ x1=x4, x19=x3 ] endmodule +module process5 = process1 [ x1=x5, x19=x4 ] endmodule +module process6 = process1 [ x1=x6, x19=x5 ] endmodule +module process7 = process1 [ x1=x7, x19=x6 ] endmodule +module process8 = process1 [ x1=x8, x19=x7 ] endmodule +module process9 = process1 [ x1=x9, x19=x8 ] endmodule +module process10 = process1 [ x1=x10, x19=x9 ] endmodule +module process11 = process1 [ x1=x11, x19=x10 ] endmodule +module process12 = process1 [ x1=x12, x19=x11 ] endmodule +module process13 = process1 [ x1=x13, x19=x12 ] endmodule +module process14 = process1 [ x1=x14, x19=x13 ] endmodule +module process15 = process1 [ x1=x15, x19=x14 ] endmodule +module process16 = process1 [ x1=x16, x19=x15 ] endmodule +module process17 = process1 [ x1=x17, x19=x16 ] endmodule +module process18 = process1 [ x1=x18, x19=x17 ] endmodule +module process19 = process1 [ x1=x19, x19=x18 ] endmodule + +// cost - 1 in each state (expected number of steps) +rewards "steps" + + true : 1; + +endrewards + +// set of initial states: all (i.e. any possible initial configuration of tokens) +init true endinit + +// formula, for use in properties: number of tokens +// (i.e. number of processes that have the same value as the process to their left) +formula num_tokens = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x14?1:0)+(x14=x15?1:0)+(x15=x16?1:0)+(x16=x17?1:0)+(x17=x18?1:0)+(x18=x19?1:0)+(x19=x1?1:0); diff --git a/prism-examples/self-stabilisation/herman/herman21.pctl b/prism-examples/self-stabilisation/herman/herman21.pctl deleted file mode 100644 index cd0d5bda..00000000 --- a/prism-examples/self-stabilisation/herman/herman21.pctl +++ /dev/null @@ -1,19 +0,0 @@ -const int k; - -// States with k tokens - where only k processes have the same value as the process to its left -label "k_tokens" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x14?1:0)+(x14=x15?1:0)+(x15=x16?1:0)+(x16=x17?1:0)+(x17=x18?1:0)+(x18=x19?1:0)+(x19=x20?1:0)+(x20=x21?1:0)+(x21=x1?1:0) = k; - -// Stable states - where only one process has a token -label "stable" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x14?1:0)+(x14=x15?1:0)+(x15=x16?1:0)+(x16=x17?1:0)+(x17=x18?1:0)+(x18=x19?1:0)+(x19=x20?1:0)+(x20=x21?1:0)+(x21=x1?1:0) = 1; - -// A stable state is reached with probability 1 -"init" => P>=1 [ true U "stable" ] - -// Maximum expected time to reach a stable state (for all configurations) -R=? [ F "stable" {"init"}{max} ] - -// Maximum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{max} ] - -// Minimum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{min} ] diff --git a/prism-examples/self-stabilisation/herman/herman21.pm b/prism-examples/self-stabilisation/herman/herman21.pm index 2f8d818e..81ace61a 100644 --- a/prism-examples/self-stabilisation/herman/herman21.pm +++ b/prism-examples/self-stabilisation/herman/herman21.pm @@ -1,52 +1,52 @@ -// herman's self stabilising algorithm [Her90] -// gxn/dxp 13/07/02 - -// the procotol is synchronous with no non-determinism (a DTMC) -dtmc - -// module for process 1 -module process1 - - // Boolean variable for process 1 - x1 : [0..1]; - - [step] (x1=x21) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); - [step] !(x1=x21) -> (x1'=x21); - -endmodule - -// add further processes through renaming -module process2 = process1[x1=x2, x21=x1 ] endmodule -module process3 = process1[x1=x3, x21=x2 ] endmodule -module process4 = process1[x1=x4, x21=x3 ] endmodule -module process5 = process1[x1=x5, x21=x4 ] endmodule -module process6 = process1[x1=x6, x21=x5 ] endmodule -module process7 = process1[x1=x7, x21=x6 ] endmodule -module process8 = process1[x1=x8, x21=x7 ] endmodule -module process9 = process1[x1=x9, x21=x8 ] endmodule -module process10 = process1[x1=x10, x21=x9 ] endmodule -module process11 = process1[x1=x11, x21=x10 ] endmodule -module process12 = process1[x1=x12, x21=x11 ] endmodule -module process13 = process1[x1=x13, x21=x12 ] endmodule -module process14 = process1[x1=x14, x21=x13 ] endmodule -module process15 = process1[x1=x15, x21=x14 ] endmodule -module process16 = process1[x1=x16, x21=x15 ] endmodule -module process17 = process1[x1=x17, x21=x16 ] endmodule -module process18 = process1[x1=x18, x21=x17 ] endmodule -module process19 = process1[x1=x19, x21=x18 ] endmodule -module process20 = process1[x1=x20, x21=x19 ] endmodule -module process21 = process1[x1=x21, x21=x20 ] endmodule - -// cost - 1 in each state (expected steps) -rewards - - true : 1; - -endrewards - -// any initial state (consider any possible initial configuration of tokens) -init - - true - -endinit +// herman's self stabilising algorithm [Her90] +// gxn/dxp 13/07/02 + +// the procotol is synchronous with no nondeterminism (a DTMC) +dtmc + +// module for process 1 +module process1 + + // Boolean variable for process 1 + x1 : [0..1]; + + [step] (x1=x21) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); + [step] !(x1=x21) -> (x1'=x21); + +endmodule + +// add further processes through renaming +module process2 = process1 [ x1=x2, x21=x1 ] endmodule +module process3 = process1 [ x1=x3, x21=x2 ] endmodule +module process4 = process1 [ x1=x4, x21=x3 ] endmodule +module process5 = process1 [ x1=x5, x21=x4 ] endmodule +module process6 = process1 [ x1=x6, x21=x5 ] endmodule +module process7 = process1 [ x1=x7, x21=x6 ] endmodule +module process8 = process1 [ x1=x8, x21=x7 ] endmodule +module process9 = process1 [ x1=x9, x21=x8 ] endmodule +module process10 = process1 [ x1=x10, x21=x9 ] endmodule +module process11 = process1 [ x1=x11, x21=x10 ] endmodule +module process12 = process1 [ x1=x12, x21=x11 ] endmodule +module process13 = process1 [ x1=x13, x21=x12 ] endmodule +module process14 = process1 [ x1=x14, x21=x13 ] endmodule +module process15 = process1 [ x1=x15, x21=x14 ] endmodule +module process16 = process1 [ x1=x16, x21=x15 ] endmodule +module process17 = process1 [ x1=x17, x21=x16 ] endmodule +module process18 = process1 [ x1=x18, x21=x17 ] endmodule +module process19 = process1 [ x1=x19, x21=x18 ] endmodule +module process20 = process1 [ x1=x20, x21=x19 ] endmodule +module process21 = process1 [ x1=x21, x21=x20 ] endmodule + +// cost - 1 in each state (expected number of steps) +rewards "steps" + + true : 1; + +endrewards + +// set of initial states: all (i.e. any possible initial configuration of tokens) +init true endinit + +// formula, for use in properties: number of tokens +// (i.e. number of processes that have the same value as the process to their left) +formula num_tokens = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x10?1:0)+(x10=x11?1:0)+(x11=x12?1:0)+(x12=x13?1:0)+(x13=x14?1:0)+(x14=x15?1:0)+(x15=x16?1:0)+(x16=x17?1:0)+(x17=x18?1:0)+(x18=x19?1:0)+(x19=x20?1:0)+(x20=x21?1:0)+(x21=x1?1:0); diff --git a/prism-examples/self-stabilisation/herman/herman3.pm b/prism-examples/self-stabilisation/herman/herman3.pm index ad1ab5cd..9684125d 100644 --- a/prism-examples/self-stabilisation/herman/herman3.pm +++ b/prism-examples/self-stabilisation/herman/herman3.pm @@ -1,34 +1,34 @@ -// herman's self stabilising algorithm [Her90] -// gxn/dxp 13/07/02 - -// the procotol is synchronous with no non-determinism (a DTMC) -dtmc - -// module for process 1 -module process1 - - // Boolean variable for process 1 - x1 : [0..1]; - - [step] (x1=x3) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); - [step] !(x1=x3) -> (x1'=x3); - -endmodule - -// add further processes through renaming -module process2 = process1[x1=x2, x3=x1 ] endmodule -module process3 = process1[x1=x3, x3=x2 ] endmodule - -// cost - 1 in each state (expected steps) -rewards - - true : 1; - -endrewards - -// any initial state (consider any possible initial configuration of tokens) -init - - true - -endinit +// herman's self stabilising algorithm [Her90] +// gxn/dxp 13/07/02 + +// the procotol is synchronous with no nondeterminism (a DTMC) +dtmc + +// module for process 1 +module process1 + + // Boolean variable for process 1 + x1 : [0..1]; + + [step] (x1=x3) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); + [step] !(x1=x3) -> (x1'=x3); + +endmodule + +// add further processes through renaming +module process2 = process1 [ x1=x2, x3=x1 ] endmodule +module process3 = process1 [ x1=x3, x3=x2 ] endmodule + +// cost - 1 in each state (expected number of steps) +rewards "steps" + + true : 1; + +endrewards + +// set of initial states: all (i.e. any possible initial configuration of tokens) +init true endinit + +// formula, for use in properties: number of tokens +// (i.e. number of processes that have the same value as the process to their left) +formula num_tokens = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x1?1:0); diff --git a/prism-examples/self-stabilisation/herman/herman5.pctl b/prism-examples/self-stabilisation/herman/herman5.pctl deleted file mode 100644 index 34cf5eaa..00000000 --- a/prism-examples/self-stabilisation/herman/herman5.pctl +++ /dev/null @@ -1,19 +0,0 @@ -const int k; - -// States with k tokens - where only k processes have the same value as the process to its left -label "k_tokens" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x1?1:0) = k; - -// Stable states - where only one process has a token -label "stable" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x1?1:0) = 1; - -// A stable state is reached with probability 1 -"init" => P>=1 [ true U "stable" ] - -// Maximum expected time to reach a stable state (for all configurations) -R=? [ F "stable" {"init"}{max} ] - -// Maximum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{max} ] - -// Minimum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{min} ] diff --git a/prism-examples/self-stabilisation/herman/herman5.pm b/prism-examples/self-stabilisation/herman/herman5.pm index 2113907d..114fc367 100644 --- a/prism-examples/self-stabilisation/herman/herman5.pm +++ b/prism-examples/self-stabilisation/herman/herman5.pm @@ -1,36 +1,36 @@ -// herman's self stabilising algorithm [Her90] -// gxn/dxp 13/07/02 - -// the procotol is synchronous with no non-determinism (a DTMC) -dtmc - -// module for process 1 -module process1 - - // Boolean variable for process 1 - x1 : [0..1]; - - [step] (x1=x5) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); - [step] !(x1=x5) -> (x1'=x5); - -endmodule - -// add further processes through renaming -module process2 = process1[x1=x2, x5=x1 ] endmodule -module process3 = process1[x1=x3, x5=x2 ] endmodule -module process4 = process1[x1=x4, x5=x3 ] endmodule -module process5 = process1[x1=x5, x5=x4 ] endmodule - -// cost - 1 in each state (expected steps) -rewards - - true : 1; - -endrewards - -// any initial state (consider any possible initial configuration of tokens) -init - - true - -endinit +// herman's self stabilising algorithm [Her90] +// gxn/dxp 13/07/02 + +// the procotol is synchronous with no nondeterminism (a DTMC) +dtmc + +// module for process 1 +module process1 + + // Boolean variable for process 1 + x1 : [0..1]; + + [step] (x1=x5) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); + [step] !(x1=x5) -> (x1'=x5); + +endmodule + +// add further processes through renaming +module process2 = process1 [ x1=x2, x5=x1 ] endmodule +module process3 = process1 [ x1=x3, x5=x2 ] endmodule +module process4 = process1 [ x1=x4, x5=x3 ] endmodule +module process5 = process1 [ x1=x5, x5=x4 ] endmodule + +// cost - 1 in each state (expected number of steps) +rewards "steps" + + true : 1; + +endrewards + +// set of initial states: all (i.e. any possible initial configuration of tokens) +init true endinit + +// formula, for use in properties: number of tokens +// (i.e. number of processes that have the same value as the process to their left) +formula num_tokens = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x1?1:0); diff --git a/prism-examples/self-stabilisation/herman/herman7.pctl b/prism-examples/self-stabilisation/herman/herman7.pctl deleted file mode 100644 index ce111a9f..00000000 --- a/prism-examples/self-stabilisation/herman/herman7.pctl +++ /dev/null @@ -1,19 +0,0 @@ -const int k; - -// States with k tokens - where only k processes have the same value as the process to its left -label "k_tokens" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x1?1:0) = k; - -// Stable states - where only one process has a token -label "stable" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x1?1:0) = 1; - -// A stable state is reached with probability 1 -"init" => P>=1 [ true U "stable" ] - -// Maximum expected time to reach a stable state (for all configurations) -R=? [ F "stable" {"init"}{max} ] - -// Maximum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{max} ] - -// Minimum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{min} ] diff --git a/prism-examples/self-stabilisation/herman/herman7.pm b/prism-examples/self-stabilisation/herman/herman7.pm index 68564101..a18f39ca 100644 --- a/prism-examples/self-stabilisation/herman/herman7.pm +++ b/prism-examples/self-stabilisation/herman/herman7.pm @@ -1,38 +1,38 @@ -// herman's self stabilising algorithm [Her90] -// gxn/dxp 13/07/02 - -// the procotol is synchronous with no non-determinism (a DTMC) -dtmc - -// module for process 1 -module process1 - - // Boolean variable for process 1 - x1 : [0..1]; - - [step] (x1=x7) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); - [step] !(x1=x7) -> (x1'=x7); - -endmodule - -// add further processes through renaming -module process2 = process1[x1=x2, x7=x1 ] endmodule -module process3 = process1[x1=x3, x7=x2 ] endmodule -module process4 = process1[x1=x4, x7=x3 ] endmodule -module process5 = process1[x1=x5, x7=x4 ] endmodule -module process6 = process1[x1=x6, x7=x5 ] endmodule -module process7 = process1[x1=x7, x7=x6 ] endmodule - -// cost - 1 in each state (expected steps) -rewards - - true : 1; - -endrewards - -// any initial state (consider any possible initial configuration of tokens) -init - - true - -endinit +// herman's self stabilising algorithm [Her90] +// gxn/dxp 13/07/02 + +// the procotol is synchronous with no nondeterminism (a DTMC) +dtmc + +// module for process 1 +module process1 + + // Boolean variable for process 1 + x1 : [0..1]; + + [step] (x1=x7) -> 0.5 : (x1'=0) + 0.5 : (x1'=1); + [step] !(x1=x7) -> (x1'=x7); + +endmodule + +// add further processes through renaming +module process2 = process1 [ x1=x2, x7=x1 ] endmodule +module process3 = process1 [ x1=x3, x7=x2 ] endmodule +module process4 = process1 [ x1=x4, x7=x3 ] endmodule +module process5 = process1 [ x1=x5, x7=x4 ] endmodule +module process6 = process1 [ x1=x6, x7=x5 ] endmodule +module process7 = process1 [ x1=x7, x7=x6 ] endmodule + +// cost - 1 in each state (expected number of steps) +rewards "steps" + + true : 1; + +endrewards + +// set of initial states: all (i.e. any possible initial configuration of tokens) +init true endinit + +// formula, for use in properties: number of tokens +// (i.e. number of processes that have the same value as the process to their left) +formula num_tokens = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x1?1:0); diff --git a/prism-examples/self-stabilisation/herman/herman9.pctl b/prism-examples/self-stabilisation/herman/herman9.pctl deleted file mode 100644 index 4d5a0530..00000000 --- a/prism-examples/self-stabilisation/herman/herman9.pctl +++ /dev/null @@ -1,19 +0,0 @@ -const int k; - -// States with k tokens - where only k processes have the same value as the process to its left -label "k_tokens" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x1?1:0) = k; - -// Stable states - where only one process has a token -label "stable" = (x1=x2?1:0)+(x2=x3?1:0)+(x3=x4?1:0)+(x4=x5?1:0)+(x5=x6?1:0)+(x6=x7?1:0)+(x7=x8?1:0)+(x8=x9?1:0)+(x9=x1?1:0) = 1; - -// A stable state is reached with probability 1 -"init" => P>=1 [ true U "stable" ] - -// Maximum expected time to reach a stable state (for all configurations) -R=? [ F "stable" {"init"}{max} ] - -// Maximum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{max} ] - -// Minimum expected time to reach a stable state (for all k-token configurations) -R=? [ F "stable" {"k_tokens"}{min} ]