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.

38 lines
1002 B

2 months ago
  1. dtmc
  2. const double p;
  3. module test
  4. // local state
  5. s : [0..5] init 0;
  6. [] s=0 -> 0.4*p : (s'=1) + (1-p) : (s'=2) + 0.6*p : (s'=3);
  7. [] s=1 -> 0.5*p : (s'=4) + 0.5*p : (s'=3) + (1-p) : (s'=5);
  8. [] s=2 -> 0.3*p : (s'=4) + (1-0.3*p) : (s'=5);
  9. [] s=3 -> 0.7*p : (s'=4) + (1-0.7*p) : (s'=5);
  10. [] s=4 -> 1 : (s'=4);
  11. [] s=5 -> 1 : (s'=5);
  12. endmodule
  13. // Dot output:
  14. //digraph model {
  15. // 0 [ label = "0: {init}" ];
  16. // 1 [ label = "1: {}" ];
  17. // 2 [ label = "2: {}" ];
  18. // 3 [ label = "3: {}" ];
  19. // 4 [ label = "4: {}" ];
  20. // 5 [ label = "5: {}" ];
  21. // 0 -> 1 [ label= "(2 * (p))/(5)" ];
  22. // 0 -> 2 [ label= "(-1 * (p+(-1)))/(1)" ];
  23. // 0 -> 3 [ label= "(3 * (p))/(5)" ];
  24. // 1 -> 3 [ label= "(p)/(2)" ];
  25. // 1 -> 4 [ label= "(p)/(2)" ];
  26. // 1 -> 5 [ label= "(-1 * (p+(-1)))/(1)" ];
  27. // 2 -> 4 [ label= "(3 * (p))/(10)" ];
  28. // 2 -> 5 [ label= "(-1 * (3*p+(-10)))/(10)" ];
  29. // 3 -> 4 [ label= "(7 * (p))/(10)" ];
  30. // 3 -> 5 [ label= "(-1 * (7*p+(-10)))/(10)" ];
  31. // 4 -> 4 [ label= "1" ];
  32. // 5 -> 5 [ label= "1" ];
  33. //}