Model-based ased Ve Veri rific icatio ation, Optim imiz - - PowerPoint PPT Presentation

model based
SMART_READER_LITE
LIVE PREVIEW

Model-based ased Ve Veri rific icatio ation, Optim imiz - - PowerPoint PPT Presentation

Model-based ased Ve Veri rific icatio ation, Optim imiz ization ation, Sy Synthesi hesis s and Perform ormanc ance e Evalu luation tion of Real-Time ime Sy Systems tems Al Alexandr xandre e Dav avid d Ki Kim m G. .


slide-1
SLIDE 1

Model-based ased

Ve

Veri rific icatio ation, Optim imiz ization ation, Sy Synthesi hesis s and Perform

  • rmanc

ance e Evalu luation tion

  • f Real-Time

ime Sy Systems tems

Al Alexandr xandre e Dav avid d Ki Kim m G. . La Lars rsen Aa Aalborg

  • rg Unive

versity rsity, , DENMAR NMARK

slide-2
SLIDE 2

Tim imed ed Aut Automa mata ta

.. .. and Price

ices, s, Games, mes, Probabilities

  • babilities

Al Alexandr xandre e Dav avid d Ki Kim m G. . La Lars rsen Aa Aalborg

  • rg Unive

versity rsity, , DENMAR NMARK

slide-3
SLIDE 3

Aalborg lborg

ICTAC AC School, l, Shanghai ai 2013

Aalborg University leading Danish ICT University in terms of public investments (33%)

Aalborg Aarhus Copenhagen Jomfru Ane Gade

Kim Larse sen [3]

slide-4
SLIDE 4

CIS ISS S - Center

r For Embe bedded dded Softwar tware e Systems ems

ICTAC AC School, l, Shanghai ai 2013

Regio gional al ICT T Center enter (2003 003- )

  • 3 research groups
  • Computer Science
  • Control Theory
  • HW/SW- codesign
  • 20

20 Employed

  • 25

25 Associated

  • 20

20 PhD Students

  • 50

50 Industrial projects

  • 10

10 Elite-students

  • 65

65 MDKK

  • ARTIST Design
  • ARTEMIS

Kim Larse sen [4]

slide-5
SLIDE 5

IDEA4CPS CPS Foundations

  • undations fo

for r CPS

IDEA4C A4CPS S Meeting ng Aalbo borg rg, June 11, 2013, Kim Larse sen [5]

I D E A

  • Inst. of Software Chinese Academy of Sciences,

Beijing, China Technical University of Denmark, Lyngby, Denmark East China Normal University, Shanghai, China Aalborg University, Denmark

(2011 011-2014 014) ) + ( (2014 14-2017) 2017)

slide-6
SLIDE 6

ES are Pervasive vasive

ICTAC AC School, l, Shanghai ai 2013

Characte cteri ristica stica:

  • Dedicated function
  • Complex environment
  • SW/HW/Mechanics
  • Autonomous
  • Ressource constrained

: Energy : Bandwidth : Memory : …

  • Timi

iming g con

  • nstrain

straints

Kim Larse sen [6]

slide-7
SLIDE 7

ES are of

  • fte

ten Safet fety Critical itical

ICTAC AC School, l, Shanghai ai 2013

300 horse power 100 processors

How to achieve ES that are:

  • correct
  • predicable
  • dependable
  • fault tolerant
  • ressource minial
  • cheap

..

Model-Based Based Develop lopment ment

Kim Larse sen [7]

slide-8
SLIDE 8

Mo Model el Che hecki king ng TOOL

System Description Requirement Yes Prototypes Executable Code Test sequences No! Debugging Information

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

ICTAC Sch chool

  • l,

, Shanghai 2013

Time Cost Probability

Kim Larse sen [8]

slide-9
SLIDE 9

TOOL

System Description Requirement Yes Control Strategy No! Debugging Information

A฀( req ) A} grant) A฀( req ) A}t<30s grant) A฀( req ) A}t<30s,c<5$ grant)

Synt nthesis hesis

ICTAC Sch chool

  • l,

, Shanghai 2013

Time Cost Probability

?

A฀( req ) A}t<30s , p>0.90 grant)

Kim Larse sen [9]

slide-10
SLIDE 10

Ov Overview view

  • Timed

med Automata & UPPAAL

  • Symb

mboli

  • lic Verification &

UPPAAL Engine, Options

  • Priced

iced Timed Automata and Timed Game ames

  • Stochastic

chastic Timed Automata Statist tistical ical Model Checking (Lecture+Exercise)4

ICTAC School,

  • ol, Shan

anghai i 2013 2013

TRON

CLASSIC

TIGA

CORA

ECDAR SMC

Kim Larse sen [10 10]

slide-11
SLIDE 11

www.cs.aa ww.cs.aau.dk/~kgl/Sh u.dk/~kgl/Shan anghai ghai2013 2013

ICTAC AC School, l, Shanghai ai 2013 Kim Larse sen [11 11]

www.up w.uppaa aal.o l.org rg

slide-12
SLIDE 12

Ti Timed med Aut Automata

  • mata
slide-13
SLIDE 13

UPPAAL AAL (1995 995- )

@UPPsal sala

  • Wang Yi
  • Paul Pettersson
  • John Håkansson
  • Anders Hessel
  • Pavel Krcal
  • Leonid Mokrushin
  • Shi Xiaochun

@AALbor

ALborg

  • Kim G Larsen
  • Alexandre David
  • Gerd Behrman
  • Marius Mikucionis
  • Jacob I. Rasmussen
  • Arne Skou
  • Brian Nielsen
  • Shuhao Li

ICTAC AC School, l, Shanghai ai 2013 2013 y = 3,4322x2 - 28,247x + 749,99

5000 10000 15000 20000 25000 30000 35000 40000 Total Downloads YYMM

UPPAAL Downloads

@Elsewhere

Emmanuel Fleury, Didier Lime, Johan Bengtsson, Fredrik Larsson, Kåre J Kristoffersen, Tobias Amnell, Thomas Hune, Oliver Möller, Elena Fersman, 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. Bowmann, D. Latella, M. Massink, G. Faconti, Kristina Lundqvist, Lars Asplund, Justin Pearson.....

Kim Larse sen [13 13]

slide-14
SLIDE 14

Real al Time me Systems tems

ICTAC AC School, l, Shanghai ai 2013 2013

Plant

Continuous

Controller Program

Discrete

Eg.: Realtime Protocols

Pump Control Air Bags Robots Cruise Control ABS CD Players Production Lines

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

sensors actuators

Kim Larse sen [14 14]

slide-15
SLIDE 15

A A Dum umb Ligh ght t Con

  • ntr

troller

  • ller

ICTAC AC School, l, Shanghai ai 2013 Kim Larse sen [15 15]

slide-16
SLIDE 16

Timed med Aut utom

  • mata

ata

ICTAC AC School, l, Shanghai ai 2013

AD ADD a clock x

Synchronizing action Clock Guard Conjunctions of x~n x: real-valued clock Reset

[Alur & Dill’89]

Kim Larse sen [16 16]

slide-17
SLIDE 17

A A Timed med Aut utom

  • mata

ata (Semantics)

ICTAC AC School, l, Shanghai ai 2013 2013

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

Kim Larse sen [17 17]

slide-18
SLIDE 18

In Inte tellige lligent nt Ligh ght t Con

  • ntroller

troller

ICTAC AC School, l, Shanghai ai 2013 2013

Invariant (Henzinger)

Kim Larse sen [18 18]

slide-19
SLIDE 19

In Inte tellige lligent nt Ligh ght t Con

  • ntroller

troller

ICTAC AC School, l, Shanghai ai 2013

Transitions: ( Off , x=0 ) delay 4.32  ( Off , x=4.32 ) press?  ( Light , x=0 ) delay 4.51  ( Light , x=4.51 ) press?  ( Light , x=0 ) delay 100  ( Light , x=100)

 ( Off , x=0) Note: ( Light , x=0 ) delay 103 

X

Invariants ensures progress

Kim Larse sen [19 19]

slide-20
SLIDE 20

Timed med Aut utom

  • mata

ata (formally)

ICTAC AC School, l, Shanghai ai 2013 2013 Kim Larse sen [20 20]

slide-21
SLIDE 21

Timed med Aut utom

  • mata

ata (formally)

ICTAC AC School, l, Shanghai ai 2013 Kim Larse sen [21 21]

slide-22
SLIDE 22

Timed med Aut utom

  • mata

ata (formally)

ICTAC AC School, l, Shanghai ai 2013 Kim Larse sen [22 22]

slide-23
SLIDE 23

Timed med Aut utom

  • mata

ata (formally)

ICTAC AC School, l, Shanghai ai 2013 Kim Larse sen [23 23]

slide-24
SLIDE 24

Timed med Aut utom

  • mata:

ata: Example mple

guard rd reset synchro chroni nizati ation

ICTAC AC School, l, Shanghai ai 2013 Kim Larse sen [24 24]

slide-25
SLIDE 25

Timed med Aut utom

  • mata:

ata: Example mple

guard rd invariant riant

ICTAC AC School, l, Shanghai ai 2013 Kim Larse sen [25 25]

slide-26
SLIDE 26

Example ample

ICTAC AC School, l, Shanghai ai 2013

a b c

Is L1 reachable ?

Kim Larse sen [26 26]

slide-27
SLIDE 27

Example ample

ICTAC AC School, l, Shanghai ai 2013

x y

a b c

Kim Larse sen [27 27]

slide-28
SLIDE 28

Example ample

ICTAC AC School, l, Shanghai ai 2013

x y

a b c

Kim Larse sen [28 28]

slide-29
SLIDE 29

Example ample

ICTAC AC School, l, Shanghai ai 2013

x y a

a b c

Kim Larse sen [29 29]

slide-30
SLIDE 30

Example ample

ICTAC AC School, l, Shanghai ai 2013

x y a a

a b c

Kim Larse sen [30 30]

slide-31
SLIDE 31

Ne Networks tworks Lig

ight Controller ller & Us User

Off Light Bright

press? press? press? x:=0 x·3 x>3

x·100

x=100 x:=0

x·100

x=100 x:=0 x:=0 press? x:=0

Rest Busy

y¸10

y:=0

y·10

press! press! y:=0

Transition ( Off, Rest, x=0, y=0 ) delay 20  ( Off, Rest, x=20, y=20 ) press?!  ( Light, Busy, x=0, y=0 ) delay 2  ( Light, Busy, x=2, y=2) press?!  ( Bright, Rest, x=0, y=0) Synchronization

x:=0

ICTAC AC School, l, Shanghai ai 2013 2013 Kim Larse sen [31 31]

slide-32
SLIDE 32

Ne Network twork Semantics mantics

A X ) s s , , S S ( T T    

2 1 2 1 2 1

X

 

X

 

X

 

X 2 1 2 1 1 1 1

s ´ s s s ´ s s    

 

 

X

 

X

´ s s s s ´ s s

2 1 2 1 2 2 2

   

 

 

X

 

X

´ s ´ s s s ´ s s ´ s s

a a 2 1 2 1 2 2 2 1 1 1

     

 

X

 

X

´ s ´ s s s ´ s s ´ s s

) d ( e ) d ( e ) d ( e 2 1 2 1 2 2 2 1 1 1

           

! ?

where

ICTAC AC School, l, Shanghai ai 2013 Kim Larse sen [32 32]

slide-33
SLIDE 33

Ne Network twork Semantics mantics

(URGE GENT NT synchr nchroniza

  • nizati

tion)

  • n)

A X ) s s , , S S ( T T    

2 1 2 1 2 1

X

 

X

 

X

 

X 2 1 2 1 1 1 1

s ´ s s s ´ s s    

 

 

X

 

X

´ s s s s ´ s s

2 1 2 1 2 2 2

   

 

 

X

 

X

´ s ´ s s s ´ s s ´ s s

a a 2 1 2 1 2 2 2 1 1 1

     

 

X

 

X

´ s ´ s s s ´ s s ´ s s

) d ( e ) d ( e ) d ( e 2 1 2 1 2 2 2 1 1 1

           

! ?

where

d’ < d, u UAct:

  • ( s1    s2   )

e(d’) u! e(d’) u?

ICTAC AC School, l, Shanghai ai 2013 2013 Kim Larse sen [33 33]

slide-34
SLIDE 34

Light Control Interface

slide-35
SLIDE 35

Informationsteknologi

Light Control Interface

Control Program User Interface Light endhold! touch! starthold! press? release? press? d release?  touch! 0.5·d· 1 press? 1  starthold! press? d release?  endhold! d >1 press? 0.2 release? … press? 0.7 release? … press? 1.0 2.4 release? …

Ø touch! starthold! endhold!

ICTAC School, Shanghai 2013 35

slide-36
SLIDE 36

Informationsteknologi

Light Control Interface

Control Program User endhold! touch! starthold! press? release?

ICTAC School, Shanghai 2013 36

slide-37
SLIDE 37

Informationsteknologi

Control Program

Light Control Network

endhold! touch! starthold! press? release?

ICTAC School, Shanghai 2013 37

slide-38
SLIDE 38

Informationsteknologi

Full Light Controller

ICTAC School, Shanghai 2013

Dim Dim

38

slide-39
SLIDE 39

UPP UPPAAL AAL

Modeling & Specification

slide-40
SLIDE 40

Train ain Crossing

  • ssing

River Crossing Gate Stopable Area [10,20] [7,15] [3,5] list

ICTAC AC School, l, Shanghai ai 2013 Kim Larse sen [40 40]

slide-41
SLIDE 41

Train ain Crossing

  • ssing

River Crossing Gate Stopable Area [10,20] [7,15] list [3,5]

appr stop leave go

enqueue() dequeue() front()

id-”parameter”

Communication via channels!

ICTAC AC School, l, Shanghai ai 2013 2013 Kim Larse sen [41 41]

slide-42
SLIDE 42

Declar clarations ations

ICTAC AC School, l, Shanghai ai 2013 2013

Constants Bounded integers Channels Clocks Arrays Types Functions Templates Processes Systems

Kim Larse sen [42 42]

slide-43
SLIDE 43

UPPAAL AAL He Help

ICTAC AC School, l, Shanghai ai 2013 Kim Larse sen [43 43]

slide-44
SLIDE 44

Log

  • gical

cal Specification cifications

  • Validation Properties
  • Possibly:

E<> <> P

  • Safety Properties
  • Invariant:

A[] P

  • Pos. Inv.:

E[] P

  • Liveness Properties
  • Eventually:

A<> <> P

  • Leadsto:

P  Q

  • Bounded Liveness
  • Leads to within: P · t Q

The expressions P and Q must be type safe, side effect free, and evaluate to a boolean. Only references to integer variables, constants, clocks, and locations are allowed (and arrays of these).

ICTAC AC School, l, Shanghai ai 2013 2013 Kim Larse sen [44 44]

slide-45
SLIDE 45

Case se Stu tudies: dies: Con

  • ntr

trollers

  • llers
  • Gearbox Controller [TACAS’98]
  • Bang & Olufsen Power Controller [RTPS’99,FTRTFT’2k]
  • SIDMAR Steel Production Plant [RTCSA’99, DSVV’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

  • Design

ignin ing, , Model delli ling and d Verify fying ing a Con

  • nta

tain iner Termi rminal al System em Using ing UPPAAL AL, , 200 008

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

industrial case study, 2008

  • Climate Controller for Pig Stables, 2008
  • Optimal and Robust Controller for Hydralic Pump, 2009

ICTAC AC School, l, Shanghai ai 2013 2013 Kim Larse sen [45 45/54] 4]

slide-46
SLIDE 46

Case se Stu tudies: dies: Prot

  • tocols
  • cols
  • 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]
  • 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]
  • Analysis of a protocol for dynamic configuration of IPv4 link

local addresses using Uppaal, 2006

  • Formalizing SHIM6, a Proposed Internet Standard in UPPAAL,

2007

  • Verifying the distributed real-time network protocol RTnet using

Uppaal, 2007

  • Analy

lysi sis s of the Zerocon

  • conf protocol

tocol using ng UP UPPAAL, , 2009 2009

  • Analysis of a Clock Synchronization Protocol for Wireless Sensor

Networks, 2009

  • Model Checking

king the FlexRay Ray Physi sical al Layer er Protoc tocol

  • l,

, 2010 2010

ICTAC AC School, l, Shanghai ai 2013 2013 Kim Larse sen [46 46/54] 4]

slide-47
SLIDE 47

Using ng UPPA PAAL AL as Back ck-end nd

  • Vooduu: verification of object-oriented designs using Uppaal,

2004

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

Systems, 2000

  • Formalising the ARTS MPSOC Model in UPPAAL, 2007
  • Timed automata translator for Uppaal to PVS
  • Compon

mponent ent-Base Based d Desi sign gn and An Analysis lysis of Embedded dded Sy Systems tems with th UPPAAL AAL PORT, T, 2008 08

  • Verification of COMDES-II Systems Using UPPAAL with

Model Transformation, 2008

  • METAMOC:

AMOC: Modul ular ar WCET CET An Analysis alysis Using ing UPPAA AAL, L, 2010 10.

ICTAC AC School, l, Shanghai ai 2013 2013 Kim Larse sen [47 47/54] 4]

slide-48
SLIDE 48

ww www. w.uppaa uppaal.org l.org

ICTAC AC School, l, Shanghai ai 2013 2013 Kim Larse sen [48 48]

slide-49
SLIDE 49

LA LAB-Exe Exercises rcises

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

ICTAC AC School, l, Shanghai ai 2013 Kim Larse sen [49 49]