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.

22 lines
366 B

  1. // A simple model using synchronization
  2. dtmc
  3. module generator
  4. s : [0..2] init 0;
  5. [] s=0 -> 0.2 : (s'=1) + 0.8 : (s'=0);
  6. [yield] s=1 -> 1 : (s'=2);
  7. [] s=2 -> 0.5 : (s'=0) + 0.5 : (s'=2);
  8. endmodule
  9. module consumer
  10. t : [0..2] init 0;
  11. [] t=0 -> 0.8 : (t'=1) + 0.2 : (t'=0);
  12. [yield] t=1 -> 1 : (t'=2);
  13. [] t=2 -> 0.2 : (t'=0) + 0.8 : (t'=2);
  14. endmodule