Modeling and Verification of Embedded Software Rajeev Alur POPL Mentoring Workshop, Jan 2012 University of Pennsylvania.

Slides:



Advertisements
Similar presentations
Hybrid Systems Modeling and Analysis of Regulatory Pathways Rajeev Alur University of Pennsylvania LSB, August 2006.
Advertisements

Catching Bugs in Software Rajeev Alur Systems Design Research Lab University of Pennsylvania
Hybrid System Verification Synchronous Workshop 2003 A New Verification Algorithm for Planar Differential Inclusions Gordon Pace University of Malta December.
Timed Automata.
Concurrency: introduction1 ©Magee/Kramer 2 nd Edition Concurrency State Models and Java Programs Jeff Magee and Jeff Kramer.
Zonotopes Techniques for Reachability Analysis Antoine Girard Workshop “Topics in Computation and Control” March 27 th 2006, Santa Barbara, CA, USA
Verification of Hybrid Systems An Assessment of Current Techniques Holly Bowen.
ECE 720T5 Fall 2012 Cyber-Physical Systems Rodolfo Pellizzoni.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Modular Specification of Hybrid Systems in CHARON R. Alur, R. Grosu, Y. Hur, V. Kumar, I. Lee University of Pennsylvania SDRL and GRASP.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Formal Models for Stability Analysis : Verifying Average Dwell Time * Sayan Mitra MIT,CSAIL Research Qualifying Exam 20 th December.
1 Stability of Hybrid Automata with Average Dwell Time: An Invariant Approach Daniel Liberzon Coordinated Science Laboratory University of Illinois at.
Systems Engineering for Automating V&V of Dependable Systems John S. Baras Institute for Systems Research University of Maryland College Park
Integrated Design and Analysis Tools for Software-Based Control Systems Shankar Sastry (PI) Tom Henzinger Edward Lee University of California, Berkeley.
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
DIVES: Design, Implementation and Validation of Embedded Software Alur, Kumar, Lee(PI), Pappas, Sokolsky GRASP/SDRL University of Pennsylvania
1 University of Pennsylvania Demonstrations Alur, Kumar, Lee, Pappas Rafael Fierro Yerang Hur Franjo Ivancic PK Mishra.
Model Checking for Hybrid Systems Bruce H. Krogh Carnegie Mellon University.
SDRL and GRASP University of Pennsylvania 6/27/00 MoBIES 1 Design, Implementation, and Validation of Embedded Software (DIVES) Contract No. F C-1707.
University of Pennsylvania 1 SDRL CHARON SDRL and GRASP University of Pennsylvania Funded by DARPA ITO.
Modeling Hybrid Systems Yerang Hur CIS 640, October 10, 2002 Department of Computer and Information Science University of Pennsylvania Code generation.
FunState – An Internal Design Representation for Codesign A model that enables representations of different types of system components. Mixture of functional.
Approximate Abstraction for Verification of Continuous and Hybrid Systems Antoine Girard Guest lecture ESE601: Hybrid Systems 03/22/2006
Models of Computation for Embedded System Design Alvise Bonivento.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI A New System Science.
System Design Research Laboratory Model-based Testing and Monitoring for Hybrid Embedded Systems Li Tan Jesung Kim Oleg Sokolsky Insup Lee University of.
Designing Predictable and Robust Systems Tom Henzinger UC Berkeley and EPFL.
DIVES Alur, Lee, Kumar, Pappas: University of Pennsylvania  Charon: high-level modeling language and a design environment reflecting the current state.
Testing and Monitoring at Penn An Integrated Framework for Validating Model-based Embedded Software Li Tan University of Pennsylvania September, 2003.
Tool Integration of Ptolemy II EE290N Class Project Haiyang Zheng May
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI Program Review May 10,
Code Generation from CHARON Rajeev Alur, Yerang Hur, Franjo Ivancic, Jesung Kim, Insup Lee, and Oleg Sokolsky University of Pennsylvania.
Approximation Metrics for Discrete and Continuous Systems Antoine Girard and George J. Pappas VERIMAG Workshop.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
1 DISTRIBUTION A. Approved for public release; Distribution unlimited. (Approval AFRL PA # 88ABW , 09 April 2014) Reducing the Wrapping Effect.
On the relation between software development and control function development in automotive embedded systems Stefan Kowalewski Embedded Software Laboratory.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Concurrency: introduction1 ©Magee/Kramer Concurrency State Models and Java Programs Jeff Magee and Jeff Kramer.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
Instructor: Rajeev Alur
Model-based Analysis and Implementation of Embedded Systems
Artificial Intelligence
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Department of Mechanical Engineering The University of Strathclyde, Glasgow Hybrid Systems: Modelling, Analysis and Control Yan Pang Department of Mechanical.
Swarat Chaudhuri Roberto Lublinerman Pennsylvania State University Sumit Gulwani Microsoft Research CAUCHY Continuity analysis of programs.
CEFRIEL Consorzio per la Formazione e la Ricerca in Ingegneria dell’Informazione Politecnico di Milano Model Checking UML Specifications of Real Time Software.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
System Design Research Lab University of Pennylvania 1/29/2002 CHARON modeling language.
Control Synthesis and Reconfiguration for Hybrid Systems October 2001 Sherif Abdelwahed ISIS Vanderbilt University.
1 Model Checking of Robotic Control Systems Presenting: Sebastian Scherer Authors: Sebastian Scherer, Flavio Lerda, and Edmund M. Clarke.
CSCI1600: Embedded and Real Time Software Lecture 8: Modeling III: Hybrid Systems Steven Reiss, Fall 2015.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CSCI1600: Embedded and Real Time Software Lecture 28: Verification I Steven Reiss, Fall 2015.
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
Engineering the Advanced Power Grid: Research Challenges and Tasks M. L. Crow, F. Liu, B. McMillin, D. Tauritz {crow, fliu, ff, University.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Ichiro Hasuo University of Tokyo Kohei Suenaga JSPS Research Fellow (PD) Kyoto University Programming with Infinitesimals A WHILE-Language for Hybrid System.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Opeoluwa Matthews, Jesse Bingham, Daniel Sorin
Software Design Methodology
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Compositional Refinement for Hierarchical Hybrid Systems
Presentation transcript:

Modeling and Verification of Embedded Software Rajeev Alur POPL Mentoring Workshop, Jan 2012 University of Pennsylvania

Software: Key to Embedded Revolution Software Inside! Software New features, Automation, Customization Software Bugs, Unpredictability, Recalls

Prius Brake Problems Blamed on Software Glitches “Toyota officials described the problem as a "disconnect" in the vehicle's complex anti-lock brake system (ABS) that causes less than a one-second lag. With the delay, a vehicle going 60 mph will have traveled nearly another 90 feet before the brakes begin to take hold” (source: CNN Feb 4, 2010)

 Correctness is formalized as a mathematical claim to be proved or falsified rigorously always with respect to the given specification  Challenge: Impossibility results for automated verifier Yet impressive success for hardware protocols, systems software Can we have similar success for embedded control software? Verifier software/model correctness specification yes/proof no/bug In Search of the Holy Grail…

Embedded Computation  Typical embedded program: cruise control Loop Read the sensors; Compute speed; Compute pressure for brake pedal / accelerator; Transmit the outputs to actuators;  Program has (non-terminating) interaction with the outside world: Reactive computation  Correctness depends on real-time response (does the car brake fast enough?)  Analysis of correctness requires modeling of the dynamics of the car

State machines off on + Dynamical systems dx/dt = kx x<70 dx/dt = -k’x x>60 x>68 x<63 Automotive Robotics Systems Biology Coordination Protocols Computer Science  Automata/Logic  Concurrency  Formal verification + Control Theory  Optimal control  Stability analysis  Discrete-event system Software + Environment Hybrid Systems Medical Devices

Vehicle Platoons Can we prove correctness of the protocol? Build a rigorous model of the controller Capture environment assumptions (e.g. bounds on acceleration of the car in the front) Requirements: Safe distance, Stability, Absence of deadlocks Validation: Simulation, Model checking

Medical Devices  From , nearly 30,000 deaths and 600,000 injuries from device failures  From , the percentage of software-related causes in medical device recalls have grown from 10% to 21% (Complexity ↑ → Potential safety violations ↑ )  There is currently no well-established standards for development of software for medical devices

Implantable Pacemaker

Uppaal Model of Dual Chamber Pacemaker

Talk Outline  Modeling  Symbolic reachability analysis  Conclusions

Hybrid Automata l l’l’ jump transformation edge guard continuous dynamics initial condition invariant: hybrid automaton may remain in l as long as X  Inv(l) X  Inv(l’) dX  Flow(l’) X  Inv(l) dX  Flow(l) X  Init(l) e : g(X)  0 J(X, X’) locations or modes (discrete states)

Modeling Research  Hierarchical modeling (Charon)  Compositionality and refinement (HIOA)  Heterogeneous modeling (Ptolemy II)  Model based integration

Charon Language Features: Modularity  Individual components described as agents Composition, instantiation, and hiding  Individual behaviors described as modes Encapsulation, instantiation, and scoping  Support for concurrency Shared variables as well as message passing  Support for discrete and continuous behavior Differential as well as algebraic constraints Discrete transitions can call Java routines  Compositional semantics with refinement rules Components have precise trace-based observational semantics Properties of the system can be deduced from components

Robot Team Approaching a Target T

Architectural Hierarchy Robots Monitor pos 1 pos 2 write diff analog position pos 1, pos 2 class position { float x; float y;} Variables Specifiers Range: discrete/analog Computation: diff/alg Access: read/write/local

Architectural Hierarchy Robot 1 Robots Robot 2 pos 1 pos 2 r1Est 1 r1Est 2 r2Est 1 r2Est 2 Robots Monitor pos 1 pos 2

Behavioral Hierarchy pos r2Est 1 r2Est 2 r1Est 1 r1Est 2 Robot 1 dTimer local diff analog timer awTarget dPlan iAway atTarget dStop iAt arrive pos == target moving dSteer aOmega iFreq sensing dStop iConst sense move arrive pos.x = v * cos(phi) pos.y = v * sin(phi)..

Charon Toolkit

Talk Outline Modeling  Symbolic reachability analysis  Conclusions

Symbolic Safety Verification Goal: Given an initial set I, compute the set of reachable states to check if a bad state in F is reachable Symbolic breadth-first search by applying Post: Post(R): Set of successors of states in R I F

Reachability for Hybrid Systems  What’s a suitable representation of regions? Region: subset of R k Main problem: handling continuous dynamics  Precise solutions available for restricted continuous dynamics Timed automata Linear hybrid automata  Even for linear systems, over-approximations of reachable set needed

Polyhedral Flow Pipe Approximations X0X0 t1t1 t2t2 t3t3 t4t4 t5t5 t6t6 t7t7 t8t8 t9t9 divide R [0,T] (X 0 ) into [t k,t k+1 ] segments enclose each segment with a convex polytope R M [0,T] (X 0 ) = union of polytopes

Challenges for Reachability Analysis  Coping with high dimensionality  Bounding errors due to over-approximations  Handling non-linear dynamics  State-of-the-art toolkit: SpaceEx (spaceex.imag.fr)

Conclusions  Modeling is central to design of embedded software systems  Analysis requires handling of time and dynamics  Many emerging applications: e.g. Pacemaker software  There are no papers at POPL on this topic, but great opportunity for PL researchers to impact industrial practice