SLIDE 1 Implementability of Timed Controllers
Based on joint works with Karine Altisen, Patricia Bouyer, Martin De Wulf, Laurent Doyen, Jean-Fran¸ cois Raskin, Pierre-Alain Reynier, and Stavros Tripakis
Nicolas Markey
ecification et V´ erification – ENS Cachan & CNRS
September 5, 2007
SLIDE 2
Controller Synthesis and Implementation
system:
⇒
property:
SLIDE 3 Controller Synthesis and Implementation
system:
⇒
property:
G(request⇒Fgrant)
SLIDE 4 Controller Synthesis and Implementation
system:
⇒
property:
G(request⇒Fgrant)
controller synthesis
SLIDE 5 Controller Synthesis and Implementation
system:
⇒
property:
G(request⇒Fgrant)
controller synthesis
yes/no
SLIDE 6 Controller Synthesis and Implementation
system:
⇒
property:
G(request⇒Fgrant)
controller synthesis
yes/no
SLIDE 7
Implementatiblity of Timed Controllers
The semantics of timed automata is a mathematical idealization: Infinitely punctual : Exact synchronization is required when composing several TAs; Infinitely precise : Different clocks are assumed to increase at the same rate in both the controler and the system. Infinitely fast : It may happen, for instance, that a TA will have to perform actions at time n and n + 1/n, for all n; In practice, a processor is digital and imprecise. Even if we prove that a TA will not enter a set of bad states, its implementations could still lead to bad behaviors.
SLIDE 8
Implementatiblity of Timed Controllers
The semantics of timed automata is a mathematical idealization: Infinitely punctual : Exact synchronization is required when composing several TAs; Infinitely precise : Different clocks are assumed to increase at the same rate in both the controler and the system. Infinitely fast : It may happen, for instance, that a TA will have to perform actions at time n and n + 1/n, for all n; In practice, a processor is digital and imprecise. Even if we prove that a TA will not enter a set of bad states, its implementations could still lead to bad behaviors.
SLIDE 9
Implementatiblity of Timed Controllers
The semantics of timed automata is a mathematical idealization: Infinitely punctual : Exact synchronization is required when composing several TAs; Infinitely precise : Different clocks are assumed to increase at the same rate in both the controler and the system. Infinitely fast : It may happen, for instance, that a TA will have to perform actions at time n and n + 1/n, for all n; In practice, a processor is digital and imprecise. Even if we prove that a TA will not enter a set of bad states, its implementations could still lead to bad behaviors.
SLIDE 10
Implementatiblity of Timed Controllers
The semantics of timed automata is a mathematical idealization: Infinitely punctual : Exact synchronization is required when composing several TAs; Infinitely precise : Different clocks are assumed to increase at the same rate in both the controler and the system. Infinitely fast : It may happen, for instance, that a TA will have to perform actions at time n and n + 1/n, for all n; In practice, a processor is digital and imprecise. Even if we prove that a TA will not enter a set of bad states, its implementations could still lead to bad behaviors.
SLIDE 11
Implementatiblity of Timed Controllers
The semantics of timed automata is a mathematical idealization: Infinitely punctual : Exact synchronization is required when composing several TAs; Infinitely precise : Different clocks are assumed to increase at the same rate in both the controler and the system. Infinitely fast : It may happen, for instance, that a TA will have to perform actions at time n and n + 1/n, for all n; In practice, a processor is digital and imprecise. Even if we prove that a TA will not enter a set of bad states, its implementations could still lead to bad behaviors.
SLIDE 12 Implementatiblity of Timed Controllers
Examples (Zeno behaviors)
ℓ0 y≤1 ℓ1 x:=0
The red state can be avoided; But this would require to prevent time to elapse.
SLIDE 13 Implementatiblity of Timed Controllers
Examples (Cassez et al., 2002)
ℓ0 ℓ1 ℓ2 ℓ3 x=1 x:=0 y=1 z:=0 z>0 y:=0 x>1
loc. ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 x y z
SLIDE 14 Implementatiblity of Timed Controllers
Examples (Cassez et al., 2002)
ℓ0 ℓ1 ℓ2 ℓ3 x=1 x:=0 y=1 z:=0 z>0 y:=0 x>1
loc. ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 x y z
SLIDE 15 Implementatiblity of Timed Controllers
Examples (Cassez et al., 2002)
ℓ0 ℓ1 ℓ2 ℓ3 x=1 x:=0 y=1 z:=0 z>0 y:=0 x>1
loc. ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 x y 1 z 1
SLIDE 16 Implementatiblity of Timed Controllers
Examples (Cassez et al., 2002)
ℓ0 ℓ1 ℓ2 ℓ3 x=1 x:=0 y=1 z:=0 z>0 y:=0 x>1
loc. ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 x y 1 1 z 1
SLIDE 17 Implementatiblity of Timed Controllers
Examples (Cassez et al., 2002)
ℓ0 ℓ1 ℓ2 ℓ3 x=1 x:=0 y=1 z:=0 z>0 y:=0 x>1
loc. ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 x ǫ1 y 1 1 z 1 ǫ1
SLIDE 18 Implementatiblity of Timed Controllers
Examples (Cassez et al., 2002)
ℓ0 ℓ1 ℓ2 ℓ3 x=1 x:=0 y=1 z:=0 z>0 y:=0 x>1
loc. ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 x ǫ1 y 1 1 1 − ǫ1 z 1 ǫ1 1
SLIDE 19 Implementatiblity of Timed Controllers
Examples (Cassez et al., 2002)
ℓ0 ℓ1 ℓ2 ℓ3 x=1 x:=0 y=1 z:=0 z>0 y:=0 x>1
loc. ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 x ǫ1 ǫ1 y 1 1 1 − ǫ1 1 z 1 ǫ1 1
SLIDE 20 Implementatiblity of Timed Controllers
Examples (Cassez et al., 2002)
ℓ0 ℓ1 ℓ2 ℓ3 x=1 x:=0 y=1 z:=0 z>0 y:=0 x>1
loc. ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 ℓ1 ℓ2 ℓ0 x ǫ1 ǫ1 ǫ1 + ǫ2 ... y 1 1 1 − ǫ1 1 ... z 1 ǫ1 1 ǫ2 ...
SLIDE 21 Implementatiblity of Timed Controllers
Examples (Fischer’s Mutual Exclusion Protocol)
s1 r1 x1≤2 w1 c1 id=0 x1:=0 x1:=0 id:=1 id=0 x1:=0 id=1, x1>2 id:=0 s2 r2 x2≤2 w2 c2 id=0 x2:=0 x2:=0 id:=2 id=0 x2:=0 id=2, x2>2 id:=0
It can be proved that this protocol enforces mutual exclusion in the critical (red) state. Any imprecise implementation will fail to fulfil that property.
SLIDE 22 Outline of the talk
1
Introduction
2
Modeling the execution platform [Altisen & Tripakis, 2005]
3
A semantical approach [De Wulf et al., 2004]
4
Conclusions
SLIDE 23 Outline of the talk
1
Introduction
2
Modeling the execution platform [Altisen & Tripakis, 2005]
3
A semantical approach [De Wulf et al., 2004]
4
Conclusions
SLIDE 24 Modeling the execution platform [Altisen & Tripakis, 2005]
A
x>2,y:=0
Env
x = 2.4 y = 0.6 id = 1
SLIDE 25 Modeling the execution platform [Altisen & Tripakis, 2005]
A
x>2,y:=0
Env
x = 2.4 y = 0.6 id = 1
Platform
P The automaton A is now a discrete automaton, using input variables given by the platform; The automaton P is a timed automaton that triggers A (modeling a digital CPU), and sends input variables to A depending on the values of the variables in Env;
SLIDE 26
Modeling the execution platform [Altisen & Tripakis, 2005]
variables, environment clocks of the model internal clock platform P (“digitized”) model Prog(A) trig!
SLIDE 27 Modeling the execution platform [Altisen & Tripakis, 2005]
- 1. Transforming A into Prog(A).
trig! is an input event allowing A to perform one step; the value of a clock is the difference between the current value of the internal clock (now) and the date at which the clock was last reset: “x > 2′′ becomes “now − x > 2′′ “x := 0′′ becomes “x := now′′
SLIDE 28 Modeling the execution platform [Altisen & Tripakis, 2005]
- 1. Transforming A into Prog(A).
Example (Fischer’s Mutual Exclusion Protocol)
s1 r1 w1 c1
trig? trig? trig? trig? trig?, x1:=now, id:=0 trig? now−x1≤2 x1:=now id:=1 trig? id=0 x1:=now trig?, id=1, now−x1>2 trig? id:=0
SLIDE 29 Modeling the execution platform [Altisen & Tripakis, 2005]
- 1. Transforming A into Prog(A).
- 2. Modeling the digital CPU.
Examples
x≤∆ x=∆, x:=0 trig!
SLIDE 30 Modeling the execution platform [Altisen & Tripakis, 2005]
- 1. Transforming A into Prog(A).
- 2. Modeling the digital CPU.
Examples
x≤∆ x=∆, x:=0 trig! x≤∆2 x∈[∆1,∆2], x:=0 trig!
SLIDE 31 Modeling the execution platform [Altisen & Tripakis, 2005]
- 1. Transforming A into Prog(A).
- 2. Modeling the digital CPU.
- 3. Modeling the global clock.
Examples
x≤∆ now:=0 x=∆, x:=0 now:=now+∆
SLIDE 32 Modeling the execution platform [Altisen & Tripakis, 2005]
- 1. Transforming A into Prog(A).
- 2. Modeling the digital CPU.
- 3. Modeling the global clock.
Examples
x≤∆ now:=0 x=∆, x:=0 now:=now+∆ x≤∆+ε now:=0 x∈[∆−ε,∆+ε], x:=0 now:=now+∆
SLIDE 33 Modeling the execution platform [Altisen & Tripakis, 2005]
- 1. Transforming A into Prog(A).
- 2. Modeling the digital CPU.
- 3. Modeling the global clock.
- 4. Modeling the input/output variables.
delays for reading variables... lock mechanism for writing variables...
SLIDE 34 Modeling the execution platform [Altisen & Tripakis, 2005]
- 1. Transforming A into Prog(A).
- 2. Modeling the digital CPU.
- 3. Modeling the global clock.
- 4. Modeling the input/output variables.
- 5. Classical verification techniques on the product of those
automata.
SLIDE 35 Pros and cons of this approach
Pros:
Very expressive: the platform can be described with many details; Relies on classical techniques: the verification step is applied
- n standard timed automata. Existing tools can be used.
SLIDE 36 Pros and cons of this approach
Pros:
Very expressive: the platform can be described with many details; Relies on classical techniques: the verification step is applied
- n standard timed automata. Existing tools can be used.
Cons:
Formal meaning?: if the model satisfies some property, what does it really mean? Faster is better?: we expect that a program proved to be implementable on a given platform remains implementable on a faster platform. This property fails to hold with this modeling.
SLIDE 37 Outline of the talk
1
Introduction
2
Modeling the execution platform [Altisen & Tripakis, 2005]
3
A semantical approach [De Wulf et al., 2004]
4
Conclusions
SLIDE 38 A semantical approach [De Wulf et al., 2004]
- 1. “Implementation” Semantics
We consider a simple model of a platform, that repeatedly executes the following actions: store the value of the global clock; compute guards; fire one of the enabled transitions. We assume that
- ne such loop takes at most ∆P t.u. to execute;
the global clock is updated every ∆L t.u. We write AImpl
∆P,∆L for the set of executions of a timed
automaton A under this semantics.
SLIDE 39 A semantical approach [De Wulf et al., 2004]
- 1. “Implementation” Semantics
- 2. Enlarged Semantics
We define the enlarged semantics for timed automata, by enlarging guards on transitions by a small tolerance ∆: If g = [a; b], then gAASAP
∆
= [a − ∆, b + ∆]. We write AAASAP
∆
for the set of executions of a timed automaton A under this semantics.
SLIDE 40 A semantical approach [De Wulf et al., 2004]
- 1. “Implementation” Semantics
- 2. Enlarged Semantics
We define the enlarged semantics for timed automata, by enlarging guards on transitions by a small tolerance ∆: If g = [a; b], then gAASAP
∆
= [a − ∆, b + ∆]. We write AAASAP
∆
for the set of executions of a timed automaton A under this semantics.
Theorem ([DDR04])
If ∆ > 3∆L + 4∆P, then AImpl
∆P,∆L ⊆ AAASAP ∆
.
SLIDE 41 A semantical approach [De Wulf et al., 2004]
We focus on safety properties for the implementation semantics: we want to ensure that an implementation will avoid bad states. Reach∆(A) is the set of reachable states under the AASAP semantics. ∆1 ≤ ∆2 ⇒ Reach∆1(A) ⊆ Reach∆2(A) R(A) =
∆>0 Reach∆(A) is the set of reachable states under
the AASAP semantics for any ∆ > 0.
SLIDE 42 A semantical approach [De Wulf et al., 2004]
We focus on safety properties for the implementation semantics: we want to ensure that an implementation will avoid bad states. Reach∆(A) is the set of reachable states under the AASAP semantics. ∆1 ≤ ∆2 ⇒ Reach∆1(A) ⊆ Reach∆2(A) R(A) =
∆>0 Reach∆(A) is the set of reachable states under
the AASAP semantics for any ∆ > 0.
Lemma
For any timed automata A and for any set of zones B, R(A) ∩ B = ∅ iff ∃∆ > 0. Reach∆(A) ∩ B = ∅.
SLIDE 43 An example: Standard semantics
x y
1 1 2 2
b c a Bad
x=1 y:=0
x≤2 x:=0 y:=0 y≥2 x=0 y=2
SLIDE 44 An example: Standard semantics
x y
1 1 2 2
b c a Bad
x=1 y:=0
x≤2 x:=0 y:=0 y≥2 x=0 y=2
SLIDE 45 An example: Standard semantics
x y
1 1 2 2
b c a Bad
x=1 y:=0
x≤2 x:=0 y:=0 y≥2 x=0 y=2
SLIDE 46 An example: Standard semantics
x y
1 1 2 2
b c a Bad
x=1 y:=0
x≤2 x:=0 y:=0 y≥2 x=0 y=2
SLIDE 47 An example: Standard semantics
x y
1 1 2 2
b c a Bad
x=1 y:=0
x≤2 x:=0 y:=0 y≥2 x=0 y=2
SLIDE 48 An example: Standard semantics
x y
1 1 2 2
b c a Bad
x=1 y:=0
x≤2 x:=0 y:=0 y≥2 x=0 y=2
SLIDE 49 An example: Standard semantics
x y
1 1 2 2
b c a Bad
x=1 y:=0
x≤2 x:=0 y:=0 y≥2 x=0 y=2
SLIDE 50 An example: Standard semantics
x y
1 1 2 2
b c a Bad
x=1 y:=0
x≤2 x:=0 y:=0 y≥2 x=0 y=2
SLIDE 51 An example: Standard semantics
x y
1 1 2 2
b c a Bad
x=1 y:=0
x≤2 x:=0 y:=0 y≥2 x=0 y=2
SLIDE 52 An example with ∆ > 0
x y
1 1 2 2
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 53 An example with ∆ > 0
x y
1 1 2 2
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 54 An example with ∆ > 0
x y
1 1 2 2
1−∆ 1+∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 55 An example with ∆ > 0
x y
1 1 2 2
1−∆ 1+∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 56 An example with ∆ > 0
x y
1 1 2 2
2+2∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 57 An example with ∆ > 0
x y
1 1 2 2
2+2∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 58 An example with ∆ > 0
x y
1 1 2 2
1−3∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 59 An example with ∆ > 0
x y
1 1 2 2
1−3∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 60 An example with ∆ > 0
x y
1 1 2 2
2+4∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 61 An example with ∆ > 0
x y
1 1 2 2
2+4∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 62 An example with ∆ > 0
x y
1 1 2 2
1−5∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 63 An example with ∆ > 0
x y
1 1 2 2
1−5∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 64 An example with ∆ > 0
x y
1 1 2 2
2+6∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 65 An example with ∆ > 0
x y
1 1 2 2
2+6∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 66 An example with ∆ > 0
x y
1 1 2 2
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 67 An example with ∆ very small
x y
1 1 2 2
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 68 An example with ∆ very small
x y
1 1 2 2
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 69 An example with ∆ very small
x y
1 1 2 2
1−∆ 1+∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 70 An example with ∆ very small
x y
1 1 2 2
1−∆ 1+∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 71 An example with ∆ very small
x y
1 1 2 2
2+2∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 72 An example with ∆ very small
x y
1 1 2 2
2+2∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 73 An example with ∆ very small
x y
1 1 2 2
1−3∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 74 An example with ∆ very small
x y
1 1 2 2
1−3∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 75 An example with ∆ very small
x y
1 1 2 2
2+4∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 76 An example with ∆ very small
x y
1 1 2 2
2+4∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 77 An example with ∆ very small
x y
1 1 2 2
1−5∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 78 An example with ∆ very small
x y
1 1 2 2
1−5∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 79 An example with ∆ very small
x y
1 1 2 2
2+6∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 80 An example with ∆ very small
x y
1 1 2 2
2+6∆
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 81 An example with ∆ very small
x y
1 1 2 2
b c a Bad
x∈[1−∆;1+∆] y:=0
x≤2+∆ x:=0 y:=0 y≥2−∆
x≤∆ y∈[2−∆,2+∆]
SLIDE 82 Difference between A and R(A)
Reach(A) x y
1 1 2 2
R(A) x y
1 1 2 2
b c a Bad
x=1 y:=0
x≤2 x:=0 y:=0 y≥2
x≤∆ y∈[2−∆,2+∆]
SLIDE 83 An algorithm for computing R(A)
Input: A Timed Automaton A Output: The set R(A)
- 1. build the region graph G of A;
- 2. compute SCC(G) = the set of strongly connected
components of G;
- 3. J := [(q0)];
- 4. J := Reach(G, J);
- 5. while ∃ S ∈ SCC(G). S ⊆ J and S ∩ J = ∅,
J := J ∪ S; J := Reach(G, J);
SLIDE 84 An algorithm for computing R(A)
Input: A Timed Automaton A Output: The set R(A)
- 1. build the region graph G of A;
- 2. compute SCC(G) = the set of strongly connected
components of G;
- 3. J := [(q0)];
- 4. J := Reach(G, J);
- 5. while ∃ S ∈ SCC(G). S ⊆ J and S ∩ J = ∅,
J := J ∪ S; J := Reach(G, J);
SLIDE 85 An algorithm for computing R(A)
Input: A Timed Automaton A Output: The set R(A)
- 1. build the region graph G of A;
- 2. compute SCC(G) = the set of strongly connected
components of G;
- 3. J := [(q0)];
- 4. J := Reach(G, J);
- 5. while ∃ S ∈ SCC(G). S ⊆ J and S ∩ J = ∅,
J := J ∪ S; J := Reach(G, J);
SLIDE 86 An algorithm for computing R(A)
Input: A Timed Automaton A Output: The set R(A)
- 1. build the region graph G of A;
- 2. compute SCC(G) = the set of strongly connected
components of G;
- 3. J := [(q0)];
- 4. J := Reach(G, J);
- 5. while ∃ S ∈ SCC(G). S ⊆ J and S ∩ J = ∅,
J := J ∪ S; J := Reach(G, J);
SLIDE 87 An algorithm for computing R(A)
Input: A Timed Automaton A Output: The set R(A)
- 1. build the region graph G of A;
- 2. compute SCC(G) = the set of strongly connected
components of G;
- 3. J := [(q0)];
- 4. J := Reach(G, J);
- 5. while ∃ S ∈ SCC(G). S ⊆ J and S ∩ J = ∅,
J := J ∪ S; J := Reach(G, J);
SLIDE 88 An algorithm for computing R(A)
Input: A Timed Automaton A Output: The set R(A)
- 1. build the region graph G of A;
- 2. compute SCC(G) = the set of strongly connected
components of G;
- 3. J := [(q0)];
- 4. J := Reach(G, J);
- 5. while ∃ S ∈ SCC(G). S ⊆ J and S ∩ J = ∅,
J := J ∪ S; J := Reach(G, J);
SLIDE 89
J ⊆ R∆(A)
Lemma
Let A be a TA with n clocks, ∆ ∈ Q>0, and δ = ∆/n. Let u be a valuation s.t. there exists a trajectory π[0, T] in A with π(0) = π(T) = u. Let v ∈ [u] ∩ B(u, δ). Then there exists a trajectory from u to v in A∆. Proof: We build the new trajectory by slightly modifying the delay transitions in π. This crucially depends on the fact that all clocks are reset along the cycle.
Corollary
Let A be a TA and p = p0p1 . . . pk be a cycle in the region graph (i.e. pk = p0). For any ∆ > 0 and any x, y ∈ p0, there exists a trajectory from x to y.
SLIDE 90
J ⊆ R∆(A)
Lemma
Let A be a TA with n clocks, ∆ ∈ Q>0, and δ = ∆/n. Let u be a valuation s.t. there exists a trajectory π[0, T] in A with π(0) = π(T) = u. Let v ∈ [u] ∩ B(u, δ). Then there exists a trajectory from u to v in A∆. Proof: We build the new trajectory by slightly modifying the delay transitions in π. This crucially depends on the fact that all clocks are reset along the cycle.
Corollary
Let A be a TA and p = p0p1 . . . pk be a cycle in the region graph (i.e. pk = p0). For any ∆ > 0 and any x, y ∈ p0, there exists a trajectory from x to y.
SLIDE 91 J ⊇ R∆(A)
Lemma
Let A be a TA, δ ∈ R>0 and k ∈ N. There exists D ∈ Q>0 s.t. for all ∆ ≤ D, any k-step trajectory π′ = (q′
0, t′ 0)(q′ 1, t′ 1) . . . (q′ k, t′ k)
in A∆ can be approximated be a k-step trajectory π = (q0, t0)(q1, t1) . . . (qk, tk) in A with qi − q′
i ≤ δ for all i.
The proof involves parametric DBMs.
Corollary
Let A be a TA with n clocks and W regions, α < 1/(2n), and ∆ <
α 22W ·(4n+2). Let x ∈ J and y s.t. there exists a trajectory from
x to y in A∆. Then d(J, y) < α.
SLIDE 92 J ⊇ R∆(A)
Lemma
Let A be a TA, δ ∈ R>0 and k ∈ N. There exists D ∈ Q>0 s.t. for all ∆ ≤ D, any k-step trajectory π′ = (q′
0, t′ 0)(q′ 1, t′ 1) . . . (q′ k, t′ k)
in A∆ can be approximated be a k-step trajectory π = (q0, t0)(q1, t1) . . . (qk, tk) in A with qi − q′
i ≤ δ for all i.
The proof involves parametric DBMs.
Corollary
Let A be a TA with n clocks and W regions, α < 1/(2n), and ∆ <
α 22W ·(4n+2). Let x ∈ J and y s.t. there exists a trajectory from
x to y in A∆. Then d(J, y) < α.
SLIDE 93 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 94 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 95 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 96 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 97 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 98 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 99 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 100 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 101 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 102 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 103 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 104 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 105 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 106 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 107 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 108 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 109 Can we relax the assumption on cycles?
Our algorithm does not work if we relax the “progress-cycle”
- constraint. For instance:
x y z x y z
b c a
y,z≥1−∆ x≤∆ x,y≤∆,z≥1−∆ x≤∆, x:=0
b c a
y=z=1 x=0 x=y=0,z=1 x=0, x:=0
SLIDE 110
Extension with clock drifts
when d time unit elapse, each clock is incremented by some value between d × (1 − ǫ) and d × (1 + ǫ).
SLIDE 111 Extension with clock drifts
when d time unit elapse, each clock is incremented by some value between d × (1 − ǫ) and d × (1 + ǫ).
1 2 1 2
a b c Bad
x=1 y:=0 x≤2 x:=0 y≤2 y:=0 x=0,y=2
SLIDE 112 Extension with clock drifts
when d time unit elapse, each clock is incremented by some value between d × (1 − ǫ) and d × (1 + ǫ).
1 2 1 2
a b c Bad
x=1 y:=0 x≤2 x:=0 y≤2 y:=0 x=0,y=2
SLIDE 113 Extension with clock drifts
when d time unit elapse, each clock is incremented by some value between d × (1 − ǫ) and d × (1 + ǫ).
1 2 1 2
a b c Bad
x=1 y:=0 x≤2 x:=0 y≤2 y:=0 x=0,y=2
SLIDE 114 Extension with clock drifts
when d time unit elapse, each clock is incremented by some value between d × (1 − ǫ) and d × (1 + ǫ).
1 2 1 2
a b c Bad
x=1 y:=0 x≤2 x:=0 y≤2 y:=0 x=0,y=2
SLIDE 115 Extension with clock drifts
when d time unit elapse, each clock is incremented by some value between d × (1 − ǫ) and d × (1 + ǫ).
1 2 1 2
a b c Bad
x=1 y:=0 x≤2 x:=0 y≤2 y:=0 x=0,y=2
SLIDE 116 Extension with clock drifts
when d time unit elapse, each clock is incremented by some value between d × (1 − ǫ) and d × (1 + ǫ).
1 2 1 2
a b c Bad
x=1 y:=0 x≤2 x:=0 y≤2 y:=0 x=0,y=2
SLIDE 117 Extension with clock drifts
when d time unit elapse, each clock is incremented by some value between d × (1 − ǫ) and d × (1 + ǫ).
1 2 1 2
a b c Bad
x=1 y:=0 x≤2 x:=0 y≤2 y:=0 x=0,y=2
SLIDE 118 Extension with clock drifts
when d time unit elapse, each clock is incremented by some value between d × (1 − ǫ) and d × (1 + ǫ).
1 2 1 2
a b c Bad
x=1 y:=0 x≤2 x:=0 y≤2 y:=0 x=0,y=2
SLIDE 119 Extension with clock drifts
when d time unit elapse, each clock is incremented by some value between d × (1 − ǫ) and d × (1 + ǫ).
1 2 1 2
a b c Bad
x=1 y:=0 x≤2 x:=0 y≤2 y:=0 x=0,y=2
SLIDE 120 Extension with clock drifts
when d time unit elapse, each clock is incremented by some value between d × (1 − ǫ) and d × (1 + ǫ).
1 2 1 2
a b c Bad
x=1 y:=0 x≤2 x:=0 y≤2 y:=0 x=0,y=2
SLIDE 121 Extension with clock drifts
when d time unit elapse, each clock is incremented by some value between d × (1 − ǫ) and d × (1 + ǫ).
1 2 1 2
a b c Bad
x=1 y:=0 x≤2 x:=0 y≤2 y:=0 x=0,y=2
Since our algorithm is the same as [Pur98]’s, we get the following:
Theorem
R∆(A) = Rε(A) = R∆,ε(A).
SLIDE 122 Pros and cons of this approach
Cons:
Not very expressive: the platform is very simple, thus not very
- realistic. Also, we over-approximate the set of executions.
New techniques, and much work still needed in order to be applicable;
SLIDE 123 Pros and cons of this approach
Cons:
Not very expressive: the platform is very simple, thus not very
- realistic. Also, we over-approximate the set of executions.
New techniques, and much work still needed in order to be applicable;
Pros:
Formal approach: we know what we are doing... Reasonnable complexity: “only” PSPACE; Faster is better: the enlarged semantics obviously satisfies this property.
SLIDE 124
Recent related work
This approach has received much attention in the last 3 years: extension to LTL properties [BMR06]:
B¨ uchi automata techniques; Repeated reachability.
Extension to timed properties:
Different techniques; No restrictions on cycles.
adaptations towards symbolic (zone-based) algorithms [DK06,SF07].
SLIDE 125
Recent related work
This approach has received much attention in the last 3 years: extension to LTL properties [BMR06]:
B¨ uchi automata techniques; Repeated reachability.
Extension to timed properties:
Different techniques; No restrictions on cycles.
adaptations towards symbolic (zone-based) algorithms [DK06,SF07].
SLIDE 126
Recent related work
This approach has received much attention in the last 3 years: extension to LTL properties [BMR06]:
B¨ uchi automata techniques; Repeated reachability.
Extension to timed properties:
Different techniques; No restrictions on cycles.
adaptations towards symbolic (zone-based) algorithms [DK06,SF07].
SLIDE 127 Outline of the talk
1
Introduction
2
Modeling the execution platform [Altisen & Tripakis, 2005]
3
A semantical approach [De Wulf et al., 2004]
4
Conclusions
SLIDE 128
Conclusions & Future Work
Implementability is an important problem: the semantics of timed automata is too mathematical; Two different approaches:
modeling the platform is a very expressive approach that involves only classical techniques; enlarging the semantics is a coarser solution, but has nice theoretical properties.
Future work:
Developpment and implementation of symbolic (zone-based) algorithms; Direct synthesis of robust controllers.
SLIDE 129
Conclusions & Future Work
Implementability is an important problem: the semantics of timed automata is too mathematical; Two different approaches:
modeling the platform is a very expressive approach that involves only classical techniques; enlarging the semantics is a coarser solution, but has nice theoretical properties.
Future work:
Developpment and implementation of symbolic (zone-based) algorithms; Direct synthesis of robust controllers.