Real Real Real Time Real-Time Time Time Model Checking Model - - PowerPoint PPT Presentation

real real real time real time time time
SMART_READER_LITE
LIVE PREVIEW

Real Real Real Time Real-Time Time Time Model Checking Model - - PowerPoint PPT Presentation

Real Real Real Time Real-Time Time Time Model Checking Model Model Checking Model Checking Checking Patricia Bouyer-Decitre Patricia Bouyer-Decitre Kim Kim G Larsen Kim Kim G. . Larsen Larsen Larsen Nicolas Markey Nicolas


slide-1
SLIDE 1

Real Real-Time Time Real Real Time Time

Model Model Checking Checking Model Model Checking Checking

Patricia Bouyer-Decitre Patricia Bouyer-Decitre Kim Kim G Larsen Larsen Kim Kim G. . Larsen Larsen Nicolas Markey Nicolas Markey

slide-2
SLIDE 2

Timed Timed Automata Automata Timed Timed Automata Automata

.. .. and Prices Prices and Games Games

Patricia Bouyer-Decitre Patricia Bouyer-Decitre Kim Kim G Larsen Larsen Kim Kim G. . Larsen Larsen Nicolas Markey Nicolas Markey

slide-3
SLIDE 3

Model Checking Model Checking

System Description

No!

Debugging Information

Time Cost Probability

TOOL

Yes

Debugging Information Requirement

Yes

Prototypes Executable Code Test sequences

A฀( req ⇒ A♦ grant) A฀( req ⇒ A♦t<30s grant) A ( A♦ t) A฀( req ⇒ A♦t<30s,c<5$ grant) A฀( req ⇒ A♦t<30s , p>0.90 grant)

Kim Lars Kim Larsen [3] en [3]

QM QMC, PhD PhD School School, Ma , March 3, 3, 201 2010

slide-4
SLIDE 4

Synthesis Synthesis

System Description

No!

Debugging Information

Time Cost Probability

?

TOOL

Yes

Debugging Information Requirement

Yes

Control Strategy

A฀( req ⇒ A♦ grant) A฀( req ⇒ A♦t<30s grant) A ( A♦ t) A฀( req ⇒ A♦t<30s,c<5$ grant) A฀( req ⇒ A♦t<30s , p>0.90 grant)

QM QMC, PhD PhD School School, Ma , March 3, 3, 201 2010

Kim Lars Kim Larsen [4] en [4]

slide-5
SLIDE 5

Overview Overview

  • Introduction

Introduction to Timed Automata Timed Automata

  • Decidability

Decidability and undecidability results

CLASSI C CLASSI C CLASSI C CLASSI C

undecidability results

  • Timed Temporal Logics

Temporal Logics

  • UPPAAL

UPPAAL (hands on)

CLASSI C CLASSI C CLASSI C CLASSI C CORA CORA CORA CORA

  • UPPAAL

UPPAAL .. (hands-on)

  • Timed Games

Games P i P i d Ti d A t t TRON TRON TI GA TI GA TI GA TI GA

  • Price

ced Timed Automata

  • Open

Open Problems Problems TRON TRON PRO PRO

QM QMC, PhD PhD Sch School, March March 3, 3, 2010 2010

Kim Lars Kim Larsen [5] en [5]

slide-6
SLIDE 6

Timed Automata Timed Automata

slide-7
SLIDE 7

UPPAAL (contributors) UPPAAL (contributors)

@UPPsala @UPPsala

  • Wang Yi
  • Paul Pettersson

@AALborg

AALborg

  • Kim G Larsen
  • Gerd Behrman

Paul Pettersson

  • John Håkansson
  • Anders Hessel
  • Pavel Krcal
  • Arne Skou
  • Brian Nielsen
  • Alexandre David
  • Jacob I Rasmussen
  • Leonid Mokrushin
  • Shi Xiaochun

Jacob I. Rasmussen

  • Marius Mikucionis
  • Thomas Chatain

@Elsewhere

Emmanuel Fleury, Didier Lime, Johan Bengtsson, Fredrik Larsson, Kåre J Kristoffersen, Tobias Amnell, Thomas Hune, Oliver Möller, Elena Fersman, C W i D id G iffi A F h k J T F i Carsten Weise, David Griffioen, Ansgar Fehnker, Jan Tretmans, Frits Vandraager, Theo Ruys, Pedro D’Argenio, J-P Katoen,, Judi Romijn, Ed Brinksma, Martijn Hendriks, Klaus Havelund, Franck Cassez, Magnus Lindahl, Francois Laroussinie, Patricia Bouyer, Augusto Burgueno, H. B D L t ll M M i k G F ti K i ti L d i t L

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Lars Kim Larsen [7] en [7]

Bowmann, D. Latella, M. Massink, G. Faconti, Kristina Lundqvist, Lars Asplund, Justin Pearson.....

slide-8
SLIDE 8

Real Time Systems Real Time Systems

sensors actuators

Plant

Continuous

Controller Program

Discrete

Eg.:

Realtime Protocols Pump Control Air Bags

Real Time System A system where correctness not only

Robots Cruise Control ABS CD Players

A system where correctness not only depends on the logical order of events but also on their timing!!

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Lars Kim Larsen [8] en [8]

CD Players Production Lines

slide-9
SLIDE 9

A Dumb A Dumb Light Controller Light Controller

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Lars Kim Larsen [9] en [9]

slide-10
SLIDE 10

Timed Timed Automata utomata

[ Alur & Dill’89]

Synchronizing action Reset Clock Guard Conjunctions of n

ADD a ADD a clock clock x

x~n x: real-valued clock

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [10] Kim Larsen [10]

slide-11
SLIDE 11

A Timed A Timed Automata utomata (Semantics)

States: ( location , x= v) where v∈R Transitions: ( Off , x= 0 ) delay 4 32  ( Off x= 4 32 ) delay 4.32  ( Off , x= 4.32 ) press?  ( Light , x= 0 ) delay 2.51  ( Light , x= 2.51 ) press?  ( Bright , x= 2.51 )

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [11] Kim Larsen [11]

slide-12
SLIDE 12

Intelligent Intelligent Light Controller Light Controller

Invariant (Henzinger)

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [12] Kim Larsen [12]

slide-13
SLIDE 13

Intelligent Intelligent Light Controller Light Controller

Transitions: ( Off , x= 0 ) delay 4.32  ( Off , x= 4.32 ) ?  ( Li ht 0 ) Note: ( Light , x= 0 ) delay 103 

X

press?  ( Light , x= 0 ) delay 4.51  ( Light , x= 4.51 ) press?  ( Light , x= 0 ) delay 100  ( Light , x= 100)

Invariants ensures

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [13] Kim Larsen [13]

 ( Off , x= 0)

progress

slide-14
SLIDE 14

Timed Timed Automata utomata (formally)

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [14] Kim Larsen [14]

slide-15
SLIDE 15

Timed Timed Automata utomata (formally)

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [15] Kim Larsen [15]

slide-16
SLIDE 16

Timed Timed Automata utomata (formally)

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [16] Kim Larsen [16]

slide-17
SLIDE 17

Timed Timed Automata utomata (formally)

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [17] Kim Larsen [17]

slide-18
SLIDE 18

Example Example

a b c

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [18] Kim Larsen [18]

slide-19
SLIDE 19

Example Example

y

a b

x

c

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [19] Kim Larsen [19]

slide-20
SLIDE 20

Example Example

y

a b

x

c

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [20] Kim Larsen [20]

slide-21
SLIDE 21

Example Example

y

a

a b

x

a

c

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [21] Kim Larsen [21]

slide-22
SLIDE 22

Example Example

y

a a

a b

x

a a

c

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [22] Kim Larsen [22]

slide-23
SLIDE 23

Li ht C t l I t f Light Control I nterface

slide-24
SLIDE 24

Light Control I nterface

gi

press? d release?  touch! 0.5≤d≤ 1 press? 1  starthold! press? d release?  endhold! d >1

knolog

Interface touch! touch!

  • nstek

Control Program touch! touch! starthold! starthold! press? press?

rmatio

Light endhold! endhold! release? release?

Infor

User Light

press? 0.2 release? … press? 0.7 release? … press? 1.0 2.4 release? …

Ø touch! starthold! endhold!

24 QMC, PhD School, March 3, 2010

slide-25
SLIDE 25

Light Control I nterface

gi knolog

t h! t h!

  • nstek

Control Program touch! touch! starthold! starthold! press? press?

rmatio

endhold! endhold! release? release?

Infor

User

25 QMC, PhD School, March 3, 2010

slide-26
SLIDE 26

Light Control Netw ork

gi knolog

t h! t h!

  • nstek

Control Program touch! touch! starthold! starthold! press? press?

rmatio

endhold! endhold! release? release?

Infor

26 QMC, PhD School, March 3, 2010

slide-27
SLIDE 27

Task Graph Scheduling

slide-28
SLIDE 28

Resources Resources & Tasks Tasks & Composition

Resource Task Synchronization Shared variable Sem antics: ( Idle Init B 0) ( Idle , Init , B= 0, x= 0) d(3.1415)  ( Idle , Init , B= 0 , x= 3.1415 ) use  ( InUse , Using , B= 6, x= 0 ) d(6)  ( InUse , Using , B= 6, x= 6 )

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [28] Kim Larsen [28]

done  ( Idle , Done , B= 6 , x= 6 )

slide-29
SLIDE 29

Task Graph Scheduling – Task Graph Scheduling – Example Example + *

2 1

Compute : (D * ( C * ( A + B )) + (( A + B ) + ( C * D )) using 2 processors

A B C D

* + +

3 4

using 2 processors

P1 (fast) P2 (slow)

C

* + *

3ps

*

2ps

+

7ps

*

5ps

+

6 5

C

+ *

P1

5 10 15 20 25 6 5

2 3 6 5

D

P1 P2

1 2 3 6 5 4

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [29] Kim Larsen [29]

time

slide-30
SLIDE 30

Task Graph Scheduling – Task Graph Scheduling – Example Example + *

2 1

Compute : (D * ( C * ( A + B )) + (( A + B ) + ( C * D )) using 2 processors

A B C D

* + +

3 4

using 2 processors

P1 (fast) P2 (slow)

C

* + *

3ps

*

2ps

+

7ps

*

5ps

+

6 5

C

+ *

P1

5 10 15 20 25 6 5

D

1 3 6 5 4

P1 P2

1 2 3 6 5 4

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [30] Kim Larsen [30]

time

slide-31
SLIDE 31

Task Graph Scheduling Task Graph Scheduling

P2 P1

2 ,3 1 6 ,1 0

P6 P3 P4

2 ,3 6 ,6 1 0 ,1 6

P7 P5

2 ,2 8 ,2

M = { M1,M2}

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Guld Kim Guldstrand Larsen [31] Larsen [31]

slide-32
SLIDE 32

Task Graph Scheduling Task Graph Scheduling

P2 P1

2 ,3 1 6 ,1 0

P6 P3 P4

2 ,3 6 ,6 1 0 ,1 6

P7 P5

2 ,2 8 ,2

M = { M1,M2}

E<> (Task1 End and and Task7 End)

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Guld Kim Guldstrand Larsen [32] Larsen [32]

E<> (Task1.End and … and Task7.End)

slide-33
SLIDE 33

Experimental Results Experimental Results

Symbolic A* Branch-&-Bound 60 sec 60 sec

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [33] Kim Larsen [33]

Abdeddaïm, Kerbaa, Maler

slide-34
SLIDE 34

B i k S ti Brick Sorting

slide-35
SLIDE 35

LEGO Mindstorm s/ RCX

gi

 Sensors: temperature

3 output

knolog

 Sensors: temperature,

light, rotation, pressure.

 Actuators: motors, lamps,

3 output ports

  • nstek

Actuators: motors, lamps,

 Virtual machine:

 10 tasks, 4 timers,

rmatio

0 tas s, t e s, 16 integers.

 Several Programming

3 input ports 1 infra-red port

Infor Languages:

 NotQuiteC, Mindstorm, Robotics, legOS, etc.

35 QMC, PhD School, March 3, 2010

slide-36
SLIDE 36

A Real Real Tim ed System

gi knolog

Controller Program The Plant

Conveyor Belt

  • nstek

Program

LEGO MINDSTORM Conveyor Belt & Bricks

rmatio Infor

36 QMC, PhD School, March 3, 2010

slide-37
SLIDE 37

First UPPAAL m odel

Sorting of Lego Boxes

K Ti d ll

gi

Ken Tindell

knolog

Boxes

Piston

eject

  • nstek

Conveyer Belt

Red

81 99

remove

rmatio

Red

9 18 81 90

Blck Yel

Controller

Infor

Black

Co t o e MAI N PUSH Exercise: Design Controller so that black boxes are being pushed out

37 QMC, PhD School, March 3, 2010

slide-38
SLIDE 38

NQC program s

int active; int DELAY;

gi

; int LIGHT_LEVEL; task MAIN{ DELAY=75; LIGHT LEVEL 35

knolog

task PUSH{ while(true){ wait(Timer(1)>DELAY && active==1); LIGHT_LEVEL=35; active=0; Sensor(IN_1, IN_LIGHT); Fwd(OUT_A,1); Displa (1)

  • nstek

active=0; Rev(OUT_C,1); Sleep(8); Fwd(OUT_C,1); Display(1); start PUSH; while(true){

rmatio

Sleep(12); Off(OUT_C); } } while(true){ wait(IN_1<=LIGHT_LEVEL); ClearTimer(1); active=1;

Infor

active=1; PlaySound(1); wait(IN_1>LIGHT_LEVEL); } }

38 QMC, PhD School, March 3, 2010

slide-39
SLIDE 39

A Black Brick

gi knolog

  • nstek

rmatio Infor

39 QMC, PhD School, March 3, 2010

slide-40
SLIDE 40

Control Tasks & Piston

gi knolog

  • nstek

rmatio

GLOBAL DECLARATI ONS: const int ctime = 75; int[ 0 1] active;

Infor

int[ 0,1] active; clock x, time; chan eject ok; chan eject, ok; urgent chan blck, red, remove, go;

40 QMC, PhD School, March 3, 2010

slide-41
SLIDE 41

Case Studies: Controllers Case Studies: Controllers

  • Gearbox Controller [TACAS’98]
  • Bang & Olufsen Power Controller [RTPS’99,FTRTFT’2k]
  • SIDMAR Steel Production Plant [RTCSA’99, DSVV’2k]

R l Ti RCX C l P [ECRTS’2k]

  • Real-Time RCX Control-Programs [ECRTS’2k]
  • Terma, Verification of Memory Management for Radar (2001)
  • Scheduling Lacquer Production (2005)
  • Memory Arbiter Synthesis and Verification for a Radar Memory Interface Card [NJC’05]
  • Adapting the UPPAAL Model of a Distributed Lift System, 2007
  • Analyzing a χ model of a turntable system using Spin, CADP

and Uppaal, 2006

  • De

Designing, Mo signing, Modelling delling and Ve nd Verif rifying a ying a Co Container T ntainer Terminal rminal System Using UPPAAL, 2008 System Using UPPAAL, 2008

  • Model-based system analysis using Chi and Uppaal: An

industrial case study, 2008

  • Climate Controller for Pig Stables, 2008

g ,

  • Optimal and Robust Controller for Hydralic Pump, 2009

Kim Larsen [41] Kim Larsen [41] QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010

slide-42
SLIDE 42

Case Studies: Protocols Case Studies: Protocols

  • Philips Audio Protocol [HS’95, CAV’95, RTSS’95, CAV’96]
  • Bounded Retransmission Protocol [TACAS’97]
  • Bang & Olufsen Audio/Video Protocol [RTSS’97]
  • TDMA Protocol [PRFTS’97]
  • Lip Synchronization Protocol [FMICS’97]
  • Lip-Synchronization Protocol [FMICS 97]
  • ATM ABR Protocol [CAV’99]
  • ABB Fieldbus Protocol [ECRTS’2k]
  • IEEE 1394 Firewire Root Contention (2000)
  • Distributed Agreement Protocol [Formats05]
  • Leader Election for Mobile Ad Hoc Networks [Charme05]

Leader Election for Mobile Ad Hoc Networks [Charme05]

  • Analysis of a protocol for dynamic configuration of IPv4 link

local addresses using Uppaal, 2006 F li i SHIM6 P d I S d d i UPPAAL

  • Formalizing SHIM6, a Proposed Internet Standard in UPPAAL,

2007

  • Verifying the distributed real-time network protocol RTnet

i U l 2007 using Uppaal, 2007

  • Anal

Analysi ysis of

  • f the

the Zeroco Zeroconf protoco protocol usi using UPPAAL, 2009 g UPPAAL, 2009

  • Analysis of a Clock Synchronization Protocol for Wireless

Sensor Networks, 2009

Kim Larsen [42] Kim Larsen [42] QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010

slide-43
SLIDE 43

Using Using UPPAAL as Back-end PPAAL as Back-end

  • Vooduu: verification of object-oriented designs

using Uppaal 2004 using Uppaal, 2004

  • Moby/RT: A Tool for Specification and Verification of

Real-Time Systems, 2000

  • Formalising the ARTS MPSOC Model in UPPAAL,

2007 Ti d t t t l t f U l t PVS

  • Timed automata translator for Uppaal to PVS
  • Component-Based Design and Analysis of

Component-Based Design and Analysis of Embedded Embedded Systems ystems with with UPPAAL UPPAAL PORT, PORT, 2008 2008 Embedded Embedded Systems Systems with with UPPAAL UPPAAL PORT, PORT, 2008 2008

  • Verification of COMDES-II Systems Using UPPAAL

with Model Transformation, 2008

QMC, PhD School, March 3, QMC, PhD School, March 3, 2010 2010 Kim Larsen [43] Kim Larsen [43]