Schedulability Analysis under Uncertainty using Formal Methods (part - - PowerPoint PPT Presentation

schedulability analysis under uncertainty using formal
SMART_READER_LITE
LIVE PREVIEW

Schedulability Analysis under Uncertainty using Formal Methods (part - - PowerPoint PPT Presentation

ESWEEK Tutorial Sunday, 30th of September Schedulability Analysis under Uncertainty using Formal Methods (part 2) tienne Andr and Giusppe Lipari LIPN, Universit Paris 13, CNRS, France tienne Andr (Universit Paris 13) Tutorial @


slide-1
SLIDE 1

ESWEEK Tutorial Sunday, 30th of September

Schedulability Analysis under Uncertainty using Formal Methods (part 2)

Étienne André and Giusppe Lipari LIPN, Université Paris 13, CNRS, France

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 1 / 42

slide-2
SLIDE 2

Outline

1

Parametric timed automata

2

IMITATOR in a nutshell

3

Modeling real-time systems with parametric timed automata

4

A case study: Verifying a real-time system under uncertainty

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 2 / 42

slide-3
SLIDE 3

Model checking timed concurrent systems

Use formal methods

[Baier and Katoen, 2008]

y = delay x := 0 x < period

A model of the system is unreachable A property to be satisfied

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 3 / 42

slide-4
SLIDE 4

Model checking timed concurrent systems

Use formal methods

[Baier and Katoen, 2008]

y = delay x := 0 x < period

A model of the system

?

| =

is unreachable A property to be satisfied Question: does the model of the system satisfy the property?

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 3 / 42

slide-5
SLIDE 5

Model checking timed concurrent systems

Use formal methods

[Baier and Katoen, 2008]

y = delay x := 0 x < period

A model of the system

?

| =

is unreachable A property to be satisfied Question: does the model of the system satisfy the property? Yes No Counterexample

Turing award (2007) to Edmund M. Clarke, Allen Emerson and Joseph Sifakis Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 3 / 42

slide-6
SLIDE 6

Outline

1

Parametric timed automata Timed automata Parametric timed automata

2

IMITATOR in a nutshell

3

Modeling real-time systems with parametric timed automata

4

A case study: Verifying a real-time system under uncertainty

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 4 / 42

slide-7
SLIDE 7

Timed automaton (TA)

Finite state automaton (sets of locations)

idle adding sugar delivering coffee

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 5 / 42

slide-8
SLIDE 8

Timed automaton (TA)

Finite state automaton (sets of locations and actions)

press? cup! press? coffee! idle adding sugar delivering coffee

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 5 / 42

slide-9
SLIDE 9

Timed automaton (TA)

Finite state automaton (sets of locations and actions) augmented with a set X of clocks

[Alur and Dill, 1994]

Real-valued variables evolving linearly at the same rate

press? cup! press? coffee! idle adding sugar delivering coffee

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 5 / 42

slide-10
SLIDE 10

Timed automaton (TA)

Finite state automaton (sets of locations and actions) augmented with a set X of clocks

[Alur and Dill, 1994]

Real-valued variables evolving linearly at the same rate Can be compared to integer constants in invariants

Features

Location invariant: property to be verified to stay at a location y ≤5 y ≤ 8

press? cup! press? coffee! idle adding sugar delivering coffee

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 5 / 42

slide-11
SLIDE 11

Timed automaton (TA)

Finite state automaton (sets of locations and actions) augmented with a set X of clocks

[Alur and Dill, 1994]

Real-valued variables evolving linearly at the same rate Can be compared to integer constants in invariants and guards

Features

Location invariant: property to be verified to stay at a location Transition guard: property to be verified to enable a transition y ≤5 y ≤ 8

press?

y = 5

cup!

x ≥ 1

press?

y = 8

coffee! idle adding sugar delivering coffee

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 5 / 42

slide-12
SLIDE 12

Timed automaton (TA)

Finite state automaton (sets of locations and actions) augmented with a set X of clocks

[Alur and Dill, 1994]

Real-valued variables evolving linearly at the same rate Can be compared to integer constants in invariants and guards

Features

Location invariant: property to be verified to stay at a location Transition guard: property to be verified to enable a transition Clock reset: some of the clocks can be set to 0 along transitions y ≤5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee! idle adding sugar delivering coffee

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 5 / 42

slide-13
SLIDE 13

The most critical system: The coffee machine

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee! idle adding sugar delivering coffee

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 6 / 42

slide-14
SLIDE 14

The most critical system: The coffee machine

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee! idle adding sugar delivering coffee

Example of concrete run for the coffee machine

Coffee with 2 doses of sugar x = y =

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 6 / 42

slide-15
SLIDE 15

The most critical system: The coffee machine

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee! idle adding sugar delivering coffee

Example of concrete run for the coffee machine

Coffee with 2 doses of sugar x = y =

press?

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 6 / 42

slide-16
SLIDE 16

The most critical system: The coffee machine

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee! idle adding sugar delivering coffee

Example of concrete run for the coffee machine

Coffee with 2 doses of sugar x = y = 1.5 1.5

press?

1.5

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 6 / 42

slide-17
SLIDE 17

The most critical system: The coffee machine

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee! idle adding sugar delivering coffee

Example of concrete run for the coffee machine

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5

press?

1.5

press?

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 6 / 42

slide-18
SLIDE 18

The most critical system: The coffee machine

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee! idle adding sugar delivering coffee

Example of concrete run for the coffee machine

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5 2.7 4.2

press?

1.5

press?

2.7

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 6 / 42

slide-19
SLIDE 19

The most critical system: The coffee machine

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee! idle adding sugar delivering coffee

Example of concrete run for the coffee machine

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5 2.7 4.2 4.2

press?

1.5

press?

2.7

press?

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 6 / 42

slide-20
SLIDE 20

The most critical system: The coffee machine

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee! idle adding sugar delivering coffee

Example of concrete run for the coffee machine

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5 2.7 4.2 4.2 0.8 5

press?

1.5

press?

2.7

press?

0.8

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 6 / 42

slide-21
SLIDE 21

The most critical system: The coffee machine

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee! idle adding sugar delivering coffee

Example of concrete run for the coffee machine

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5 2.7 4.2 4.2 0.8 5 0.8 5

press?

1.5

press?

2.7

press?

0.8

cup!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 6 / 42

slide-22
SLIDE 22

The most critical system: The coffee machine

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee! idle adding sugar delivering coffee

Example of concrete run for the coffee machine

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5 2.7 4.2 4.2 0.8 5 0.8 5 3.8 8

press?

1.5

press?

2.7

press?

0.8

cup!

3

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 6 / 42

slide-23
SLIDE 23

The most critical system: The coffee machine

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee! idle adding sugar delivering coffee

Example of concrete run for the coffee machine

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5 2.7 4.2 4.2 0.8 5 0.8 5 3.8 8 3.8 8

press?

1.5

press?

2.7

press?

0.8

cup!

3

coffee!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 6 / 42

slide-24
SLIDE 24

Concrete semantics of timed automata

Concrete state of a TA: pair (l, w), where

l is a location, w is a valuation of each clock

Example:

  • ,

x=1.2

y=3.7

  • Concrete run: alternating sequence of concrete states and actions or time

elapse

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 7 / 42

slide-25
SLIDE 25

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-26
SLIDE 26

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y =

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-27
SLIDE 27

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y =

press?

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-28
SLIDE 28

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5

press?

5

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-29
SLIDE 29

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5

press?

5

cup!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-30
SLIDE 30

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5 8 8

press?

5

cup!

3

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-31
SLIDE 31

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5 8 8 8 8

press?

5

cup!

3

coffee!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-32
SLIDE 32

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5 8 8 8 8

press?

5

cup!

3

coffee!

Coffee with 2 doses of sugar x = y =

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-33
SLIDE 33

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5 8 8 8 8

press?

5

cup!

3

coffee!

Coffee with 2 doses of sugar x = y =

press?

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-34
SLIDE 34

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5 8 8 8 8

press?

5

cup!

3

coffee!

Coffee with 2 doses of sugar x = y = 1.5 1.5

press?

1.5

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-35
SLIDE 35

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5 8 8 8 8

press?

5

cup!

3

coffee!

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5

press?

1.5

press?

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-36
SLIDE 36

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5 8 8 8 8

press?

5

cup!

3

coffee!

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5 2.7 4.2

press?

1.5

press?

2.7

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-37
SLIDE 37

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5 8 8 8 8

press?

5

cup!

3

coffee!

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5 2.7 4.2 4.2

press?

1.5

press?

2.7

press?

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-38
SLIDE 38

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5 8 8 8 8

press?

5

cup!

3

coffee!

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5 2.7 4.2 4.2 0.8 5

press?

1.5

press?

2.7

press?

0.8

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-39
SLIDE 39

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5 8 8 8 8

press?

5

cup!

3

coffee!

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5 2.7 4.2 4.2 0.8 5 0.8 5

press?

1.5

press?

2.7

press?

0.8

cup!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-40
SLIDE 40

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5 8 8 8 8

press?

5

cup!

3

coffee!

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5 2.7 4.2 4.2 0.8 5 0.8 5 3.8 8

press?

1.5

press?

2.7

press?

0.8

cup!

3

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-41
SLIDE 41

Example of concrete runs

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

Possible concrete runs for the coffee machine

Coffee with no sugar x = y = 5 5 5 5 8 8 8 8

press?

5

cup!

3

coffee!

Coffee with 2 doses of sugar x = y = 1.5 1.5 1.5 2.7 4.2 4.2 0.8 5 0.8 5 3.8 8 3.8 8

press?

1.5

press?

2.7

press?

0.8

cup!

3

coffee!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 8 / 42

slide-42
SLIDE 42

Timed automata: A success story

An expressive formalism

Dense time Concurrency

A tractable verification in theory

Reachability is PSPACE-complete

[Alur and Dill, 1994]

A very efficient verification in practice

Symbolic verification: relatively insensitive to constants Several model checkers, notably Uppaal

[Larsen et al., 1997]

Long list of successful case studies

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 9 / 42

slide-43
SLIDE 43

Outline

1

Parametric timed automata Timed automata Parametric timed automata

2

IMITATOR in a nutshell

3

Modeling real-time systems with parametric timed automata

4

A case study: Verifying a real-time system under uncertainty

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 10 / 42

slide-44
SLIDE 44

Beyond timed model checking: parameter synthesis

Verification for one set of constants does not usually guarantee the correctness for other values Challenges

Numerous verifications: is the system correct for any value within [40; 60]? Optimization: until what value can we increase 10? Robustness [Markey, 2011]: What happens if 50 is implemented with 49.99? System incompletely specified: Can I verify my system even if I don’t know the period value with full certainty?

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 11 / 42

slide-45
SLIDE 45

Beyond timed model checking: parameter synthesis

Verification for one set of constants does not usually guarantee the correctness for other values Challenges

Numerous verifications: is the system correct for any value within [40; 60]? Optimization: until what value can we increase 10? Robustness [Markey, 2011]: What happens if 50 is implemented with 49.99? System incompletely specified: Can I verify my system even if I don’t know the period value with full certainty?

Parameter synthesis

Consider that timing constants are unknown constants (parameters)

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 11 / 42

slide-46
SLIDE 46

timed model checking

y = delay x := 0 x < period

A model of the system

?

| =

is unreachable A property to be satisfied Question: does the model of the system satisfy the property? Yes No Counterexample

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 12 / 42

slide-47
SLIDE 47

Parametric timed model checking

y = delay x := 0 x < period

A model of the system

?

| =

is unreachable A property to be satisfied Question: for what values of the parameters does the model of the system satisfy the property? Yes if...

2delay > period ∧ period < 20.46

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 12 / 42

slide-48
SLIDE 48

Parametric Timed Automaton (PTA)

Timed automaton (sets of locations, actions and clocks) y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y =5

cup!

x ≥ 1

press?

x:=0 y =8

coffee!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 13 / 42

slide-49
SLIDE 49

Parametric Timed Automaton (PTA)

Timed automaton (sets of locations, actions and clocks) augmented with a set P of parameters

[Alur et al., 1993]

Unknown constants compared to a clock in guards and invariants y ≤ p2 y ≤ 8

press?

x := 0 y := 0 y =p2

cup!

x ≥ p1

press?

x:=0 y =p3

coffee!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 13 / 42

slide-50
SLIDE 50

Notation: Valuation of a PTA

Given a PTA A and a parameter valuation v, we denote by v(A) the (non-parametric) timed automaton where each parameter p is valuated by v(p)

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 14 / 42

slide-51
SLIDE 51

Notation: Valuation of a PTA

Given a PTA A and a parameter valuation v, we denote by v(A) the (non-parametric) timed automaton where each parameter p is valuated by v(p)

v      

y ≤ p2 y ≤ 8

press?

x := 0 y := 0 y =p2

cup!

x ≥ p1

press?

x:=0 y =p3

coffee!

      =

y ≤ 5 y ≤ 8

press?

x := 0 y := 0 y = 5

cup!

x ≥ 1

press?

x := 0 y = 8

coffee!

with v :

   p1 → 1 p2 → 5 p3 → 8

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 14 / 42

slide-52
SLIDE 52

Symbolic semantics of parametric timed automata

Symbolic state of a PTA: pair (l, C), where

l is a location, C is a convex polyhedron over X and P with a special form, called

parametric zone

[Hune et al., 2002]

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 15 / 42

slide-53
SLIDE 53

Symbolic semantics of parametric timed automata

Symbolic state of a PTA: pair (l, C), where

l is a location, C is a convex polyhedron over X and P with a special form, called

parametric zone

[Hune et al., 2002]

Symbolic run: alternating sequence of symbolic states and actions

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 15 / 42

slide-54
SLIDE 54

Symbolic semantics of parametric timed automata

Symbolic state of a PTA: pair (l, C), where

l is a location, C is a convex polyhedron over X and P with a special form, called

parametric zone

[Hune et al., 2002]

Symbolic run: alternating sequence of symbolic states and actions Example x≤p1 x≤p3 x ≥ p2 a y :=0 b x:=0 y ≥p4 c

Possible symbolic run for this PTA x=y x≤p1

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 15 / 42

slide-55
SLIDE 55

Symbolic semantics of parametric timed automata

Symbolic state of a PTA: pair (l, C), where

l is a location, C is a convex polyhedron over X and P with a special form, called

parametric zone

[Hune et al., 2002]

Symbolic run: alternating sequence of symbolic states and actions Example x≤p1 x≤p3 x ≥ p2 a y :=0 b x:=0 y ≥p4 c

Possible symbolic run for this PTA x=y x≤p1 x − y ≤p1 x − y ≥p2 x≤p3 a

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 15 / 42

slide-56
SLIDE 56

Symbolic semantics of parametric timed automata

Symbolic state of a PTA: pair (l, C), where

l is a location, C is a convex polyhedron over X and P with a special form, called

parametric zone

[Hune et al., 2002]

Symbolic run: alternating sequence of symbolic states and actions Example x≤p1 x≤p3 x ≥ p2 a y :=0 b x:=0 y ≥p4 c

Possible symbolic run for this PTA x=y x≤p1 x − y ≤p1 x − y ≥p2 x≤p3 p1 ≥p2 y ≥x y − x≤p3 a b

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 15 / 42

slide-57
SLIDE 57

Symbolic semantics of PTA: Illustration

C′ = [(C ∩ g)]R ∩ I(l′))ր ∩ I(l′)) C

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 16 / 42

slide-58
SLIDE 58

Symbolic semantics of PTA: Illustration

C′ = [(C ∩ g)]R ∩ I(l′))ր ∩ I(l′)) C g

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 16 / 42

slide-59
SLIDE 59

Symbolic semantics of PTA: Illustration

C′ = [(C ∩ g)]R ∩ I(l′))ր ∩ I(l′)) C g R

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 16 / 42

slide-60
SLIDE 60

Symbolic semantics of PTA: Illustration

C′ = [(C ∩ g)]R ∩ I(l′))ր ∩ I(l′)) C g I(l′) R

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 16 / 42

slide-61
SLIDE 61

Symbolic semantics of PTA: Illustration

C′ = [(C ∩ g)]R ∩ I(l′))ր ∩ I(l′)) C g I(l′) R

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 16 / 42

slide-62
SLIDE 62

Symbolic semantics of PTA: Illustration

C′ = [(C ∩ g)]R ∩ I(l′))ր ∩ I(l′)) C g I(l′) C′ R

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 16 / 42

slide-63
SLIDE 63

Symbolic exploration: Coffee machine

y ≤ p2 y ≤ 8

press?

x := 0 y := 0 y =p2

cup!

x ≥ p1

press?

x:=0 y =p3

coffee!

x=y

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 17 / 42

slide-64
SLIDE 64

Symbolic exploration: Coffee machine

y ≤ p2 y ≤ 8

press?

x := 0 y := 0 y =p2

cup!

x ≥ p1

press?

x:=0 y =p3

coffee!

x=y x = y 0 ≤ y ≤ p2

press?

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 17 / 42

slide-65
SLIDE 65

Symbolic exploration: Coffee machine

y ≤ p2 y ≤ 8

press?

x := 0 y := 0 y =p2

cup!

x ≥ p1

press?

x:=0 y =p3

coffee!

x=y x = y 0 ≤ y ≤ p2 x = y p2 ≤ y ≤ 8

press? cup!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 17 / 42

slide-66
SLIDE 66

Symbolic exploration: Coffee machine

y ≤ p2 y ≤ 8

press?

x := 0 y := 0 y =p2

cup!

x ≥ p1

press?

x:=0 y =p3

coffee!

x=y x = y 0 ≤ y ≤ p2 x = y p2 ≤ y ≤ 8 p2 ≤ p3 ≤ 8 y = x + p3

press? cup! coffee!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 17 / 42

slide-67
SLIDE 67

Symbolic exploration: Coffee machine

y ≤ p2 y ≤ 8

press?

x := 0 y := 0 y =p2

cup!

x ≥ p1

press?

x:=0 y =p3

coffee!

x=y x = y 0 ≤ y ≤ p2 x = y p2 ≤ y ≤ 8 p2 ≤ p3 ≤ 8 y = x + p3

press? cup! coffee! press?

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 17 / 42

slide-68
SLIDE 68

Symbolic exploration: Coffee machine

y ≤ p2 y ≤ 8

press?

x := 0 y := 0 y =p2

cup!

x ≥ p1

press?

x:=0 y =p3

coffee!

· · · x=y x = y 0 ≤ y ≤ p2 x = y p2 ≤ y ≤ 8 p2 ≤ p3 ≤ 8 y = x + p3 y − x ≥ p1 0 ≤ y ≤ p2

press? cup! coffee! press? press? cup!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 17 / 42

slide-69
SLIDE 69

Symbolic exploration: Coffee machine

y ≤ p2 y ≤ 8

press?

x := 0 y := 0 y =p2

cup!

x ≥ p1

press?

x:=0 y =p3

coffee!

· · · · · · x=y x = y 0 ≤ y ≤ p2 x = y p2 ≤ y ≤ 8 p2 ≤ p3 ≤ 8 y = x + p3 y − x ≥ p1 0 ≤ y ≤ p2 y − x ≥ 2p1 0 ≤ y ≤ p2

press? cup! coffee! press? press? cup! press? cup!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 17 / 42

slide-70
SLIDE 70

Symbolic exploration: Coffee machine

y ≤ p2 y ≤ 8

press?

x := 0 y := 0 y =p2

cup!

x ≥ p1

press?

x:=0 y =p3

coffee!

· · · · · · · · · x=y x = y 0 ≤ y ≤ p2 x = y p2 ≤ y ≤ 8 p2 ≤ p3 ≤ 8 y = x + p3 y − x ≥ p1 0 ≤ y ≤ p2 y − x ≥ 2p1 0 ≤ y ≤ p2

press? cup! coffee! press? press? cup! press? cup!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 17 / 42

slide-71
SLIDE 71

Why studying decidability?

If a decision problem is undecidable, it is hopeless to look for algorithms yielding exact solutions (because that is impossible)

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 18 / 42

slide-72
SLIDE 72

Why studying decidability?

If a decision problem is undecidable, it is hopeless to look for algorithms yielding exact solutions (because that is impossible) However, one can: design semi-algorithms: if the algorithm halts, then its result is correct design algorithms yielding over- or under-approximations

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 18 / 42

slide-73
SLIDE 73

Decision and computation problems for PTA

EF-Emptiness “Is the set of parameter valuations for which a given location l is reachable empty?”

Example: “Does there exist at least one parameter valuation for which I can get a coffee with 2 sugars?”

EF-Universality “Do all parameter valuations allow to reach a given location l?”

Example: “Are all parameter valuations such that I may eventually get a coffee?”

AF-Emptiness “Is the set of parameter valuations for which a given location l is always eventually reachable empty?”

Example: “Does there exist at least one parameter valuation for which I can always eventually get a coffee?”

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 19 / 42

slide-74
SLIDE 74

Decision and computation problems for PTA

EF-Emptiness “Is the set of parameter valuations for which a given location l is reachable empty?”

Example: “Does there exist at least one parameter valuation for which I can get a coffee with 2 sugars?”

, e. g., p1 = 1, p2 = 5, p3 = 8

EF-Universality “Do all parameter valuations allow to reach a given location l?”

Example: “Are all parameter valuations such that I may eventually get a coffee?”

AF-Emptiness “Is the set of parameter valuations for which a given location l is always eventually reachable empty?”

Example: “Does there exist at least one parameter valuation for which I can always eventually get a coffee?”

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 19 / 42

slide-75
SLIDE 75

Decision and computation problems for PTA

EF-Emptiness “Is the set of parameter valuations for which a given location l is reachable empty?”

Example: “Does there exist at least one parameter valuation for which I can get a coffee with 2 sugars?”

, e. g., p1 = 1, p2 = 5, p3 = 8

EF-Universality “Do all parameter valuations allow to reach a given location l?”

Example: “Are all parameter valuations such that I may eventually get a coffee?”

×, e. g., p1 = 1, p2 = 5, p3 = 2 AF-Emptiness “Is the set of parameter valuations for which a given location l is always eventually reachable empty?”

Example: “Does there exist at least one parameter valuation for which I can always eventually get a coffee?”

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 19 / 42

slide-76
SLIDE 76

Decision and computation problems for PTA

EF-Emptiness “Is the set of parameter valuations for which a given location l is reachable empty?”

Example: “Does there exist at least one parameter valuation for which I can get a coffee with 2 sugars?”

, e. g., p1 = 1, p2 = 5, p3 = 8

EF-Universality “Do all parameter valuations allow to reach a given location l?”

Example: “Are all parameter valuations such that I may eventually get a coffee?”

×, e. g., p1 = 1, p2 = 5, p3 = 2 AF-Emptiness “Is the set of parameter valuations for which a given location l is always eventually reachable empty?”

Example: “Does there exist at least one parameter valuation for which I can always eventually get a coffee?”

, e. g., p1 = 1, p2 = 5, p3 = 8

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 19 / 42

slide-77
SLIDE 77

Undecidability

The symbolic state space is infinite in general No finite abstraction exists (unlike timed automata)

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 20 / 42

slide-78
SLIDE 78

Undecidability

The symbolic state space is infinite in general No finite abstraction exists (unlike timed automata)

Bad news

All interesting problems are undecidable for (general) parametric timed automata.

[ÉA, STTT 2017]

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 20 / 42

slide-79
SLIDE 79

Undecidability in a nutshell

EF-emptiness problem “Is the set of parameter valuations for which a given location l is reachable empty?”

[Alur et al., 1993, Miller, 2000, Doyen, 2007, Beneš et al., 2015]

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 21 / 42

slide-80
SLIDE 80

Undecidability in a nutshell

EF-emptiness problem “Is the set of parameter valuations for which a given location l is reachable empty?”

[Alur et al., 1993, Miller, 2000, Doyen, 2007, Beneš et al., 2015]

EF-universality problem “Do all parameter valuations allow to reach a given location l?”

[ÉA, Lime, Roux @ ICFEM’16]

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 21 / 42

slide-81
SLIDE 81

Undecidability in a nutshell

EF-emptiness problem “Is the set of parameter valuations for which a given location l is reachable empty?”

[Alur et al., 1993, Miller, 2000, Doyen, 2007, Beneš et al., 2015]

EF-universality problem “Do all parameter valuations allow to reach a given location l?”

[ÉA, Lime, Roux @ ICFEM’16]

AF-emptiness and AF-universality problem “Is the set of parameter valuations for which all runs eventually reach a given location l empty/universal?”

[Jovanović et al., 2015, André et al., 2016]

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 21 / 42

slide-82
SLIDE 82

Undecidability in a nutshell

EF-emptiness problem “Is the set of parameter valuations for which a given location l is reachable empty?”

[Alur et al., 1993, Miller, 2000, Doyen, 2007, Beneš et al., 2015]

EF-universality problem “Do all parameter valuations allow to reach a given location l?”

[ÉA, Lime, Roux @ ICFEM’16]

AF-emptiness and AF-universality problem “Is the set of parameter valuations for which all runs eventually reach a given location l empty/universal?”

[Jovanović et al., 2015, André et al., 2016]

Preservation of the untimed language “Given a parameter valuation, does there exist another valuations with the same untimed language?”

[André and Markey, 2015]

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 21 / 42

slide-83
SLIDE 83

Decidability in a nutshell

Reducing the number of clocks yields decidability of the EF-emptiness problem:

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 22 / 42

slide-84
SLIDE 84

Decidability in a nutshell

Reducing the number of clocks yields decidability of the EF-emptiness problem:

1 parametric clock and arbitrarily many non-parametric clocks and integer-valued parameters

[Beneš et al., 2015]

1 parametric clock and arbitrarily many rational-valued parameters

[Miller, 2000]

2 parametric clocks and 1 integer-valued parameter

[Bundala and Ouaknine, 2014]

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 22 / 42

slide-85
SLIDE 85

Decidability in a nutshell

Reducing the number of clocks yields decidability of the EF-emptiness problem:

1 parametric clock and arbitrarily many non-parametric clocks and integer-valued parameters

[Beneš et al., 2015]

1 parametric clock and arbitrarily many rational-valued parameters

[Miller, 2000]

2 parametric clocks and 1 integer-valued parameter

[Bundala and Ouaknine, 2014]

Restraining the syntax brings decidability of some problems: L/U-PTAs

[Hune et al., 2002, Bozzelli and La Torre, 2009, André and Markey, 2015, André and Lime, 2017, André et al., 2018b]

PTAs with bounded integer-valued parameters

[Jovanović et al., 2015]

reset-PTAs

[André et al., 2016, André et al., 2018c]

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 22 / 42

slide-86
SLIDE 86

Outline

1

Parametric timed automata

2

IMITATOR in a nutshell

3

Modeling real-time systems with parametric timed automata

4

A case study: Verifying a real-time system under uncertainty

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 23 / 42

slide-87
SLIDE 87

IMITATOR

A tool for modeling and verifying timed concurrent systems with unknown constants modeled with parametric timed automata

Communication through (strong) broadcast synchronization Rational-valued shared discrete variables Stopwatches, to model schedulability problems with preemption

Synthesis algorithms

(non-Zeno) parametric model checking (using a subset of TCTL) Language and trace preservation, and robustness analysis Parametric deadlock-freeness checking

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 24 / 42

slide-88
SLIDE 88

IMITATOR

Under continuous development since 2008

[André et al., FM’12]

A library of benchmarks Communication protocols Schedulability problems Asynchronous circuits ...and more Free and open source software: Available under the GNU-GPL license

✇✇✇✳✐♠✐t❛t♦r✳❢r

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 25 / 42

slide-89
SLIDE 89

IMITATOR

Under continuous development since 2008

[André et al., FM’12]

A library of benchmarks Communication protocols Schedulability problems Asynchronous circuits ...and more Free and open source software: Available under the GNU-GPL license Try it!

✇✇✇✳✐♠✐t❛t♦r✳❢r

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 25 / 42

slide-90
SLIDE 90

Some success stories

Modeled and verified an asynchronous memory circuit by ST-Microelectronics Parametric schedulability analysis of a prospective architecture for the flight control system of the next generation of spacecrafts designed at ASTRIUM Space Transportation

[Fribourg et al., 2012]

Verification of software product lines

[Luthmann et al., 2017]

Offline monitoring

[ÉA, Hasuo, Waga @ ICECCS’18]

Formal timing analysis of music scores

[Fanchon and Jacquemard, 2013]

Solution to a challenge related to a distributed video processing system by Thales

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 26 / 42

slide-91
SLIDE 91

Outline

1

Parametric timed automata

2

IMITATOR in a nutshell

3

Modeling real-time systems with parametric timed automata

4

A case study: Verifying a real-time system under uncertainty

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 27 / 42

slide-92
SLIDE 92

Modeling real-time systems with timed automata

Using timed automata

[Abdeddaïm and Maler, 2001]

Using stopwatch automata

[Adbeddaïm and Maler, 2002]

Using parametric timed automata

[Cimatti et al., 2008]

Using parametric stopwatch automata

[Fribourg et al., 2012, Sun et al., 2013, Lipari et al., 2014]

Using task automata

[Norström et al., 1999, Fersman et al., 2007, André, 2017]

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 28 / 42

slide-93
SLIDE 93

Modeling a periodic task T (exercise)

Periodic task T with period periodT :

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 29 / 42

slide-94
SLIDE 94

Modeling a periodic task T (exercise)

Periodic task T with period periodT :

init urgent periodic

xactT ≤ periodT

actT

xactT = periodT

actT

xactT := 0

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 29 / 42

slide-95
SLIDE 95

Modeling a periodic task T (exercise)

Periodic task T with period periodT :

init urgent periodic

xactT ≤ periodT

actT

xactT = periodT

actT

xactT := 0

Periodic task T with period periodT and offsetT :

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 29 / 42

slide-96
SLIDE 96

Modeling a periodic task T (exercise)

Periodic task T with period periodT :

init urgent periodic

xactT ≤ periodT

actT

xactT = periodT

actT

xactT := 0

Periodic task T with period periodT and offsetT :

init

xactT ≤ offsetT

periodic

xactT ≤ periodT xactT = offsetT

actT

xactT := 0 xactT = periodT

actT

xactT := 0

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 29 / 42

slide-97
SLIDE 97

Modeling a sporadic task T (exercise)

Sporadic task T with minimum interarrival time miatT and offsetT :

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 30 / 42

slide-98
SLIDE 98

Modeling a sporadic task T (exercise)

Sporadic task T with minimum interarrival time miatT and offsetT :

init sporadic

xactT ≥ offsetT

actT

xactT := 0 xactT ≥ miatT

actT

xactT := 0

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 30 / 42

slide-99
SLIDE 99

Modeling a sporadic task T (exercise)

Sporadic task T with minimum interarrival time miatT and offsetT :

init sporadic

xactT ≥ offsetT

actT

xactT := 0 xactT ≥ miatT

actT

xactT := 0

A more efficient modeling to avoid clock divergence in IMITATOR and hence optimize the computation

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 30 / 42

slide-100
SLIDE 100

Modeling a sporadic task T (exercise)

Sporadic task T with minimum interarrival time miatT and offsetT :

init sporadic

xactT ≥ offsetT

actT

xactT := 0 xactT ≥ miatT

actT

xactT := 0

A more efficient modeling to avoid clock divergence in IMITATOR and hence optimize the computation

init

xactT ≤ offsetT

waiting

xactT ≤ miatT

ready stop {xactT}

xactT = offsetT

actT

xactT := 0 xactT = miatT

actT

xactT := 0

Trick: stop the computation of xactT to avoid diverging

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 30 / 42

slide-101
SLIDE 101

Modeling a task / pipeline

Pipeline P of two tasks T1 and T2 The pipeline has a period periodP

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 31 / 42

slide-102
SLIDE 102

Modeling a task / pipeline

Pipeline P of two tasks T1 and T2 The pipeline has a period periodP

T1 waiting

urgent

T1 released T2 waiting

urgent

T2 released P complete xactP ≤ periodP

actT1 finishT1 actT2 finishT2

xactP = periodP P restart xactP := 0

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 31 / 42

slide-103
SLIDE 103

Modeling the preemptive fixed priority scheduler

A fixed-priority preemptive processor with two tasks T1 and T4 Timings for T1: period periodT1, execution time period C1, deadline period D1 and similarly for T4

Idle stop {xT1 ,xT4 }

T1 running

stop {xT4 }

τ4 running

stop {xT1 }

T1 running τ4 released

stop {xT4 } Deadline missed actT1 actT4

xT1 = C1

finishT1

xT1 := 0

actT4

xactT1 > D1

Deadline miss

xT4 = C4

finishT4

xT4 := 0

actT1

xactT4 > D4

Deadline miss

xT1 = C1

finishT1

xT1 := 0 xT1 > D1

  • r xactT4 > D4

Deadline miss Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 32 / 42

slide-104
SLIDE 104

Outline

1

Parametric timed automata

2

IMITATOR in a nutshell

3

Modeling real-time systems with parametric timed automata

4

A case study: Verifying a real-time system under uncertainty

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 33 / 42

slide-105
SLIDE 105

The FMTV 2015 Challenge (1/2)

Challenge by Thales proposed during the WATERS 2014 workshop Solutions presented at WATERS 2015 System: an unmanned aerial video system with uncertain periods Period constant but with a small uncertainty (typically 0.01 %) Not a jitter!

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 34 / 42

slide-106
SLIDE 106

The FMTV 2015 Challenge (2/2)

Goal

Compute the end-to-end BCET and WCET times for a buffer size of n = 1 and

n = 3

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 35 / 42

slide-107
SLIDE 107

The FMTV 2015 Challenge (2/2)

Goal

Compute the end-to-end BCET and WCET times for a buffer size of n = 1 and

n = 3 Not a typical parameter synthesis problem?

No parameters in the specification

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 35 / 42

slide-108
SLIDE 108

The FMTV 2015 Challenge (2/2)

Goal

Compute the end-to-end BCET and WCET times for a buffer size of n = 1 and

n = 3 Not a typical parameter synthesis problem?

No parameters in the specification

A typical parameter synthesis problem

The end-to-end time can be set as a parameter... to be synthesized The uncertain period is typically a parameter (with some constraint, e. g.,

P1 ∈ [40 − 0.004, 40 + 0.004])

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 35 / 42

slide-109
SLIDE 109

Methodology

1

Propose a PTA model with parameters for uncertain periods and the end-to-end time

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 36 / 42

slide-110
SLIDE 110

Methodology

1

Propose a PTA model with parameters for uncertain periods and the end-to-end time

2

Add a specific location corresponding to the correct transmission of the frame

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 36 / 42

slide-111
SLIDE 111

Methodology

1

Propose a PTA model with parameters for uncertain periods and the end-to-end time

2

Add a specific location corresponding to the correct transmission of the frame

3

Run the reachability synthesis algorithm EFsynth (implemented in IMITATOR) w.r.t. that location

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 36 / 42

slide-112
SLIDE 112

Methodology

1

Propose a PTA model with parameters for uncertain periods and the end-to-end time

2

Add a specific location corresponding to the correct transmission of the frame

3

Run the reachability synthesis algorithm EFsynth (implemented in IMITATOR) w.r.t. that location

4

Gather all constraints (in as many dimensions as uncertain periods + the end-to-end time)

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 36 / 42

slide-113
SLIDE 113

Methodology

1

Propose a PTA model with parameters for uncertain periods and the end-to-end time

2

Add a specific location corresponding to the correct transmission of the frame

3

Run the reachability synthesis algorithm EFsynth (implemented in IMITATOR) w.r.t. that location

4

Gather all constraints (in as many dimensions as uncertain periods + the end-to-end time)

5

Eliminate all parameters but the end-to-end time

Note: not eliminating parameters allows one to know for which values of the periods the best / worst case execution times are obtained.

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 36 / 42

slide-114
SLIDE 114

Methodology

1

Propose a PTA model with parameters for uncertain periods and the end-to-end time

2

Add a specific location corresponding to the correct transmission of the frame

3

Run the reachability synthesis algorithm EFsynth (implemented in IMITATOR) w.r.t. that location

4

Gather all constraints (in as many dimensions as uncertain periods + the end-to-end time)

5

Eliminate all parameters but the end-to-end time

6

Exhibit the minimum and the maximum

Note: not eliminating parameters allows one to know for which values of the periods the best / worst case execution times are obtained.

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 36 / 42

slide-115
SLIDE 115

To build the PTA model

Uncertainties in the system:

P1 ∈ [40 − 0.004, 40 + 0.004] P3 ∈ [ 40

3 − 1 150, 40 3 + 1 150]

P4 ∈ [40 − 0.004, 40 + 0.004]

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 37 / 42

slide-116
SLIDE 116

To build the PTA model

Uncertainties in the system:

P1 ∈ [40 − 0.004, 40 + 0.004] P3 ∈ [ 40

3 − 1 150, 40 3 + 1 150]

P4 ∈ [40 − 0.004, 40 + 0.004]

Parameters:

P1_uncertain P3_uncertain P4_uncertain

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 37 / 42

slide-117
SLIDE 117

To build the PTA model

Uncertainties in the system:

P1 ∈ [40 − 0.004, 40 + 0.004] P3 ∈ [ 40

3 − 1 150, 40 3 + 1 150]

P4 ∈ [40 − 0.004, 40 + 0.004]

Parameters:

P1_uncertain P3_uncertain P4_uncertain

The end-to-end latency (another parameter): E2E

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 37 / 42

slide-118
SLIDE 118

To build the PTA model

Uncertainties in the system:

P1 ∈ [40 − 0.004, 40 + 0.004] P3 ∈ [ 40

3 − 1 150, 40 3 + 1 150]

P4 ∈ [40 − 0.004, 40 + 0.004]

Parameters:

P1_uncertain P3_uncertain P4_uncertain

The end-to-end latency (another parameter): E2E Others:

the register between task 2 and task 3: discrete variable reg2,3 the buffer between task 3 and task 4: n = 1 or n = 3

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 37 / 42

slide-119
SLIDE 119

Simplification

T1 and T2 are synchronised; T1, T3 and T4 are asynchronised

(exact modeling of the system behaviour is too heavy)

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 38 / 42

slide-120
SLIDE 120

Simplification

T1 and T2 are synchronised; T1, T3 and T4 are asynchronised

(exact modeling of the system behaviour is too heavy)

We choose a single arbitrary frame, called the target one We assume the system is initially in an arbitrary status

This is our only uncertain assumption (in other words, can the periods deviate from each other so as to yield any arbitrary deviation?)

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 38 / 42

slide-121
SLIDE 121

The initialization automaton

camera0 ckT1T2 = WCET1

slide-122
SLIDE 122

The initialization automaton

camera0 ckT1T2 = WCET1 camera1 ckT1T2 = WCET1 buffer3,4 := 0 highest3,4 := 0 buffer3,4 := 1 highest3,4 := 1

slide-123
SLIDE 123

The initialization automaton

camera0 ckT1T2 = WCET1 camera1 ckT1T2 = WCET1 buffer3,4 := 0 highest3,4 := 0 buffer3,4 := 1 highest3,4 := 1 camera2 ckT1T2 = WCET1 frame_in_3 := 0 frame_in_3 := 2

slide-124
SLIDE 124

The initialization automaton

camera0 ckT1T2 = WCET1 camera1 ckT1T2 = WCET1 buffer3,4 := 0 highest3,4 := 0 buffer3,4 := 1 highest3,4 := 1 camera2 ckT1T2 = WCET1 frame_in_3 := 0 frame_in_3 := 2 camera3 ckT1T2 = WCET1 reg2,3 := 0 reg2,3 := 3

slide-125
SLIDE 125

The initialization automaton

camera0 ckT1T2 = WCET1 camera1 ckT1T2 = WCET1 buffer3,4 := 0 highest3,4 := 0 buffer3,4 := 1 highest3,4 := 1 camera2 ckT1T2 = WCET1 frame_in_3 := 0 frame_in_3 := 2 camera3 ckT1T2 = WCET1 reg2,3 := 0 reg2,3 := 3 T1T2 WCET1 + WCL2 ≥ ckT1T2 start

slide-126
SLIDE 126

The initialization automaton

camera0 ckT1T2 = WCET1 camera1 ckT1T2 = WCET1 buffer3,4 := 0 highest3,4 := 0 buffer3,4 := 1 highest3,4 := 1 camera2 ckT1T2 = WCET1 frame_in_3 := 0 frame_in_3 := 2 camera3 ckT1T2 = WCET1 reg2,3 := 0 reg2,3 := 3 T1T2 WCET1 + WCL2 ≥ ckT1T2 start T1T2done ckT1T2 ≥ WCET1 + BCL2 T2done reg2,3 := target

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 39 / 42

slide-127
SLIDE 127

Task T3

T3preinit

slide-128
SLIDE 128

Task T3

T3preinit T3process WCET3 ≥ ckT3 WCET3 ≥ ckT3 start

slide-129
SLIDE 129

Task T3

T3preinit T3process WCET3 ≥ ckT3 WCET3 ≥ ckT3 start T3wait P3_uncertain ≥ ckT3 start

slide-130
SLIDE 130

Task T3

T3preinit T3process WCET3 ≥ ckT3 WCET3 ≥ ckT3 start T3wait P3_uncertain ≥ ckT3 start P3_uncertain = ckT3 T3_start ckT3 := 0 frame_in_3 := reg2,3

slide-131
SLIDE 131

Task T3

T3preinit T3process WCET3 ≥ ckT3 WCET3 ≥ ckT3 start T3wait P3_uncertain ≥ ckT3 start P3_uncertain = ckT3 T3_start ckT3 := 0 frame_in_3 := reg2,3 WCET3 = ckT3 ∧buffer3,4 = 0 ∧frame_in_3 > highest3,4 T3_done write_by_T3()

slide-132
SLIDE 132

Task T3

T3preinit T3process WCET3 ≥ ckT3 WCET3 ≥ ckT3 start T3wait P3_uncertain ≥ ckT3 start P3_uncertain = ckT3 T3_start ckT3 := 0 frame_in_3 := reg2,3 WCET3 = ckT3 ∧buffer3,4 = 0 ∧frame_in_3 > highest3,4 T3_done write_by_T3() WCET3 = ckT3 ∧ buffer3,4 > 0 T3_done

slide-133
SLIDE 133

Task T3

T3preinit T3process WCET3 ≥ ckT3 WCET3 ≥ ckT3 start T3wait P3_uncertain ≥ ckT3 start P3_uncertain = ckT3 T3_start ckT3 := 0 frame_in_3 := reg2,3 WCET3 = ckT3 ∧buffer3,4 = 0 ∧frame_in_3 > highest3,4 T3_done write_by_T3() WCET3 = ckT3 ∧ buffer3,4 > 0 T3_done WCET3 = ckT3 ∧ buffer3,4 = 0 ∧ highest3,4 ≥ frame_in_3 T3_done

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 40 / 42

slide-134
SLIDE 134

Task T4

T4wait P4_uncertain ≥ ckT4

slide-135
SLIDE 135

Task T4

T4wait P4_uncertain ≥ ckT4 T4process_nonempty 10 ≥ ckT4 P4_uncertain = ckT4 ∧ buffer3,4 > 0 ckT4 := 0 read_by_T4()

slide-136
SLIDE 136

Task T4

T4wait P4_uncertain ≥ ckT4 T4process_nonempty 10 ≥ ckT4 P4_uncertain = ckT4 ∧ buffer3,4 > 0 ckT4 := 0 read_by_T4() P4_uncertain = ckT4 ∧ buffer3,4 = 0 ckT4 := 0

slide-137
SLIDE 137

Task T4

T4wait P4_uncertain ≥ ckT4 T4process_nonempty 10 ≥ ckT4 P4_uncertain = ckT4 ∧ buffer3,4 > 0 ckT4 := 0 read_by_T4() P4_uncertain = ckT4 ∧ buffer3,4 = 0 ckT4 := 0 10 = ckT4 ∧ frame_in_4 = target

slide-138
SLIDE 138

Task T4

T4wait P4_uncertain ≥ ckT4 T4process_nonempty 10 ≥ ckT4 P4_uncertain = ckT4 ∧ buffer3,4 > 0 ckT4 := 0 read_by_T4() P4_uncertain = ckT4 ∧ buffer3,4 = 0 ckT4 := 0 10 = ckT4 ∧ frame_in_4 = target T4end_ok ckT4 = 0 10 = ckT4 ∧ frame_in_4 = target ∧ ckT1T2 = E2E ckT4 := 0

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 41 / 42

slide-139
SLIDE 139

Results

E2E latency results for n = 1 and n = 3

n = 1 n = 3

min E2E 63 ms 63 ms max E2E 145.008 ms 225.016 ms

Results obtained using IMITATOR in a few seconds

[ÉA, Lipari, Sun @ WATERS’15]

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 42 / 42

slide-140
SLIDE 140

Bibliography

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 43 / 42

slide-141
SLIDE 141

References I

Abdeddaïm, Y. and Maler, O. (2001). Job-shop scheduling using timed automata. In Berry, G., Comon, H., and Finkel, A., editors, CAV, volume 2102 of Lecture Notes in Computer Science, pages 478–492. Springer. Adbeddaïm, Y. and Maler, O. (2002). Preemptive job-shop scheduling using stopwatch automata. In TACAS, volume 2280 of LNCS, pages 113–126. Springer-Verlag. Alur, R. and Dill, D. L. (1994). A theory of timed automata. Theoretical Computer Science, 126(2):183–235. Alur, R., Henzinger, T. A., and Vardi, M. Y. (1993). Parametric real-time reasoning. In STOC, pages 592–601. ACM. André, É. (2017). A unified formalism for monoprocessor schedulability analysis under uncertainty. In Cavalcanti, A., Petrucci, L., and Seceleanu, C., editors, FMICS-AVoCS, volume 10471 of Lecture Notes in Computer Science, pages 100–115. Springer. Best paper award.

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 44 / 42

slide-142
SLIDE 142

References II

André, É. (2017). What’s decidable about parametric timed automata? International Journal on Software Tools for Technology Transfer. To appear. André, É., Fribourg, L., Kühne, U., and Soulat, R. (2012). IMITATOR 2.5: A tool for analyzing robustness in scheduling problems. In FM, volume 7436 of LNCS, pages 33–36. Springer. André, É., Hasuo, I., and Waga, M. (2018a). Offline timed pattern matching under uncertainty. In ICECCS. IEEE. To appear. André, É. and Lime, D. (2017). Liveness in L/U-parametric timed automata. In Legay, A. and Schneider, K., editors, ACSD, pages 9–18. IEEE. André, É., Lime, D., and Ramparison, M. (2018b). TCTL model checking lower/upper-bound parametric timed automata without invariants. In Jansen, D. N. and Prabhakar, P., editors, FORMATS, volume 11022 of Lecture Notes in Computer Science, pages 1–17. Springer.

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 45 / 42

slide-143
SLIDE 143

References III

André, É., Lime, D., and Ramparison, M. (2018c). Timed automata with parametric updates. In Juhás, G., Chatain, T., and Grosu, R., editors, ACSD, pages 21–29. IEEE. To appear. André, É., Lime, D., and Roux, O. H. (2016). Decision problems for parametric timed automata. In Ogata, K., Lawford, M., and Liu, S., editors, ICFEM, volume 10009 of LNCS, pages 400–416. Springer. André, É., Lipari, G., and Sun, Y. (2015). Verification of two real-time systems using parametric timed automata. In Quinton, S. and Vardanega, T., editors, WATERS. André, É. and Markey, N. (2015). Language preservation problems in parametric timed automata. In FORMATS, volume 9268 of LNCS, pages 27–43. Springer. Baier, C. and Katoen, J.-P. (2008). Principles of Model Checking. MIT Press. Beneš, N., Bezděk, P., Larsen, K. G., and Srba, J. (2015). Language emptiness of continuous-time parametric timed automata. In ICALP, Part II, volume 9135 of LNCS, pages 69–81. Springer.

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 46 / 42

slide-144
SLIDE 144

References IV

Bozzelli, L. and La Torre, S. (2009). Decision problems for lower/upper bound parametric timed automata. Formal Methods in System Design, 35(2):121–151. Bundala, D. and Ouaknine, J. (2014). Advances in parametric real-time reasoning. In MFCS, volume 8634 of LNCS, pages 123–134. Springer. Cimatti, A., Palopoli, L., and Ramadian, Y. (2008). Symbolic computation of schedulability regions using parametric timed automata. In RTSS, pages 80–89. IEEE Computer Society. Doyen, L. (2007). Robust parametric reachability for timed automata. Information Processing Letters, 102(5):208–213. Fanchon, L. and Jacquemard, F. (2013). Formal timing analysis of mixed music scores. In ICMC (International Computer Music Conference). Fersman, E., Krcál, P., Pettersson, P., and Yi, W. (2007). Task automata: Schedulability, decidability and undecidability. Information and Computation, 205(8):1149–1172. Fribourg, L., Lesens, D., Moro, P., and Soulat, R. (2012). Robustness analysis for scheduling problems using the inverse method. In TIME, pages 73–80. IEEE Computer Society Press.

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 47 / 42

slide-145
SLIDE 145

References V

Hune, T., Romijn, J., Stoelinga, M., and Vaandrager, F. W. (2002). Linear parametric model checking of timed automata. Journal of Logic and Algebraic Programming, 52-53:183–220. Jovanović, A., Lime, D., and Roux, O. H. (2015). Integer parameter synthesis for timed automata. IEEE Transactions on Software Engineering, 41(5):445–461. Larsen, K. G., Pettersson, P., and Yi, W. (1997). UPPAAL in a nutshell. International Journal on Software Tools for Technology Transfer, 1(1-2):134–152. Lipari, G., Sun, Y., André, É., and Fribourg, L. (2014). Toward parametric timed interfaces for real-time components. In Andre, E. and Frehse, G., editors, SynCoP, volume 145 of Electronic Proceedings in Theoretical Computer Science, pages 49–64. Luthmann, L., Stephan, A., Bürdek, J., and Lochau, M. (2017). Modeling and testing product lines with unbounded parametric real-time constraints. In Cohen, M. B., Acher, M., Fuentes, L., Schall, D., Bosch, J., Capilla, R., Bagheri, E., Xiong, Y., Troya, J., Cortés,

  • A. R., and Benavides, D., editors, SPLC, Volume A, pages 104–113. ACM.

Markey, N. (2011). Robustness in real-time systems. In SIES, pages 28–34. IEEE Computer Society Press.

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 48 / 42

slide-146
SLIDE 146

References VI

Miller, J. S. (2000). Decidability and complexity results for timed automata and semi-linear hybrid automata. In HSCC, volume 1790 of LNCS, pages 296–309. Springer. Norström, C., Wall, A., and Yi, W. (1999). Timed automata as task models for event-driven systems. In RTCSA, pages 182–189. IEEE Computer Society. Sun, Y., Soulat, R., Lipari, G., André, É., and Fribourg, L. (2013). Parametric schedulability analysis of fixed priority real-time distributed systems. In FTSCS, volume 419 of CCIS, pages 212–228. Springer.

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 49 / 42

slide-147
SLIDE 147

Licensing

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 50 / 42

slide-148
SLIDE 148

Source of the graphics used I

Title: Smiley green alien big eyes (aaah) Author: LadyofHats Source: ❤tt♣s✿✴✴❝♦♠♠♦♥s✳✇✐❦✐♠❡❞✐❛✳♦r❣✴✇✐❦✐✴❋✐❧❡✿❙♠✐❧❡②❴❣r❡❡♥❴❛❧✐❡♥❴❜✐❣❴❡②❡s✳s✈❣ License: public domain Title: Smiley green alien big eyes (cry) Author: LadyofHats Source: ❤tt♣s✿✴✴❝♦♠♠♦♥s✳✇✐❦✐♠❡❞✐❛✳♦r❣✴✇✐❦✐✴❋✐❧❡✿❙♠✐❧❡②❴❣r❡❡♥❴❛❧✐❡♥❴❜✐❣❴❡②❡s✳s✈❣ License: public domain

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 51 / 42

slide-149
SLIDE 149

License of this document

This presentation can be published, reused and modified under the terms of the license Creative Commons Attribution-ShareAlike 4.0 Unported (CC BY-SA 4.0)

(L

A

T EX source available on demand)

Author: Étienne André

❤tt♣s✿✴✴❝r❡❛t✐✈❡❝♦♠♠♦♥s✳♦r❣✴❧✐❝❡♥s❡s✴❜②✲s❛✴✹✳✵✴

Étienne André (Université Paris 13) Tutorial @ ESWEEK 2018 52 / 42