Token-Ring for Distributed Mutex

This example provides a formal specification of the Token-Ring algorithm for distributed mutual exclusion. Processes are arranged in a logical ring, and a unique token circulates among them, granting exclusive access to the critical section to the token holder.

Verification

This example studies a Token-Ring mutual-exclusion specification using symbolic constrained patterns.

DM-Check is used to analyze a candidate invariant under the transition rules and to relate that invariant to the safety property expressed by the example.

The downloadable files contain the exact symbolic sets and queries used in the verification and should be consulted for the precise result.

Run it

Extract the DM-Check archive and, from that folder, replay the whole case study with its script:

$ maude -allow-files
Maude> load examples/token-ring/token-ring.maude
Maude> load dm-check.maude

DM-Check> load examples/token-ring/token-ring.dmc

The script selects the module TOKEN-RING, prints every command before running it, and stops at the end of the file or at the first command that cannot be parsed or executed. To follow the proof step by step, type the commands one by one at the prompt instead. See Install, step 5 for the script format.

The two proof obligations left by the empty commands are discharged with NuITP. From the same folder, in a new Maude session, run its script:

$ maude -allow-files
Maude> load examples/token-ring/token-ring.maude
Maude> load NuITP.maude
Maude> erew in NuITP : init .

NuITP> load examples/token-ring/token-ring.nuitp