OTS/CafeOBJ method
Assume that many agents (or processes) are competting for a common resource, but that at any given moment of time only one agent can use the resource. That is, the agents exclude or prevent each other from accessing the resource. A protocol that can gurantee this kind of mutual-exclusion property is called a mutual exclusion protocol (slides).
QLOCK |- ceq top(sq(S:Sys))= I:X$Pid if pc(S:Sys,I:X$Pid)= cs [nonexec] ;
See qinv.maude for the full proof.
GOAL |- ceq I:X$Pid = J:X$Pid if pc(S:Sys,I:X$Pid)= cs /\ pc(S:Sys,J:X$Pid)= cs ;
See qgoal.maude for the full proof.