You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
406 B

  1. // sum of two dice as the asynchronous parallel composition of
  2. // two copies of Knuth's model of a fair die using only fair coins
  3. mdp
  4. module simple
  5. // local state
  6. s : [0..2] init 0;
  7. [A] s=0 -> 0.2 : (s'=1) + 0.8 : (s'=0);
  8. [B] s=0 -> 1 : (s'=2);
  9. [] s>0 -> 1 : (s'=s);
  10. endmodule
  11. rewards "actA"
  12. [A] true : 1;
  13. endrewards
  14. rewards "actB"
  15. [B] true : 2;
  16. endrewards
  17. label "a" = s=1;
  18. label "b" = s=2;