Optimal strategies in weighted timed games: undecidability and approximation
Nicolas Markey
LSV, CNRS & ENS Cachan, France
(joint work with Patricia Bouyer and Samy Jaziri)
68 NQRT seminar – Rennes, France October 1, 2015
Optimal strategies in weighted timed games: undecidability and - - PowerPoint PPT Presentation
Optimal strategies in weighted timed games: undecidability and approximation Nicolas Markey LSV, CNRS & ENS Cachan, France (joint work with Patricia Bouyer and Samy Jaziri) 68 NQRT seminar Rennes, France October 1, 2015 Model checking
Nicolas Markey
LSV, CNRS & ENS Cachan, France
(joint work with Patricia Bouyer and Samy Jaziri)
68 NQRT seminar – Rennes, France October 1, 2015
system
[http://www.embedded.com]
property
a! b? a? b!
always 3 ≤ h ≤ 12 model-checking algorithm
system
[http://www.embedded.com]
property
a! b? a? b! ?
always 3 ≤ h ≤ 12 synthesis algorithm
a? b!
Example (A computer mouse)
idle left right
left button? right button? left click! left button? left double click! right click! right button? right double click!
Definition ([AD90])
A timed automaton is made of a transition system,
Example (A computer mouse)
idle left right
left button? right button? left click! left button? left double click! right click! right button? right double click!
[AD90] Alur, Dill. Automata For Modeling Real-Time Systems. ICALP, 1990.
Definition ([AD90])
A timed automaton is made of a transition system, a set of clocks,
Example (A computer mouse)
idle left right
left button? right button? left click! left button? left double click! right click! right button? right double click! x
[AD90] Alur, Dill. Automata For Modeling Real-Time Systems. ICALP, 1990.
Definition ([AD90])
A timed automaton is made of a transition system, a set of clocks, timing constraints on states and transitions.
Example (A computer mouse)
idle left
x≤300
right
x≤300
left button? x := 0 right button? x := 0 x = 300 left click! x ≤ 300 left button? left double click! x = 300 right click! x ≤ 300 right button? right double click! x
[AD90] Alur, Dill. Automata For Modeling Real-Time Systems. ICALP, 1990.
Example
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2 y x 1 1 2 2
Example
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2 y x 1 1 2 2
Example
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2 y x 1 1 2 2
Example
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2 y x 1 1 2 2
Example
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2 y x 1 1 2 2
Example
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2 y x 1 1 2 2
Example
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2 y x 1 1 2 2
Example
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2 y x 1 1 2 2
Example
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2 y x 1 1 2 2
Example
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2 y x 1 1 2 2
Example
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2 y x 1 1 2 2
Example
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2 y x 1 1 2 2
Theorem ([AD90,ACD93, ...])
Reachability in timed automata is decidable (as well as many other important properties).
[AD90] Alur, Dill. Automata For Modeling Real-Time Systems. ICALP, 1990. [ACD93] Alur, Courcoubetis, Dill. Model-Checking in Dense Real-Time. Inf. & Comp., 1993.
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2
x=1 y:=0 x≤2, x:=0 y≥2, y:=0 x=0 ∧ y≥2
Theorem
Reachability checking in timed automata is PSPACE-complete.
Definition
A timed game is made of a timed automaton;
Example
ℓ0 (x≤2) ℓ1 ℓ2 ℓ3
x<1 x<1 x:=0 x≤1 x≥2 x≥1
Definition
A timed game is made of a timed automaton; a partition between controllable and uncontrollable transitions.
Example
ℓ0 (x≤2) ℓ1 ℓ2 ℓ3
x<1 x<1 x:=0 x≤1 x≥2 x≥1
Definition
A timed game is made of a timed automaton; a partition between controllable and uncontrollable transitions.
Example
ℓ0 (x≤2) ℓ1 ℓ2 ℓ3
x<1 x<1 x:=0 x≤1 x≥2 x≥1
a memoryless strategy
in (ℓ0, x = 0): wait 0.5 goto ℓ1 in (ℓ1, x): wait until x = 2 goto in (ℓ2, x ≤ 1): wait until x = 1 goto ℓ3 in (ℓ3, x ≤ 1): wait until x = 1 goto ℓ1
Theorem ([AMPS98])
Deciding the winner in a timed game (e.g. for reachability
Proof
x=1 ∧ 1≤y≤2
[AMPS98] Asarin, Maler, Pnueli, Sifakis. Controller synthesis for timed automata. SSC, 1998.
Theorem ([AMPS98])
Deciding the winner in a timed game (e.g. for reachability
Proof
x=1 ∧ 1≤y≤2
[AMPS98] Asarin, Maler, Pnueli, Sifakis. Controller synthesis for timed automata. SSC, 1998.
Theorem ([AMPS98])
Deciding the winner in a timed game (e.g. for reachability
Proof
x=1 ∧ 1≤y≤2
[AMPS98] Asarin, Maler, Pnueli, Sifakis. Controller synthesis for timed automata. SSC, 1998.
Theorem ([AMPS98])
Deciding the winner in a timed game (e.g. for reachability
Proof
x=1 ∧ 1≤y≤2
[AMPS98] Asarin, Maler, Pnueli, Sifakis. Controller synthesis for timed automata. SSC, 1998.
Theorem ([AMPS98])
Deciding the winner in a timed game (e.g. for reachability
Proof
x=1 ∧ 1≤y≤2
regions are sufficient; the computation terminates.
[AMPS98] Asarin, Maler, Pnueli, Sifakis. Controller synthesis for timed automata. SSC, 1998.
1
Introduction: timed automata and timed games
2
Measuring extra quantities in timed automata Example: task graph scheduling Timed automata with observer variables
3
Cost-optimal strategies Optimal reachability in priced timed automata Optimal reachability in priced timed games
4
Conclusions and future works
1
Introduction: timed automata and timed games
2
Measuring extra quantities in timed automata Example: task graph scheduling Timed automata with observer variables
3
Cost-optimal strategies Optimal reachability in priced timed automata Optimal reachability in priced timed games
4
Conclusions and future works
Compute D×(C×(A+B))+(A+B)+(C×D) using two processors:
P1 (fast): time + 2 picoseconds × 3 picoseconds energy idle 10 Watt in use 90 Watts P2 (slow): time + 5 picoseconds × 7 picoseconds energy idle 20 Watts in use 30 Watts + T1 × T2 × T3 + T4 × T5 + T6
B A D C C D
Compute D×(C×(A+B))+(A+B)+(C×D) using two processors:
P1 (fast): time + 2 picoseconds × 3 picoseconds energy idle 10 Watt in use 90 Watts P2 (slow): time + 5 picoseconds × 7 picoseconds energy idle 20 Watts in use 30 Watts + T1 × T2 × T3 + T4 × T5 + T6
B A D C C D
5 10 15 20 25 P2 P1 Sch1 T2 T3 T5 T6 T1 T4 13 picoseconds 1.37 nanojoules
Compute D×(C×(A+B))+(A+B)+(C×D) using two processors:
P1 (fast): time + 2 picoseconds × 3 picoseconds energy idle 10 Watt in use 90 Watts P2 (slow): time + 5 picoseconds × 7 picoseconds energy idle 20 Watts in use 30 Watts + T1 × T2 × T3 + T4 × T5 + T6
B A D C C D
5 10 15 20 25 P2 P1 Sch1 T2 T3 T5 T6 T1 T4 13 picoseconds 1.37 nanojoules P2 P1 Sch2 T1 T2 T3 T4 T5 T6 12 picoseconds 1.39 nanojoules
Compute D×(C×(A+B))+(A+B)+(C×D) using two processors:
P1 (fast): time + 2 picoseconds × 3 picoseconds energy idle 10 Watt in use 90 Watts P2 (slow): time + 5 picoseconds × 7 picoseconds energy idle 20 Watts in use 30 Watts + T1 × T2 × T3 + T4 × T5 + T6
B A D C C D
5 10 15 20 25 P2 P1 Sch1 T2 T3 T5 T6 T1 T4 13 picoseconds 1.37 nanojoules P2 P1 Sch2 T1 T2 T3 T4 T5 T6 12 picoseconds 1.39 nanojoules P2 P1 Sch3 T1 T2 T3 T4 T5 T6 19 picoseconds 1.32 nanojoules
Definition ([KPSY99,ALP01,BFH+01])
A priced timed automaton is made of a timed automaton;
Example
x=1 x:=0
[KPSY99] Kesten, Pnueli, Sifakis, Yovine. Decidable Integration Graphs. Inf. & Comp., 1999. [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata. HSCC, 2001. [BFH+01] Behrmann et al. Minimum-cost reachability in priced timed automata. HSCC, 2001.
Definition ([KPSY99,ALP01,BFH+01])
A priced timed automaton is made of a timed automaton; the price of each transition and location.
Example
−3 +6 −6 +2 −1 x=1 x:=0
[KPSY99] Kesten, Pnueli, Sifakis, Yovine. Decidable Integration Graphs. Inf. & Comp., 1999. [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata. HSCC, 2001. [BFH+01] Behrmann et al. Minimum-cost reachability in priced timed automata. HSCC, 2001.
Definition ([KPSY99,ALP01,BFH+01])
A priced timed automaton is made of a timed automaton; the price of each transition and location.
Example
−3 +6 −6 +2 −1 x=1 x:=0 −3 1 2 3 4 1
[KPSY99] Kesten, Pnueli, Sifakis, Yovine. Decidable Integration Graphs. Inf. & Comp., 1999. [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata. HSCC, 2001. [BFH+01] Behrmann et al. Minimum-cost reachability in priced timed automata. HSCC, 2001.
Definition ([KPSY99,ALP01,BFH+01])
A priced timed automaton is made of a timed automaton; the price of each transition and location.
Example
−3 +6 −6 +2 −1 x=1 x:=0 −3 −3
1 6
1 2 3 4 1
[KPSY99] Kesten, Pnueli, Sifakis, Yovine. Decidable Integration Graphs. Inf. & Comp., 1999. [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata. HSCC, 2001. [BFH+01] Behrmann et al. Minimum-cost reachability in priced timed automata. HSCC, 2001.
Definition ([KPSY99,ALP01,BFH+01])
A priced timed automaton is made of a timed automaton; the price of each transition and location.
Example
−3 +6 −6 +2 −1 x=1 x:=0 −3 −3 +6
1 6
1 2 3 4 1
[KPSY99] Kesten, Pnueli, Sifakis, Yovine. Decidable Integration Graphs. Inf. & Comp., 1999. [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata. HSCC, 2001. [BFH+01] Behrmann et al. Minimum-cost reachability in priced timed automata. HSCC, 2001.
Definition ([KPSY99,ALP01,BFH+01])
A priced timed automaton is made of a timed automaton; the price of each transition and location.
Example
−3 +6 −6 +2 −1 x=1 x:=0 −3 −3 +6 +6
1 6 1 2
1 2 3 4 1
[KPSY99] Kesten, Pnueli, Sifakis, Yovine. Decidable Integration Graphs. Inf. & Comp., 1999. [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata. HSCC, 2001. [BFH+01] Behrmann et al. Minimum-cost reachability in priced timed automata. HSCC, 2001.
Definition ([KPSY99,ALP01,BFH+01])
A priced timed automaton is made of a timed automaton; the price of each transition and location.
Example
−3 +6 −6 +2 −1 x=1 x:=0 −3 −3 +6 +6 −6
1 6 1 2
−1 1 2 3 4 1
[KPSY99] Kesten, Pnueli, Sifakis, Yovine. Decidable Integration Graphs. Inf. & Comp., 1999. [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata. HSCC, 2001. [BFH+01] Behrmann et al. Minimum-cost reachability in priced timed automata. HSCC, 2001.
Definition ([KPSY99,ALP01,BFH+01])
A priced timed automaton is made of a timed automaton; the price of each transition and location.
Example
−3 +6 −6 +2 −1 x=1 x:=0 −3 −3 +6 +6 −6 −6
1 6 1 2
−1
1 3
1 2 3 4 1
[KPSY99] Kesten, Pnueli, Sifakis, Yovine. Decidable Integration Graphs. Inf. & Comp., 1999. [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata. HSCC, 2001. [BFH+01] Behrmann et al. Minimum-cost reachability in priced timed automata. HSCC, 2001.
Definition ([KPSY99,ALP01,BFH+01])
A priced timed automaton is made of a timed automaton; the price of each transition and location.
Example
−3 +6 −6 +2 −1 x=1 x:=0 −3 −3 +6 +6 −6 −6 +2
1 6 1 2
−1
1 3
1 2 3 4 1
[KPSY99] Kesten, Pnueli, Sifakis, Yovine. Decidable Integration Graphs. Inf. & Comp., 1999. [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata. HSCC, 2001. [BFH+01] Behrmann et al. Minimum-cost reachability in priced timed automata. HSCC, 2001.
Definition ([KPSY99,ALP01,BFH+01])
A priced timed automaton is made of a timed automaton; the price of each transition and location.
Example
−3 +6 −6 +2 −1 x=1 x:=0 −3 −3 +6 +6 −6 −6 +2
1 6 1 2
−1
1 3
1 2 3 4 1
[KPSY99] Kesten, Pnueli, Sifakis, Yovine. Decidable Integration Graphs. Inf. & Comp., 1999. [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata. HSCC, 2001. [BFH+01] Behrmann et al. Minimum-cost reachability in priced timed automata. HSCC, 2001.
Compute D×(C×(A+B))+(A+B)+(C×D) using two processors:
P1 (fast): time + 2 picoseconds × 3 picoseconds energy idle 10 Watt in use 90 Watts P2 (slow): time + 5 picoseconds × 7 picoseconds energy idle 20 Watts in use 30 Watts + T1 × T2 × T3 + T4 × T5 + T6
B A D C C D
5 10 15 20 25 P2 P1 Sch1 T2 T3 T5 T6 T1 T4 13 picoseconds 1.37 nanojoules P2 P1 Sch2 T1 T2 T3 T4 T5 T6 12 picoseconds 1.39 nanojoules P2 P1 Sch3 T1 T2 T3 T4 T5 T6 19 picoseconds 1.32 nanojoules
Processors: + + +
˙ c=90 x≤2
idle
˙ c=10
× × ×
˙ c=90 x≤3
add1
x:=0
mul1
x:=0
done1
x=2
done1
x=3
Processors: + + +
˙ c=90 x≤2
idle
˙ c=10
× × ×
˙ c=90 x≤3
add1
x:=0
mul1
x:=0
done1
x=2
done1
x=3
+ + +
˙ c=30 x≤5
idle
˙ c=20
× × ×
˙ c=30 x≤7
add2
x:=0
mul2
x:=0
done2
x=5
done2
x=7
Processors: + + +
˙ c=90 x≤2
idle
˙ c=10
× × ×
˙ c=90 x≤3
add1
x:=0
mul1
x:=0
done1
x=2
done1
x=3
+ + +
˙ c=30 x≤5
idle
˙ c=20
× × ×
˙ c=30 x≤7
add2
x:=0
mul2
x:=0
done2
x=5
done2
x=7
Tasks: T4 F4
t1 ∧ t2
add1 done1
t4:=1 t1 ∧ t2
add2 done2
t4:=1
1
Introduction: timed automata and timed games
2
Measuring extra quantities in timed automata Example: task graph scheduling Timed automata with observer variables
3
Cost-optimal strategies Optimal reachability in priced timed automata Optimal reachability in priced timed games
4
Conclusions and future works
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching :
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching : 5t + 6(3 − t) + 1
18 20 22 2
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching : 5t + 6(3 − t) + 1 5t + 3(3 − t) + 9
18 20 22 2
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching : min 5t + 6(3 − t) + 1 5t + 3(3 − t) + 9
20 22 2
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching : inf
0≤t≤2 min
5t + 6(3 − t) + 1 5t + 3(3 − t) + 9
20 22 2
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching : inf
0≤t≤2 min
5t + 6(3 − t) + 1 5t + 3(3 − t) + 9
18 20 22 2
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching : inf
0≤t≤2 min
5t + 6(3 − t) + 1 5t + 3(3 − t) + 9
18 20 22 2
The optimal schedule consists in waiting 2 time units in ; going through .
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
Proof
Regions are not precise enough;
˙ p=3 ˙ p=3 ˙ p=3 ˙ p=5 x:=0 p+=2
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
Proof
Regions are not precise enough; Use regions with corner-points:
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
Proof
Regions are not precise enough; Use regions with corner-points:
˙ p=3 ˙ p=3 ˙ p=3 ˙ p=3 ˙ p=5 x:=0 p+=2
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
Proof
Regions are not precise enough; Use regions with corner-points:
˙ p=3 ˙ p=3 ˙ p=3 ˙ p=3 ˙ p=5 p+=0 p+=3 p+=0 x:=0 p+=2
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
Proof
Regions are not precise enough; Use regions with corner-points:
˙ p=3 ˙ p=3 ˙ p=3 ˙ p=3 ˙ p=5 p+=0 p+=3 p+=0 x:=0 p+=2 ˙ p=3 ˙ p=3 ˙ p=3 ˙ p=5 p+=0 p+=0 x:=0 p+=2
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
Proof
t1 t2 t3 t4 t5
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
Proof
t1 t2
x≤2
t3 t4 t5 t1 + t2 ≤ 2
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
Proof
t1
y:=0
t2
x≤2
t3 t4
y≥3
t5 t1 + t2 ≤ 2 t2 + t3 + t4 ≥ 3
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
Proof
t1
y:=0
t2
x≤2
t3 t4
y≥3
t5 Minimize
t1 + t2 ≤ 2 t2 + t3 + t4 ≥ 3
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
Proof
t1
y:=0
t2
x≤2
t3 t4
y≥3
t5 Minimize
t1 + t2 ≤ 2 t2 + t3 + t4 ≥ 3 infimum over bounded zone reached at a point
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
Proof
∀π. ∃πcp. cost(πcp) ≤ cost(π).
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
Theorem ([BBBR07])
Optimal reachability in priced timed automata is PSPACE-complete.
Proof
∀π. ∃πcp. cost(πcp) ≤ cost(π). approximate path in corner-point abstraction by a real run: ∀πcp. ∃π. cost(π) ≤ cost(πcp) + ǫ.
[BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem. FMSD, 2007.
1
Introduction: timed automata and timed games
2
Measuring extra quantities in timed automata Example: task graph scheduling Timed automata with observer variables
3
Cost-optimal strategies Optimal reachability in priced timed automata Optimal reachability in priced timed games
4
Conclusions and future works
Compute D×(C×(A+B))+(A+B)+(C×D) using two processors:
P1 (fast): time + 2 picoseconds × 3 picoseconds energy idle 10 Watt in use 90 Watts P2 (slow): time + 5 picoseconds × 7 picoseconds energy idle 20 Watts in use 30 Watts + T1 × T2 × T3 + T4 × T5 + T6
B A D C C D
5 10 15 20 25 P2 P1 Sch1 T2 T3 T5 T6 T1 T4 13 picoseconds 1.37 nanojoules P2 P1 Sch2 T1 T2 T3 T4 T5 T6 12 picoseconds 1.39 nanojoules P2 P1 Sch3 T1 T2 T3 T4 T5 T6 19 picoseconds 1.32 nanojoules
Using games to model uncertainty over delays
Processors with exact delays: + + +
˙ c=90 x≤2
idle
˙ c=10
× × ×
˙ c=90 x≤3
add1
x:=0
mul1
x:=0
done1
x=2
done1
x=3
Using games to model uncertainty over delays
Processors with exact delays: + + +
˙ c=90 x≤2
idle
˙ c=10
× × ×
˙ c=90 x≤3
add1
x:=0
mul1
x:=0
done1
x=2
done1
x=3
Processors with approximate delays: + + +
˙ c=90 x≤3
idle
˙ c=10
× × ×
˙ c=90 x≤4
add1
x:=0
mul1
x:=0
done1
x≥2
done1
x≥3
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching :
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching : 5t + 6(3 − t) + 1
18 20 22 2
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching : 5t + 6(3 − t) + 1 5t + 3(3 − t) + 9
18 20 22 2
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching : max 5t + 6(3 − t) + 1 5t + 3(3 − t) + 9
20 22 2
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching : inf
0≤t≤2 max
5t + 6(3 − t) + 1 5t + 3(3 − t) + 9
20 22 2
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching : inf
0≤t≤2 max
5t + 6(3 − t) + 1 5t + 3(3 − t) + 9
18 20 22 2
Example
˙ p=5 y=0 ˙ p=6 ˙ p=3
y:=0 x≥3 p+=1 p+=9 x≥3
Minimal cost for reaching : inf
0≤t≤2 max
5t + 6(3 − t) + 1 5t + 3(3 − t) + 9
(with topt = 1 3 )
18 20 22 2
Optimal strategies need not exist...
˙ p=2 ˙ p=1
x=0
Optimal strategies need not exist...
˙ p=2 ˙ p=1
x=0
Optimal strategies may need memory...
˙ p=2 ˙ p=1
x=1 x>0
Theorem ([BBR05,BBM06])
Optimal reachability in priced timed games is undecidable.
[BBR05] Brihaye, Bruy` ere, Raskin. On optimal timed strategies. FORMATS, 2005. [BBM06] Bouyer, Brihaye, Markey. Improved undecidability results on weighted timed automa. IPL, 2006.
Theorem ([BBR05,BBM06])
Optimal reachability in priced timed games is undecidable.
Proof
Encode a two-counter machine as a priced timed game.
[BBR05] Brihaye, Bruy` ere, Raskin. On optimal timed strategies. FORMATS, 2005. [BBM06] Bouyer, Brihaye, Markey. Improved undecidability results on weighted timed automa. IPL, 2006.
Theorem ([BBR05,BBM06])
Optimal reachability in priced timed games is undecidable.
Proof
Encode a two-counter machine as a priced timed game. add the value of clock x to the accumulated cost
Add+(x) ˙ p=0 ˙ p=1 z=0 x=1 x:=0 z=1 z:=0 y=1, y:=0 y=1, y:=0
[BBR05] Brihaye, Bruy` ere, Raskin. On optimal timed strategies. FORMATS, 2005. [BBM06] Bouyer, Brihaye, Markey. Improved undecidability results on weighted timed automa. IPL, 2006.
Theorem ([BBR05,BBM06])
Optimal reachability in priced timed games is undecidable.
Proof
Encode a two-counter machine as a priced timed game. add the value of clock x to the accumulated cost add 1 − x to the accumulated cost
Add+(x) ˙ p=1 ˙ p=0 z=0 x=1 x:=0 z=1 z:=0 y=1, y:=0 y=1, y:=0
[BBR05] Brihaye, Bruy` ere, Raskin. On optimal timed strategies. FORMATS, 2005. [BBM06] Bouyer, Brihaye, Markey. Improved undecidability results on weighted timed automa. IPL, 2006.
Theorem ([BBR05,BBM06])
Optimal reachability in priced timed games is undecidable.
Proof
Encode a two-counter machine as a priced timed game. add the value of clock x to the accumulated cost add 1 − x to the accumulated cost check that y = 2x
Test(y=2x) ˙ p=0 Add+(x) Add+(x) Add−(y) ˙ p=0 Add−(x) Add−(x) Add+(y) z=0 z=0 p+=2 p+=1 z=0
Theorem ([BBR05,BBM06])
Optimal reachability in priced timed games is undecidable.
Proof
Encode a two-counter machine as a priced timed game. add the value of clock x to the accumulated cost add 1 − x to the accumulated cost check that y = 2x
Test(y=2x) ˙ p=0 Add+(x) Add+(x) Add−(y) ˙ p=0 Add−(x) Add−(x) Add+(y) z=0 z=0 p+=2 p+=1 cost=3+(2x−y) cost=3+(y−2x) z=0
Theorem ([BBR05,BBM06])
Optimal reachability in priced timed games is undecidable.
Proof
Encode a two-counter machine as a priced timed game. add the value of clock x to the accumulated cost add 1 − x to the accumulated cost check that y = 2x divide clock x by 2
Divide2(x) ˙ p=0 ˙ p=0 ˙ p=0 ˙ p=0 Test(x=2y) x=1 x:=0 y:=0 z=1 z:=0 z=0 z=0 z=0
Theorem ([BBR05,BBM06])
Optimal reachability in priced timed games is undecidable.
Proof
Encode a two-counter machine as a priced timed game. add the value of clock x to the accumulated cost add 1 − x to the accumulated cost check that y = 2x divide clock x by 2 We can use the following encoding: x1 = 1 2c1 x2 = 1 2c2
Theorem ([BBR05,BBM06])
Optimal reachability in priced timed games is undecidable.
Proof
Encode a two-counter machine as a priced timed game. qhalt
Instr. Instr. Instr. Instr. Instr. Instr. Test Test Test Test Test Test Test
Theorem ([BBR05,BBM06])
Optimal reachability in priced timed games is undecidable.
Proof
Encode a two-counter machine as a priced timed game.
Lemma
The halting state is reachable if, and only if, there is an optimal strategy in the priced timed game.
[BBR05] Brihaye, Bruy` ere, Raskin. On optimal timed strategies. FORMATS, 2005. [BBM06] Bouyer, Brihaye, Markey. Improved undecidability results on weighted timed automa. IPL, 2006.
Theorem ([BBR05,BBM06])
Optimal reachability in priced timed games is undecidable.
Proof
Encode a two-counter machine as a priced timed game.
Lemma
The halting state is reachable if, and only if, there is an optimal strategy in the priced timed game. reach terminal location with total weight at most 3
[BBR05] Brihaye, Bruy` ere, Raskin. On optimal timed strategies. FORMATS, 2005. [BBM06] Bouyer, Brihaye, Markey. Improved undecidability results on weighted timed automa. IPL, 2006.
Definition
Definition
Cost of a path: cost(π) = sum of costs of all transitions until target location
Definition
Cost of a path: cost(π) = sum of costs of all transitions until target location Cost of a strategy: cost(σ) = sup{cost(π) | π outcome of σ}
Definition
Cost of a path: cost(π) = sum of costs of all transitions until target location Cost of a strategy: cost(σ) = sup{cost(π) | π outcome of σ} Optimal cost in a priced timed game:
Definition
Cost of a path: cost(π) = sum of costs of all transitions until target location Cost of a strategy: cost(σ) = sup{cost(π) | π outcome of σ} Optimal cost in a priced timed game:
The existence of a strategy with cost less than k is undecidable. What about deciding if optcostG ≤ k?
Trying to reuse the previous reduction...
q0 q1 q2 q3 q4 q5 q6 q7 q8 q9
c1+=2 c1==0 c2+=2 c2 −− c2 −− c1+=2 c2>0 c2==0 c1 −− c1 −− c2+=2 c1>0 c1==0
Trying to reuse the previous reduction...
q0 q1 q2 q3 q4 q5 q6 q7 q8 q9
c1+=2 c1==0 c2+=2 c2 −− c2 −− c1+=2 c2>0 c2==0 c1 −− c1 −− c2+=2 c1>0 c1==0 c2 c1 q0
Trying to reuse the previous reduction...
q0 q1 q2 q3 q4 q5 q6 q7 q8 q9
c1+=2 c1==0 c2+=2 c2 −− c2 −− c1+=2 c2>0 c2==0 c1 −− c1 −− c2+=2 c1>0 c1==0 c2 c1 q0
Trying to reuse the previous reduction...
q0 q1 q2 q3 q4 q5 q6 q7 q8 q9
c1+=2 c1==0 c2+=2 c2 −− c2 −− c1+=2 c2>0 c2==0 c1 −− c1 −− c2+=2 c1>0 c1==0 c2 c1 q0
Trying to reuse the previous reduction...
q0 q1 q2 q3 q4 q5 q6 q7 q8 q9
c1+=2 c1==0 c2+=2 c2 −− c2 −− c1+=2 c2>0 c2==0 c1 −− c1 −− c2+=2 c1>0 c1==0 c2 c1 q0
final cost: 3+
25 − 1 25
Adapting the previous reduction...
qhalt
Adapting the previous reduction...
qhalt
Instr. Instr. Instr. Instr. Instr. Instr. Test Test Test Test Test Test Test
Adapting the previous reduction...
qhalt
Instr. Instr. Instr. Instr. Instr. Instr. Test Test Test Test Test Test Test Exit Exit Exit Exit Exit Exit
exit nodes: cost 3+ 1
2n
(n = length of path)
Adapting the previous reduction...
Instr. Instr. Instr. Instr. Instr. Instr. Instr. Test Test Test Test Test Test Test Exit Exit Exit Exit Exit Exit
exit nodes: cost 3+ 1
2n
(n = length of path)
Adapting the previous reduction...
Instr. Instr. Instr. Instr. Instr. Instr. Instr. Test Test Test Test Test Test Test Exit Exit Exit Exit Exit Exit
exit nodes: cost 3+ 1
2n
(n = length of path) if M does not halt: Player 1 simulates correctly until 2n > 1
ǫ.
cost(σ) ≤ 3 + ǫ
Adapting the previous reduction...
Instr. Instr. Instr. Instr. Instr. Instr. Instr. Test Test Test Test Test Test Test Exit Exit Exit Exit Exit Exit
exit nodes: cost 3+ 1
2n
(n = length of path) if M does not halt: Player 1 simulates correctly until 2n > 1
ǫ.
cost(σ) ≤ 3 + ǫ if M halts: correct simulation for finite duration. cost(σ) ≥ 3 + αM for all σ
Theorem ([BJM15])
The value problem is undecidable in priced timed games.
[BJM15] Bouyer, Jaziri, Markey. On the Value Problem in Weighted Timed Games. CONCUR, 2015.
Theorem ([BJM15])
The value problem is undecidable in priced timed games.
Remark
blue nodes and intermediary instruction modules have cost zero everywhere; positive weights only occur in acyclic parts.
Instr. Instr. Instr. Instr. Instr. Instr. Instr. Test Test Test Test Test Test Test Exit Exit Exit Exit Exit Exit [BJM15] Bouyer, Jaziri, Markey. On the Value Problem in Weighted Timed Games. CONCUR, 2015.
Definition
A priced timed game G is almost-strongly non-Zeno if there exists κ > 0 for any run ρ that starts and ends in the same region: cost(ρ) ≥ κ
cost(ρ) = 0
Definition
A priced timed game G is almost-strongly non-Zeno if there exists κ > 0 for any run ρ that starts and ends in the same region: cost(ρ) ≥ κ
cost(ρ) = 0
Theorem ([BJM15])
The optimal cost of almost-strongly non-Zeno priced timed automata can be approximated.
[BJM15] Bouyer, Jaziri, Markey. On the Value Problem in Weighted Timed Games. CONCUR, 2015.
Definition
A priced timed game G is almost-strongly non-Zeno if there exists κ > 0 for any run ρ that starts and ends in the same region: cost(ρ) ≥ κ
cost(ρ) = 0
Theorem ([BJM15])
The optimal cost of almost-strongly non-Zeno priced timed automata can be approximated: for every ǫ > 0, we can compute values v+
ǫ and v− ǫ such that
|v+
ǫ − v− ǫ | < ǫ
v−
ǫ ≤ optcostG ≤ v+ ǫ
a strategy σǫ such that
[BJM15] Bouyer, Jaziri, Markey. On the Value Problem in Weighted Timed Games. CONCUR, 2015.
Proof
semi-unfolding of region automaton (seen as a timed game)
Only cost 0 Kernel K Only cost 0 Kernel K
Proof
semi-unfolding of region automaton (seen as a timed game)
(ℓ,r)
Only cost 0 Kernel K Only cost 0 Kernel K
(ℓ,r)
Proof
semi-unfolding of region automaton (seen as a timed game)
(ℓ,r)
Only cost 0 Kernel K Only cost 0 Kernel K
(ℓ,r)
Proof
semi-unfolding of region automaton (seen as a timed game)
(ℓ,r)
Only cost 0 Kernel K Only cost 0 Kernel K
(ℓ,r)
Hypothesis: cost > 0 ↓ cost ≥ κ
Proof
semi-unfolding of region automaton (seen as a timed game)
(ℓ,r)
Only cost 0 Kernel K Only cost 0 Kernel K
(ℓ,r)
Hypothesis: cost > 0 ↓ cost ≥ κ bounded depth
Proof
semi-unfolding of region automaton (seen as a timed game) compute exact optimal cost in tree-like parts 1
Proof
semi-unfolding of region automaton (seen as a timed game) compute exact optimal cost in tree-like parts 1
Proof
semi-unfolding of region automaton (seen as a timed game) compute exact optimal cost in tree-like parts 1
Proof
semi-unfolding of region automaton (seen as a timed game) compute exact optimal cost in tree-like parts 1
Proof
semi-unfolding of region automaton (seen as a timed game) compute exact optimal cost in tree-like parts compute approximate optimal cost in kernels Output cost functions f
Proof
semi-unfolding of region automaton (seen as a timed game) compute exact optimal cost in tree-like parts compute approximate optimal cost in kernels Output cost functions f Under- and over-approximate by piecewise constant functions f −
ǫ
and f +
ǫ
Proof
semi-unfolding of region automaton (seen as a timed game) compute exact optimal cost in tree-like parts compute approximate optimal cost in kernels Output cost functions f Under- and over-approximate by piecewise constant functions f −
ǫ
and f +
ǫ
Proof
semi-unfolding of region automaton (seen as a timed game) compute exact optimal cost in tree-like parts compute approximate optimal cost in kernels Output cost functions f Under- and over-approximate by piecewise constant functions f −
ǫ
and f +
ǫ
reachability timed game in small regions
Proof
semi-unfolding of region automaton (seen as a timed game) compute exact optimal cost in tree-like parts compute approximate optimal cost in kernels Output cost functions f Under- and over-approximate by piecewise constant functions f −
ǫ
and f +
ǫ
reachability timed game in small regions
1
Introduction: timed automata and timed games
2
Measuring extra quantities in timed automata Example: task graph scheduling Timed automata with observer variables
3
Cost-optimal strategies Optimal reachability in priced timed automata Optimal reachability in priced timed games
4
Conclusions and future works
Priced timed automata and games
convenient for modelling resources; 1-player setting remains tractable (sort of); 2-player setting undecidable, but approximable. approximation algorithms are a convenient trade-off.
Priced timed automata and games
convenient for modelling resources; 1-player setting remains tractable (sort of); 2-player setting undecidable, but approximable. approximation algorithms are a convenient trade-off.
Future work
improve approximation technique (in terms of complexity); extend results to whole class of priced timed games; average energy and energy constraints; robust analysis of priced timed games; develop a tool.