robustness and implementability of timed automata martin de wulf laurent doyen nicolas markey...

45
Robustness and Robustness and Implementability of Timed Implementability of Timed Automata Automata Martin De Wulf Martin De Wulf Laurent Doyen Laurent Doyen Nicolas Markey Nicolas Markey Jean-François Raskin Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT 2004 – Sep 24 FORMATS-FTRTFT 2004 – Sep 24 th th - Grenoble - Grenoble

Upload: sydney-williamson

Post on 16-Dec-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

Robustness and Robustness and Implementability of Timed Implementability of Timed

AutomataAutomata

Martin De WulfMartin De Wulf

Laurent DoyenLaurent Doyen

Nicolas MarkeyNicolas Markey

Jean-François RaskinJean-François Raskin

Centre Fédéré en Vérification

FORMATS-FTRTFT 2004 – Sep 24FORMATS-FTRTFT 2004 – Sep 24thth - Grenoble - Grenoble

Page 2: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

MotivationMotivation

• Embedded Controllers… are difficult to develop (concurrency, real-time, continuous environment, ...).

… are safety critical.

Use formal models + Verification:

Timed Automata andReachability Analysis

Page 3: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

Timed Automata

closed guard

reset

Location

Transition

2a

0:a

2b

0:b

1:a0:b

A

Clocks: {a,b}

Page 4: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

ObjectivesObjectives

• From a verified model, generate (automatically) a correct implementation

• Using classical formalism (e.g. timed automata)

• …but interpreting the model in a way that guarantees the transfer of the properties from model to implementation3x

Page 5: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

Robustness and ImplentationRobustness and Implentation

Model

•Perfect continuous clocks

•Instantaneous synchronisations

•Reaction time = 0

•Digital clocks

•Delayed synchronisations

•Reaction time > 0

Implementation

vs.

Correct model

Correct implementatio

n

??

Page 6: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

Timed Automata: SemanticsTimed Automata: Semantics

Classical

Perfect clocks

Rate:

Guard:

1/ dtdx

][ iff | gvgv

Imprecise clocks

Rate:

Guard:

]1,1[/ dtdx

][ iff | gvgv

],[][ babxa ],[][ babxa

00][A Enlarge

dvs.

][A

Shortcut:

0][:][ AA 0][:][ AA

Page 7: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

From Model to ImplementationFrom Model to Implementation

>0 Reach([A´]) Bad =

Timed automaton A is implementable [DDR04] if

Reach([A]) Bad =

Timed automaton A is correct if

which is equivalent to

>0 Reach([A´]) Bad =

Page 8: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

RobustnessRobustness

No ! (see example)

•Is it always the case that ?

>0 Reach([A]) = Reach([A])

•How to compute ?

>0 Reach([A])

• [Pur98] gives an algorithm for

>0 Reach([A])

• We show that >0 Reach([A]) = >0 Reach([A])

Page 9: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

An example showing thatAn example showing that

Reach([A]) >0 Reach([A])

Page 10: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2

ExampleExample

Page 11: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

a

b

10

1

2

2

1:a0:b

Classical Semantics

ExampleExample

Page 12: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Classical Semantics

ExampleExample

Page 13: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Classical Semantics

ExampleExample

Page 14: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Classical Semantics

ExampleExample

Page 15: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Classical Semantics

ExampleExample

Page 16: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Classical Semantics

ExampleExample

Page 17: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2

AReach

Classical Semantics

ExampleExample

Page 18: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 19: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 20: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2

Enlarged Semantics

ExampleExample

Page 21: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 22: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2

2

Enlarged Semantics

ExampleExample

Page 23: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 24: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2

3

Enlarged Semantics

ExampleExample

Page 25: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 26: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2

4

Enlarged Semantics

ExampleExample

Page 27: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 28: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2

)12( k

Enlarged Semantics

ExampleExample

Page 29: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 30: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2

k2

Enlarged Semantics

ExampleExample

Page 31: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 32: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 33: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 34: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 35: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 36: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 37: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Page 38: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

Reach([A])

Page 39: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

2a

0:a

2b

0:b

1:a0:b

a

b

10

1

2

2 Enlarged Semantics

ExampleExample

>0 Reach([A])

When 0

Page 40: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

Enlarged Semantics

a

b

10

1

2

2

Classical Semantics

vs.

ExampleExample

a10

1

2

2

b

>0 Reach([A])Reach([A])

00

Page 41: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

a

b

10

1

2

2

•Black cycles are reachable

•Blue cycles are not !

Classical semantics [A]

Enlarged semantics

•One blue cycle is reachable

•By repeating this cycle with Δ>0, the entire regions are reachable !

ExampleExample

[A]

Page 42: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

Cycles in Timed AutomataCycles in Timed Automata

Algortihm [Pur98] is based on this observation:

•It just adds the cycles to reachable states

•Until no more cycle is accessible

Hence, the implementability problem

is decidable ! (and PSPACE-complete)

Given a timed automaton A, determine whether there exists Δ>0 such that Reach([A]) Bad =

Page 43: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

Open questionsOpen questions

• Maximize Δ such that

• Decide whether there exists Δ such that

• Find a practical algorithm for

• And many others…

Reach([A]) Bad =

>0 Reach([A])

UntimedLang([A]) = UntimedLang([A])

Page 44: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

ReferencesReferences

• [DDR04] M. De Wulf, L. Doyen, J.-F. Raskin. Almost ASAP Semantics: From Timed Model to Timed Implementation. LNCS 2993, HSCC 2004.

• [Pur98] A. Puri. Dynamical Properties of Timed Automata. FTRTFT 1998.

Page 45: Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT

Model-based developmentModel-based development

• Make a model of the environment:Env

• Make clear the control objective: Bad

• Make a model of the control strategy:ControllerModel

• Verify:Does Env || ControllerModel avoid

Bad ?• Good, but after ?