70
Automatic Rectangular Refinement Automatic Rectangular Refinement of Affine Hybrid Automata of Affine Hybrid Automata Tom Henzinger Tom Henzinger EPFL EPFL Laurent Doyen Laurent Doyen ULB ULB Jean-François Raskin Jean-François Raskin ULB ULB FORMATS 2005 – Sep 27 FORMATS 2005 – Sep 27 th th - Uppsala - Uppsala

Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

Automatic Rectangular Automatic Rectangular Refinement of Affine Hybrid Refinement of Affine Hybrid

AutomataAutomata

Tom HenzingerTom Henzinger

EPFLEPFL

Laurent DoyenLaurent Doyen

ULBULB

Jean-François RaskinJean-François Raskin

ULBULB

FORMATS 2005 – Sep 27FORMATS 2005 – Sep 27thth - Uppsala - Uppsala

Page 2: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

OverviewOverview

• Automatic analysis of affine hybrid systems

Page 3: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

OverviewOverview

• Automatic analysis of affine hybrid systems• Example:

Navigation Benchmark

vx

)( dvvAv {

Page 4: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

OverviewOverview

• Automatic analysis of affine hybrid systems• Example:

Two trajectories

vx

)( dvvAv {

Page 5: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

OverviewOverview

• Automatic analysis of affine hybrid systems• Example:

Navigation Benchmark

vx

)( dvvAv {Affine dynamics

Page 6: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

OverviewOverview

• Automatic analysis of affine hybrid systems• Example:

vx

)( dvvAv {Affine dynamicsDiscrete states

B 2

+

A2 2

4

44 3

Page 7: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

• Some classes of hybrid automata:– Timed automata ( )– Rectangular automata ( )– Linear automata ( )

ReminderReminder

1x][ ,bax

bxa ii ~

Page 8: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

• Some classes of hybrid automata:– Timed automata ( )– Rectangular automata ( )– Linear automata ( )

ReminderReminder

1x][ ,bax

bxa ii ~

Limit for decidability of Language Emptiness

Page 9: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ReminderReminder

• Some classes of hybrid automata:– Timed automata ( )– Rectangular automata ( )– Linear automata ( )– Affine automata ( )– Polynomial automata ( )– etc.

1x][ ,bax

bxa ii ~ cxbxa iiii ~

cxxp ii ~),(

Limit for decidability of Language Emptiness

Page 10: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ReminderReminder

• Some classes of hybrid automata:– Timed automata ( )– Rectangular automata ( )– Linear automata ( )– Affine automata ( )– Polynomial automata ( )– etc.

1x][ ,bax

bxa ii ~ cxbxa iiii ~

cxxp ii ~),(

Limit for symbolic computation of Post with HyTech

Limit for decidability of Language Emptiness

Page 11: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

MethodologyMethodology

• Affine automaton A and set of states Bad

• Check that Reach(A) Bad = Ø

Page 12: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

MethodologyMethodology

• Affine dynamics is too complex ?Abstract it !

• Affine automaton A and set of states Bad

• Check that Reach(A) Bad = Ø

Page 13: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

MethodologyMethodology

• Affine dynamics is too complex ?Abstract it !

• Abstraction is too coarse ? Refine it !

HOW ?

• Affine automaton A and set of states Bad

• Check that Reach(A) Bad = Ø

Page 14: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

MethodologyMethodology

Affine dynamics Rectangular dynamics

xx 2

30 x

• 1. Abstraction: over-approximation

Page 15: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

Let Then

MethodologyMethodology

Affine dynamics Rectangular dynamics

xx 2

30 x

]2,1[x

30 x

• 1. Abstraction: over-approximation

30Inv x)](max),([min InvInv]2,1[ xfxf xx

-x f(x) 2{

Page 16: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

xx 2

30 x

MethodologyMethodology

Line l

• 2. Refinement: split locations by a line cut

23x

l

0 3

Page 17: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

xx 2

30 x

323 x

MethodologyMethodology

Line l

230 x

• 2. Refinement: split locations by a line cut

23x xx 2

xx 2l

0 3

Page 18: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

MethodologyMethodology

Abstract

Reach(A’)Bad Ø?=

A’

A

Yes

Original Automaton

Property verified

Page 19: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

MethodologyMethodology

Abstract

Reach(A’)Bad Ø?=

A’

A

Yes

Original Automaton

(Undecidable)Property verified

Page 20: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

MethodologyMethodology

Abstract Refine

Reach(A’)Bad Ø?=

A’

A

No

Yes

Original Automaton

(Undecidable)Property verified

•using Reach(A’)•using Pre*(Bad)

Page 21: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

RefinementRefinement

• 2. Refinement: split locations by a line cut

• Which location(s) ?– Loc1 = Locations reachable in the last step– Loc2 = Reachable locations that can reach Bad– Better: replace the state space by Loc2

Page 22: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

RefinementRefinement

• 2. Refinement: split locations by a line cut

• Which location(s) ?– Loc1 = Locations reachable in the last step– Loc2 = Reachable locations that can reach Bad– Better: replace the state space by Loc2

• Which line cut ?– The best cut for some criterion characterizing the goodness of the resulting approximation.

Page 23: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

NotationsNotations

Page 24: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

NotationsNotations

Page 25: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

NotationsNotations

l

P+

P-A

B

Page 26: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

NotationsNotations

l

P+

P-A

B

Page 27: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

• ?

Goodness of a cutGoodness of a cut

• A good cut should minimize

Page 28: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

• ?

• ?

Goodness of a cutGoodness of a cut

• A good cut should minimize

Page 29: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

• ?

• ?

• ?

• …

Goodness of a cutGoodness of a cut

• A good cut should minimize

Page 30: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

• ?

• ?

• ?

• …

Goodness of a cutGoodness of a cut

Our choice

• A good cut should minimize

Page 31: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

Finding the optimal cutFinding the optimal cut

P

Page 32: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

Extremal level sets of f(x,y)Extremal level sets of f(x,y)

P

Page 33: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

Extremal level sets of g(x,y)Extremal level sets of g(x,y)

P

Page 34: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

P

Assume

Page 35: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

Then any line separating { } and { }

is better than any other line.

ExampleExample

P

Assume

Page 36: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

P

Page 37: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

Any line separating { } and { }

is better than any other line.

P

Page 38: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

Any line separating { } and { }

is better than any other line.

P

Page 39: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

Thus, for every

the best line separates and

P

Page 40: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

Thus, for every

the best line separates and

P

Page 41: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

Thus, for every

the best line separates and

P

Page 42: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

Thus, for every

the best line separates and

P

Page 43: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

P

When

Page 44: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

P

When the best line cut must separate both

from and from

Page 45: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

P

The best line cut must separate both

from and from

Page 46: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

Intersection

P

The process continues because it is still possible to separate

both from and from

When an intersection occurs…

Page 47: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

P

Page 48: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

P

Page 49: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

P

Page 50: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

P

Page 51: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

Intersection

P

When a second intersection occurs…

Page 52: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

Intersection

P

In this case, we have reached the "limit of separability"

Page 53: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ExampleExample

An optimal cut

P

Page 54: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

How to compute the How to compute the intersection ?intersection ?

P

Page 55: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

How to compute the How to compute the intersection ?intersection ?

P

We have to find the minimal such that:

(u,v)

Page 56: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

How to compute the How to compute the intersection ?intersection ?

P

We have to find the minimal such that:

This is a linear program !

(u,v)

Page 57: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

The algorithmThe algorithm

• Applies in the plane (2D)– Several particular cases

Page 58: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

The algorithmThe algorithm

• Applies in the plane (2D)– Several particular cases

• What for higher dimension ?– An option: discretize the problem using a grid– Apply a (more) discrete algorithm– The exact solution can be arbitrarily closely approximated

Page 59: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

The algorithmThe algorithm

• Applies in the plane (2D)– Several particular cases

• What for higher dimension ?– An option: discretize the problem using a grid– Apply a (more) discrete algorithm– The exact solution can be arbitrarily closely approximated

N.B.: it is possible to define a general algorithm in nD, but it requires to solve difficult

geometrical problems (parametric convex hulls).

Page 60: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

The algorithmThe algorithm

• Applies in the plane (2D)– Several particular cases

• What for higher dimension ?– An option: discretize the problem using a grid– Apply a (more) discrete algorithm– The exact solution can be arbitrarily closely approximated

N.B.: it is possible to define a general algorithm in nD, but it requires to solve difficult

geometrical problems (parametric convex hulls).

Page 61: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

Navigation benchmarkNavigation benchmark

In each location, the dynamics has the form:

We cut in the plane v1-v2

Page 62: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

Navigation benchmarkNavigation benchmark

In each location, the dynamics has the form:

We cut in the plane v1-v2

Page 63: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ResultsResults

NAV 04 NAV 07

Initial states Bad states Good states

Page 64: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

Results: NAV 04Results: NAV 04

Forward Backward

Page 65: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

Results: NAV 04Results: NAV 04

Forward Forward

Page 66: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

Results: NAV 07Results: NAV 07

Backward

Page 67: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ConclusionConclusion

• Approximations• Rectangular• Over-approximations

Page 68: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ConclusionConclusion

• Approximations• Rectangular• Over-approximations

• Refinements• Automatic• Optimal split for some criterion (at least in 2D)

Page 69: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ConclusionConclusion

• Approximations• Rectangular• Over-approximations

• Refinements• Automatic• Optimal split for some criterion (at least in 2D)

• Possible future work• Under-approximations• Optimal split for some other criterion• Combine with other approaches (barrier certificates, ellipsoïds, …)

Page 70: Automatic Rectangular Refinement of Affine Hybrid Automata Tom Henzinger EPFL Laurent Doyen ULB Jean-François Raskin ULB FORMATS 2005 – Sep 27 th - Uppsala

ReferencesReferences

• [FI04] A. Fehnker and F. Ivancic. Benchmarks for hybrid systems verification. In HSCC 2004, LNCS 2993, pp 326-341.

• [Fre05] G. Frehse. Phaver: Algorithmic verification of hybrid systems past hytech. In HSCC 2005, LNCS 3414, pp 258-273.