--- Kshemkalyani and Singhal (p. 6) lists the requirements of a mutual exclusion algorithm:
--- * Safety Property: At any instant, only one process can execute the critical section.
--- * Liveness Property: This property states the absence of deadlock and starvation. Two or more sites should not endlessly wait for messages which will never arrive.
--- * Fairness: Each process gets a fair chance to execute the CS. Fairness property generally means the CS execution requests are executed in the order of their arrival (time is determined by a logical clock) in the system.
--- Check the mutual exclusion property
--- Check the mutual exclusion property
red modelCheck(init, []~ twoInCritSec) .
red modelCheck(init, []~ twoInCritSec) .
--- Expected: true
--- Expected: true
...
@@ -13,5 +18,7 @@ red modelCheck(init, []~ twoInCritSec) .
...
@@ -13,5 +18,7 @@ red modelCheck(init, []~ twoInCritSec) .
red modelCheck(init, <>[]~ hasUnsentMessages) .
red modelCheck(init, <>[]~ hasUnsentMessages) .
--- Expected: true
--- Expected: true
--- Check for another watered-down version of strong liveness.
--- Check for fairness.
red modelCheck(init, []()) .
red modelCheck(init, (<> isExhausted) -> [] ~ isUnfair) .