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.
 
 
 
 
 
 

4 lines
650 B

label "hungry" = ((p1>0) & (p1<8)) | ((p2>0) & (p2<8)) | ((p3>0) & (p3<8)) | ((p4>0) & (p4<8)) | ((p5>0) & (p5<8)) | ((p6>0) & (p6<8)) | ((p7>0) & (p7<8)) | ((p8>0) & (p8<8)) | ((p9>0) & (p9<8)) | ((p10>0) & (p10<8)) | ((p11>0) & (p11<8)) | ((p12>0) & (p12<8)) | ((p13>0) & (p13<8)) | ((p14>0) & (p14<8)) | ((p15>0) & (p15<8));
label "eat" = (p1=8..9) | (p2=8..9) | (p3=8..9) | (p4=8..9) | (p5=8..9) | (p6=8..9) | (p7=8..9) | (p8=8..9) | (p9=8..9) | (p10=8..9) | (p11=8..9) | (p12=8..9) | (p13=8..9) | (p14=8..9) | (p15=8..9);
// liveness (if a philosopher is hungry then eventually some philosopher eats)
"hungry" => P>=1 [ true U "eat"]