Browse Source

Few more fixes in examples re new semantics.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3091 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 15 years ago
parent
commit
7ca4244890
  1. 12
      prism-examples/leader/asynchronous/leader.pctl
  2. 6
      prism-examples/leader/synchronous/leader.pctl
  3. 2
      prism-examples/self-stabilisation/beauquier/beauquier.pctl
  4. 2
      prism-examples/self-stabilisation/herman/herman.pctl
  5. 2
      prism-examples/self-stabilisation/israeli-jalfon/ij.pctl

12
prism-examples/leader/asynchronous/leader.pctl

@ -1,12 +1,14 @@
// only one leader is elected // only one leader is elected
leaders<=1
fiter(forall, leaders<=1)
// with probability 1 eventually a leader is elected // with probability 1 eventually a leader is elected
P>=1 [ F "elected" ] P>=1 [ F "elected" ]
// min/max probability leader is elected within K steps // min/max probability leader is elected within K steps
const int K; const int K;
Pmin=?[ F<=K "elected" ]
Pmax=?[ F<=K "elected" ]
Pmin=? [ F<=K "elected" ]
Pmax=? [ F<=K "elected" ]
// the min/max expected time to elect a leader // the min/max expected time to elect a leader
Rmin=?[ F "elected" ]
Rmax=?[ F "elected" ]
Rmin=? [ F "elected" ]
Rmax=? [ F "elected" ]

6
prism-examples/leader/synchronous/leader.pctl

@ -1,10 +1,10 @@
const int L; const int L;
// Probability that a leader is eventually elected // Probability that a leader is eventually elected
P=? [ F "elected" ]
P=? [ F "elected" ]
// Probability that a leader is elected within L rounds // Probability that a leader is elected within L rounds
P=? [ F<=(L*(N+1)) "elected" ] P=? [ F<=(L*(N+1)) "elected" ]
// Expected time (num. rounds) to elect a leader // Expected time (num. rounds) to elect a leader
R{"num_rounds"}=? [ F "elected" ] R{"num_rounds"}=? [ F "elected" ]

2
prism-examples/self-stabilisation/beauquier/beauquier.pctl

@ -6,7 +6,7 @@ label "k_tokens" = num_tokens=k; // configurations with k tokens
label "stable" = num_tokens=1; // stable configurations (1 token) label "stable" = num_tokens=1; // stable configurations (1 token)
// From any configuration, a stable configuration is reached with probability 1 // From any configuration, a stable configuration is reached with probability 1
filter(forall, P>=1 [ F "stable" ], "init")
filter(forall, "init" => P>=1 [ F "stable" ])
// Maximum expected time to reach a stable configuration (for all configurations) // Maximum expected time to reach a stable configuration (for all configurations)
Rmax=? [ F "stable" {"init"}{max} ] Rmax=? [ F "stable" {"init"}{max} ]

2
prism-examples/self-stabilisation/herman/herman.pctl

@ -5,7 +5,7 @@ const int K; // number of steps
label "k_tokens" = num_tokens=k; // configurations with k tokens label "k_tokens" = num_tokens=k; // configurations with k tokens
// From any configuration, a stable configuration is reached with probability 1 // From any configuration, a stable configuration is reached with probability 1
filter(forall, P>=1 [ F "stable" ], "init")
filter(forall, "init" => P>=1 [ F "stable" ])
// Maximum expected time to reach a stable configuration (for all configurations) // Maximum expected time to reach a stable configuration (for all configurations)
R=? [ F "stable" {"init"}{max} ] R=? [ F "stable" {"init"}{max} ]

2
prism-examples/self-stabilisation/israeli-jalfon/ij.pctl

@ -5,7 +5,7 @@ const int K; // number of steps
label "k_tokens" = num_tokens=k; // configurations with k tokens label "k_tokens" = num_tokens=k; // configurations with k tokens
// From any configuration, a stable configuration is reached with probability 1 // From any configuration, a stable configuration is reached with probability 1
filter(forall, P>=1 [ F "stable" ], "init")
filter(forall, "init" => P>=1 [ F "stable" ])
// Maximum expected time to reach a stable configuration (for all configurations) // Maximum expected time to reach a stable configuration (for all configurations)
Rmax=? [ F "stable" {"init"}{max} ] Rmax=? [ F "stable" {"init"}{max} ]

Loading…
Cancel
Save