07.01.2013 Views

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

180 Machiel van der Bijl and Fabien Peureux<br />

implementation does not implement coffee as an output. It is still correct, because<br />

the set of traces of the implementation is a subset of the set of traces of the<br />

specification, even with the trace button·button·button ∗ ·coffee·button ∗ miss<strong>in</strong>g.<br />

External trace <strong>in</strong>clusion is not a very realistic implementation relation, because<br />

it also approves implementations that are <strong>in</strong>tuitively <strong>in</strong>correct. For example, the<br />

implementation on the right only implements the push<strong>in</strong>g of the button, without<br />

serv<strong>in</strong>g any dr<strong>in</strong>k. This is correct, because the set of traces button·button·button ∗<br />

is a subset of the external traces of the specification.<br />

q4<br />

s<br />

q1<br />

q2<br />

?button<br />

?button<br />

q3 ?button<br />

!coffee !tea<br />

q5<br />

?button ?button<br />

i1<br />

q1<br />

q2<br />

q3<br />

q4<br />

?button<br />

?button<br />

!tea<br />

?button<br />

?button<br />

Fig. 7.2. Example of the external trace <strong>in</strong>clusion preorder<br />

i2<br />

q1<br />

q2<br />

q3<br />

?button<br />

?button<br />

?button<br />

Lynch and Tuttle <strong>in</strong>troduced the notion of fair execution for IOA. Remember<br />

that IOA are (strong) <strong>in</strong>put enabled. This means that an <strong>in</strong>f<strong>in</strong>ite stream of <strong>in</strong>put<br />

actions can prevent an output or <strong>in</strong>ternal action from occurr<strong>in</strong>g. Intuitively the<br />

idea beh<strong>in</strong>d fair execution is that locally controlled actions cannot be blocked<br />

by <strong>in</strong>put actions for ever. This is expressed formally <strong>in</strong> the def<strong>in</strong>ition below.<br />

The def<strong>in</strong>ition uses the concept of quiescent executions. Similar to transition<br />

systems, for IOA an execution is quiescent if it ends <strong>in</strong> a quiescent state, i.e.,<br />

a state that can only perform <strong>in</strong>put actions (so no locally controlled actions).<br />

A quiescent trace, is a trace that leads to a quiescent state. The set of quiescent<br />

traces is the set of f<strong>in</strong>ite external traces that lead to a quiescent state :<br />

qtraces(p) ={σ ∈ etraces ∗ p ∗ |∃q ∈ states(p) :p σ<br />

=⇒ q ∧ enabled(q) =<strong>in</strong>(p)}.<br />

An execution α of an IOA p is fair if either α is quiescent or α is <strong>in</strong>f<strong>in</strong>ite<br />

and for each class c ∈ part(p) either actions from c occur <strong>in</strong>f<strong>in</strong>itely often <strong>in</strong> α<br />

or states from which no action from c is enabled appear <strong>in</strong>f<strong>in</strong>itely often <strong>in</strong> α. A<br />

fair trace of an IOA p is the external trace of a fair execution of p. Thesetof<br />

fair traces of an IOA p is denoted by ftraces(p). Given the notion of fair traces<br />

we can def<strong>in</strong>e a preorder over the sets of fair traces of IOA.<br />

Def<strong>in</strong>ition 7.7 (Fair preorder). Given two IOA’s i and s with the same external<br />

action signature, the fair preorder is def<strong>in</strong>ed as:<br />

i ⊑F s ⇔ ftraces(i) ⊆ ftraces(s).<br />

We will give examples of the fair preorder a little later <strong>in</strong> this section, because<br />

we first want to <strong>in</strong>troduce a preorder that is strongly related to the fair preorder,

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

Saved successfully!

Ooh no, something went wrong!