1 Timed and Hybrid Systems in UPPAAL2k Kim Guldstrand Larsen Paul Pettersson &

Slides:



Advertisements
Similar presentations
Clocked Mazurkiewicz Traces and Partial Order Reductions for Timed Automata D. Lugiez, P. Niebert, S. Zennou Laboratoire d Informatique Fondamentale de.
Advertisements

UCb Kim Guldstrand Larsen Symbolic Model Checking …and Verification Options How UPPAAL really works & How to make UPPAAL really work.
Real-Time Systems, DTU, Feb 15, 2000 Paul Pettersson, BRICS, Aalborg, Denmark. Timed Automata and Timed Computation Tree Logic Paul Pettersson
UCb Symbolic Reachability and Beyound or how UPPAAL really works Kim Guldstrand Larsen
Dependable Embedded Software Systems Kim Guldstrand Larsen UCb.
1 Logics & Preorders from logic to preorder – and back Kim Guldstrand Larsen Paul PetterssonMogens Nielsen
Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
UPPAAL Introduction Chien-Liang Chen.
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
Timed Automata.
UPPAAL T-shirt to (identifiable)
Introduction to Uppaal ITV Multiprogramming & Real-Time Systems Anders P. Ravn Aalborg University May 2009.
Modelling and Analysis of Real Time Systems Kim Guldstrand Larsen UPPAAL2k using UPPAAL2k.
UPPAAL Andreas Hadiyono Arrummaisha Adrifina Harya Iswara Aditya Wibowo Juwita Utami Putri.
CSE 522 UPPAAL – A Model Checking Tool Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
Verification of Hybrid Systems An Assessment of Current Techniques Holly Bowen.
Hybrid Approach to Model-Checking of Timed Automata DAT4 Project Proposal Supervisor: Alexandre David.
Model Checking for Probabilistic Timed Systems Jeremy Sproston Università di Torino VOSS Dagstuhl seminar 9th December 2002.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
UCb Tools and Application of Timed Automata UPPAAL & Optimal Scheduling Kim G. Larsen
Reachability, Schedulability and Optimality
Convertibility Verification and Converter Synthesis: Two Faces of the Same Coin Jie-Hong Jiang EE249 Discussion 11/21/2002 Passerone et al., ICCAD ’ 02.
Formal Verification of Safety Properties in Timed Circuits Marco A. Peña (Univ. Politècnica de Catalunya) Jordi Cortadella (Univ. Politècnica de Catalunya)
1 Modelling and Validation of Real Time Systems Kim Guldstrand Larsen Paul Pettersson
Verifikation af realtids systemer i UPPAAL
Formal Methods Automatic Validation and Verification Tools
Verification and Controller Synthesis for Timed Automata : the tool KRONOS Stavros Trypakis.
Scheduling Using Timed Automata Borzoo Bonakdarpour Wednesday, April 13, 2005 Selected Topics in Algorithms and Complexity (CSE960)
Sanjit A. Seshia and Randal E. Bryant Computer Science Department
CaV 2003 CbCb 1 Concurrency and Verification What? Why? How?
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
Beyond HyTech Presented by: Ben Horowitz and Rupak Majumdar Joint work with Tom Henzinger and Howard Wong-Toi.
1 Verification Options & Beyond Reachability or how to make UPPAAL perform better and more Kim Guldstrand Larsen
1 Efficient Verification of Timed Automata Kim Guldstrand Larsen Paul PetterssonMogens Nielsen
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
UPPAAL Ghaith Haddad. Introduction UPPAAL is a tool for modeling, validation and verification of real-time systems. Appropriate for systems that can be.
ULB, November 2004 As cheap as possible: Linearly Priced Timed Automata Gerd Behrmann, Ed Brinksma, Ansgar Fehnker, Thomas Hune, Kim Larsen, Paul Pettersson,
Test & Verification Verification Kim G. Larsen. TOV 2002Kim G. Larsen 2 Research Profile Distributed Systems & Semantics Unit Semantic Models concurrency,
Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek.
CEFRIEL Consorzio per la Formazione e la Ricerca in Ingegneria dell’Informazione Politecnico di Milano Model Checking UML Specifications of Real Time Software.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
Lecture51 Timed Automata II CS 5270 Lecture 5.
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
Timed I/O Automata: A Mathematical Framework for Modeling and Analyzing Real-Time Systems Frits Vaandrager, University of Nijmegen joint work with Dilsun.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Black-box conformance testing for real-time systems Stavros Tripakis VERIMAG Joint work with Moez Krichen.
1 Outline:  Optimization of Timed Systems  TA-Modeling of Scheduling Tasks  Transformation of TA into Mixed-Integer Programs  Tree Search for TA using.
1 CSEP590 – Model Checking and Automated Verification Lecture outline for August 6, 2003.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Control Synthesis and Reconfiguration for Hybrid Systems October 2001 Sherif Abdelwahed ISIS Vanderbilt University.
1 Model Checking of of Timed Systems Rajeev Alur University of Pennsylvania.
Verification & Validation By: Amir Masoud Gharehbaghi
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Reachability for Linear Hybrid Automata Using Iterative Relaxation Abstraction Sumit K. Jha, Bruce H. Krogh, James E. Weimer, Edmund M. Clarke Carnegie.
ECE/CS 584: Verification of Embedded Computing Systems Model Checking Timed Automata Sayan Mitra Lecture 09.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Controller Synthesis For Timed Automata Authors : Eugene Asarin, Oded Maler, Amir Pnueli and Joseph Sifakis Yean-Ru Chen Embedded System Laboratory of.
ECE/CS 584: Verification of Embedded Computing Systems Timed to Hybrid Automata Sayan Mitra (edited by Yu Wang) Lecture 10.
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
UPPAAL Real-Time Systems Lab. Seolyoung, Jeong.
The Time-abstracting Bisimulation Equivalence  on TA states: Preserve discrete state changes. Abstract exact time delays. s1s2 s3  a s4  a 11 s1s2.
TIOA-to-UPPAAL Translator & Front-End Integration
Timed Automata II CS 5270 Lecture Lecture5.
Instructor: Rajeev Alur
Timed Automata Formal Systems Pallab Dasgupta Professor,
Presentation transcript:

1 Timed and Hybrid Systems in UPPAAL2k Kim Guldstrand Larsen Paul Pettersson &

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 2 Hybrid & Real Time Systems Plant Continuous Controller Program Discrete Control Theory Computer Science Eg.: 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!! Real Time System A system where correctness not only depends on the logical order of events but also on their timing!! sensors actuators Task

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 3 Validation & Verification Construction of UPPAAL models Plant Continuous Controller Program Discrete sensors actuators Task a cb a cb a cb UPPAAL Model Model of environment (user-supplied) Model of tasks (automatic?)

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 4 Real Timed Model Checking Model Checker UPPAAL System Description Timed Automata A Requirement Specification F A sat F Yes! No! Diagnostic Information Timed Automata Decidability Epsilon TAB Regions HyTech Polyhedra UPPAAL Kronos Zones, DBM Minimal Constraints History 99 UPPAAL2k CDDs

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 5 UPPAAL k U PPAAL 2.02 First official release with Graphical Simulator/Validator U PPAAL 2.17 Dec’96Sep’98 Every 9 month 10 times better performance!

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 6 Collaborators yWang Yi yJohan Bengtsson yPaul Pettersson yFredrik Larsson yAlexandre David yTobias Amnell yKim G Larsen yArne Skou yPaul Pettersson yCarsten Weise yKåre J Kristoffersen yGerd Behrman yThomas Hune yFranck Cassez, Magnus Lindahl, Francois Laroussinie, Patricia Bouyer, Augusto Burgueno, David Griffioen, Ansgar Fehnker, Frits Vandraager, Klaus Havelund, Theo Ruys, Pedro D’Argenio, J-P Katoen, J. Tretmans, H. Bowmann, D. Latella, M. Massink, G. Faconti, Kristina Lundqvist, Lars Asplund, Justin Pearson...

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 7 Overview of Tutorial zTimed Automata zUPPAAL and LEGO MINDSTORM zThe UPPAAL Engine ySymbolic Reachability yVerification Options zApplications/Case Studies ySIDMAR Steel Production Plant (VHS project)

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 8 TIMED AUTOMATA Alur, Dill 1990

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 9 Intelligent Light Control OffLightBright press? WANT: if press is issued twice quickly then the light will get brighter; otherwise the light is turned off.

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 10 Intelligent Light Control OffLightBright press? Solution: Add real-valued clock x X:=0 X<=3 X>3

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 11 Timed Automata n m a Alur & Dill 1990 Clocks: x, y x 3 x := 0 Guard Boolean combination of integer bounds on clocks and clock-differences. Reset Action perfomed on clocks Transitions ( n, x=2.4, y= ) ( n, x=3.5, y= ) e(1.1) ( n, x=2.4, y= ) ( m, x=0, y= ) a State ( location, x=v, y=u ) where v,u are in R Action used for synchronization

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 12 n m a Clocks: x, y x 3 x := 0 Transitions ( n, x=2.4, y= ) ( n, x=3.5, y= ) e(1.1) ( n, x=2.4, y= ) e(3.2) x<=5 y<=10 Location Invariants g1 g2 g3 g4 Invariants insure progress!! Timed Automata - Invariants

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 13 Timed Automata: Example guard reset-set location a action

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 14 Timed Automata: Example a aa guard reset-set location a action

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 15 Timed Automata: Example a Invariant

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 16 Timed Automata: Example a aaa Invariant

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 17 Fundamental Results zReachability Alur, Dill zTrace-inclusion Alur, Dill xTimed  ; Untimed zBisimulation xTimed Cerans ; Untimed zModel-checking xTCTL, T mu, L nu,... PSPACE-c PSPACE-c / EXPTIME-c

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 18 Updatable Timed Automata Patricia Bouyer, Catherine Dufourd, Emmanuel Fleury, Antoine Petit

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 19 Other Extensions 4Ordinary clocks..... x rate 1 4Integer variables.... x rate 0 3Stopwatches..... x rate 0 or x rate 1 (loc.dep.)  Const. slope clocks.. x rate n where n is in Nat BParameters.... x rate 0 (and NOT assignable)  Multirate clocks Lin. Hyb. Aut x rate [l,u] where l,u is in Nat linear guards & linear asgn. Cassez, Larsen HyTech

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 20 The UPPAAL Model = Networks of Timed Automata + Integer Variables +…. l1 l2 a! x>=2 i==3 x := 0 i:=i+4 m1 m2 a? y<=4 …………. Two-way synchronization on complementary actions. Closed Systems! Two-way synchronization on complementary actions. Closed Systems! (l1, m1,………, x=2, y=3.5, i=3,…..) (l2,m2,……..,x=0, y=3.5, i=7,…..) (l1,m1,………,x=2.2, y=3.7, I=3,…..) 0.2 tau Example transitions If a URGENT CHANNEL

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 21 UPPAAL & LEGO MINDSTORM DEMO

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 22 LEGO Mindstorms/RCX  Sensors: temperature, light, rotation, pressure.  Actuators: motors, lamps, zVirtual machine: y10 tasks, 4 timers, 16 integers. zSeveral Programming Languages: yNotQuiteC, Mindstorm, Robotics, legOS, etc. 3 input ports 3 output ports 1 infra-red port

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 23 LEGO Mindstorms/RCX zLEGO bricks!!! Production Cell SIDMAR Steel Plant

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 24 First UPPAAL model Sorting of Lego Boxes Conveyer Belt Exercise: Design Controller so that only black boxes are being pushed out Boxes Piston Black Red Blck Rd remove eject Controller Ken Tindell MAINPUSH

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 25 NQC programs task PUSH{ while(true){ wait(Timer(1)>DELAY && active==1); active=0; Rev(OUT_C,1); Sleep(8); Fwd(OUT_C,1); Sleep(12); Off(OUT_C); } task PUSH{ while(true){ wait(Timer(1)>DELAY && active==1); active=0; Rev(OUT_C,1); Sleep(8); Fwd(OUT_C,1); Sleep(12); Off(OUT_C); } int active; int DELAY; int LIGHT_LEVEL; int active; int DELAY; int LIGHT_LEVEL; task MAIN{ DELAY=75; LIGHT_LEVEL=35; active=0; Sensor(IN_1, IN_LIGHT); Fwd(OUT_A,1); Display(1); start PUSH; while(true){ wait(IN_1<=LIGHT_LEVEL); ClearTimer(1); active=1; PlaySound(1); wait(IN_1>LIGHT_LEVEL); } task MAIN{ DELAY=75; LIGHT_LEVEL=35; active=0; Sensor(IN_1, IN_LIGHT); Fwd(OUT_A,1); Display(1); start PUSH; while(true){ wait(IN_1<=LIGHT_LEVEL); ClearTimer(1); active=1; PlaySound(1); wait(IN_1>LIGHT_LEVEL); }

IDA foredrag UPPAAL Demo

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 27 From RCX to UPPAAL zModel includes Round-Robin Scheduler. zCompilation of RCX tasks into TA models. zPresented at ECRTS 2000 (yesterday) in Stockholm. Task MAIN

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 28 THE UPPAAL ENGINE Symbolic Reachability Checking

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 29 Zones From infinite to finite State (n, x=3.2, y=2.5 ) x y x y Symbolic state (set ) (n, ) Zone: conjunction of x-y n

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 30 Symbolic Transitions n m x>3 y:=0 x y delays to conjuncts to projects to x y 1<=x<=4 1<=y<=3 x y 1<=x, 1<=y -2<=x-y<=3 x y 3<x, 1<=y -2<=x-y<=3 3<x, y=0 Thus (n,1 (m,3<x, y=0) a

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 31 A1 B1 CS1 V:=1V=1 A2 B2 CS2 V:=2V=2 Init V=1 2 ´´ V Criticial Section Fischer’s Protocol analysis using zones Y<10 X:=0 Y:=0 X>10 Y>10 X<10

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 32 Fischers cont. B1 CS1 V:=1V=1 A2 B2 CS2 V:=2V=2 Y<10 X:=0 Y:=0 X>10 Y>10 X<10 A1,A2,v=1A1,B2,v=2A1,CS2,v=2B1,CS2,v=1CS1,CS2,v=1 Untimed case A1

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 33 Fischers cont. B1 CS1 V:=1V=1 A2 B2 CS2 V:=2V=2 Y<10 X:=0 Y:=0 X>10 Y>10 X<10 A1,A2,v=1A1,B2,v=2A1,CS2,v=2B1,CS2,v=1CS1,CS2,v=1 Untimed case Taking time into account X Y A1

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 34 Fischers cont. B1 CS1 V:=1V=1 A2 B2 CS2 V:=2V=2 Y<10 X:=0 Y:=0 X>10 Y>10 X<10 A1,A2,v=1A1,B2,v=2A1,CS2,v=2B1,CS2,v=1CS1,CS2,v=1 Untimed case Taking time into account X Y A1 10 X Y

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 35 Fischers cont. B1 CS1 V:=1V=1 A2 B2 CS2 V:=2V=2 Y<10 X:=0 Y:=0 X>10 Y>10 X<10 A1,A2,v=1A1,B2,v=2A1,CS2,v=2B1,CS2,v=1CS1,CS2,v=1 Untimed case Taking time into account A1 10 X Y X Y

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 36 Fischers cont. B1 CS1 V:=1V=1 A2 B2 CS2 V:=2V=2 Y<10 X:=0 Y:=0 X>10 Y>10 X<10 A1,A2,v=1A1,B2,v=2A1,CS2,v=2B1,CS2,v=1CS1,CS2,v=1 Untimed case Taking time into account A1 10 X Y X Y X Y

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 37 Fischers cont. B1 CS1 V:=1V=1 A2 B2 CS2 V:=2V=2 Y<10 X:=0 Y:=0 X>10 Y>10 X<10 A1,A2,v=1A1,B2,v=2A1,CS2,v=2B1,CS2,v=1CS1,CS2,v=1 Untimed case Taking time into account A1 10 X Y X Y X Y

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 38 Canonical Dastructures for Zones Difference Bounded Matrices Bellman 1958, Dill 1989 x<=1 y-x<=2 z-y<=2 z<=9 x<=1 y-x<=2 z-y<=2 z<=9 x<=2 y-x<=3 y<=3 z-y<=3 z<=7 x<=2 y-x<=3 y<=3 z-y<=3 z<=7 D1 D2 Inclusion 0 x y z x y z ? ? Graph

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 39 Bellman 1958, Dill 1989 x<=1 y-x<=2 z-y<=2 z<=9 x<=1 y-x<=2 z-y<=2 z<=9 x<=2 y-x<=3 y<=3 z-y<=3 z<=7 x<=2 y-x<=3 y<=3 z-y<=3 z<=7 D1 D2 Inclusion 0 x y z Shortest Path Closure Shortest Path Closure 0 x y z x y z x y z Graph ? ? Canonical Dastructures for Zones Difference Bounded Matrices

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 40 Bellman 1958, Dill 1989 x<=1 y>=5 y-x<=3 x<=1 y>=5 y-x<=3 D Emptiness 0 y x Negative Cycle iff empty solution set Graph Canonical Dastructures for Zones Difference Bounded Matrices Compact

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 41 1<= x <=4 1<= y <=3 1<= x <=4 1<= y <=3 D Future x y x y Future D 0 y x 4 3 Shortest Path Closure Remove upper bounds on clocks 1<=x, 1<=y -2<=x-y<=3 1<=x, 1<=y -2<=x-y<=3 y x y x Canonical Dastructures for Zones Difference Bounded Matrices

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 42 Canonical Dastructures for Zones Difference Bounded Matrices x y D 1<=x, 1<=y -2<=x-y<=3 1<=x, 1<=y -2<=x-y<=3 y x Remove all bounds involving y and set y to 0 x y {y}D y=0, 1<=x Reset y x 0 0 0

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 43 Improved Datastructures Compact Datastructure for Zones x1-x2<=4 x2-x1<=10 x3-x1<=2 x2-x3<=2 x0-x1<=3 x3-x0<=5 x1-x2<=4 x2-x1<=10 x3-x1<=2 x2-x3<=2 x0-x1<=3 x3-x0<=5 x1x2 x3x x1x2 x3x Shortest Path Closure O(n^3) RTSS 1997

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 44 Improved Datastructures Compact Datastructure for Zones x1-x2<=4 x2-x1<=10 x3-x1<=2 x2-x3<=2 x0-x1<=3 x3-x0<=5 x1-x2<=4 x2-x1<=10 x3-x1<=2 x2-x3<=2 x0-x1<=3 x3-x0<=5 x1x2 x3x x1x2 x3x x1x2 x3x Shortest Path Closure O(n^3) Shortest Path Reduction O(n^3) 3 Canonical wrt = Space worst O(n^2) practice O(n) RTSS 1997

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 45 Other Symbolic Datastructures zRegions Alur, Dill zNDD’s Maler et. al. zCDD’s UPPAAL/CAV99 zDDD’s Møller, Lichtenberg zPolyhedra HyTech z CDD-representations

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 46 Verification Options Diagnostic Trace Breadth-First Depth-First Local Reduction Active-Clock Reduction Global Reduction Re-Use State-Space Over-Approximation Under-Approximation Diagnostic Trace Breadth-First Depth-First Local Reduction Active-Clock Reduction Global Reduction Re-Use State-Space Over-Approximation Under-Approximation Case Studies

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 47 Representation of symbolic states (In)Active Clock Reduction x is only active in location S1 x>3 x<5 x:=0 S x is inactive at S if on all path from S, x is always reset before being tested. Definition x<7 Case Studies

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 48 When to store symbolic state Global Reduction No Cycles: Passed list not needed for termination However, Passed list useful for efficiency Case Studies

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 49 When to store symbolic state Global Reduction Cycles: Only symbolic states involving loop-entry points need to be saved on Passed list Case Studies

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 50 Reuse State Space Passed Waiting prop1 A[] prop1 A[] prop2 A[] prop3 A[] prop4 A[] prop5. A[] propn Search in existing Passed list before continuing search Which order to search? prop2 Case Studies

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 51 Reuse State Space Passed Waiting prop1 A[] prop1 A[] prop2 A[] prop3 A[] prop4 A[] prop5. A[] propn Search in existing Passed list before continuing search Which order to search? Hashtable prop2 Case Studies

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 52 Over-approximation Convex Hull x y Convex Hull Case Studies

IDA foredrag Case Studies

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 54 Case Studies: Protocols zPhilips Audio Protocol [HS’95, CAV’95, RTSS’95, CAV’96 ] zCollision-Avoidance Protocol [SPIN’95] zBounded Retransmission Protocol [TACAS’97] zBang & Olufsen Audio/Video Protocol [RTSS’97] zTDMA Protocol [PRFTS’97] zLip-Synchronization Protocol [FMICS’97] zMultimedia Streams [DSVIS’98] zATM ABR Protocol [CAV’99] zABB Fieldbus Protocol [ECRTS’2k] zIEEE 1394 Firewire Root Contention (2000)

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 55 Case-Studies: Controllers zGearbox Controller [TACAS’98] zBang & Olufsen Power Controller [RTPS’99,FTRTFT’2k] zSIDMAR Steel Production Plant [RTCSA’99, DSVV’2k] zReal-Time RCX Control-Programs [ECRTS’2k] zExperimental Batch Plant (2000) zRCX Production Cell (2000)

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 56 Steel Production Plant Machine 1 Machine 2Machine 3 Machine 4Machine 5 Buffer Continuos Casting Machine Storage Place Crane B Crane A zA. Fehnker, T. Hune, K. G. Larsen, P. Pettersson zCase study of Esprit-LTR project VHS zPhysical plant of SIDMAR located in Gent, Belgium. zPart between blast furnace and hot rolling mill. Objective: model the plant, obtain schedule and control program for plant. Lane 1 Lane 2

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 57 Steel Production Plant Machine 1 Machine 2Machine 3 Machine 4Machine 5 Buffer Continuos Casting Machine Storage Place Crane B Crane A Load follows Recipe to become certain quality, e.g: start; end within 120. Output: sequence of higher quality steel. Lane 1 Lane 2 Input: sequence of steel loads (“pigs”).

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 58 Steel Production Plant Machine 1 Machine 2Machine 3 Machine 4Machine 5 Buffer Continuos Casting Machine Storage Place Crane B Crane A Input: sequence of steel Load follows Recipe to become certain quality, e.g: start; end within 120. Output: sequence of higher quality steel. Lane 1 Lane  =107

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 59 Steel Production Plant Machine 1 Machine 2Machine 3 Machine 4Machine 5 Buffer Continuos Casting Machine Storage Place Crane B Crane A Input: sequence of steel Load follows Recipe to obtain certain quality, e.g: start; end within 120. Output: sequence of higher quality steel. Lane 1 Lane  =127

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 60 Modus Operandi Physical Plant Plant Model Trace Program 2. Reformulate scheduling as reachability and apply U PPAAL tool. 3. Synthesise program. 1. Model plant as networks of timed automata. 4. Execute program.

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 61 Overview of Plant Model Machine 1 & 4 Machine 2 & 5 Machine 3 Crane A Crane B Casting Machine Load Positions Recipe Production Order TEST BATCHESPLANT Check for E<>( test.final ) U PPAAL generates diagnostic trace if property holds.

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 62 Load Automaton zModels all possible movements of load. zClock tRB1 used to model time consumption. zBit vectors posI and posII models mutex.

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 63 Steel Recipe zClock tot to constrain upper total time bound. zClock t to measure duration of machine treatment. zChannel quality1! signaled when steel converted.

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 64 Production Order zSpecifies the steel qualities to be produced. zAllows for scheduling to be reformulated as reachability. zReachable only with feasible schedule. zE<>( final )

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 65 Modus Operandi Physical Plant Plant Model Trace Program 3. Synthesise program. 1. Model plant as networks of timed automata. 2. Reformulate scheduling as reachability and apply U PPAAL. Verification: Generating schedule for three batches FAILS!!! 4. Execute program. zSystem with 5 steel loads: Parallel composition of: y15 timed automata ( locations), y18 real-valued clocks, y28 bounded integer variables, y140 action channels.

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 66 Modus Operandi Physical Plant Plant Model Trace Program 3. Synthesise program. 1(a). Model plant in UPPAAL Guided Plant Model 1(b). Add guides to plant model to restrict behaviour. 2. Reformulate scheduling as reachability and apply U PPAAL. 4. Execute program.

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 67 Guiding the Model Idea: Guide model according to chosen strategies: yenforce desired behaviors, yrestrict undesired behaviors. Implementation: Annotate model with: yclock and integer variables, yassignments (to added clock or variable), and yguards (to any clock or variable). Fact: Trace of guided model is guaranteed to be trace of unguided model.

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 68 Experiment BFS = breadth-first search, DFS = depth-first search, BSH = bit-state hashing, “-” = requires >2h (on 450MHz Pentium III), >256 MB, or suitable hash-table size was not found. System size: 2n+5 automata and 3n+3 clocks, if n=35: 75 automata and 108 clocks. Schedule generated for n=60 on Sun Ultra with 2x300MHz with 1024MB in 2257s.

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 69 Modus Operandi Physical Plant Plant Model Trace Program 3. Synthesise program. 1(a). Model plant in UPPAAL Guided Plant Model 1(b). Add guides to plant model to restrict behaviour. 2. Reformulate scheduling as reachability and apply U PPAAL. 4. Execute program.

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 70 LEGO Plant Model zLEGO RCX Mindstorms. zLocal controllers with control programs. zIR protocol for remote invocation of programs. zCentral controller. m1m2m3 m4m5 crane a crane b casting storage buffer central controller Synthesis

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 71 Local Control Programs zBelts: ymove left/right, yreceive from left/right, zMachine: ystart, ystop, ymove left/right, yreceive from left/right, zCranes: ymove up/down, yset down, ypick up, zCasting Machine: ystart, ystop, z...

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 72 Extracting Programs Trace... ( loadB1.p1 recipeB1.gotoT1 loadB2... { loadB1.x=5 recipeB1.tot=5 recipeB1… Sync: b1right ( loadB1.pre recipeB1.gotoT1 loadB2… { loadB1.x=5 recipeB1.tot=5 recipeB1… delay( 5 ) ( loadB1.pre recipeB1.gotoT1 loadB2… { loadB1.x=10 recipeB1.tot=10 recipe… Sync: B1M1on ( loadB1.onM1 recipeB1.onT1 loadB2… { loadB1.x=0 recipeB1.tot=10 recipe… delay( 10 ) ( loadB1.onM1 recipeB1.onT1 loadB2… { loadB1.x=10 recipeB1.tot=20 recipe… Sync: B1M1off ( loadB1.pre recipeB1.gotoT2 loadB2… { loadB1.x=0 recipeB1.tot=20 recipe... Schedule... belt1 right delay 5 load B1 on Machine 1 delay 10 load B1 off Machine 1... Program... // Belt Unit 1 move RIGHT PB.SendPBMessage 2, 20 // Delay 5 PB.Wait 2, 500 // Machine 1 START PB.SendPBMessage 2, 23 // Delay 10 PB.Wait 2, 100 // Machine 2 STOP PB.SendPBMessage 2,24...

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 73 Modus Operandi Physical Plant Plant Model Trace Program 4. Synthesise program. 1. Model plant as networks of timed automata. Guided Plant Model 2. Add guides to plant model to restrict behaviour. 3. U PPAAL to generate “schedule” by reachability analysis lines of RCX code (n=5), “ - (n=60). Experiment 4. Execute program. Specification Errors.

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 74 LEGO Plant Model Belt/Machine Unit.

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 75 Current & Future Research zDUPPAAL zPUPPAAL zGUPPAAL zCUPPAAL zHUPPAAL zPrUPPAAL

MOVEP June 21, 2000Kim G. Larsen & Paul Pettersson UCb 76 Current & Future Research zDUPPAALDistributed [Behrmann,Hune,Vandraager, CAV2k] zPUPPAALParameterized zGUPPAALGuided zCUPPAALCost-Optimal zHUPPAALHierarchical (UML) zPrUPPAALProbabilistic

IDA foredrag ENDE