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.

228 Laura Brandán Briones and Mathias Röhl<br />

Please note, that even if Impl is determ<strong>in</strong>istic, from the tester’s perspective<br />

it does not behave determ<strong>in</strong>istically, because events produced by the implementation<br />

may occur at different po<strong>in</strong>ts <strong>in</strong> time. S<strong>in</strong>ce the tester has no capability to<br />

control when output events of the SUT will eventually occur any possible trace<br />

has to be considered for both reach<strong>in</strong>g a state and dist<strong>in</strong>guish<strong>in</strong>g a state. One<br />

of all possible reach traces, orseparat<strong>in</strong>g traces respectively, had to be chosen on<br />

the fly dur<strong>in</strong>g execution of the test, depend<strong>in</strong>g on the actual occurrence of an<br />

output event. If there is a trace that does not depend on the choices of the SUT<br />

we only need to consider this one for test<strong>in</strong>g.<br />

The conformance test algorithm (cf. Algorithm 14) takes a TTTS Spec, constructed<br />

us<strong>in</strong>g a View V, as <strong>in</strong>put and produces a f<strong>in</strong>ite set of traces each accompanied<br />

with an oracle (yes/no) for observ<strong>in</strong>g its f<strong>in</strong>al event.<br />

Algorithm 14 TTTS Conformance Test Algorithm<br />

<strong>in</strong>put: TTTS Spec = 〈Q, L, −→, q0〉, TestViewV<br />

output: Test(Spec)<br />

1 Test (Spec) =∅<br />

2 for every q ∈ Q do<br />

3 // f<strong>in</strong>d all acyclic traces, i.e. that visit no state more than once, end<strong>in</strong>g at q<br />

4 reach(q) ={σ | q0<br />

σ<br />

−→ q ∧ acyclic(σ)}<br />

5 for every q ∈ Q that is a transition’s dest<strong>in</strong>ation state do<br />

6 for each q ′ =V q do<br />

7 // dist<strong>in</strong>guish q from all states <strong>in</strong> the same visible equivalence class<br />

8 if q = q ′ then σ = 〈〉<br />

9 else // non trivial dist<strong>in</strong>ction of states<br />

10 for every σ = l1 ...ln with l1 ...ln−1 ∈ traces(q) ∩ traces(q ′ ) do<br />

11 if σ �∈traces(q) ∩ traces(q ′ ) then // σ dist<strong>in</strong>guishes between q and q ′<br />

12 // pair σ with oracle whether the f<strong>in</strong>al event should be observed<br />

13 if σ ∈ traces(q) then diff(q, q ′ )+ = σ ∗ yes<br />

14 else if σ ∈ traces(q ′ ) then diff(q, q ′ )+ = σ ∗ no<br />

15 // Compose a test for every transition<br />

16 for every t =(q1, l, q2) ∈−→ do<br />

17 for each qi =V q2<br />

18 Testfor(t) +=σ1 · l · σi ∗ Ri, withσ1 ∈ reach(q1) andσi ∗ Ri ∈ diff (q2, qi)<br />

19 Test(Spec) +=Testfor(t)<br />

Previous work did allow implementations to have extra states [COG98]. Now<br />

it is claimed that “the assumption of a bounded, small number of extra states<br />

is not appropriate for real-time systems” [CO00], because m<strong>in</strong>or changes of a<br />

timed automata specification can result <strong>in</strong> a very large change <strong>in</strong> the size of its<br />

TTTS.<br />

Def<strong>in</strong>ition 8.38. Real-Time Faults for TTTS: Impl ∈ NonConf(Spec) ifand<br />

only if

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

Saved successfully!

Ooh no, something went wrong!