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

Create successful ePaper yourself

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

7 I/O-automata Based Test<strong>in</strong>g 179<br />

specification. Several implementation relations have been def<strong>in</strong>ed for the automata<br />

that were <strong>in</strong>troduced <strong>in</strong> the previous section. In this section, we start<br />

with implementation relations def<strong>in</strong>ed on IOA and cont<strong>in</strong>ue with implementation<br />

relations on labeled transition systems.<br />

7.4.1 Preorders on IOA<br />

In this section, we treat implementation relations on Input Output Automata.<br />

Some of these implementation relations canalsobeexpressedonlabeledtransition<br />

systems as we will expla<strong>in</strong> <strong>in</strong> the next section. All of the implementation<br />

relations that we treat <strong>in</strong> this section are preorders.<br />

We first recapitulate some concepts that are used with IOA. An execution<br />

fragment of an IOA p is an alternat<strong>in</strong>g, possibly <strong>in</strong>f<strong>in</strong>ite sequence of states and<br />

actions α = q0a1q1a2q2 ··· such that (qi, ai+1, qi+1) ∈ steps(p). When q0 is a<br />

start state of p we call the execution fragment an execution of p. Anexternal<br />

trace of an IOA p is an execution (fragment) that is restricted to the set of<br />

external actions. We use the notation etraces(p) to denote the external traces<br />

of IOA p, whereetraces ∗ (p) denotes the set of f<strong>in</strong>ite external traces of p. We<br />

use the notation a ∈ enabled(q) to denote that state q enables a transition with<br />

action a. This means that there is a state q ′ for which (q, a, q ′ ) ∈ steps(p).<br />

To denote the set of enabled external actions <strong>in</strong> a state q, we use the notation<br />

wenabled(q). An IOA p is f<strong>in</strong>itely branch<strong>in</strong>g iff each state of p enables f<strong>in</strong>itely<br />

many transitions.<br />

We start with the trace <strong>in</strong>clusion preorder. This is a very weak relation. It<br />

expresses that one system is an implementation of the other if its set of external<br />

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

Def<strong>in</strong>ition 7.6 (External trace <strong>in</strong>clusion). For IOA i and s:<br />

i ≤tr s =def etraces(i) ⊆ etraces(s)<br />

The above def<strong>in</strong>ition is def<strong>in</strong>ed <strong>in</strong> a so-called <strong>in</strong>tentional way. Many implementation<br />

relations can also be def<strong>in</strong>ed <strong>in</strong> an extensional way <strong>in</strong> the style of<br />

De Nicola and Hennessy [NH84]. The term extensional refers to an external observer.<br />

The <strong>in</strong>tuition beh<strong>in</strong>d this idea is that an implementation conforms to a<br />

specification if no external observer can see the difference. We will not use the<br />

extensional def<strong>in</strong>ition <strong>in</strong> this section, but we refer to Chapter 5 for more <strong>in</strong>formation<br />

about extensional def<strong>in</strong>itions of implementation relations and to [Tre96b]<br />

for more <strong>in</strong>formation on extensional def<strong>in</strong>itions of implementation relations with<br />

<strong>in</strong>puts and outputs.<br />

Example. We give an example of the external trace <strong>in</strong>clusion preorder <strong>in</strong> Figure<br />

7.2. On the left hand side we see a specification of a coffee mach<strong>in</strong>e. It<br />

prescribes that after press<strong>in</strong>g the button at least twice we expect to observe<br />

either coffee or tea as output. We will reuse this coffee mach<strong>in</strong>e specification <strong>in</strong><br />

other examples. On the right hand side we see two implementations. The first

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

Saved successfully!

Ooh no, something went wrong!