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.

Ψ(S ′ )={PE ′ | E ′ ∈ 2E(S ′ �<br />

) ∧ PE ′ =<br />

ϕ∈Γ (E ′ )<br />

8 Test Derivation from Timed Automata 209<br />

ϕ ∧<br />

�<br />

ϕ∈Γ (E(S ′ )−E ′ )<br />

¬ϕ}<br />

Then, the set of guards ϕi whose disjunction equals the disjunctive normal form<br />

is denoted as GDNF, i.e,<br />

GDNF(PE ′)={ϕi ∈ Φ(C ) | �<br />

i ϕi = DNF (PE ′)}<br />

and f<strong>in</strong>ally Ψdnf (S ′ )is:<br />

�<br />

Ψdnf (S ′ )=<br />

PE ′ ∈Ψ (S ′ )<br />

GDNF (PE ′).<br />

To make this def<strong>in</strong>ition more understandable we show the next example.<br />

Us<strong>in</strong>g our example of the automatic Light Switch, we present the procedure for<br />

f<strong>in</strong>d the equivalences classes for S ′ = {s1}.<br />

Example. Let S ′ = {s1}, then the transitions from S ′ are:<br />

E(S ′ )={(s1, on?, con < 5, s1), (s1, off !, con =5, s0)}<br />

the guards of E(S ′ )are:<br />

Γ (E(S ′ )) = {con < 5, con =5}<br />

only for simplicity we will present 2 Γ (E(S ′ )) <strong>in</strong>stead of 2 E(S ′ ) :<br />

2 Γ (E(S ′ )) = {∅, {con < 5, con =5}, {con < 5}, {con =5}}<br />

and:<br />

Ψ(S ′ )={(con ≥ 5) ∧ (con �= 5), (con < 5) ∧ (con �= 5),<br />

(con ≥ 5) ∧ (con =5), (con < 5) ∧ (con =5)}<br />

the disjunctive normal form of Ψ(S ′ )is:<br />

Ψdnf (S ′ )={con > 5, con < 5, con =5, ∅}<br />

Then we have: [s1, con > 5], [s1, con < 5] and [s1, con = 5] as states for our<br />

equivalence class graph.<br />

The state space of the ERA specification is a graph of equivalence classes.<br />

A node <strong>in</strong> this graph corresponds to an equivalence class. A transition between<br />

two nodes is labeled with an action, and represents the possibility of execute<br />

an action <strong>in</strong> a state <strong>in</strong> the source node, wait some amount of time, and thereby<br />

enter <strong>in</strong> a state <strong>in</strong> the target node. The graph is constructed by start from<br />

an exist<strong>in</strong>g node [S ′ , p] (<strong>in</strong>itially the equivalence class of the <strong>in</strong>itial location),<br />

and then for each enabled action a, compute the set of locations S ′′ that can<br />

be entered by execute the a action from the current equivalence class. Then<br />

the partitions p ′ of location S ′′ can be computed accord<strong>in</strong>g to Def<strong>in</strong>ition 8.14.<br />

Every [S ′′ , p ′ ]isthenana successor of [S ′ , p]. Only equivalence classes whose<br />

constra<strong>in</strong>ts have solutions need to be represented. The equivalence class graph<br />

is def<strong>in</strong>ed <strong>in</strong>ductively <strong>in</strong> the Algorithm 11.<br />

Each equivalence class [S ′ , p] is decorated with the action sets M , C , R from<br />

the test<strong>in</strong>g preorder, as it is shows <strong>in</strong> def<strong>in</strong>ition 8.15.

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

Saved successfully!

Ooh no, something went wrong!