Docsity

Modeling and Verification of Real-time and Hybrid Systems: Timed Automata and TCTL, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE 598: Modeling and Verification of Real-time and Hybrid Systems Fall 2008
Lecture 9,10— DATE, 2008
TCTL and Model Checking Timed Automata
Prof. Sayan Mitra Scribe: YOUR NAME
8 Symbolic Model Checking (continued)
We complete the discussion on model checking of finite state systems.
8.1 Proof for Fixed point representations
Ef1=GF P (f1∧EXZ)
E[f1Uf2] = LF P (f2∨(f1∧EXZ))
8.2 CTL, CTL*, and LTL
9 Algorithmic Analysis of Timed and Hybrid Systems
In the first part of the course we studied the Hybrid I/O automaton modelIn particular, we looked
at the semantics of the model and some examples of how it can be used to specify systems with
both discrete and continuous evolution. HIOA is a very general framework; it imposes few restric-
tions on the discrete and the continuous behavior. (E.g., almost any program can be embedded
within an eff clause of a transition, almost any set of differential and algebraic equations can be
written in the evolve clause.). In the next few lectures we will restric HIOAs and explore techniques
for automatic verification.
9.1 Timed Automata
A Timed Automaton allows a set of clocks that can evolve continuously and can be reset along a
finite number of discrete states.
9.1.1 Clocks
Aclock variable xis variable of type real such that along any trajectory τof x, for all t∈τ.dom,
(τ↓x)(t) = t. For a set Xcof clock variables, the set Φ(X)of integral clock constraints gis inductively
defined as
g::= x≤q|x≥ |¬g|g1∧g2,
where q∈Zand x∈Xc. Thus, x= 10, x ∈[2,5),true are valid clock constraints.
1
pf3
pf4

Partial preview of the text

Download Modeling and Verification of Real-time and Hybrid Systems: Timed Automata and TCTL and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

ECE 598: Modeling and Verification of Real-time and Hybrid Systems Fall 2008

Lecture 9,10— DATE, 2008

TCTL and Model Checking Timed Automata

Prof. Sayan Mitra Scribe: YOUR NAME

8 Symbolic Model Checking (continued)

We complete the discussion on model checking of finite state systems.

8.1 Proof for Fixed point representations

Ef 1 = GF P (f 1 ∧ EXZ) E[f 1 Uf 2 ] = LF P (f 2 ∨ (f 1 ∧ EXZ))

8.2 CTL, CTL*, and LTL

9 Algorithmic Analysis of Timed and Hybrid Systems

In the first part of the course we studied the Hybrid I/O automaton modelIn particular, we looked at the semantics of the model and some examples of how it can be used to specify systems with both discrete and continuous evolution. HIOA is a very general framework; it imposes few restric- tions on the discrete and the continuous behavior. (E.g., almost any program can be embedded within an eff clause of a transition, almost any set of differential and algebraic equations can be written in the evolve clause.). In the next few lectures we will restric HIOAs and explore techniques for automatic verification.

9.1 Timed Automata

A Timed Automaton allows a set of clocks that can evolve continuously and can be reset along a finite number of discrete states.

9.1.1 Clocks

A clock variable x is variable of type real such that along any trajectory τ of x, for all t ∈ τ.dom, (τ ↓ x)(t) = t. For a set Xc of clock variables, the set Φ(X) of integral clock constraints g is inductively defined as g ::= x ≤ q|x ≥ |¬g|g 1 ∧ g 2 ,

where q ∈ Z and x ∈ Xc. Thus, x = 10, x ∈ [2, 5), true are valid clock constraints.

Recall, a valuation for Xc is a function xc that assigns a real value to each x ∈ Xc. A valuation xc satisfies a clock constraint g over Xc iff g evaluates to true using the values assigned to the clocks at xc. We will use the shorthand xc + t for some t ∈ R, to denote the valuation where for each x ∈ Xc is assigned xc.x + t.

9.1.2 Integral Timed Automata

Definition 1. A integral timed automaton is a HIOA A = 〈V, Q, Q 0 , A, D, T 〉 where

  1. V = Xc ∪ {l}, where Xc is a set of n clocks and l is a discrete state variable of finite type Ł.
  2. Q = R≥ 0 n^ × Ł,
  3. A is finite
  4. D ⊆ (Φ(Xc) × Ł) × A × (Xc × Ł). For any 〈xc, l〉 → 〈a x′ c, l′〉, for all x ∈ Xc, either x′ c.x = xc.x or x′ c.x = 0
  5. For each τ ∈ T and t ∈ τ.dom, (a) τ (t).l = τ (0).l, and (b) for each x ∈ Xc, τ (t).x = τ (0).x + t.

Example:Light Switch The Light Switch can be turned on whenever at least 2 time units have elapsed since the last turn off. Switches off automatically 15 time units after the last on. Clock variables Xc = {x, y}. Discrete states Ł = {on, of f }. Actions A = {push, pop}. An execu- tion:

〈off , x = 0, y = 0〉 τ (3.2) → 〈off , 3. 2 , 3. 2 〉 push → 〈on, 0 , 0 〉 τ (t 1 ), 2 ≤t 1 ≤ 9 → 〈on, t 1 , t 1 〉 push → 〈on, 0 , t 1 〉 τ (t 2 ),t 1 +t 2 = → 〈on, t 2 , 15 〉 pop → 〈off , 0 , 9 〉.

off on y ≤ 15

push : x ≥ 2; x := y := 0

pop : y = 15; x := 0

push : x ≥ 2; x := 0

Figure 1: Light Switch.

timing properties such as “the orange light stays on for at most 15 time units”. A natural way to specify these properties is to augment CTL with formula clocks. The resulting logic is called Timed CTL (TCTL). Informally, a formula clock is a stopwatch that runs along with the timed automaton A, and you, as the observers of the system, are allowed to reset the clock at any time. This allows you to measure the elapsed time between events of interest.

9.2.1 Syntax

Let AP be a set of atomic propositions and L be a labelling function Q → 2 AP^ , and Z be a collection of formula clocks.

TCTL formulas have two new constructs (over CTL): (1) assertions tions about automaton clocks and formula clocks, and (2) the reset operator for formula clocks. The next state operator X is not allowed in TCTL^1 Syntax of TCTL:

f := true|p|γ|¬f 1 |f 1 ∧ f 2 |z in f 1 |E[f 1 Uf 2 ]

where p ∈ AP, γ ∈ Φ(Xc ∪ Z), and z ∈ Z.

9.2.2 Semantics

Given time automaton A, a state q ∈ Q of A is a valuation of l and the variables in Xc. That is, q = 〈l, x〉, where l ∈ Ł and x ∈ Rn ≥ 0. A valuation of the formula clocks Z is denoted by z ∈ R|≥Z 0 |. A given state q and a valuation of formula clocks z satisfy a CTL formula if

  1. (l, x, z) |= p ⇐⇒ p ∈ L(〈l, x〉).
  2. (l, x, z) |= γ ⇐⇒ z ∈ γ if γ ∈ Φ(Z).
  3. (l, x, z) |= γ ⇐⇒ x ∈ γ if γ ∈ Φ(Xc).
  4. (l, x, z) |= ¬f ⇐⇒ (l, x, z)| 6 = f.
  5. (l, x, z) |= f 1 ∧ f 2 ⇐⇒ (l, x, z) |= f 1 and (l, x, z) |= f 2.
  6. (l, x, z) |= z in f 1 ⇐⇒ (l, x, z′) |= f 1 , where z′^ = z with z set to 0.
  7. (l, x, z) |= E[f 1 Uf 2 ] ⇐⇒ ∃ closed α ∈ ExecsA, α.fstate = 〈l, x〉 such that 〈α.lstate.l, α.lstate.x, z+ α.ltime〉 |= f 2 and for every proper prefix α′^ of α, 〈α′.lstate.l, α′.lstate.x, z+α′.ltime〉 |= f 1 ∨f 2.

9.2.3 Derived Operators

A[f 1 U≤tf 2 ] =∆ z in A[(f 1 ∧ z ≤ t)Uf 2 ]: Along all paths f 1 holds continuously until within t time units f 2 becomes true. E < 5 f 1 =∆ z in E  (z < 5 ∧ f 1 ): There exists a path along which before 5 time units f 1 becomes true.

(^1) in a timed automaton the notion of a next state does not make sense.