Robustness in Timed Automata:
Analysis, Synthesis, Implementation
Ocan Sankur
PhD Thesis Defense LSV, Ecole Normale Sup´ erieure de Cachan May 24, 2013
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 1 / 28
Robustness in Timed Automata: Analysis, Synthesis, Implementation - - PowerPoint PPT Presentation
Robustness in Timed Automata: Analysis, Synthesis, Implementation Ocan Sankur PhD Thesis Defense LSV, Ecole Normale Sup erieure de Cachan May 24, 2013 Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 1 / 28 Real-Time
PhD Thesis Defense LSV, Ecole Normale Sup´ erieure de Cachan May 24, 2013
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 1 / 28
Systems whose behaviors depend on real-time constraints, such as Robots, Car, train, airplane components, Biomedical systems (e.g. insuline pump), ... Developing correct real-time systems is difficult: formal verification
Model-checking
? is reachable
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 2 / 28
Model-checking is often used to validate abstract designs. Model Verify Implement
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 3 / 28
Model-checking is often used to validate abstract designs. Model Verify Implement Model ≈ Implementation? Model: Abstract, simplified Idealized: perfect measurements and timings Implementation: measurement errors, unexpected input, hardware errors...
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 3 / 28
Model-checking is often used to validate abstract designs. Model Verify Implement Model ≈ Implementation? Model: Abstract, simplified Idealized: perfect measurements and timings Implementation: measurement errors, unexpected input, hardware errors...
Robustness
The ability of a system to resist to errors upto some bound. Goal: Add robustness to model-checking of real-time systems.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 3 / 28
t 2 4 6 8 10
frame 1 frame 2 frame 3 frame 4 frame 5 frame 6 ... enc 1 enc 2 enc 3 enc 4 enc 5
Components are abstracted as periodic events
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 4 / 28
t 2 4 6 8 10
frame 1 frame 2 frame 3 frame 4 frame 5 frame 6 ... enc 1 enc 2 enc 3 enc 4 enc 5
Components are abstracted as periodic events Property: No buffer overflow. Model-checking:
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 4 / 28
t 2 4 6 8 10
frame 1 frame 2 frame 3 frame 4 frame 5 frame 6 ... enc 1 enc 2 enc 3 enc 4
Assume that the implementation of the encoder is slightly slower due to unexpected workload, wrong hardware specification, etc.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 4 / 28
t 2 4 6 8 10
frame 1 frame 2 frame 3 frame 4 frame 5 frame 6 ... enc 1 enc 2 enc 3 enc 4 Overflow
Assume that the implementation of the encoder is slightly slower due to unexpected workload, wrong hardware specification, etc. Under the slightest enlargement, the system is incorrect. The system is not robust to small increases in execution times.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 4 / 28
Scenario
0 1 2 3 4 5 6 7 M2 M1 A C B D E with the constraints: A → B, C → D, E.
1 A, D, E must be scheduled on machine M1, 2 B, C must be scheduled on machine M2, 3 C starts no sooner than 2 time units, Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 5 / 28
Scenario
0 1 2 3 4 5 6 7 M2 M1 A C B D E with the constraints: A → B, C → D, E.
1 A, D, E must be scheduled on machine M1, 2 B, C must be scheduled on machine M2, 3 C starts no sooner than 2 time units,
Goal: Analyse a work-conserving scheduling policy on a given scenario (work-conserving: no machine is idle if a task is waiting for execution) Property: All tasks terminate in 6 time units Model-checking:
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 5 / 28
Scenario
0 1 2 3 4 5 6 7 M2 M1 A C B D E This cannot be an outcome of an algorithm (not work-conserving). Unexpectedly : duration of A is reduced to 1.999
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 5 / 28
Scenario
0 1 2 3 4 5 6 7 8 M2 M1 A B C D E Unexpectedly : duration of A is reduced to 1.999 The best scheduling in this case takes 7.999 time units. The system is not robust to small decreases in execution times.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 5 / 28
Scenario
0 1 2 3 4 5 6 7 8 M2 M1 A B C D E Unexpectedly : duration of A is reduced to 1.999 The best scheduling in this case takes 7.999 time units. The system is not robust to small decreases in execution times. Next: Timed automata formalism to model real-time systems.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 5 / 28
Timed automata = Finite automata + Analog clocks. [Alur and Dill 1994] ℓ0 ℓ1 ℓ2 x = 1, a, y ← 0 x ≤ 2, b, x ← 0 y ≥ 2, c, y ← 0 Runs: time delays + discrete actions (ℓ0, 0, 0)
1 1 2 2 x y
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 6 / 28
Timed automata = Finite automata + Analog clocks. [Alur and Dill 1994] ℓ0 ℓ1 ℓ2 x = 1, a, y ← 0 x ≤ 2, b, x ← 0 y ≥ 2, c, y ← 0 Runs: time delays + discrete actions (ℓ0, 0, 0)
1
− → (ℓ0, 1, 1)
1 1 2 2 x y
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 6 / 28
Timed automata = Finite automata + Analog clocks. [Alur and Dill 1994] ℓ0 ℓ1 ℓ2 x = 1, a, y ← 0 x ≤ 2, b, x ← 0 y ≥ 2, c, y ← 0 Runs: time delays + discrete actions (ℓ0, 0, 0)
1
− → (ℓ0, 1, 1)
a
− → (ℓ1, 1, 0)
1 1 2 2 x y
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 6 / 28
Timed automata = Finite automata + Analog clocks. [Alur and Dill 1994] ℓ0 ℓ1 ℓ2 x = 1, a, y ← 0 x ≤ 2, b, x ← 0 y ≥ 2, c, y ← 0 Runs: time delays + discrete actions (ℓ0, 0, 0)
1
− → (ℓ0, 1, 1)
a
− → (ℓ1, 1, 0)
0.6
− − → (ℓ1, 1.6, 0.6) b − → (ℓ2, 0, 0.6)
1 1 2 2 x y
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 6 / 28
Timed automata = Finite automata + Analog clocks. [Alur and Dill 1994] ℓ0 ℓ1 ℓ2 x = 1, a, y ← 0 x ≤ 2, b, x ← 0 y ≥ 2, c, y ← 0 Runs: time delays + discrete actions (ℓ0, 0, 0)
1
− → (ℓ0, 1, 1)
a
− → (ℓ1, 1, 0)
0.6
− − → (ℓ1, 1.6, 0.6) b − → (ℓ2, 0, 0.6)
1 1 2 2 x y
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 6 / 28
Timed automata = Finite automata + Analog clocks. [Alur and Dill 1994] ℓ0 ℓ1 ℓ2 x = 1, a, y ← 0 x ≤ 2, b, x ← 0 y ≥ 2, c, y ← 0 Runs: time delays + discrete actions (ℓ0, 0, 0)
1
− → (ℓ0, 1, 1)
a
− → (ℓ1, 1, 0)
0.6
− − → (ℓ1, 1.6, 0.6) b − → (ℓ2, 0, 0.6)
1.8
− − → (ℓ2, 1.8, 2.4) c − → (ℓ1, 1.8, 0)
1 1 2 2 x y
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 6 / 28
Timed automata = Finite automata + Analog clocks. [Alur and Dill 1994] ℓ0 ℓ1 ℓ2 x = 1, a, y ← 0 x ≤ 2, b, x ← 0 y ≥ 2, c, y ← 0
Theorem - [Alur & Dill 1994]
Checking the existence of a run reaching a location, or satisfying a B¨ uchi condition is PSPACE-comp. ◮ Efficient algorithms and tools.
1 1 2 2 x y
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 6 / 28
The semantics is idealistic
Convenient for modeling and verification but not realistic: Clocks are perfectly continuous and can be read exactly Discrete actions are instantaneous No lower bounds on time between consecutive actions (infinite frequency) ◮ How does a timed automaton perform under different assumptions? ◮ Timed automaton (Design) ↔ Real-world system (Implementation)?
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 7 / 28
The semantics is idealistic
Convenient for modeling and verification but not realistic: Clocks are perfectly continuous and can be read exactly Discrete actions are instantaneous No lower bounds on time between consecutive actions (infinite frequency) ◮ How does a timed automaton perform under different assumptions? ◮ Timed automaton (Design) ↔ Real-world system (Implementation)? In this thesis: Study of robustness in different models of perturbations of timings. Several methodologies to develop robust systems with timed automata.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 7 / 28
1
Guard Enlargement Robustness Analysis Robust Implementation Robust Controller Synthesis
2
Guard Shrinking Robustness Analysis The Shrinktech Tool Robust B¨ uchi Acceptance
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 8 / 28
1
Guard Enlargement Robustness Analysis Robust Implementation Robust Controller Synthesis
2
Guard Shrinking Robustness Analysis The Shrinktech Tool Robust B¨ uchi Acceptance
Enlargement
A measuring error of ±δ is added to all guards. Let Aδ the resulting timed au- tomaton. 1 ≤ x ≤ 2 ↓ 1 − δ ≤ x ≤ 2 + δ
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 9 / 28
Enlargement
A measuring error of ±δ is added to all guards. Let Aδ the resulting timed au- tomaton. 1 ≤ x ≤ 2 ↓ 1 − δ ≤ x ≤ 2 + δ
Robust model-checking
Given a timed automaton A, and a property φ, check whether there exists δ > 0 for which (all runs of) Aδ satisfies φ.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 9 / 28
Enlargement
A measuring error of ±δ is added to all guards. Let Aδ the resulting timed au- tomaton. 1 ≤ x ≤ 2 ↓ 1 − δ ≤ x ≤ 2 + δ
Robust model-checking
Given a timed automaton A, and a property φ, check whether there exists δ > 0 for which (all runs of) Aδ satisfies φ. Methodology:
1 Design timed automaton A 2 Model-check Aδ (δ is a parameter) 3 Implement A
(the implementation is overapproximated by Aδ).
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 9 / 28
Has been shown decidable for following properties:
[Puri 1998], [De Wulf, Doyen, Markey, Raskin 2004]
symbolic algorithms for flat timed automata, [Jaubert, Reynier 2011]
uchi, co-B¨ uchi, LTL is PSPACE-c,
[Bouyer, Markey, Reynier 2006] [Bouyer, Markey, S. 2011]
[Bouyer, Markey, Reynier 2008].
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 10 / 28
Has been shown decidable for following properties:
[Puri 1998], [De Wulf, Doyen, Markey, Raskin 2004]
symbolic algorithms for flat timed automata, [Jaubert, Reynier 2011]
uchi, co-B¨ uchi, LTL is PSPACE-c,
[Bouyer, Markey, Reynier 2006] [Bouyer, Markey, S. 2011]
[Bouyer, Markey, Reynier 2008].
Let L(A) denote the untimed language of A.
Theorem [S. MFCS 2011]
Checking whether there is δ > 0 such that L(A) = L(Aδ) is in EXPSPACE. Compare with: Untimed language equivalence is EXPSPACE-complete in timed automata with two clocks.
[Brenguier, G¨
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 10 / 28
Robustness analysis checks a given finished design. Can we rather modify a design to ensure its robustness by construction?
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 11 / 28
Given a timed automaton A, construct A′ such that A′ ∼ A A′ is “robust”. where ∼ is timed bisimulation,
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 11 / 28
Given a timed automaton A, construct A′ such that A′ ∼ A A′ ≈ǫ A′
δ, for some δ.
where ∼ is timed bisimulation, and ≈ǫ is approx. timed bisimulation.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 11 / 28
Given a timed automaton A, construct A′ such that A′ ∼ A A′ ≈ǫ A′
δ, for some δ.
where ∼ is timed bisimulation, and ≈ǫ is approx. timed bisimulation. s ≈ǫ t iff
σ
− → s′ ⇒ t
σ
− → t′, and t ≈ǫ t′,
d
− → s′ ⇒ ∃d′, |d − d′| ≤ ǫ, t
d′
− → t′, t ≈ǫ t′,
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 11 / 28
Given a timed automaton A, construct A′ such that A′ ∼ A A′ ≈ǫ A′
δ, for some δ.
where ∼ is timed bisimulation, and ≈ǫ is approx. timed bisimulation. Robust implementation methodology:
1 Design timed automaton A, 2 Check the correctness using existing tools, 3 Implement (automatically generated) A′.
Perturbed system is ǫ-bisimilar to the original design: A′
δ ≈ǫ A.
Approach separates design and implementation: User only concentrates on the exact semantics.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 11 / 28
Theorem [Bouyer, Larsen, Markey, S., Thrane. CONCUR 2011]
For any timed automaton A, and any ǫ > 0, there exists A′ and δ0 = O(ǫ +
1 |Clocks|) such that
A′ ∼ A and A′ ≈ǫ A′
δ, for all δ ∈ [0, δ0].
“All timed automata are approximately implementable.”
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 12 / 28
Theorem [Bouyer, Larsen, Markey, S., Thrane. CONCUR 2011]
For any timed automaton A, and any ǫ > 0, there exists A′ and δ0 = O(ǫ +
1 |Clocks|) such that
A′ ∼ A and A′ ≈ǫ A′
δ, for all δ ∈ [0, δ0].
“All timed automata are approximately implementable.” A′ is computable in exponential time and |A′| = O(2|A|( 1
ǫ)|clocks|)
Simpler and possibly smaller version is available: A ∼ A′ and same reachable locations in A′ and A′
δ.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 12 / 28
Previous algorithms concentrated on worst-case behavior of a given timed automaton: “Is there a run violating the property in Aδ?”.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 13 / 28
Previous algorithms concentrated on worst-case behavior of a given timed automaton: “Is there a run violating the property in Aδ?”. Controller synthesis: Can we construct a controller that chooses delays and edges so that a property is satisfied even in presence of perturbations? → Controller = strategy that observes perturbations and suggests moves accordingly.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 13 / 28
A game between Controller and Environment parameterized by δ > 0.
Excess Game Semantics Gδ(A)
At any state (ℓ, ν),
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 14 / 28
A game between Controller and Environment parameterized by δ > 0.
Excess Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d | = g,
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 14 / 28
A game between Controller and Environment parameterized by δ > 0.
Excess Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d | = g,
2 Environment chooses ǫ ∈ [−δ, δ], Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 14 / 28
A game between Controller and Environment parameterized by δ > 0.
Excess Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d | = g,
2 Environment chooses ǫ ∈ [−δ, δ], 3 New state is (ℓ′, (ν + d + ǫ)[R ← 0]). Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 14 / 28
A game between Controller and Environment parameterized by δ > 0.
Excess Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d | = g,
2 Environment chooses ǫ ∈ [−δ, δ], 3 New state is (ℓ′, (ν + d + ǫ)[R ← 0]).
x=y=1 y←0
ν0
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 14 / 28
A game between Controller and Environment parameterized by δ > 0.
Excess Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d | = g,
2 Environment chooses ǫ ∈ [−δ, δ], 3 New state is (ℓ′, (ν + d + ǫ)[R ← 0]).
x=y=1 y←0
ν0 ν′
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 14 / 28
A game between Controller and Environment parameterized by δ > 0.
Excess Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d | = g,
2 Environment chooses ǫ ∈ [−δ, δ], 3 New state is (ℓ′, (ν + d + ǫ)[R ← 0]).
x=y=1 y←0
ν0 ν′
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 14 / 28
A game between Controller and Environment parameterized by δ > 0.
Excess Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d | = g,
2 Environment chooses ǫ ∈ [−δ, δ], 3 New state is (ℓ′, (ν + d + ǫ)[R ← 0]).
x=y=1 y←0
ν0 ν′ Controller’s objective: reaching a given location. Environment’s objective is avoiding the same location.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 14 / 28
Parameterized Robust Controller Synthesis
Decide whether for some δ > 0, Controller has a strategy ensuring a reachability objective.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 15 / 28
Parameterized Robust Controller Synthesis
Decide whether for some δ > 0, Controller has a strategy ensuring a reachability objective. Methodology: Design a non-deterministic A describing all possible behaviors. Synthesize a controller that achieves the objective despite imprecisions.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 15 / 28
Parameterized Robust Controller Synthesis
Decide whether for some δ > 0, Controller has a strategy ensuring a reachability objective. Methodology: Design a non-deterministic A describing all possible behaviors. Synthesize a controller that achieves the objective despite imprecisions.
Theorem [Bouyer, Markey, S. ICALP’12]
Parameterized robust controller synthesis for reachability is EXPTIME-complete for timed automata and turn-based timed games. Turn-based timed games: Environment determines delays and edges in some locations.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 15 / 28
Three approaches
Robustness analysis: L(A) = L(Aδ)? Approximate robust implementation: A ≈ǫ A′
δ.
Robust controller synthesis: Gδ(A)
◮ Turn-based timed games ◮ Undecidability of cost-optimal reachability in weighted timed automata
(not presented)
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 16 / 28
1
Guard Enlargement Robustness Analysis Robust Implementation Robust Controller Synthesis
2
Guard Shrinking Robustness Analysis The Shrinktech Tool Robust B¨ uchi Acceptance
Shrinking
We require the automaton to avoid the borders
the guards by shrinking ( = strengthening) them. 1 ≤ x ≤ 2 ↓ 1 + δ ≤ x ≤ 2 − δ Any equality becomes empty
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 17 / 28
Shrinking
We require the automaton to avoid the borders
the guards by shrinking ( = strengthening) them. 1 ≤ x ≤ 2 ↓ 1 + δ ≤ x ≤ 2 − δ Robustness: Does any significant behavior disappear under shrinking? e.g. liveness If yes, then some behaviors require the borders of the guards.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 17 / 28
Shrinking
We require the automaton to avoid the borders
the guards by shrinking ( = strengthening) them. 1 ≤ x ≤ 2 ↓ 1 + δ ≤ x ≤ 2 − δ Robustness: Does any significant behavior disappear under shrinking? e.g. liveness If yes, then some behaviors require the borders of the guards. Implementation: If one is concerned about imprecisions by guard enlargement, then Model Real-world behavior 1 ≤ x ≤ 2 1 − ∆ ≤ x ≤ 2 + ∆
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 17 / 28
Shrinking
We require the automaton to avoid the borders
the guards by shrinking ( = strengthening) them. 1 ≤ x ≤ 2 ↓ 1 + δ ≤ x ≤ 2 − δ Robustness: Does any significant behavior disappear under shrinking? e.g. liveness If yes, then some behaviors require the borders of the guards. Implementation: If one is concerned about imprecisions by guard enlargement, then Model Real-world behavior 1 ≤ x ≤ 2 1 − ∆ ≤ x ≤ 2 + ∆ 1 + δ ≤ x ≤ 2 − δ 1 + δ − ∆ ≤ x ≤ 2 − δ + ∆ ⇒ 1 ≤ x ≤ 2
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 17 / 28
Problem: Some behaviors can be lost under any shrinking. We consider a different shrinking parameter for each atomic guard: 1 ≤ x ≤ 3 ∧ y ≥ 0 → 1 + 2δ ≤ x ≤ 3 − 5δ ∧ y ≥ 4δ. Rational δ′ ⇔ kδ. For δ > 0, and positive integer vector k, let A−
kδ denote the
automaton A “shrunk” by kδ.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 18 / 28
Problem: Some behaviors can be lost under any shrinking. We consider a different shrinking parameter for each atomic guard: 1 ≤ x ≤ 3 ∧ y ≥ 0 → 1 + 2δ ≤ x ≤ 3 − 5δ ∧ y ≥ 4δ. For δ > 0, and positive integer vector k, let A−
kδ denote the
automaton A “shrunk” by kδ.
Shrinkability
Given a timed automaton A, does there exist positive integers k and some δ0 > 0 such that A−
kδ
is non-blocking non-blocking-shrinkability can time-abstract simulate A simulation-shrinkability for all δ ∈ [0, δ0]?
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 18 / 28
Problem: Some behaviors can be lost under any shrinking. We consider a different shrinking parameter for each atomic guard: 1 ≤ x ≤ 3 ∧ y ≥ 0 → 1 + 2δ ≤ x ≤ 3 − 5δ ∧ y ≥ 4δ. For δ > 0, and positive integer vector k, let A−
kδ denote the
automaton A “shrunk” by kδ.
Shrinkability
Given a timed automaton A, does there exist positive integers k and some δ0 > 0 such that A−
kδ
is non-blocking non-blocking-shrinkability can time-abstract simulate some finite automaton F ⊑t.a. A simulation-shrinkability for all δ ∈ [0, δ0]?
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 18 / 28
Theorem [S., Bouyer, Markey FSTTCS 2011]
Non-blocking-shrinkability can be decided in PSPACE Simulation-shrinkability can be decided in time pseudo-polynomial in F and A (So A ⊑t.a. A−
kδ in EXPTIME)
Both at the same time, in EXPTIME
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 19 / 28
Theorem [S., Bouyer, Markey FSTTCS 2011]
Non-blocking-shrinkability can be decided in PSPACE Simulation-shrinkability can be decided in time pseudo-polynomial in F and A (So A ⊑t.a. A−
kδ in EXPTIME)
Both at the same time, in EXPTIME Methodology:
1 Design and verify A. 2 Check shrinkability: A−
kδ.
3 Implement A−
kδ.
We have A ⊑t.a. A−
kδ+∆ ⊑ A.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 19 / 28
Theorem [S., Bouyer, Markey FSTTCS 2011]
Non-blocking-shrinkability can be decided in PSPACE Simulation-shrinkability can be decided in time pseudo-polynomial in F and A (So A ⊑t.a. A−
kδ in EXPTIME)
Both at the same time, in EXPTIME Theoretical tools: A parameterized extension of difference-bound matrices: shrunk DBMs Relations between parameters k expressed as max-plus fixpoint equations on natural numbers. Proof characterizes equations that have solutions.
k1δ k2δ k3δ k4δ k3 = max(k1 + k2, k3) k2 = max(k2, k1) + k3
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 19 / 28
An implementation of the simulation-shrinkability algorithm
Network of timed automata (Kronos format) shrinktech Finite automaton F (Aldebaran format) Shrunk timed automata Parameter δ Parameterized simulator sets Counter-example: path or cycle Visualization (graphviz)
(kronos) shrinkable not shrinkable
The finite automaton F can be – the time-abstract bisimilarity quotient of A computed by Kronos, – manually given F ⊑t.a. A.
http://www.lsv.ens-cachan.fr/software/shrinktech
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 20 / 28
An implementation of the simulation-shrinkability algorithm
Network of timed automata (Kronos format) shrinktech Finite automaton F (Aldebaran format) Shrunk timed automata Parameter δ Parameterized simulator sets Counter-example: path or cycle Visualization (graphviz)
(kronos) shrinkable not shrinkable Model states trans |C| |F| time shrinkable Lip-Sync Prot. 230 680 5 4484/48049 28s No Philips Audio Prot. 446 2097 2 437/2734 46s Yes Train Gate Controller 68 199 11 952/8540 34s No Fischer’s Protocol 3 152 464 3 472/4321 20s Yes Fischer’s Protocol 4 752 2864 4 4382/65821 310min Yes And-Or Circuit 12 20 4 80/497 1.3s Yes Flip-Flop Circuit 22 34 5 30/64 0.9s Yes Latch Circuit 32 77 7 105/364 1.6s Yes
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 20 / 28
ℓ0 ℓ1 ℓ2 x = 1, y ← 0 x ≤ 2, a, x ← 0 y ≥ 2, b, y ← 0
x y 1 1 2 2
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 21 / 28
ℓ0 ℓ1 ℓ2 x = 1, y ← 0 x ≤ 2, a, x ← 0 y ≥ 2, b, y ← 0
x y 1 1 2 2
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 21 / 28
ℓ0 ℓ1 ℓ2 x = 1, y ← 0 x ≤ 2, a, x ← 0 y ≥ 2, b, y ← 0
x y 1 1 2 2
Consecutives values of x at ℓ1 are nondecreasing, and always x ≤ 2.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 21 / 28
ℓ0 ℓ1 ℓ2 x = 1, y ← 0 x ≤ 2, a, x ← 0 y ≥ 2, b, y ← 0
x y 1 1 2 2
Consecutives values of x at ℓ1 are nondecreasing, and always x ≤ 2. ◮ Along any infinite run, the clock x needs infinite precision. A real run would actually be blocking.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 21 / 28
ℓ0 ℓ1 ℓ2 x = 1, y ← 0 x ≤ 2, a, x ← 0 y ≥ 2, b, y ← 0
x y 1 1 2 2
Consecutives values of x at ℓ1 are nondecreasing, and always x ≤ 2. ◮ Along any infinite run, the clock x needs infinite precision. A real run would actually be blocking. How to check if there is an infinite run realizable with “finite precision” delays?
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 21 / 28
Some behaviors in timed automata are not realistic, and may require high precision, and convergence. Goal: Suggest an alternative notion of B¨ uchi acceptance for timed automata: only accept realizable runs, avoid convergence.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 22 / 28
A game between Controller and Environment parameterized by δ > 0.
Conservative Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d + ǫ | = g for all ǫ ∈ [−δ, δ].
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 22 / 28
A game between Controller and Environment parameterized by δ > 0.
Conservative Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d + ǫ | = g for all ǫ ∈ [−δ, δ].
2 Environment chooses ǫ ∈ [−δ, δ], Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 22 / 28
A game between Controller and Environment parameterized by δ > 0.
Conservative Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d + ǫ | = g for all ǫ ∈ [−δ, δ].
2 Environment chooses ǫ ∈ [−δ, δ], 3 New state is (ℓ′, (ν + d + ǫ)[R ← 0]). Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 22 / 28
A game between Controller and Environment parameterized by δ > 0.
Conservative Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d + ǫ | = g for all ǫ ∈ [−δ, δ].
2 Environment chooses ǫ ∈ [−δ, δ], 3 New state is (ℓ′, (ν + d + ǫ)[R ← 0]).
1<x<2 y←0
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 22 / 28
A game between Controller and Environment parameterized by δ > 0.
Conservative Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d + ǫ | = g for all ǫ ∈ [−δ, δ].
2 Environment chooses ǫ ∈ [−δ, δ], 3 New state is (ℓ′, (ν + d + ǫ)[R ← 0]).
1<x<2 y←0
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 22 / 28
A game between Controller and Environment parameterized by δ > 0.
Conservative Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d + ǫ | = g for all ǫ ∈ [−δ, δ].
2 Environment chooses ǫ ∈ [−δ, δ], 3 New state is (ℓ′, (ν + d + ǫ)[R ← 0]).
1<x<2 y←0
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 22 / 28
A game between Controller and Environment parameterized by δ > 0.
Conservative Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d + ǫ | = g for all ǫ ∈ [−δ, δ].
2 Environment chooses ǫ ∈ [−δ, δ], 3 New state is (ℓ′, (ν + d + ǫ)[R ← 0]).
1<x<2 y←0
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 22 / 28
A game between Controller and Environment parameterized by δ > 0.
Conservative Game Semantics Gδ(A)
At any state (ℓ, ν),
1 Controller chooses a delay d ≥ δ, and an edge ℓ
g,R
− − → ℓ′, such that ν + d + ǫ | = g for all ǫ ∈ [−δ, δ].
2 Environment chooses ǫ ∈ [−δ, δ], 3 New state is (ℓ′, (ν + d + ǫ)[R ← 0]).
1<x<2 y←0
Controller’s objective: ensuring a B¨ uchi condition Environment’s objective: the complement
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 22 / 28
Previous work: Chatterjee, Henzinger, Prabhu 2008: for fixed δ > 0.
Parameterized Robust Controller Synthesis
Decide whether for some δ > 0, Controller has a strategy ensuring the B¨ uchi condition. Such an infinite run is then realizable despite imprecisions
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 23 / 28
Previous work: Chatterjee, Henzinger, Prabhu 2008: for fixed δ > 0.
Parameterized Robust Controller Synthesis
Decide whether for some δ > 0, Controller has a strategy ensuring the B¨ uchi condition.
Theorem [S., Bouyer, Markey, Reynier. Submitted].
Parameterized robust controller synthesis for B¨ uchi objectives is PSPACE-complete on timed automata The problem consists in finding cycles that do not become blocked (= aperiodicity)
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 23 / 28
Previous work: Chatterjee, Henzinger, Prabhu 2008: for fixed δ > 0.
Parameterized Robust Controller Synthesis
Decide whether for some δ > 0, Controller has a strategy ensuring the B¨ uchi condition.
Theorem [S., Bouyer, Markey, Reynier. Submitted].
Parameterized robust controller synthesis for B¨ uchi objectives is PSPACE-complete on timed automata Robustly controllable ⇔ there exists an “aperiodic” lasso. The problem consists in finding cycles that do not become blocked (= aperiodicity)
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 23 / 28
Non-aperiodic cycle: At each iteration, the only reachable states are in the bottom half-space.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 24 / 28
Non-aperiodic cycle: At each iteration, the only reachable states are in the bottom half-space. Aperiodic cycle: No such constraining half-spaces.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 24 / 28
Lemma
Environment has a strategy ensuring a distance of at least ǫ from the half-space, along any non-aperiodic cycle.
≥ ǫ
No infinite iteration of such a cycle is possible ⇒ One cannot satisfy B¨ uchi.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 25 / 28
Lemma
Environment has a strategy ensuring a distance of at least ǫ from the half-space, along any non-aperiodic cycle.
≥ ǫ
No infinite iteration of such a cycle is possible ⇒ One cannot satisfy B¨ uchi.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 25 / 28
Shrinkability analysis: a new notion for robustness and implementability. Software tool and experimental results. Robust B¨ uchi acceptance. Perturbation game semantics: Decidable cost-optimal reachability for weighted timed automata, but undecidable for weighted timed games (not presented).
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 26 / 28
Several perturbation models: – Enlargement: syntactic, game semantics. – Shrinking: syntactic, game semantics. – Sampling (not presented). Several methodologies: – Robustness analysis – Robust controller synthesis – Robust implementation Software tool for shrinkability analysis. Parameter synthesis.
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 27 / 28
Same or close computational complexity as the classical setting + Extensions of some techniques from the exact case: shrunk DBMs, regions with shrinking constraints, orbit graphs = Symbolic algorithms? Robust controller synthesis on timed games (by giving Environment more power) Probabilistic perturbation models:
◮ Almost-sure reachability and safety ◮ Quantifying mean-time to failure
Compositional robustness
Ocan Sankur (ENS Cachan) Robustness in Timed Automata May 24, 2013 28 / 28