



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




ECE 598: Modeling and Verification of Real-time and Hybrid Systems Fall 2008
Prof. Sayan Mitra Scribe: YOUR NAME
One of the key ideas in formal modeling and verification is the notion of abstraction. In this lecture we will study different kinds of abstraction relations for Hybrid I/O Automata and techniques for proving these relations.
HIOAs A 1 and A 2 are comparable if they have the same external interface. That is, O 1 ∪ I 1 = O 2 ∪ I 2 and U 1 ∪ Y 1 = U 2 ∪ Y 2. For comparable HIOAs A 1 and A 2 , we say that A 1 implements A 2 , denoted by A 1 ≤ A 2 , if TracesA 1 ⊆ TracesA 2. That is, all external behaviors of A 1 are allso allowed external behaviors for A 2. Informally, A 2 is the abstract automaton and A 1 is the concrete automaton. Of course, we can reason about more than two comparable automata modelling the system at different levels of abstractions.
Example. In Figure 1 automaton TSpec abstractly specifies that a timeout action must occur within d time of a fail. The Timeout automaton is the composition of a periodically sending process, a timed channel, and a detector. How can we prove that if d ≥ u2 + b then Timeout ≤ TSpec.
The standard technique for proving A 1 ≤ A 2 is to demonstrate the existence of a simulation relation. There are various different kinds of simulation relations and in the remainder of this lecture we’ll study them.
18.2.1 Forward Simulation
Definition 1. Consider comparable HIOAs A and B. A simulation relation from A to B is a relation R ⊆ QA × QB satisfying the following conditions, for all states x and y of A and B, respectively:
automaton TSpec(d: R+) signature output fail, timeout variables internal last timeout: R∞ := ∞ now: R := 0; suspected: B := false; failed: B := false transitions output fail pre ¬ failed eff last timeout := now + d failed := true output timeout pre failed ∧ ¬ suspected; eff suspected := true; last timeout := ∞ trajectories trajdef beforeF afterS invariant ¬ failed ∨ (failed ∧ suspected) evolve d(now) = 1 trajdef FnotS invariant failed ∧ ¬ suspected stop when now > = 0 ∧ now = last timeout evolve d(now) = 1
automaton Timeout(u1, u2, b: Real) where u1 > = 0 ∧ u2 > = 0 ∧ b > = 0 ∧ u2 > (u1 + b) signature internal send(m: M), receive(m: M) output fail, timeout variables p clock: R∞ := 0; t clock: R∞ := u suspected: B := false; failed: B:= false now: R := 0 queue: timed message Q := mtQ() transitions internal send(m) pre now > = 0 ∧ ¬ failed ∧ p clock = now eff p clock := now + u queue := enQ((m, now + b), queue) internal receive(m) pre now > = 0 ∧ m = earliest msg(queue) eff t clock := now + u queue := deQ(queue) output fail pre ¬ failed eff failed := true; p clock := ∞ output timeout pre now > = 0 ∧ ¬ suspected ∧ t clock = now eff suspected := true; t clock := ∞ trajectories trajdef traj stop when now > = 0 ∧ (now = p clock ∨ now = t clock ∨ now = earliest deadline(queue)); evolve d(now) = 1;
Figure 1: Simple Failure Detector.
Theorem 1. Let A and B be comparable HIOAs and let R be a simulation relation from A to B. Then A ≤ B.
Proof. We have to show that A ≤ B. Suppose δ is the trace of an execution of A; we prove that δ is also a trace of an execution of B.
Let α = τ 0 a 1 τ 1 a 2 τ 2... be an execution of A such that trace(α) = δ.
We consider cases:
Case 1: α is an infinite sequence. We can write α as an infinite concatenation α 0 _^ α 1 _^ α 2.. ., in which the execution fragments αi with i even consist of a trajectory only, and the execution fragments αi with i odd consist of a single discrete transition surrounded by two point trajectories. We define inductively a sequence β 0 β 1 β 2... of closed execution fragments of B such that x R β 0 .f state, β 0 .f state ∈ ΘB, and for all i, βi.lstate = βi+1.f state, αi.lstate R βi.lstate, and trace(βi) = trace(αi). Property 1 of Definition 1 ensures that there exists such a β 0 .f state
18.2.3 Bisimulation
Definition 3. Let A and B be comparable HIOAs. A bisimulation between A to B is a relation R ⊆ QA × QB such that R is a forward simulation from A to B and R−^1 is a forward simulation from B to A.
That is, R satisfies the following conditions, for all states x ∈ QA and y ∈ QB if xRy then the following conditions hold:
Example: Forward simulation and bisimulation in transition systems.
18.2.4 Backward Simulation
Definition 4. Let A and B be comparable HIOAs. A backward simulation from A to B is a total relation R ⊆ QA × QB satisfying the following conditions, for all states x ∈ QA and y ∈ QB:
A relation R ⊆ X × Y is said to be image finite if for every x ∈ X the set {y ∈ Y | x R y} is finite.
Theorem 2. Let A and B be comparable HIOAs and let R be an image finite backward simulation relation from A to B. Then A ≤ B.
Image finiteness is necessary for proving inclusion of traces that are open sequences. See [KLSV05] for the proof.
Example. Need for backward simulation The following example illustrates the need for back- ward simulation relation.
History and prophecy relations are discussed in [KLSV05].
[KLSV05] Dilsun K. Kaynar, Nancy Lynch, Roberto Segala, and Frits Vaandrager. The Theory of Timed I/O Automata. Synthesis Lectures on Computer Science. Morgan Claypool, November 2005. Also available as Technical Report MIT-LCS-TR-917.