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.

24 lines
527 B

  1. dtmc
  2. module die
  3. // local state
  4. s : [0..7] init 0;
  5. // value of the dice
  6. d : [0..6] init 0;
  7. [] s=0 -> 0.5 : (s'=1) + 0.5 : (s'=2);
  8. [] s=1 -> 0.5 : (s'=3) + 0.5 : (s'=4);
  9. [] s=2 -> 0.5 : (s'=5) + 0.5 : (s'=6);
  10. [] s=3 -> 0.5 : (s'=1) + 0.5 : (s'=7) & (d'=1);
  11. [] s=4 -> 0.5 : (s'=7) & (d'=2) + 0.5 : (s'=7) & (d'=3);
  12. [] s=5 -> 0.5 : (s'=7) & (d'=4) + 0.5 : (s'=7) & (d'=5);
  13. [] s=6 -> 0.5 : (s'=2) + 0.5 : (s'=7) & (d'=6);
  14. [] s=7 -> 1 : (s'=7);
  15. endmodule
  16. rewards "coin_flips"
  17. [] s<7 : 1;
  18. s>3 : 1;
  19. endrewards
  20. label test = s>2;