14.08.2013 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.2. TRACE EQUIVALENCE: A FIRST ATTEMPT 41<br />

Taking the point of view of st<strong>and</strong>ard automata theory, <strong>and</strong> abstracting from the notion<br />

of ‘accept state’ that is missing altogether in our treatment, an automaton may<br />

be completely identified by its set of traces, <strong>and</strong> thus two processes are equivalent<br />

if, <strong>and</strong> only if, they afford the same traces.<br />

This point of view is totally justified <strong>and</strong> natural if we view our LTSs as nondeterministic<br />

devices that may generate or accept sequences of actions. However,<br />

is it still a reasonable one if we view our automata as reactive machines that interact<br />

with their environment?<br />

To answer this questions, consider the coff<strong>ee</strong> <strong>and</strong> tea machine CTM defined in<br />

equation 2.2 on page 11, <strong>and</strong> compare it with the following one:<br />

CTM ′ def<br />

= coin.coff<strong>ee</strong>.CTM ′ + coin.tea.CTM ′ . (3.2)<br />

You should be able to convince yourselves that CTM <strong>and</strong> CTM ′ afford the same<br />

traces. (Do so!) However, if you were a user of the coff<strong>ee</strong> <strong>and</strong> tea machine who<br />

wants coff<strong>ee</strong> <strong>and</strong> hates tea, which machine would you like to interact with? We<br />

certainly would prefer to interact with CTM as that machine will give us coff<strong>ee</strong><br />

after receiving a coin, whereas CTM ′ may refuse to deliver coff<strong>ee</strong> after having<br />

accepted our coin!<br />

This informal discussion may be directly formalized within CCS by assuming<br />

that the behaviour of the coff<strong>ee</strong> starved user is described by the process<br />

Consider now the terms<br />

<strong>and</strong><br />

CA def<br />

= coin.coff<strong>ee</strong>.CA .<br />

(CA | CTM) \ {coin, coff<strong>ee</strong>, tea}<br />

(CA | CTM ′ ) \ {coin, coff<strong>ee</strong>, tea}<br />

that we obtain by forcing interaction betw<strong>ee</strong>n the coff<strong>ee</strong> addict CA <strong>and</strong> the two<br />

vending machines. Using the SOS rules for CCS, you should convince yourselves<br />

that the former term can only perform an infinite computation consisting of τlabelled<br />

transitions, whereas the second term can deadlock thus:<br />

(CA | CTM ′ ) \ {coin, coff<strong>ee</strong>, tea} τ → (coff<strong>ee</strong>.CA | tea.CTM ′ ) \ {coin, coff<strong>ee</strong>, tea} .<br />

Note that the target term of this transition captures precisely the deadlock situation<br />

that we intuitively expected to have, namely that the user only wants coff<strong>ee</strong>, but<br />

the machine is only willing to deliver tea. So trace equivalent terms may exhibit

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!