Semantic Translation of Simulink/Stateflow Models to Hybrid Automata using Graph Transformations A. Agarwal, Gy. Simon, G. Karsai ISIS, Vanderbilt University.

Slides:



Advertisements
Similar presentations
S i m u l i n k Prof. Muhammad Saeed Mathematical Modeling and Simulation UsingMATLAB 1.
Advertisements

Budapest University of Technology and EconomicsDagstuhl 2004 Department of Measurement and Information Systems 1 Towards Automated Formal Verification.
1 1 Regression Verification for Multi-Threaded Programs Sagar Chaki, SEI-Pittsburgh Arie Gurfinkel, SEI-Pittsburgh Ofer Strichman, Technion-Haifa Originally.
1 Translation Validation: From Simulink to C Michael RyabtsevOfer Strichman Technion, Haifa, Israel Acknowledgement: sponsored by a grant from General.
Lecture #4 Simulation of hybrid systems João P. Hespanha University of California at Santa Barbara Hybrid Control and Switched Systems.
CS 290C: Formal Models for Web Software Lecture 4: Implementing and Verifying Statecharts Specifications Using the Spin Model Checker Instructor: Tevfik.
Timed Automata.
Hydra (A General Framework for Formalizing UML with Formal Languages for Embedded Systems*) *from the Ph.D. thesis of William E. McUmber Software Engineering.
Verification of Hybrid Systems An Assessment of Current Techniques Holly Bowen.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 04. Other.
1 Towards formal manipulations of scenarios represented by High-level Message Sequence Charts Loïc Hélouet Claude Jard Benoît Caillaud IRISA/PAMPA (INRIA/CNRS/Univ.
Chess Review November 21, 2005 Berkeley, CA Edited and presented by New results in Platform Modeling Tivadar Szemethy ISIS, Vanderbilt University.
EECE Hybrid and Embedded Systems: Computation T. John Koo, Ph.D. Institute for Software Integrated Systems Department of Electrical Engineering and.
SSP Re-hosting System Development: CLBM Overview and Module Recognition SSP Team Department of ECE Stevens Institute of Technology Presented by Hongbing.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Leveraging Synchronous Language Principles for Hybrid System Models Haiyang Zheng and.
Conformance Simulation Relation ( ) Let and be two automata over the same alphabet simulates () if there exists a simulation relation such that Note that.
Institute For Software Integrated Systems Vanderbilt University Applications of Model Integrated Computing to The Synchronous Language Signal Ethan Jackson.
University of Pennsylvania 1 SDRL CHARON SDRL and GRASP University of Pennsylvania Funded by DARPA ITO.
EECE Hybrid and Embedded Systems: Computation T. John Koo, Ph.D. Institute for Software Integrated Systems Department of Electrical Engineering and.
EECE Hybrid and Embedded Systems: Computation
Software Engineering, COMP201 Slide 1 Protocol Engineering Protocol Specification using CFSM model Lecture 30.
SIMULINK Dr. Samir Al-Amer. SIMULINK SIMULINK is a power simulation program that comes with MATLAB Used to simulate wide range of dynamical systems To.
Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI NSF Model-Based Design DSML.
Using the Vanderbilt Generic Modeling Environment (GME) to Address SOA QoS Sumant Tambe Graduate Intern, Applied Research, Telcordia Technologies Inc.
Chess Review November 18, 2004 Berkeley, CA Model-Based Design Edited and Presented by Janos Sztipanovits, Co-PI ISIS, Vanderbilt University.
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.
EECE Hybrid and Embedded Systems: Computation T. John Koo, Ph.D. Institute for Software Integrated Systems Department of Electrical Engineering and.
Tool Integration of Ptolemy II EE290N Class Project Haiyang Zheng May
MOBIES Project Progress Report Engine Throttle Controller Design Using Multiple Models of Computation Edward Lee Haiyang Zheng with thanks to Ptolemy Group.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI Program Review May 10,
Chess Review May 11, 2005 Berkeley, CA Platform Modeling and Analysis Presented by Tivadar Szemethy ISIS, Vanderbilt University.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
Chess Review October 4, 2006 Alexandria, VA Edited and presented by Model-Based Design Janos Sztipanovits Vanderbilt University.
GReAT: Graph Rewriting And Transformation Presenter: Yuehua Lin 2/17/04, Tuesday Slides help from Aditya Agrawal
Behaviour-Preserving Model Transformation Arend Rensink, University of Twente IPA Spring Days, 18 April 2012.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Ch.2 Part A: Requirements, State Charts EECE **** Embedded System Design.
- 1 - Embedded Systems—State charts Specifications.
November 21, 2005 Center for Hybrid and Embedded Software Systems Tivadar Szemethy, Institute for Software Integrated Systems, Vanderbilt University A.
AToM 3 : A Tool for Multi- Formalism and Meta-Modelling Juan de Lara (1,2) Hans Vangheluwe (2) (1) ETS Informática Universidad Autónoma de Madrid Madrid,
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
MathCore Engineering AB Experts in Modeling & Simulation WTC.
Department of Mechanical Engineering The University of Strathclyde, Glasgow Hybrid Systems: Modelling, Analysis and Control Yan Pang Department of Mechanical.
Validated Model Transformation Tihamér Levendovszky Budapest University of Technology and Economics Department of Automation and Applied Informatics Applied.
Software Engineering Research paper presentation Ali Ahmad Formal Approaches to Software Testing Hierarchal GUI Test Case Generation Using Automated Planning.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Hybrid automata and temporal logics
University of Paderborn Software Engineering Group Prof. Dr. Wilhelm Schäfer Towards Verified Model Transformations Holger Giese 1, Sabine Glesner 2, Johannes.
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
Procedures for managing workflow components Workflow components: A workflow can usually be described using formal or informal flow diagramming techniques,
1 LiSyC ENSIETA/DTN 02/04/2008 AADL execution semantics transformation for formal verification Joel Champeau, Thomas Abdoul, Pierre Yves Pillain, Philippe.
Visual Specification of a DSL Processor Debugger Tamás Mészáros and Tihamér Levendovszky Budapest University of Technology and Economics.
MODEL-BASED SYNTHESIS OF GENERATORS FOR EMBEDDED SYSTEMS PI: Gabor Karsai, Co-PI: Akos Ledeczi (615)
INTRODUCTION TO SIMULINK by Yasmin Hanum Md Thayoob & Aidil Azwin Zainul Abidin.
Reasoning about the Behavior of Semantic Web Services with Concurrent Transaction Logic Presented By Dumitru Roman, Michael Kifer University of Innsbruk,
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
1. 2 Purpose of This Presentation ◆ To explain how spacecraft can be virtualized by using a standard modeling method; ◆ To introduce the basic concept.
Institute for Software Integrated Systems Vanderbilt University On Metamodel Composition Akos Ledeczi, Greg Nordstrom, Gabor Karsai, Peter Volgyesi and.
Introduction to Simulink Matlab based Both Continuous Time and Discrete Time Simulation Based on Blocksets Model Based Design: a software model of the.
MODEL-BASED SYNTHESIS OF GENERATORS FOR EMBEDDED SYSTEMS PI: Gabor Karsai, Co-PI: Akos Ledeczi (615)
Overview of meta-modeling works for multi-clocked environments Christian Brunette IRISA/INRIA Rennes – ESPRESSO Synchron 2005.
CSCI1600: Embedded and Real Time Software Lecture 10: Modeling IV: Compositions of State Machines Steven Reiss, Fall 2015.
CPE555A: Real-Time Embedded Systems
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Event Relation Graphs and Extensions in Ptolemy II
Getting Started With Simulink
Model Transformation with the Ptera Controller
Compositional Refinement for Hierarchical Hybrid Systems
Program correctness Model-checking CTL
Presentation transcript:

Semantic Translation of Simulink/Stateflow Models to Hybrid Automata using Graph Transformations A. Agarwal, Gy. Simon, G. Karsai ISIS, Vanderbilt University Nashville, TN 37235, USA

2/14 CHESS ReviewAditya Agrawal Overview  Translation problem  Tool used: GReAT  Algorithm with example  Summary

3/14 CHESS ReviewAditya Agrawal The translation problem Motivation Simulink/Stateflow  De facto prototyping and simulation environment for dynamic systems  E.g.: Embedded controllers for automobiles  Large legacy libraries  No formal verification capability Hybrid automata  Mathematical modeling technique  Formal foundations  Few real-life examples  Verification capability ?

4/14 CHESS ReviewAditya Agrawal The translation problem Simulink/Stateflow Example (Input) Control level of tank:

5/14 CHESS ReviewAditya Agrawal The translation problem Hybrid Automata (Output) Hybrid Systems: Dynamic systems with simultaneous continuous and discrete dynamics Hybrid Automata Example (ref: U Penn) Tank’=0 Tank’=-Tank+In1-max(tank-15,0)*3 Tank’= -tank-max(tank-15,0)*3 Tank’=-max(tank-15,0)*3 Tank’=In1-max(Tank-15,0)*3 Tank’ = In1 A = (X, V, flow,inv, init, E, jump, å, syn) ― X : a set of real-valued variables ― V : a set of control modes ― flow : a flow condition over X ― inv : a set of invariant over X ― init : an initial condition ― E : a set of transitions ― jump : a condition for transition ― å : a set of events ― syn : a set of synchronization labels

6/14 CHESS ReviewAditya Agrawal Background Metamodels as graph grammars Simulink/Stateflow model: Graph grammar Model Object Network Graph Visualization UML-based metamodels for: Simulink/Stateflow and HSIF (HA interchange language) Simulink/Stateflow metamodel:

7/14 CHESS ReviewAditya Agrawal Tool used: GReAT Metamodel of Source Metamodel of Target DS-PI Model Source Models DS-PS Model Target Model Model Transformation Specification Input Output Describes Refers to Transformation Modeling Transformation Execution Transformation Model API Meta GRE Model API

8/14 CHESS ReviewAditya Agrawal GReAT: UMT: A Simple Model Transformation Language 1.Pattern specification  Pattern variables are typed with their UML classes  Cardinality of association-ends is checked  Extra (OCL) constraints define guard conditions 2.Graph transformation and rewrite  Create new/delete/modify objects  Attribute mapping (procedural)  “Cross-links”: edges between old/new objects  Input/output ports: pre-bound pattern variables 3.“High-level” control flow over the rules  Port connections imply “data flow” and control flow  Hierarchy/Sequencing/Recursion/Branching

9/14 CHESS ReviewAditya Agrawal Algorithm 1.Stateflow Part 1.Convert to StateChart 1.Create Hierarchical StateChart, flatten it 2.Determine data dependencies, extend state machines 3.Prune unreachable states 2.Convert to HSIF 1.Create Hybrid Automata, variables 2.Add transitions with guards 2. Simulink Part 1.Locate associated Hybrid Automata 2.Add variables as needed 3.Derive and add equations

10/14 CHESS ReviewAditya Agrawal Algorithm Determine data dependencies, extend state machines

11/14 CHESS ReviewAditya Agrawal Algorithm Inferring signals, extending state machines (d) Final Hybrid Automata States

12/14 CHESS ReviewAditya Agrawal Status, metrics  A hierarchal Simulink diagram with the following primitives:  Continuous: Integrator  Math: Product/Sum/Gain/Abs/Min/Max/Signum/Saturate  Signal and Systems : Mux/Demux/Ground  Source and Sinks: Constant/Workspace variables  Nonlinear : Controlled Switch/Manual Switch  The Simulink diagram can contain any number of Stateflow diagram.  Stateflow diagram can be hierarchical.  The Stateflow diagram receives signals from Simulink and can only produce switching signals that control the switches.  Switches cannot be controlled by any other Simulink block.  In Stateflow, the switch control action can only be performed in the entry action. Size  Primitive rules: 154  Complex rules: 43  C++ code: ~6000 lines Complexity  Most algorithms are of polynomial complexity  Some parts are worst-case exponential:  State-splitting  Flattening

13/14 CHESS ReviewAditya Agrawal GReAT in Action ProblemDeveloper GReAT Hand code Primitive Rules #/ Compound Rules # Man hoursLOC Hierarchical Data Flow (HDF) to Flat Data Flow (FDF) Staff Eng 11/3~3~200 KHORUS to GUDMLMSc Student 19/10~8~500 Hierarchical Concurrent State Machine (HCSM) to Finite State Machine (FSM) PhD Student 21/5~8~500 Simulink Stateflow to C codePhD Researcher 70/50~25~2.5K Matlab Simulink/ Stateflow to Hybrid Automata PhD Student 154/43~60~6K

14/14 CHESS ReviewAditya Agrawal Summary, further work  Tool integration requires translators that convert models created in one tool into semantically equivalent models in other tools. Translators are essential for design automation…but difficult to build.  Graph transformations can be used to solve practical translation problems … if good supporting tools are available.  Modeling a transformation using GT programs offers an opportunity for reasoning about the transformations --- A great potential area for research.

15/14 CHESS ReviewAditya Agrawal Background slides

16/14 CHESS ReviewAditya Agrawal UMT A Transformation Rule PatternEffect Output port Input port

17/14 CHESS ReviewAditya Agrawal UMT Rule execution – Rules and Blocks Rules produce multiple matches: “packets”. By default, all packets are consumed by a rule, and new set of packets is produced “Blocks” are composite rules, with simple composition semantics. (1) (2) (3) (4) (5) (1) (2) (3)

18/14 CHESS ReviewAditya Agrawal UMT Rule execution- ForBlocks and Test/Cases “ ForBlocks” process single packets. Tests are conditional control structures built from Cases. (1) (2) (3) (4) (5) A single Case: (1) (2) (3) Also supported  Recursion  Non-deterministic execution