Advertisement
Guest User

Untitled

a guest
May 30th, 2016
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MODULE main
  2. VAR
  3.   k: 10..10;
  4.   m0: process bottom(m5, k);
  5.   m1: process machine(m0, k);
  6.   m2: process machine(m1, k);
  7.   m3: process machine(m2, k);
  8.   m4: process machine(m3, k);
  9.   m5: process machine(m4, k);
  10. SPEC
  11.   AG AF( (m0.s = m1.s) & (m1.s = m2.s) & (m2.s = m3.s) & (m3.s = m4.s) & (m4.s = m5.s) )
  12.  
  13. MODULE machine(l, k)
  14. VAR
  15.   s: 0..k;
  16. ASSIGN
  17.   init(s) := 0;
  18.   next(s) := case
  19.            !(l.s = s) : l.s;
  20.            TRUE : s;
  21.            esac;
  22. FAIRNESS running
  23. SPEC
  24.    AG AF ( l.s != s )
  25.  
  26. MODULE bottom(l, k)
  27. VAR
  28.   s: 0..k;
  29. ASSIGN
  30.   init(s) := 0;
  31.   next(s) := case
  32.             (l.s = s) : (s+1) mod k;
  33.             TRUE : s;
  34.             esac;
  35. FAIRNESS running
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement