Reactive Systems: Modelling, Specification and Verification - Cs.ioc.ee
Reactive Systems: Modelling, Specification and Verification - Cs.ioc.ee
Reactive Systems: Modelling, Specification and Verification - Cs.ioc.ee
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
7.2. SPECIFYING MUTUAL EXCLUSION USING CCS ITSELF 167<br />
Note that the collection of weak traces coincides with that of traces for processes<br />
that, like MutexSpec, do not afford internal transitions. (Why?)<br />
We claim that the processes Peterson <strong>and</strong> MutexSpec are weak trace equivalent,<br />
<strong>and</strong> therefore that Peterson does m<strong>ee</strong>t our specification of mutual exclusion modulo<br />
weak trace equivalence. This can be checked automatically using the comm<strong>and</strong><br />
mayeq provided by the CWB. (Do so!) This equivalence tells us that not only each<br />
weak trace of process Peterson is allowed by the specification MutexSpec, but also<br />
that process Peterson can exhibit as a weak trace each of the traces permitted by<br />
the specification.<br />
If we are just satisfied with checking the pure safety condition that no trace<br />
of process Peterson violates the mutual exclusion property, then it suffices only to<br />
show that Peterson is a weak trace approximation of MutexSpec. A useful proof<br />
technique that can be used to establish this result is given by the notion of weak<br />
simulation. (Compare with the notion of simulation defined in Exercise 3.17.)<br />
Definition 7.2 [Weak simulation] Let us say that a binary relation R over the set<br />
of states of an LTS is a weak simulation iff whenever s1 R s2 <strong>and</strong> α is an action<br />
(including τ):<br />
- if s1 α → s ′ 1 , then there is a transition s2 α ⇒ s ′ 2 such that s′ 1 R s′ 2 .<br />
We say that s ′ weakly simulates s iff there is a weak simulation R with s R s ′ . <br />
Proposition 7.1 For all states s, s ′ , s ′′ in a labelled transition system, the following<br />
statements hold.<br />
1. State s weakly simulates itself.<br />
2. If s ′ weakly simulates s, <strong>and</strong> s ′′ weakly simulates s ′ , then s ′′ weakly simulates<br />
s.<br />
3. If s ′ weakly simulates s, then each weak trace of s is also a weak trace of s ′ .<br />
In light of the above proposition, to show that Peterson is a weak trace approximation<br />
of MutexSpec, it suffices only to build a weak simulation that relates Peterson<br />
with MutexSpec. The existence of such a weak simulation can be checked using<br />
the comm<strong>and</strong> pre offered by the CWB. (Do so!)<br />
Exercise 7.8 Prove Proposition 7.1. <br />
Exercise 7.9 Assume that s ′ weakly simulates s, <strong>and</strong> s weakly simulates s ′ . Is it<br />
true that s <strong>and</strong> s ′ are observationally equivalent? Argue for your answer.