and Symb mbolic olic Ve Verif rification ication Kim Ki m G. - - PowerPoint PPT Presentation

and
SMART_READER_LITE
LIVE PREVIEW

and Symb mbolic olic Ve Verif rification ication Kim Ki m G. - - PowerPoint PPT Presentation

Dec ecidab idability ility and Symb mbolic olic Ve Verif rification ication Kim Ki m G. . La Lars rsen Aa Aalb lborg org Univ iversity ersity, , DENMARK NMARK Dec Decid idabi ability lity Reachability chability ? a b


slide-1
SLIDE 1

Dec ecidab idability ility and Symb mbolic

  • lic Ve

Verif rification ication

Ki Kim m G. . La Lars rsen Aa Aalb lborg

  • rg Univ

iversity ersity, , DENMARK NMARK

slide-2
SLIDE 2

Dec Decid idabi ability lity

slide-3
SLIDE 3

Reachability chability ?

a b c

Reachable from initial state (L0,x=0,y=0) ?

OBSTACLE: Uncountably infinite state space

locations clock-valuations

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [3]

slide-4
SLIDE 4

The he Regi gion

  • n Abstr

traction action

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [4]

slide-5
SLIDE 5

Time me Abstracte tracted Bisim simulation ulation

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [5]

slide-6
SLIDE 6

THM [CY90] Time-optimal reachability is decidable (and PSPACE-complete) for timed automata

+

Regi gions

  • ns – From Infinite to Finite

Successor Regions Successor Regions Successor regions Reset region

THM [AD90] Reachability is decidable (and PSPACE-complete) for timed automata

A region

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [6]

slide-7
SLIDE 7

Regi gion

  • n Graph

aph

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [7]

slide-8
SLIDE 8

Region gion Au Automaton

  • maton =

= Finite nite Bisimulation simulation Qu Quotiont

  • tiont

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [8]

slide-9
SLIDE 9

An n Example ample

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [9]

slide-10
SLIDE 10

Regi gion

  • n Aut

utoma

  • maton

ton

LARGE ARGE: : exponential in the number of clocks and in the constants (if encoded in binary). The number of regions is

| |

(2 2) | !| 2 X

x x X

M X

  

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [10 10]

slide-11
SLIDE 11

Fun undamental mental Resul ults ts

  • Reachability 
  • Model-checking
  • TCTL  ; MTL  ; MITL 
  • Bisimulation, Simulation
  • Timed 

; Untimed 

  • Trace-inclusion
  • Timed 

; Untimed 

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [11 11]

slide-12
SLIDE 12

Sym Symbol bolic ic Ve Veri rific fication ation

The UPPAAL Verification Engine

slide-13
SLIDE 13

+

Regi gions

  • ns – From
  • m In

Infinit finite e to to Fi Fini nite te

Regi gion

  • n constru

ructi ction:

  • n: [AD94]

94] In practice: ce: Zones

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [13 13]

slide-14
SLIDE 14

Zo Zone nes – From

  • m Fini

nite te to to Ef Effic ficienc iency

A zone Z: 1· x · 2 Æ 0· y · 2 Æ x - y ¸ 0

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [14 14]

slide-15
SLIDE 15

Zo Zone nes - Op Operations ations

x y x y x y x y x y x y

(n, 2·x·4 Æ 1·y·3 Æ y-x·0 ) (n, 2·x Æ 1·y Æ -3· y-x·0 ) (n, 2·x Æ 1·y·3 Æ y-x·0 )

Delay Delay (stopwatch) Reset

(n, x=0 Æ 1·y·3 )

Extrapolation

2

Convex Hull

(n, 2·x·4Æ 1·y )

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [15 15]

slide-16
SLIDE 16

Symbolic mbolic Transition ansitions

x>3 y:=0 delays to conjuncts to projects to x y

1<=x<=4 1<=y<=3

x y x y

3<x, 1<=y

  • 2<=x-y<=3

3<x, y=0

x y

a

1<=x, 1<=y

  • 2<=x-y<=3

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [16 16]

slide-17
SLIDE 17

For

  • rwa

ward rd Reachability chability

Passed Waiting Final Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT pick (n,Z) in Waiting if (n,Z) = Final return true for all (n,Z)(n’,Z’): if for some (n’,Z’’) Z’ Z’’ continue else add (n’,Z’) to Waiting move (n,Z) to Passed UNTIL Waiting = Ø return false

Init -> Final ?

PW

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [17 17]

slide-18
SLIDE 18

For

  • rwa

ward rd Reachability chability

Passed Waiting Final Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT pick (n,Z) in Waiting if (n,Z) = Final return true for all (n,Z)(n’,Z’): if for some (n’,Z’’) Z’ Z’’ continue else add (n’,Z’) to Waiting move (n,Z) to Passed UNTIL Waiting = Ø return false

Init -> Final ?

PW

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [18 18]

slide-19
SLIDE 19

For

  • rwa

ward rd Reachability chability

Passed Waiting Final? Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT pick (n,Z) in Waiting if (n,Z) = Final return true for all (n,Z)(n’,Z’): if for some (n’,Z’’) Z’ Z’’ continue else add (n’,Z’) to Waiting move (n,Z) to Passed UNTIL Waiting = Ø return false

Init -> Final ?

PW

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [19 19]

slide-20
SLIDE 20

For

  • rwa

ward rd Reachability chability

Passed Waiting Final Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT pick (n,Z) in Waiting if (n,Z) = Final return true for all (n,Z)(n’,Z’): if for some (n’,Z’’) Z’ Z’’ continue else add (n’,Z’) to Waiting move (n,Z) to Passed UNTIL Waiting = Ø return false

Init -> Final ?

PW

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [20 20]

slide-21
SLIDE 21

For

  • rwa

ward rd Reachability chability

Passed Waiting Final Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT pick (n,Z) in Waiting if (n,Z) = Final return true for all (n,Z)(n’,Z’): if for some (n’,Z’’) Z’ Z’’ continue else add (n’,Z’) to Waiting move (n,Z) to Passed UNTIL Waiting = Ø return false

Init -> Final ?

PW

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [21 21]

slide-22
SLIDE 22

For

  • rwa

ward rd Reachability chability

Passed Waiting Final Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT pick (n,Z) in Waiting if (n,Z) = Final return true for all (n,Z)(n’,Z’): if for some (n’,Z’’) Z’ Z’’ continue else add (n’,Z’) to Waiting move (n,Z) to Passed UNTIL Waiting = Ø return false

Init -> Final ?

PW

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [22 22]

slide-23
SLIDE 23

For

  • rwa

ward rd Reachability chability

Passed Waiting Final Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT pick (n,Z) in Waiting if (n,Z) = Final return true for all (n,Z)(n’,Z’): if for some (n’,Z’’) Z’ Z’’ continue else add (n’,Z’) to Waiting move (n,Z) to Passed UNTIL Waiting = Ø return false

Init -> Final ?

PW

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [23 23]

slide-24
SLIDE 24

Symbolic mbolic Explora ploration tion

Reachable? x y

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [24 24]

slide-25
SLIDE 25

Symbolic mbolic Explora ploration tion

Reachable? x y Delay

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [25 25]

slide-26
SLIDE 26

Symbolic mbolic Explora ploration tion

Reachable? x y Left

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [26 26]

slide-27
SLIDE 27

Symbolic mbolic Explora ploration tion

Reachable? x y Left

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [27 27]

slide-28
SLIDE 28

Symbolic mbolic Explora ploration tion

Reachable? x y Delay

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [28 28]

slide-29
SLIDE 29

Symbolic mbolic Explora ploration tion

Reachable? x y Left

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [29 29]

slide-30
SLIDE 30

Symbolic mbolic Explora ploration tion

Reachable? x y Left

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [30 30]

slide-31
SLIDE 31

Symbolic mbolic Explora ploration tion

Reachable? x y Delay

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [31 31]

slide-32
SLIDE 32

Symbolic mbolic Explora ploration tion

Reachable? x y Down

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [32 32]

slide-33
SLIDE 33

Data tastruc structure tures s fo for Zo Zone nes

  • Difference Bounded

Matrices (DBMs)

  • Minimal Constraint

Form [RTSS97]

  • Clock Difference

Diagrams [CAV99]

x1 x2 x3 x0

  • 4

4 2 2 5 3 3

  • 2
  • 2

1

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [33 33]

slide-34
SLIDE 34

Bellman 1958, Dill 1989 x<=1 y-x<=2 z-y<=2 z<=9 x<=2 y-x<=3 y<=3 z-y<=3 z<=7

D1 D2 Inclusion

x y z 1 2 2 9 x y z 2 3 3 7 3

? ?

Graph Graph

In Inclusion usion Che hecki king ng (DBMs) Ms)

Shortest Path Closure Shortest Path Closure x y z 1 2 2

5

x y z 2 3 3

6 3

3

4 6

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [34 34]

slide-35
SLIDE 35

Fut utur ure e (DBMs) Ms)

1<= x <=4 1<= y <=3

D

x y x y

Future D

y x 4

  • 1

3

  • 1

Shortest Path Closure Remove upper bounds

  • n clocks

1<=x, 1<=y

  • 2<=x-y<=3

y x

  • 1
  • 1

3 2 y x

  • 1
  • 1

3 2 4 3

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [35 35]

slide-36
SLIDE 36

Reset t (DBMs) Ms)

x y

D

1<=x, 1<=y

  • 2<=x-y<=3

y x

  • 1
  • 1

3 2 Remove all bounds involving y and set y to 0

x y

{y}D

y=0, 1<=x

y x

  • 1

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [36 36]

slide-37
SLIDE 37

x1-x2<=4 x2-x1<=10 x3-x1<=2 x2-x3<=2 x0-x1<=3 x3-x0<=5

x1 x2 x3 x0

  • 4

10 2 2 5 3

x1 x2 x3 x0

  • 4

4 2 2 5 3 3

  • 2
  • 2

1 Shortest Path Closure O(n^3)

Canonical Datastructures for Zones

Diffe ffere rence nce Bou

  • und

nded ed Ma Matr trices ices

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [37 37]

slide-38
SLIDE 38

x1-x2<=4 x2-x1<=10 x3-x1<=2 x2-x3<=2 x0-x1<=3 x3-x0<=5

x1 x2 x3 x0

  • 4

10 2 2 5 3

x1 x2 x3 x0

  • 4

4 2 2 5 3

x1 x2 x3 x0

  • 4

2 2 3 3

  • 2
  • 2

1 Shortest Path Closure O(n^3) Shortest Path Reduction O(n^3) 3 Space worst O(n^2) practice O(n)

RTSS 1997

Canonical Datastructures for Zones

Mi Mini nimal mal Con

  • nstraint

straint For

  • rm

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [38 38]

slide-39
SLIDE 39

Earlier rlier Terminatio mination

Passed Waiting Final Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT pick (n,Z) in Waiting if (n,Z) = Final return true for all (n,Z)(n’,Z’): if for some (n’,Z’’) Z’ Z’’ continue else add (n’,Z’) to Waiting move (n,Z) to Passed UNTIL Waiting = Ø return false

Init -> Final ?

PW

Z’ Z’’

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [39 39]

slide-40
SLIDE 40

Earlier rlier Terminatio mination

Passed Waiting Final Init INITIAL Passed := Ø; Waiting := {(n0,Z0)} REPEAT pick (n,Z) in Waiting if (n,Z) = Final return true for all (n,Z)(n’,Z’): if for some (n’,Z’’) Z’ Z’’ continue else add (n’,Z’) to Waiting move (n,Z) to Passed UNTIL Waiting = Ø return false

Init -> Final ?

PW

Z’ Z’’

Z’ [ Zi

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [40 40]

slide-41
SLIDE 41

Clock

  • ck Diffe

ffere rence nce Diagra iagrams ms

  • Nodes labeled with

differences

  • Maximal sharing of

substructures (also across different CDDs)

  • Maximal intervals
  • Linear-time algorithms for

set-theoretic operations.

  • NDD’s Maler et. al
  • DDD’s Møller, Lichtenberg

CDD-representations

CAV99

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. Sept

ptembe ber 2013. Kim Larse sen [41 41]

slide-42
SLIDE 42

Ve Veri rificati fication

  • n Op

Optio tions ns

slide-43
SLIDE 43

Ve Verifica ification tion Op Opti tions

  • ns

Search Order Depth First Breadth First State Space Reduction None Conservative Aggressive State Space Representation DBM Compact Form Under Approximation Over Approximation Diagnostic Trace Some Shortest Fastest Extrapolation Hash Table size Reuse

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [43 43]

slide-44
SLIDE 44

Cycles: Only symbolic states involving loop-entry points need to be saved on Passed list

Sta tate te Spac pace Reductio uction

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [44 44]

slide-45
SLIDE 45

To

  • Sto

tore re or

  • r Not
  • t To
  • Sto

tore re

Audio Protocol 117 statestotal ! 81 statesentrypoint ! 9 states Behrmann, Larsen, Pelanek 2003 Time OH less than 10%

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [45 45]

slide-46
SLIDE 46

Ov Over/U /Under nder Approximation roximation

Declared State Space

R

G

Question:

G 2 R ? O

I

U How to use: G 2 O ? G 2 U ? G2 U ) G2 R :(G2 O) ) :(G2 R)

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [46 46]

slide-47
SLIDE 47

Ov Over-approximation approximation Co Conv nvex ex Hu Hull

x y Convex Hull

1 3 5 1 3 5

TACAS04: An EXACT method performing as well as Convex Hull has been developed based on abstractions taking max constants into account distinguishing between clocks, locations and · & ¸

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [47 47]

slide-48
SLIDE 48

Under er-approximation approximation Bits tstat tate Ha Hashin ing

Passed Waiting

Final Init n,Z’ m,U n,Z

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [48 48]

slide-49
SLIDE 49

Passed Waiting

Final Init n,Z’ m,U n,Z

Passed= Bitarray 1 1 1 UPPAAL 4 - 512 Mbits Hashfunction F

Und nder-approximation approximation Bitsta tstate te Ha Hashi hing ng

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [49 49]

slide-50
SLIDE 50

Extr trapolation apolation

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [50 50]

slide-51
SLIDE 51

For

  • rwa

ward rd Symbolic mbolic Exploratio ploration

TERMINATION not garanteed Need for Finite Abstractions

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [51 51]

slide-52
SLIDE 52

Abstracti tractions

  • ns

We want )a to be:

  • sound & complete wrt reachability
  • finite
  • easy to compute
  • as coarse as possible

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [52 52]

slide-53
SLIDE 53

Abstracti traction

  • n by Extr

trapolatio apolation

Let k be the largest constant appearing in the TA

x1 x2 x3 x0

*

>k <-k

* * * * * * *

x1 x2 x3 x0

*

1

  • k

* * * * * * *

Sound & Complete Ensures Termination

[Daws,Tripakis 98]

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [53 53]

slide-54
SLIDE 54

Loc

  • cation

tion Depende ndency ncy

kx = 5 ky = 106 Will generate all symbolic states of the form

(l2, x2 [0,14] , y2 [5,14n] , y-x2 [5,14n-14])

for n ·106/14 !! But y¸106 is not RELEVANT in l2

[Behrmann, Bouyer, Fleury, Larsen 03]

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [54 54]

slide-55
SLIDE 55

Loc

  • cation

tion Depende ndent nt Con

  • nstants

stants

kx = 5 ky = 106 kx

i

= 14 for i2{1,2,3,4} ky

i

= 5 for i2{1,2,3} ky

4

= 106 kj

i may be found as solution to

simple linear constraints! Active Clock Reduction: kj

i = -1

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [55 55]

slide-56
SLIDE 56

Expe perimen riments ts

Active ve by defaul ult

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [56 56]

slide-57
SLIDE 57

Low

  • wer and

nd Uppe per r Bou

  • unds

nds

[Behrmann, Bouyer, Larsen, Pelanek 04]

kx

l = 106

Given that x·106 is an upper bound implies that (l,vx,vy) simulates (l,v’x,vy) whenever v’x¸ vx¸ 10. For reachability downward closure wrt simulation suffices!

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [57 57]

slide-58
SLIDE 58

Adva vance nced d Extr trapolatio apolation

Classical

  • Loc. dep. Max
  • Loc. dep. LU

Convex Hull Fischer CSMA/CD

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [58 58]

slide-59
SLIDE 59

Additional “secrets”

  • Sharing among symbolic states
  • location vector / discrete values / zones
  • Symmetry Reduction
  • Sweep Line Method
  • Guiding wrt Heuristic Value (CORA)
  • User-supplied / Auto-generated
  • “Manual” tricks:
  • active variable reduction
  • Value passing using arrays of channels

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [59 59]

slide-60
SLIDE 60

Op Open n Problem

  • blems
  • Fully symbolic exploration of TA (both

discrete and continuous part) ?

  • Canonical form for CDD’s ?
  • Partial Order Reduction ?
  • Compositional Backwards Reachability ?
  • Bounded Model Checking for TA ?
  • Exploitation of multi-core processors ?

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [60 60]

slide-61
SLIDE 61

App Appli lication: cation: Sch Schedulabil dulability ity Ana Analysis lysis

slide-62
SLIDE 62

Task sk Sched heduling uling

T2 is running { T4 , T1 , T3 } ready

  • rdered according to some

given priority: (e.g. Fixed Priority, Earliest Deadline,..)

T1 T2 Tn

Scheduler

2

1 4 3 ready done stop run P(i), [E(i), L(i)], .. : period or earliest/latest arrival or .. for Ti C(i): execution time for Ti D(i): deadline for Ti

utilization of CPU

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [62 62]

slide-63
SLIDE 63

Classi lassical cal Sched heduling uling The heor

  • ry
41

Utilisation-Based Analysis

  • A simple sufficient but not necessary

schedulability test exists

) 1 2 (

/ 1 1

   

 N N i i i

N T C U

   N U as 69 .

Where C is WCET and T is period 42

Response Time Equation

j i hp j j i i i

C T R C R         

 ) (

Where hp(i) is the set of tasks with priority higher than task i Solve by forming a recurrence relationship:

j i hp j j n i i n i

C T w C w         

  ) ( 1

The set of values is monotonically non decreasing When the solution to the equation has been found, must not be greater that (e.g. 0 or )

1 

n i n i

w w ,.. ,..., , ,

2 1 n i i i i

w w w w

i

w

i

R

i

C

Quasimodo

Classical cal WCRT Analysis

  • “Classical” scheduling analysis technique
  • For all tasks i: WCRTi Deadlinei
  • Ci Worst-Case Execution Time
  • Bi Blocking time by lower-pri tasks (shared resources)
  • hp(i) tasks with higher priority than i
Quasimodo Workshop, Eindhoven, Nov 6, 2009 Page 21

 Simple to perform – Overly conservative – Limited settings – Single-processor  Do it in UPP PPAAL AL!

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [63 63]

slide-64
SLIDE 64

Mo Modeling eling Task sk

T1 T2 Tn

Scheduler

2

1 4 3

ready done stop run

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [64 64]

slide-65
SLIDE 65

Mo Modeling eling Sched heduler uler

T1 T2 Tn

Scheduler

2

1 4 3

ready done stop run

Implementat mentation ion of enqueu ueue/dequeu equeue  scheduli heduling ng policy

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [65 65]

slide-66
SLIDE 66

Mo Modeling eling Qu Queue ue

T1 T2 Tn

Scheduler

2

1 4 3

ready done stop run

In UPPAAL 4.0 User Defined Function …… Sort by priority

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [66 66]

slide-67
SLIDE 67

Sched hedulability ulability = S = Safety fety Prope

  • perty

rty

A฀ :(Task0.Error or Task1.Error or …)

:(Task0.Error or Task1.Error or …)

May be extended with preemption

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [67 67]

slide-68
SLIDE 68

Preemption mption – Sto topwatc pwatches! hes!

Task Scheduler Defeating undecidability 

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [69 69]

slide-69
SLIDE 69

Sto top-Watc Watche hes

  • Make reachability undecidable.
  • Over-approximation used in UPPAAL
  •  Safe for positive schedulability results!
  • What to do if you violate deadlines?
  • Try to validate the trace using other techniques,

e.g., polyhedra.

  • Use SMC!

Verifi ifica catio ion n Theory, y, Systems s and Appli plica catio ions s Summer r School.

  • l. September

mber 2013. Kim Larse sen [70 70]

slide-70
SLIDE 70

LA LAB-Exercises Exercises (cont cont)

www.cs.aau.dk/~kgl/Shanghai2013/exercises Exercise 1 (Brick Sorter) Exercise 2 (Coffee Machine) Excercise 19 (Train Crossing) Exercise 28 (Jobshop Scheduling) Exercise 14 (Gossiping Girls)