50
1 Beyond Liveness Efficient Parameter Synthesis for Time Bounded Liveness Gerd Behrmann Kim Guldstrand Larsen Jacob Illum Rasmussen BRICS/CISS, Aalborg University, DENMARK

Efficient Parameter Synthesis for Time Bounded Liveness

  • Upload
    others

  • View
    15

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Efficient Parameter Synthesis for Time Bounded Liveness

1

Beyond Liveness

Efficient Parameter Synthesis for Time Bounded Liveness

Gerd BehrmannKim Guldstrand LarsenJacob Illum Rasmussen

BRICS/CISS, Aalborg University, DENMARK

Page 2: Efficient Parameter Synthesis for Time Bounded Liveness

2

Safety & Liveness

WANG YI: Safety properties

= those that can be checked with reachability analysis

Liveness: properties = those that can not be checked without loop detection

It seems that liveness is very much related to QoS properties e.g. "Over time, every 100 events that occur, there must be at least 10 good ones".

LESLIE LAMPORT: Knowing that something will eventually happen isn't

particularly useful; we'd like to know that it happens before the sun explodes in a few billion years.

Liveness Manifesto“Beyond Safety”, workshopSchloss Ringberg, Germany 2004.

Page 3: Efficient Parameter Synthesis for Time Bounded Liveness

3

Safety & Liveness

PAROSH ABDULLA: The traditional definition of liveness "something good will

eventually occur" is not very useful for an engineer. It is not satisfactory to know that your program will terminate within one year. Bounded liveness is practically more relevant, but it is a safety property.

HARDI HUNGAR: Liveness is what remains if one abstracts away the time

bounds which usually come with every response property.

1. A liveness property is useless in practice if it is not accompanied by bound2. A liveness property accompanied by a bound is a safety property 3. Consequence of the above: There is no liveness property which is useful in practice

Page 4: Efficient Parameter Synthesis for Time Bounded Liveness

4

Bounded Liveness

P2 P1

P6 P3 P4

P7 P5

[10,16][2,3]

[6,6] [10,16]

[2,2] [2,8]

M = {M1,M2}

- Task P={P1,.., Pm} - Machines M={M1,..,Mn}

- Duration ∆ : P ! N1xN1

- < : p.o. on P (pred.)

Task Graph Scheduling w Uncertainty,

FixedPrioritySch.

[2,3]

Page 5: Efficient Parameter Synthesis for Time Bounded Liveness

5

Bounded Liveness

P2 P1

P6 P3 P4

P7 P5

[10,16][2,3]

[6,6] [10,16]

[2,2] [2,8]

M = {M1,M2}

- Task P={P1,.., Pm} - Machines M={M1,..,Mn}

- Duration ∆ : P ! N1xN1

- < : p.o. on P (pred.)

Task Graph Scheduling w Uncertainty,

FixedPrioritySch.

[2,3] A}∙ 35 ( Task1.End Æ … Æ Task7.End )

???

Page 6: Efficient Parameter Synthesis for Time Bounded Liveness

6

Bounded Liveness

4Beyond SafetyApril 2004 Kim G. LarsenU C b  

Train Crossing

River

Crossing

Gate

StopableArea

[10,20]

[7,15]

Queue

[3,5]

Page 7: Efficient Parameter Synthesis for Time Bounded Liveness

7

Bounded Liveness

4Beyond SafetyApril 2004 Kim G. LarsenU C b  

Train Crossing

River

Crossing

Gate

StopableArea

[10,20]

[7,15]

Queue

[3,5]

Að ( Train1.Appr ) A}∙ 98 Train1.Cross ) ???

Page 8: Efficient Parameter Synthesis for Time Bounded Liveness

8

Beyond Liveness = ?rameter Synthesis

Page 9: Efficient Parameter Synthesis for Time Bounded Liveness

9

Beyond Liveness = Parameter Synthesis

How to synthesize the minimum value p for which a time-bounded liveness property is valid ?

Farn Wang, 2000: Parameterized RegionsBruyere, Dall’Olio, Raskin, 2003:

Parameterized TCTL using Presburger ArithmeticMetzner, 2004: Binary Search

Efficiency

Page 10: Efficient Parameter Synthesis for Time Bounded Liveness

10

Outline of Talk

Simulation Graph for Timed Automata

Reduction to Reachability Analysis Parameterized Liveness Analysis Experimental Results

Extensions Priced Timed Automata

(Worst Cost Execution) Timed Games

(Time-optimal Winning Strategies) Conclusions

Page 11: Efficient Parameter Synthesis for Time Bounded Liveness

11

Outline of Talk

Simulation Graph for Timed Automata

Reduction to Reachability Analysis Parameterized Liveness Analysis Experimental Results

Extensions Priced Timed Automata

(Worst Cost Execution) Timed Games

(Time-optimal Winning Strategies) Conclusions

Page 12: Efficient Parameter Synthesis for Time Bounded Liveness

12

Symbolic States & Transitions

n

m

x>3

y:=0

delays to

conjuncts to

projects to

x

y

1<=x<=41<=y<=3

x

y1<=x, 1<=y-2<=x-y<=3

x

y 3<x, 1<=y-2<=x-y<=3

3<x, y=0

x

y

Thus (n,1<=x<=4,1<=y<=3) =a => (m,3<x, y=0)

a

using Zones

Page 13: Efficient Parameter Synthesis for Time Bounded Liveness

13

Reduction to Reachability

φ φ φφ φφ

φ

p

S0

Page 14: Efficient Parameter Synthesis for Time Bounded Liveness

14

Reduction to Reachability

φ φ φφ φφ

φ

p

Assumption: A}φ holds !!Add clock c to modelAdd global variable p

S0

Page 15: Efficient Parameter Synthesis for Time Bounded Liveness

15

Reduction to Reachability

φ φ φφ φφ

φ

Passed Wait

: φ

p

Page 16: Efficient Parameter Synthesis for Time Bounded Liveness

16

Reduction to Reachability

φ φ φφ φφ

φ

Passed Wait

p

: φ

Page 17: Efficient Parameter Synthesis for Time Bounded Liveness

17

Reduction to Reachability

φ φ φφ φφ

φ

Passed Wait

p:=max(p,maxc(S))

: φ

Page 18: Efficient Parameter Synthesis for Time Bounded Liveness

18

Reduction to Reachability

φ φ φφ φφ

φ

Passed Wait

: φ

p

Page 19: Efficient Parameter Synthesis for Time Bounded Liveness

19

Reduction to Reachability

φ φ φφ φφ

φ

Passed Wait

p

: φ

Page 20: Efficient Parameter Synthesis for Time Bounded Liveness

20

Reduction to Reachability

φ φ φφ φφ

φ

Passed Wait

: φ

p

Page 21: Efficient Parameter Synthesis for Time Bounded Liveness

21

Reduction to Reachability

φ φ φφ φφ

φ

Passed Wait

: φ

p

Page 22: Efficient Parameter Synthesis for Time Bounded Liveness

22

Reduction to Reachability

φ φ φφ φφ

φ

Passed Wait

: φ

p

Page 23: Efficient Parameter Synthesis for Time Bounded Liveness

23

Outline of Talk

Simulation Graph for Timed Automata

Reduction to Reachability Analysis Parameterized Liveness Analysis Experimental Results

Extensions Priced Timed Automata

(Worst Cost Execution) Timed Games

(Time-optimal Winning Strategies) Conclusions

Page 24: Efficient Parameter Synthesis for Time Bounded Liveness

24

Liveness Algorithm

PassedST Unexplored

A} φ

: φ

S

Bouajjani, Tripakis, Yovine, 97

Page 25: Efficient Parameter Synthesis for Time Bounded Liveness

25

Liveness Algorithm

PassedST Unexplored

A} φ

: φ

= ?

Page 26: Efficient Parameter Synthesis for Time Bounded Liveness

26

Liveness Algorithm

PassedST Unexplored

A} φ

: φ

Page 27: Efficient Parameter Synthesis for Time Bounded Liveness

27

Liveness Algorithm

PassedST Unexplored

A} φ

: φ

??

Page 28: Efficient Parameter Synthesis for Time Bounded Liveness

28

Liveness Algorithm

PassedST Unexplored

A} φ

: φ

µ

??

Page 29: Efficient Parameter Synthesis for Time Bounded Liveness

29

Liveness Algorithm

PassedST Unexplored

A} φ

: φ

Page 30: Efficient Parameter Synthesis for Time Bounded Liveness

30

Liveness Algorithm

PassedST Unexplored

A} φ

: φ

Page 31: Efficient Parameter Synthesis for Time Bounded Liveness

31

Liveness Algorithm

PassedST Unexplored

A} φ

: φ

Page 32: Efficient Parameter Synthesis for Time Bounded Liveness

32

Outline of Talk

Simulation Graph for Timed Automata

Reduction to Reachability Analysis Parameterized Liveness Analysis Experimental Results

Extensions Priced Timed Automata

(Worst Cost Execution) Timed Games

(Time-optimal Winning Strategies) Conclusions

Page 33: Efficient Parameter Synthesis for Time Bounded Liveness

33

Parameterized Liveness Algorithm

PassedST Unexplored

A} φ

: φ

p

S

Page 34: Efficient Parameter Synthesis for Time Bounded Liveness

34

Parameterized Liveness Algorithm

PassedST Unexplored

A} φ

: φ

p

Add clock c to modelAdd global variable p

S

Page 35: Efficient Parameter Synthesis for Time Bounded Liveness

35

Parameterized Liveness Algorithm

PassedST Unexplored

A} φ

: φ

=π(X) ? p

Page 36: Efficient Parameter Synthesis for Time Bounded Liveness

36

Parameterized Liveness Algorithm

PassedST Unexplored

A} φ

: φ

p:=max(p,maxc(S))

Page 37: Efficient Parameter Synthesis for Time Bounded Liveness

37

Experimental Results

11 random problems. (100 Tasks, 2 Processes)

Task Graph Scheduling Train Gate

Page 38: Efficient Parameter Synthesis for Time Bounded Liveness

38

Outline of Talk

Simulation Graph for Timed Automata

Reduction to Reachability Analysis Parameterized Liveness Analysis Experimental Results

Extensions Priced Timed Automata

(Worst Cost Execution) Timed Games

(Time-optimal Winning Strategies) Conclusions

Page 39: Efficient Parameter Synthesis for Time Bounded Liveness

39

Cost-Bounded Liveness

P2 P1

P6 P3 P4

P7 P5

[10,16][2,3]

[6,6] [10,16]

[2,2] [2,8]

M = {M1,M2}

- Energy-rates C:M ! NxN

Task Graph Scheduling w Uncertainty,

FixedPrioritySch.

[2,3]cost’==1

cost’==5

Page 40: Efficient Parameter Synthesis for Time Bounded Liveness

40

Cost-Bounded Liveness

P2 P1

P6 P3 P4

P7 P5

[10,16][2,3]

[6,6] [10,16]

[2,2] [2,8]

M = {M1,M2}

- Energy-rates C:M ! NxN

Task Graph Scheduling w Uncertainty,

FixedPrioritySch.

[2,3]

A}cost∙ 60 ( Task1.End Æ … Æ Task7.End ) ???

cost’==1

cost’==5

Page 41: Efficient Parameter Synthesis for Time Bounded Liveness

41

Priced Zone

x

y

Δ4

2-1

Z

Cost x , y =2 y−x2

CAV’01

Page 42: Efficient Parameter Synthesis for Time Bounded Liveness

42

Reset

x

y

Δ4

21 -

Z

y:=0

2

Page 43: Efficient Parameter Synthesis for Time Bounded Liveness

43

Reset

x

y

Δ4

2-1

Z

y:=0

2

Page 44: Efficient Parameter Synthesis for Time Bounded Liveness

44

Reset

x

y

Δ4

2-1

Z

y:=0

2

Page 45: Efficient Parameter Synthesis for Time Bounded Liveness

45

Reset

x

y

Δ4

2-1

Z

y:=0

2

1 -1

TACAS’2005: For dual-priced TA we use dual-priced zones:

( Z, {( c1 , d1 ), … ,( ck , dk )} )characterizing ALL cost-pair by which states may be reached !

Page 46: Efficient Parameter Synthesis for Time Bounded Liveness

46

Controller Synthesis and Timed GamesProduction Cell

GIVEN System moves S, Controller moves C, and property φ FIND strategy sC such that sC||S ² φ

A Two-Player Game

GIVEN System moves S, Controller moves C, and property φ FIND strategy sC such that sC||S ² φ

A Two-Player Game

CONCUR 2005

Page 47: Efficient Parameter Synthesis for Time Bounded Liveness

47

Time Optimality Winning Strategy

1

2

3

4

x>1

x∙1

x<1

x:=0

x<1

x∙1

x¸2

Assumption:Known upper bound B-- here 5 (say)

Technique:Add new clock tAdd invariant

t∙B to all locationst unconstrained in initial state(s)

Result:

x

t

Minimum timerequired = 2

Page 48: Efficient Parameter Synthesis for Time Bounded Liveness

48

Experimental Results

Page 49: Efficient Parameter Synthesis for Time Bounded Liveness

49

Conclusion & Future Work

Improvements of algorithms: Pruning: give upper bounds on the remaining time for

reaching goal condition. Guiding: towards most expensive goal state.

Alternative algorithms for parameterized liveness: Breadth-first algorithm Forward on-the-fly algorithm

Extensions to Priced Timed Automata

Implementation in UPPAAL & UPPAAL Cora

Page 50: Efficient Parameter Synthesis for Time Bounded Liveness

50

END