cstalks - model checking - 26 jan

85
Computing Students Talks 26th January 2011 The Good, the Bad and the Unknown Synthesis of Timing Parameters in Concurrent Systems ´ Etienne ANDR ´ E PAT Team School of Computing, National University of Singapore ´ Etienne ANDR ´ E (NUS) The Good, the Bad and the Unknown 26th January 2011 1 / 27

Post on 21-Oct-2014

552 views

Category:

Documents


0 download

DESCRIPTION

CSTalk # 2

TRANSCRIPT

Page 1: CSTalks - Model Checking - 26 Jan

Computing Students Talks

26th January 2011

The Good, the Bad and the UnknownSynthesis of Timing Parameters in Concurrent Systems

Etienne ANDREPAT Team

School of Computing, National University of Singapore

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 1 / 27

Page 2: CSTalks - Model Checking - 26 Jan

Introduction

Verification of Real Time Systems

Motivation

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 2 / 27

Page 3: CSTalks - Model Checking - 26 Jan

Introduction

Context: Model Checking Timed Systems (1/2)

Input

A timed concurrent system

A good behavior expected forthe system

Question: does the system always behave well?

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 3 / 27

Page 4: CSTalks - Model Checking - 26 Jan

Introduction

Context: Model Checking Timed Systems (1/2)

Input

A timed concurrent system A good behavior expected forthe system

Question: does the system always behave well?

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 3 / 27

Page 5: CSTalks - Model Checking - 26 Jan

Introduction

Context: Model Checking Timed Systems (1/2)

Input

A timed concurrent system A good behavior expected forthe system

Question: does the system always behave well?

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 3 / 27

Page 6: CSTalks - Model Checking - 26 Jan

Introduction

Context: Model Checking Timed Systems (2/2)

Use of formal methods

A finite model of the system

?

|=

AG¬bad

A formula to be satisfied

Question: does the model of the system satisfy the formula?

Yes No

Counterexample

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 4 / 27

Page 7: CSTalks - Model Checking - 26 Jan

Introduction

Context: Model Checking Timed Systems (2/2)

Use of formal methods

A finite model of the system

?

|= AG¬bad

A formula to be satisfied

Question: does the model of the system satisfy the formula?

Yes No

Counterexample

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 4 / 27

Page 8: CSTalks - Model Checking - 26 Jan

Introduction

Context: Model Checking Timed Systems (2/2)

Use of formal methods

A finite model of the system

?

|= AG¬bad

A formula to be satisfied

Question: does the model of the system satisfy the formula?

Yes No

Counterexample

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 4 / 27

Page 9: CSTalks - Model Checking - 26 Jan

Outline

Outline

1 A Coffee Vending Machine

2 A Parametric Coffee Vending Machine

3 Synthesis of Parameters

4 Conclusion

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 5 / 27

Page 10: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Outline

1 A Coffee Vending Machine

2 A Parametric Coffee Vending Machine

3 Synthesis of Parameters

4 Conclusion

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 6 / 27

Page 11: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Model

press? cup!

press?

coffee!

WaitingAdding sugarDelivering coffee

Example of runs

Coffee with no sugarpress? cup! coffee!

Coffee with 2 doses of sugarpress? press? press? cup! coffee!

And so on

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 7 / 27

Page 12: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Model

press? cup!

press?

coffee!

WaitingAdding sugarDelivering coffee

Example of runsCoffee with no sugar

press? cup! coffee!

Coffee with 2 doses of sugarpress? press? press? cup! coffee!

And so on

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 7 / 27

Page 13: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Model

press? cup!

press?

coffee!

WaitingAdding sugarDelivering coffee

Example of runsCoffee with no sugar

press? cup! coffee!

Coffee with 2 doses of sugarpress? press? press? cup! coffee!

And so on

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 7 / 27

Page 14: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Model

press? cup!

press?

coffee!

WaitingAdding sugarDelivering coffee

Example of runsCoffee with no sugar

press? cup! coffee!

Coffee with 2 doses of sugarpress? press? press? cup! coffee!

And so on

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 7 / 27

Page 15: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Temporal Logics

Specify properties on the order between events

Example: CTL (Computation Tree Logic)[Clarke and Emerson, 1982]

“After the button is pressed, a coffee is always eventuallydelivered.”

(×)“After the button is pressed, there exists an execution such that acoffee is eventually delivered.”

(√

)

“It is possible to get a coffee with 2 doses of sugar.”

(√

)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 8 / 27

Page 16: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Temporal Logics

Specify properties on the order between events

Example: CTL (Computation Tree Logic)[Clarke and Emerson, 1982]

“After the button is pressed, a coffee is always eventuallydelivered.” (×)

“After the button is pressed, there exists an execution such that acoffee is eventually delivered.”

(√

)

“It is possible to get a coffee with 2 doses of sugar.”

(√

)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 8 / 27

Page 17: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Temporal Logics

Specify properties on the order between events

Example: CTL (Computation Tree Logic)[Clarke and Emerson, 1982]

“After the button is pressed, a coffee is always eventuallydelivered.” (×)“After the button is pressed, there exists an execution such that acoffee is eventually delivered.”

(√

)“It is possible to get a coffee with 2 doses of sugar.”

(√

)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 8 / 27

Page 18: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Temporal Logics

Specify properties on the order between events

Example: CTL (Computation Tree Logic)[Clarke and Emerson, 1982]

“After the button is pressed, a coffee is always eventuallydelivered.” (×)“After the button is pressed, there exists an execution such that acoffee is eventually delivered.” (

√)

“It is possible to get a coffee with 2 doses of sugar.”

(√

)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 8 / 27

Page 19: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Temporal Logics

Specify properties on the order between events

Example: CTL (Computation Tree Logic)[Clarke and Emerson, 1982]

“After the button is pressed, a coffee is always eventuallydelivered.” (×)“After the button is pressed, there exists an execution such that acoffee is eventually delivered.” (

√)

“It is possible to get a coffee with 2 doses of sugar.”

(√

)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 8 / 27

Page 20: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Temporal Logics

Specify properties on the order between events

Example: CTL (Computation Tree Logic)[Clarke and Emerson, 1982]

“After the button is pressed, a coffee is always eventuallydelivered.” (×)“After the button is pressed, there exists an execution such that acoffee is eventually delivered.” (

√)

“It is possible to get a coffee with 2 doses of sugar.” (√

)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 8 / 27

Page 21: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed AutomatonFinite state automaton (sets of locations)

and actions) augmentedwith a set X of clocks [Alur and Dill, 1994]

Real-valued variables evolving linearly at the same rate

Features

Location invariant: property to be verified to stay at a locationTransition guard: property to be verified to enable a transitionClock reset: some of the clocks can be set to 0 at each transition

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 9 / 27

Page 22: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed AutomatonFinite state automaton (sets of locations and actions)

augmentedwith a set X of clocks [Alur and Dill, 1994]

Real-valued variables evolving linearly at the same rate

Features

Location invariant: property to be verified to stay at a locationTransition guard: property to be verified to enable a transitionClock reset: some of the clocks can be set to 0 at each transition

press?

x := 0y := 0

y = 5

cup!

x > 1

press?

x := 0

y = 8

coffee!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 9 / 27

Page 23: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed AutomatonFinite state automaton (sets of locations and actions) augmentedwith a set X of clocks [Alur and Dill, 1994]

Real-valued variables evolving linearly at the same rate

Features

Location invariant: property to be verified to stay at a locationTransition guard: property to be verified to enable a transitionClock reset: some of the clocks can be set to 0 at each transition

press?

x := 0y := 0

y = 5

cup!

x > 1

press?

x := 0

y = 8

coffee!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 9 / 27

Page 24: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed AutomatonFinite state automaton (sets of locations and actions) augmentedwith a set X of clocks [Alur and Dill, 1994]

Real-valued variables evolving linearly at the same rate

FeaturesLocation invariant: property to be verified to stay at a location

Transition guard: property to be verified to enable a transitionClock reset: some of the clocks can be set to 0 at each transition

y6 5

press?

x := 0y := 0

y = 5

cup!

x > 1

press?

x := 0

y = 8

coffee!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 9 / 27

Page 25: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed AutomatonFinite state automaton (sets of locations and actions) augmentedwith a set X of clocks [Alur and Dill, 1994]

Real-valued variables evolving linearly at the same rate

FeaturesLocation invariant: property to be verified to stay at a locationTransition guard: property to be verified to enable a transition

Clock reset: some of the clocks can be set to 0 at each transition

y6 5

press?

x := 0y := 0

y = 5cup!

x > 1press?

x := 0

y = 8coffee!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 9 / 27

Page 26: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed AutomatonFinite state automaton (sets of locations and actions) augmentedwith a set X of clocks [Alur and Dill, 1994]

Real-valued variables evolving linearly at the same rate

FeaturesLocation invariant: property to be verified to stay at a locationTransition guard: property to be verified to enable a transitionClock reset: some of the clocks can be set to 0 at each transition

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 9 / 27

Page 27: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

Coffee with 2 doses of sugar

00

xy

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 28: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

Coffee with 2 doses of sugar

00

xy

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 29: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

press?

Coffee with 2 doses of sugar

00

xy

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 30: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

press? 5

Coffee with 2 doses of sugar

00

xy

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 31: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

press? 5 cup!

Coffee with 2 doses of sugar

00

xy

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 32: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

88

press? 5 cup! 3

Coffee with 2 doses of sugar

00

xy

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 33: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

88

88

press? 5 cup! 3 coffee!

Coffee with 2 doses of sugar

00

xy

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 34: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

88

88

press? 5 cup! 3 coffee!

Coffee with 2 doses of sugar

00

xy

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 35: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

88

88

press? 5 cup! 3 coffee!

Coffee with 2 doses of sugar

00

xy

00

press?

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 36: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

88

88

press? 5 cup! 3 coffee!

Coffee with 2 doses of sugar

00

xy

00

1.51.5

press? 1.5

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 37: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

88

88

press? 5 cup! 3 coffee!

Coffee with 2 doses of sugar

00

xy

00

1.51.5

01.5

press? 1.5 press?

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 38: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

88

88

press? 5 cup! 3 coffee!

Coffee with 2 doses of sugar

00

xy

00

1.51.5

01.5

2.74.2

press? 1.5 press? 2.7

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 39: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

88

88

press? 5 cup! 3 coffee!

Coffee with 2 doses of sugar

00

xy

00

1.51.5

01.5

2.74.2

04.2

press? 1.5 press? 2.7 press?

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 40: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

88

88

press? 5 cup! 3 coffee!

Coffee with 2 doses of sugar

00

xy

00

1.51.5

01.5

2.74.2

04.2

0.85

press? 1.5 press? 2.7 press? 0.8

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 41: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

88

88

press? 5 cup! 3 coffee!

Coffee with 2 doses of sugar

00

xy

00

1.51.5

01.5

2.74.2

04.2

0.85

0.85

press? 1.5 press? 2.7 press? 0.8 cup!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 42: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

88

88

press? 5 cup! 3 coffee!

Coffee with 2 doses of sugar

00

xy

00

1.51.5

01.5

2.74.2

04.2

0.85

0.85

3.88

press? 1.5 press? 2.7 press? 0.8 cup! 3

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 43: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Runs

y6 5

press?x := 0y := 0

y = 5cup!

x > 1press?x := 0

y = 8coffee!

Examples of timed runs

Coffee with no sugar

00

xy

00

55

55

88

88

press? 5 cup! 3 coffee!

Coffee with 2 doses of sugar

00

xy

00

1.51.5

01.5

2.74.2

04.2

0.85

0.85

3.88

3.88

press? 1.5 press? 2.7 press? 0.8 cup! 3 coffee!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 10 / 27

Page 44: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Dense Time

Time is dense: transitions can be taken anytimeInfinite number of timed runsModel checking needs a finite structure!

Some runs are equivalentTaking the press? action at t = 1.5 or t = 1.57 is equivalent w.r.t. thepossible actions

Idea: reason with abstractionsRegion automaton [Alur and Dill, 1994]Example: in location , all clock values in the following regionare equivalent

x > 1 ∧ y 6 5 ∧ x = yThis abstraction is finite

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 11 / 27

Page 45: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Temporal Logics

Specify properties on the order and the delay between events

Example: TCTL (Timed CTL) [Alur et al., 1993a]“After the first time the button is pressed, a coffee is alwayseventually delivered within 10 units of time.”

(√

)“It must never happen that the button can be pressed twice within1 unit of time.”

(×)

“It must never happen that the button can be pressed twice within atime strictly less than 1 unit of time.”

(√

)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 12 / 27

Page 46: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Temporal Logics

Specify properties on the order and the delay between events

Example: TCTL (Timed CTL) [Alur et al., 1993a]“After the first time the button is pressed, a coffee is alwayseventually delivered within 10 units of time.” (

√)

“It must never happen that the button can be pressed twice within1 unit of time.”

(×)

“It must never happen that the button can be pressed twice within atime strictly less than 1 unit of time.”

(√

)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 12 / 27

Page 47: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Temporal Logics

Specify properties on the order and the delay between events

Example: TCTL (Timed CTL) [Alur et al., 1993a]“After the first time the button is pressed, a coffee is alwayseventually delivered within 10 units of time.” (

√)

“It must never happen that the button can be pressed twice within1 unit of time.”

(×)“It must never happen that the button can be pressed twice within atime strictly less than 1 unit of time.”

(√

)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 12 / 27

Page 48: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Temporal Logics

Specify properties on the order and the delay between events

Example: TCTL (Timed CTL) [Alur et al., 1993a]“After the first time the button is pressed, a coffee is alwayseventually delivered within 10 units of time.” (

√)

“It must never happen that the button can be pressed twice within1 unit of time.” (×)

“It must never happen that the button can be pressed twice within atime strictly less than 1 unit of time.”

(√

)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 12 / 27

Page 49: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Temporal Logics

Specify properties on the order and the delay between events

Example: TCTL (Timed CTL) [Alur et al., 1993a]“After the first time the button is pressed, a coffee is alwayseventually delivered within 10 units of time.” (

√)

“It must never happen that the button can be pressed twice within1 unit of time.” (×)“It must never happen that the button can be pressed twice within atime strictly less than 1 unit of time.”

(√

)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 12 / 27

Page 50: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Timed Temporal Logics

Specify properties on the order and the delay between events

Example: TCTL (Timed CTL) [Alur et al., 1993a]“After the first time the button is pressed, a coffee is alwayseventually delivered within 10 units of time.” (

√)

“It must never happen that the button can be pressed twice within1 unit of time.” (×)“It must never happen that the button can be pressed twice within atime strictly less than 1 unit of time.” (

√)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 12 / 27

Page 51: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Towards a Parametrization. . .

Interesting problemsRobustness

Does the system still behave the same if one of the delays (slightly)changes?

Optimization of timing constantsUp to which value of the delay between two actions press? can I stillorder a coffee with 3 doses of sugar?

Avoidance of numerous verificationsIf one of the timing delays of the model changes, should I modelcheck again the whole system?

Idea: reason with parameters (unknown constants)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 13 / 27

Page 52: CSTalks - Model Checking - 26 Jan

A Coffee Vending Machine

Towards a Parametrization. . .

Interesting problemsRobustness

Does the system still behave the same if one of the delays (slightly)changes?

Optimization of timing constantsUp to which value of the delay between two actions press? can I stillorder a coffee with 3 doses of sugar?

Avoidance of numerous verificationsIf one of the timing delays of the model changes, should I modelcheck again the whole system?

Idea: reason with parameters (unknown constants)

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 13 / 27

Page 53: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Outline

1 A Coffee Vending Machine

2 A Parametric Coffee Vending Machine

3 Synthesis of Parameters

4 Conclusion

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 14 / 27

Page 54: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Parametric Timed Automaton

Timed automaton (sets of locations, actions and clocks)

augmented with a set P of parameters [Alur et al., 1993b]

Unknown constants used in guards and invariants

y6 5

press?x := 0y := 0

y= 5cup!

x > 1press?x := 0

y= 8coffee!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 15 / 27

Page 55: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Parametric Timed Automaton

Timed automaton (sets of locations, actions and clocks)augmented with a set P of parameters [Alur et al., 1993b]

Unknown constants used in guards and invariants

y6p2

press?x := 0y := 0

y=p2

cup!x > p1

press?x := 0

y=p3

coffee!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 15 / 27

Page 56: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Symbolic Exploration

Iterative exploration of symbolic statesSymbolic state: location and constraint on the clocks andparameters

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 16 / 27

Page 57: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Symbolic Exploration: Coffee Machine

y6p2

press?x := 0y := 0

y=p2cup!

x > p1press?x := 0

y=p3coffee!

x=y

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 17 / 27

Page 58: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Symbolic Exploration: Coffee Machine

y6p2

press?x := 0y := 0

y=p2cup!

x > p1press?x := 0

y=p3coffee!

x=y x = y0 6 y 6 p2

press?

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 17 / 27

Page 59: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Symbolic Exploration: Coffee Machine

y6p2

press?x := 0y := 0

y=p2cup!

x > p1press?x := 0

y=p3coffee!

x=y x = y0 6 y 6 p2

x=yy>p2

press? cup!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 17 / 27

Page 60: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Symbolic Exploration: Coffee Machine

y6p2

press?x := 0y := 0

y=p2cup!

x > p1press?x := 0

y=p3coffee!

x=y x = y0 6 y 6 p2

x=yy>p2

x=yy>p3

press? cup! coffee!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 17 / 27

Page 61: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Symbolic Exploration: Coffee Machine

y6p2

press?x := 0y := 0

y=p2cup!

x > p1press?x := 0

y=p3coffee!

x=y x = y0 6 y 6 p2

x=yy>p2

x=yy>p3

press? cup! coffee!

press?

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 17 / 27

Page 62: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Symbolic Exploration: Coffee Machine

y6p2

press?x := 0y := 0

y=p2cup!

x > p1press?x := 0

y=p3coffee!

· · ·

x=y x = y0 6 y 6 p2

x=yy>p2

x=yy>p3

y− x > p10 6 y 6 p2

press? cup! coffee!

press?

press?

cup!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 17 / 27

Page 63: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Symbolic Exploration: Coffee Machine

y6p2

press?x := 0y := 0

y=p2cup!

x > p1press?x := 0

y=p3coffee!

· · ·

· · ·

x=y x = y0 6 y 6 p2

x=yy>p2

x=yy>p3

y− x > p10 6 y 6 p2

y− x > 2p10 6 y 6 p2

press? cup! coffee!

press?

press?

cup!

press?

cup!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 17 / 27

Page 64: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Symbolic Exploration: Coffee Machine

y6p2

press?x := 0y := 0

y=p2cup!

x > p1press?x := 0

y=p3coffee!

· · ·

· · ·

· · ·

x=y x = y0 6 y 6 p2

x=yy>p2

x=yy>p3

y− x > p10 6 y 6 p2

y− x > 2p10 6 y 6 p2

press? cup! coffee!

press?

press?

cup!

press?

cup!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 17 / 27

Page 65: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Undecidability

The symbolic exploration is infinite in general

No possible abstraction like for Timed Automata

Bad News(Almost) all interesting problems are undecidable for Parametric TimedAutomata.

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 18 / 27

Page 66: CSTalks - Model Checking - 26 Jan

A Parametric Coffee Vending Machine

Undecidability

The symbolic exploration is infinite in general

No possible abstraction like for Timed Automata

Bad News(Almost) all interesting problems are undecidable for Parametric TimedAutomata.

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 18 / 27

Page 67: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

Outline

1 A Coffee Vending Machine

2 A Parametric Coffee Vending Machine

3 Synthesis of Parameters

4 Conclusion

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 19 / 27

Page 68: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

Synthesis of Parameters (1/2)

The good parameters problem

“Given a bounded parameter domain, find a set of parametervaluations of good behavior”

Interesting problem

But undecidable!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 20 / 27

Page 69: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

Synthesis of Parameters (1/2)

The good parameters problem

“Given a bounded parameter domain, find a set of parametervaluations of good behavior”

Interesting problem

But undecidable!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 20 / 27

Page 70: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

Synthesis of Parameters (1/2)

The good parameters problem

“Given a bounded parameter domain, find a set of parametervaluations of good behavior”

Interesting problem

But undecidable!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 20 / 27

Page 71: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

Synthesis of Parameters (1/2)

The good parameters problem

“Given a bounded parameter domain, find a set of parametervaluations of good behavior”

Interesting problem

But undecidable!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 20 / 27

Page 72: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

Synthesis of Parameters (2/2)

Possible options to deal with undecidability

Semi algorithmsExample: Computation of all the reachable states, and intersectionwith the bad states [Henzinger and Wong-Toi, 1996]

ApproximationsExample: Use of octahedra [Clariso and Cortadella, 2007]

Restrictions to decidable subclassesExample: L/U automata [Hune et al., 2002]

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 21 / 27

Page 73: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

An Inverse Method for PTAs

Original method for synthesis of parameters [Andre et al., 2009]

“Given a reference parameter valuation π0, find other valuationsaround π0 of same (linear-time) behavior”

·π0Inputp1 = 1p2 = 5p3 = 8

Properties

Semi-algorithmNot complete

Advantages

Exact methodBehaves well in practice!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 22 / 27

Page 74: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

An Inverse Method for PTAs

Original method for synthesis of parameters [Andre et al., 2009]

“Given a reference parameter valuation π0, find other valuationsaround π0 of same (linear-time) behavior”

·π0Inputp1 = 1p2 = 5p3 = 8

Outputp3 >p2

∧ 6p1 >p2

∧ p2 > 5p1

Properties

Semi-algorithmNot complete

Advantages

Exact methodBehaves well in practice!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 22 / 27

Page 75: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

An Inverse Method for PTAs

Original method for synthesis of parameters [Andre et al., 2009]

“Given a reference parameter valuation π0, find other valuationsaround π0 of same (linear-time) behavior”

·π0Inputp1 = 1p2 = 5p3 = 8

Outputp3 >p2

∧ 6p1 >p2

∧ p2 > 5p1

Properties

Semi-algorithmNot complete

Advantages

Exact methodBehaves well in practice!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 22 / 27

Page 76: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

Behavioral Cartography of Timed Automata (1/2)

delay

s min

0 100 200 300 400 500 600 700 800 900800

900

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

2100

2200

Idea: repeatedly call the inversemethod[Andre and Fribourg, 2010]

{ Cover the parametric spacewith tiles

Parametric zones with uniformbehavior

Remarks

Tiles may be infiniteThe cartography may not coverthe whole real-valued space

Example: Root Contention Protocol

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 23 / 27

Page 77: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

Behavioral Cartography of Timed Automata (1/2)

1

2

3

4

5

6

7

9

11

128

1013

14

15

16 1718

19

delay

s min

0 100 200 300 400 500 600 700 800 900800

900

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

2100

2200

Idea: repeatedly call the inversemethod[Andre and Fribourg, 2010]

{ Cover the parametric spacewith tiles

Parametric zones with uniformbehavior

Remarks

Tiles may be infiniteThe cartography may not coverthe whole real-valued space

Example: Root Contention Protocol

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 23 / 27

Page 78: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

Behavioral Cartography of Timed Automata (1/2)

1

2

3

4

5

6

7

9

11

128

1013

14

15

16 1718

19

delay

s min

0 100 200 300 400 500 600 700 800 900800

900

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

2100

2200

Idea: repeatedly call the inversemethod[Andre and Fribourg, 2010]

{ Cover the parametric spacewith tiles

Parametric zones with uniformbehavior

Remarks

Tiles may be infiniteThe cartography may not coverthe whole real-valued space

Example: Root Contention Protocol

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 23 / 27

Page 79: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

Behavioral Cartography of Timed Automata (2/2)

1

2

3

4

5

6

7

9

11

128

1013

14

15

16 1718

19

delay

s min

0 100 200 300 400 500 600 700 800 900800

900

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

2100

2200

Partition into good and badsubspaces

Good if the property is trueBad if the property is falseUnknown if not covered byany tile

AdvantagesIndependent of the property(Only the partition depends onthe property)Covers much of the parametricspace in practice

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 24 / 27

Page 80: CSTalks - Model Checking - 26 Jan

Synthesis of Parameters

Behavioral Cartography of Timed Automata (2/2)

1

2

3

4

5

6

7

9

11

128

1013

14

15

16 1718

19

delay

s min

0 100 200 300 400 500 600 700 800 900800

900

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

2100

2200

Partition into good and badsubspaces

Good if the property is trueBad if the property is falseUnknown if not covered byany tile

AdvantagesIndependent of the property(Only the partition depends onthe property)Covers much of the parametricspace in practice

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 24 / 27

Page 81: CSTalks - Model Checking - 26 Jan

Conclusion

Summary

Synthesis of parameters for real-time concurrent systemsimportant

RobustnessOptimization of timing constantsAvoidance of numerous verifications

Undecidable in the general casePossible solutions

Semi algorithmsApproximationsRestrictions to decidable subclasses

Still ongoing work!

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 25 / 27

Page 82: CSTalks - Model Checking - 26 Jan

Bibliography

References I

Alur, R., Courcoubetis, C., and Dill, D. L. (1993a).Model-checking in dense real-time.Information and Computation, 104(1):2–34.

Alur, R. and Dill, D. L. (1994).A theory of timed automata.TCS, 126(2):183–235.

Alur, R., Henzinger, T. A., and Vardi, M. Y. (1993b).Parametric real-time reasoning.In STOC ’93, pages 592–601. ACM.

Andre, E., Chatain, T., Encrenaz, E., and Fribourg, L. (2009).An inverse method for parametric timed automata.International Journal of Foundations of Computer Science, 20(5):819–836.

Andre, E. and Fribourg, L. (2010).Behavioral cartography of timed automata.In RP’10, volume 6227 of LNCS, pages 76–90. Springer.

Clariso, R. and Cortadella, J. (2007).The octahedron abstract domain.Sci. Comput. Program., 64(1):115–139.

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 26 / 27

Page 83: CSTalks - Model Checking - 26 Jan

Bibliography

References II

Clarke, E. M. and Emerson, E. A. (1982).Design and synthesis of synchronization skeletons using branching-time temporal logic.In Logic of Programs, Workshop, pages 52–71, London, UK. Springer-Verlag.

Henzinger, T. A. and Wong-Toi, H. (1996).Using HyTech to synthesize control parameters for a steam boiler.In Formal Methods for Industrial Applications: Specifying and Programming the Steam BoilerControl, LNCS 1165. Springer-Verlag.

Hune, T., Romijn, J., Stoelinga, M., and Vaandrager, F. (2002).Linear parametric model checking of timed automata.Journal of Logic and Algebraic Programming.

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 27 / 27

Page 84: CSTalks - Model Checking - 26 Jan

Extra Slides

Summary of Experiments: IM

Computation times of various case studiesExperiments conducted on an Intel Core2 Duo 2.4 GHz with 2 Gb

Example PTAs loc./PTA |X| |P| iter. |K0| states trans. TimeSR-latch 3 [3, 8] 3 3 5 2 4 3 0.007Flip-flop 5 [4, 16] 5 12 9 6 11 10 0.122And–Or 3 [4, 8] 4 12 14 4 13 13 0.15

Latch circuit 7 [2, 5] 8 13 12 6 18 17 0.345CSMA/CD 3 [3, 8] 3 3 19 2 219 342 1.01

RCP 5 [6, 11] 6 5 20 2 327 518 2.3BRP 6 [2, 6] 7 6 30 7 429 474 34

SIMOP 5 [5, 16] 8 7 53 9 1108 1404 67SPSMALL 28 [2, 11] 28 62 94 45 129 173 461

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 28 / 27

Page 85: CSTalks - Model Checking - 26 Jan

Extra Slides

Summary of Experiments: BC

Computation time for the cartography algorithmExperiments conducted on an Intel Core2 Duo 2.4 GHz with 2 Gb

Example PTAs loc./PTA |X| |P| |V0| tiles states trans. Time (s)SR-latch 3 [3, 8] 3 3 1331 6 5 4 0.3Flip-flop 5 [4, 16] 5 2 644 8 15 14 3

Latch circuit 7 [2, 5] 8 4 73062 5 21 20 96.3And–Or 3 [4, 8] 4 6 75600 4 64 72 118

CSMA/CD 3 [3, 8] 3 3 2000 140 349 545 269RCP 5 [6, 11] 6 3 186050 19 5688 9312 7018

SPSMALL 28 [2, 11] 28 3 784 213 145 196 31641

Etienne ANDRE (NUS) The Good, the Bad and the Unknown 26th January 2011 29 / 27