Mobies Phase 1 UC Berkeley 1 Process-Based Software Components Mobies Phase 1, UC Berkeley Edward A. Lee and Tom Henzinger (with contributions from Steve.

Slides:



Advertisements
Similar presentations
Rule Based Operational Semantics Specification in Ptolemy Yanwar Asrigo COMP 763B - Modeling and Simulation Based Design 30 th April 2008.
Advertisements

UC Berkeley Mobies Technology Project PI: Edward Lee CoPI: Tom Henzinger Process-Based Software Components for Networked Embedded Systems.
ACM SIGPLAN 2001 Workshop on Languages, Compilers, and Tools for Embedded Systems (LCTES'2001) Jun 22-23, 2001, Snowbird, Utah, USA Embedded Software from.
Mobies Phase 1 UC Berkeley 1 Process-Based Software Components Mobies Phase 1, UC Berkeley Edward A. Lee and Tom Henzinger PI Meeting, New York July 24,
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
Process-Based Software Components for Networked Embedded Systems Edward A. Lee, PI UC Berkeley Core Technical Team (Mobies, SEC, and GSRC): Christopher.
Component Technologies for Embedded Systems Johan Eker.
Chess Review May 8, 2003 Berkeley, CA Classes and Inheritance in Actor- Oriented Models Stephen Neuendorffer Edward Lee UC Berkeley.
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 Java Code Generation Steve Neuendorffer UC Berkeley.
Berkeley, CA, March 12, 2002 Modal Models in Vehicle-Vehicle Coordination Control Xiaojun Liu The Ptolemy Group EECS Department, UC Berkeley.
Advanced Tool Architectures Supporting Interface-Based Design
Integrated Design and Analysis Tools for Software-Based Control Systems Shankar Sastry (PI) Tom Henzinger Edward Lee University of California, Berkeley.
February 21, 2008 Center for Hybrid and Embedded Software Systems Organization Board of Directors Edward A. Lee, UC Berkeley.
Mobies Phase 1 UC Berkeley 1 Agenda 8:00-8:30 Continental breakfast 8:30-9:00 Overview of Mobies Phase 1 effort (Edward A. Lee) 9:00-9:40 Introduction.
Type System, March 12, Data Types and Behavioral Types Yuhong Xiong Edward A. Lee Department of Electrical Engineering and Computer Sciences University.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Leveraging Synchronous Language Principles for Hybrid System Models Haiyang Zheng and.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley Behavioral Types for Actor-Oriented Design Edward A. Lee.
Behavioral Types as Interface Definitions for Concurrent Components Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley.
February 11, 2010 Center for Hybrid and Embedded Software Systems Ptolemy II - Heterogeneous Concurrent Modeling and Design.
5/15/ Modeling and controlling the Caltech Ducted Fan Vehicle Steve Neuendorffer EE290N Final Presentation.
Causality Interface  Declares the dependency that output events have on input events.  D is an ordered set associated with the min ( ) and plus ( ) operators.
Component-Based Design of Embedded Control Systems Luca Dealfaro Chamberlain Fong Tom Henzinger Christopher Hylands John Koo Edward A. Lee Jie Liu Xiaojun.
Heterogeneous Modeling and Design in Ptolemy II Johan Eker UC Berkeley with material courtesy of Edward Lee and the Ptolemy group ECE Seminar Series, Carnegie.
Mobies Phase 1 UC Berkeley 1 Process-Based Software Components Mobies Phase 1, UC Berkeley Edward A. Lee and Tom Henzinger (with contributions from Steve.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Mobies Phase 1 UC Berkeley 1 Process-Based Software Components Mobies Phase 1, UC Berkeley Edward A. Lee and Tom Henzinger PI Meeting, Boca Raton January.
February 23, 2012 Center for Hybrid and Embedded Software Systems Organization Board of Directors Edward A. Lee, EECS Thomas.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
3/12/ Modeling and controlling the Caltech Ducted Fan Vehicle Steve Neuendorffer, Ptolemy Group, UC Berkeley.
Hybrid System Modeling: Operational Semantics Issues Edward A. Lee Professor UC Berkeley Center for Hybrid and embedded software systems OMG Technical.
Mixing Models of Computation Jie Liu Palo Alto Research Center (PARC) 3333 Coyote Hill Rd., Palo Alto, CA joint work with Prof. Edward.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
MoBIES PI-Meeting, July 2001, Jackson Hole Controller Design Using Multiple Models of Computation Edward Lee Johan Eker with thanks to Paul Griffiths,
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI A New System Science.
Ptolemy Miniconference May 9, 2003 Berkeley, CA Ptolemy Project Plans for the Future Edward A. Lee Professor Ptolemy Project Director.
Heterochronous Dataflow in Ptolemy II Brian K. Vogel EE249 Project Presentation, Dec. 4, 1999.
SEC PI Meeting Annapolis, May 8-9, 2001 Component-Based Design of Embedded Control Systems Edward A. Lee & Jie Liu UC Berkeley with thanks to the entire.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley System-Level Types for Component-Based Design Edward A.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley Concurrent Component Patterns, Models of Computation, and.
MoBIES Working group meeting, September 2001, Dearborn Ptolemy II The automotive challenge problems version 4.1 Johan Eker Edward Lee with thanks.
State of the Art Lecture IEEE Instrumentation and Measurement Technology Conference Budapest, Hungary, May 21-23, 2001 Computing for Embedded Systems Edward.
November 18, 2004 Embedded System Design Flow Arkadeb Ghosal Alessandro Pinto Daniele Gasperini Alberto Sangiovanni-Vincentelli
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 The Component Interaction Domain: Modeling Event-Driven and Demand- Driven Applications.
Tool Integration of Ptolemy II EE290N Class Project Haiyang Zheng May
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 MESCAL Application Modeling and Mapping: Warpath Andrew Mihal and the MESCAL team UC Berkeley.
Lee & Henzinger ESWG #1 UC Berkeley Mobies Technology Project Process-Based Software Components for Networked Embedded Systems PI: Edward Lee CoPI: Tom.
MOBIES Project Progress Report Engine Throttle Controller Design Using Multiple Models of Computation Edward Lee Haiyang Zheng with thanks to Ptolemy Group.
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,
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
Code Generation from CHARON Rajeev Alur, Yerang Hur, Franjo Ivancic, Jesung Kim, Insup Lee, and Oleg Sokolsky University of Pennsylvania.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Chapter 6 System Engineering - Computer-based system - System engineering process - “Business process” engineering - Product engineering (Source: Pressman,
Model-Driven Analysis Frameworks for Embedded Systems George Edwards USC Center for Systems and Software Engineering
IBM Software Group ® Overview of SA and RSA Integration John Jessup June 1, 2012 Slides from Kevin Cornell December 2008 Have been reused in this presentation.
Chapter 10 Analysis and Design Discipline. 2 Purpose The purpose is to translate the requirements into a specification that describes how to implement.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
FDT Foil no 1 On Methodology from Domain to System Descriptions by Rolv Bræk NTNU Workshop on Philosophy and Applicablitiy of Formal Languages Geneve 15.
Design Languages in 2010 Chess: Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley Panel Position Statement Forum on Design.
1. 2 Purpose of This Presentation ◆ To explain how spacecraft can be virtualized by using a standard modeling method; ◆ To introduce the basic concept.
Satisfying Requirements BPF for DRA shall address: –DAQ Environment (Eclipse RCP): Gumtree ISEE workbench integration; –Design Composing and Configurability,
CS 5991 Presentation Ptolemy: A Framework For Simulating and Prototyping Heterogeneous Systems.
February 14, 2013 Center for Hybrid and Embedded Software Systems Organization Faculty Edward A. Lee, EECS Alberto Sangiovanni-Vincentelli,
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
Retargetable Model-Based Code Generation in Ptolemy II
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Multiple Aspect Modeling of the Synchronous Language Signal
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Presentation transcript:

Mobies Phase 1 UC Berkeley 1 Process-Based Software Components Mobies Phase 1, UC Berkeley Edward A. Lee and Tom Henzinger (with contributions from Steve Neuendorffer, Christopher Hylands, Jie Liu, Xiaojun Liu, and Haiyang Zheng) PI Meeting, Chandler, AZ January 29, 2003 PI: Edward A. Lee, , Co-PI: Tom Henzinger, , PM: John Bay Agent: James Lyttle, AFRL/IFSC, Award end date: December, 2003 Contract number: F C-1703 AO #: J655

Mobies Phase 1 UC Berkeley 2 Subcontractors and Collaborators Subcontractor –Univ. of Maryland (C code generation) Collaborators –Caltech SEC (fan-driven platform) –UCB SEC (helicopters) –Kestrel (code generation technology) –Vanderbilt (HSIF) –Penn (HSIF) –CMU (HSIF) –Ford/GM/UCB (HSIF) –Research in Motion Limited –Brigham Young University (hardware generation)

Mobies Phase 1 UC Berkeley 3 Project Goals and Problem Description Our focus is on component-based design using principled models of computation and their runtime environments for embedded systems. The emphasis of this project is on the dynamics of the components, including the communication protocols that they use to interface with other components, the modeling of their state, and their flow of control. The purpose of the mechanisms we develop is to improve robustness and safety while promoting component-based design.

Mobies Phase 1 UC Berkeley 4 Technical Approach Summary Models of computation –supporting heterogeneity –supporting real-time computation –codifications of design patterns –definition as behavioral types Co-compilation –joint compilation of components and architecture –vs. code generation –supporting heterogeneity Ptolemy II –our open-architecture software laboratory –shed light on models of computation & co-compilation –by prototyping modeling frameworks and techniques our tool

Mobies Phase 1 UC Berkeley 5 Summary of Accomplishments Heterogeneous modeling –HyVisual hybrid system modeler –Domain polymorphism concept & realization –Theory of responsible frameworks –Behavioral type system –Related Giotto, Simulink, and Timed Multitasking semantics –Component definition principles (Cal and Actif) –Component interaction (CI) domain –Higher-order expression language Tool integration –Charon import/export from Ptolemy II –HSIF import to HyVisual –Matlab integration with Ptolemy II Code generation –Co-compilation concept –Giotto program generation –Java code generation from SDF models –C code generation from Java –Code generation from expressions –FSM code generation

Mobies Phase 1 UC Berkeley 6 Tool Interchange – A Semantics Problem Director from a library defines component interaction semantics Large, domain-polymorphic component library. Effective tool interchange requires more narrowly defined semantics and more targeted component libraries. Basic Ptolemy II infrastructure:

Mobies Phase 1 UC Berkeley 7 HyVisual – Hybrid System Modeling Tool Based on Ptolemy II HyVisual is a such a targeted tool, designed for hybrid system modeling.

Mobies Phase 1 UC Berkeley 8 HyVisual Demo – Building a Hybrid System

Mobies Phase 1 UC Berkeley 9 Tool Customization Ptolemy II Configurations A Configuration is a Ptolemy II model, defined in an XML file, that contains: –A customized library of components –References to customized on-line docs –A list of factories for model editors. E.g.: HSIF editor MoML editor HTML editor Text editor –Template models for new designs. E.g.: Blank model populated with a director State refinement for modal models Transition refinement for modal models

Mobies Phase 1 UC Berkeley 10 Reading HSIF files in HyVisual HSIF file detected. Invoking XSL Translation (HSIF → MoML of Ptolemy) Global variables → ports; Local variables → parameters; or ports controlled by dynamic equations; Hybrid Automata → modal models; Invariant expressions → invariant actors; Locations → states & refinements; Differential equations → refinement structures; Transitions → transitions. MoML file generated.

Mobies Phase 1 UC Berkeley 11 Swimming Pool Example pool w/ level & temp control pump/ valve L_hi level controller circulation pump heater L_low Temp temp controller leakage evaporation level Parameters: f_in=0.2 m/min f_leak=0.04 m/min (rates of change in level due to inflow and leak respectively) heat=1/60 /min ambient=1/120 /min inflow=1/100 /min (rate of temperature change due to the heater,surroundings and incoming cold water) T_max=32 T_min=27 T_heat=40 T_inflow=15 T_ambient=25 (all in degrees centigrade) level_max=2.6 m level_min=2.2 m pump on-off transition timeout = 0.5 min A swimming pool model from Bruce Krogh. Objective is to keep the water temperature and level of the swimming pool inside a proper range.

Mobies Phase 1 UC Berkeley 12 GME View GME model constructed by Bruce Krogh. GME exports HSIF from this model. Initial Hybrid automata State machines Dynamics inside (not shown)

Mobies Phase 1 UC Berkeley 13 level <= level_min level >= level_max T >= T_max level <= level_min T <= T_min The detailed thermostat state machine model with non-deterministic behaviors. level >= level_max ? T >= T_max ? Initial Original Thermostat State Machine

Mobies Phase 1 UC Berkeley 14 Issues Raised by This Model Model is nondeterministic –If temperature and level are both low, there are two enabled transitions from HeatOff –How/whether to simulate? HeatOn_PumpOff state is transient –If temperature and level are both low, then we can transition right through this state –Glitch in simulation? Initial conditions violated invariants –How to specify initial conditions for both simulation and reachability analysis? –How should a simulator deal with violated invariants?

Mobies Phase 1 UC Berkeley 15 Initial The refined thermostat model with deterministic behaviors. Initial level <= level_min level >= level_max Initial Heat Off Heat On Pump Off Pump On split state. Completed transitions. Made transitions mutually exclusive. Modified Model Hierarchical state machine not representable in HSIF.

Mobies Phase 1 UC Berkeley 16 Model After Import Into HyVisual

Mobies Phase 1 UC Berkeley 17 Manual Modifications Required Added display actors Visual layout of components Set simulation control parameters –Length of simulation time –Step size control –Choice of solver

Mobies Phase 1 UC Berkeley 18 More Issues Raised Hierarchical state machines are not supported in HSIF –Better orthogonalization of designs –Need for transitions to optionally reset destination to the initial state. HSIF annotations needed? –One tool may need to put in annotations that will be and should be ignored by other tools. E.g.: Simulation parameters Identification of signals to display Initial conditions or recorded state Should HSIF support transition refinements?

Mobies Phase 1 UC Berkeley 19 XSL Transformation Phases Global variables: –Global variables become input or output ports –HSIF defines input, controlled, and observable Local variables: –Some are converted to parameters –If controlled by dynamic equations, converted to ports Mapping of components –HA to modal models –Transitions to transitions –Differential equations to state refinements –Invariants to invariant actors

Mobies Phase 1 UC Berkeley 20 Timer used in Pump Water level Simulation Results

Mobies Phase 1 UC Berkeley 21 More Issues: Transition Semantics In continuous-time models, HyVisual uses event detectors to identify the precise time at which an event occurs: Semantics of transitions, however, is to enable a mode change. Precise time of enablement is not identified: One consequence: deterministic model becomes nondeterministic if simulator takes steps that are too large. Another consequence: invariants may be violated due to failure to take mode transitions on time.

Mobies Phase 1 UC Berkeley 22 Model Errors vs. Exceptions Model errors are passed up the model hierarchy Exceptions are passed up the procedure-call stack Model errors can be used to refine step size while preserving information-hiding.

Mobies Phase 1 UC Berkeley 23 Maximum step size of 1.0: Timer used in Pump Temperature If Step-Size is Too Large… Overshoot – could violate invariants

Mobies Phase 1 UC Berkeley 24 Code Generation Status Update Giotto code generator from Giotto domain –still need code generation from FSM to get modal models Java code generator from SDF domain –based on Soot compiler infrastructure (McGill) –type specialization –static scheduling, buffering –code substitution using model of computation semantics C code generation from Java –University of Maryland subcontract –based on Soot compiler infrastructure (McGill) –preliminary concept demonstration built Configurable hardware synthesis –targeted Wildcard as a concept demonstration –collaborative with BYU (funded by another program)

Mobies Phase 1 UC Berkeley 25 Caltech Vehicles Wireless b Network Datagram with vehicle locations Controller RS232 commands to fans

Mobies Phase 1 UC Berkeley 26 A Detailed Heterogeneous Model Array of 3 Bytes: {85, Left, Right} Sent immediately after controller computes value Array of 50 Bytes: {TimeStamp, ID, X, Y, Angle} Generated every second by localization system Measured Physical Parameters Discrete Event model convenient for events that do not occur at the same time.

Mobies Phase 1 UC Berkeley 27 A Detailed Heterogeneous Model Data formatting Fan Thrust Map Continuous time model good for physical hardware dynamics

Mobies Phase 1 UC Berkeley 28 A Detailed Heterogenous Model Proportional control law drives automatically to desired location Synchronous dataflow model convenient for signal processing and discrete-time aspects

Mobies Phase 1 UC Berkeley 29 Key Observations Different aspects of overall system have a naturally convenient model Confidence in design comes from simulating heterogeneous aspects together Model allows validation of ‘non-functional’ system details (i.e. packet format, control value quantization)

Mobies Phase 1 UC Berkeley 30 Towards Implementation b RS-232

Mobies Phase 1 UC Berkeley 31 Hardware-in-the-loop b RS-232 Replace hardware-true simulation model with actual vehicle. Allows validation of hardware model aspects.

Mobies Phase 1 UC Berkeley 32 Controller Code Generation b RS-232 Replace controller simulation with embedded controller. The controller model contains all aspects of the actual embedded implementation Embedded Java Platform

Mobies Phase 1 UC Berkeley 33 Directions Proportional control doesn’t require real-time controller execution –Add integration term or use model-predictive control law. –Use timed Giotto model at toplevel of controller instead of untimed synchronous dataflow. Implement Softwalls algorithm on Caltech vehicles –Dynamics similar to 2D aircraft dynamics, but safe for experimentation.

Mobies Phase 1 UC Berkeley 34 Plans May 9, 2003: Ptolemy Miniconference Software radio OEP target Distributed models –CORBA integration release –JXTA peer-to-peer distributed applications HSIF –Resolve remaining semantics questions –Ensure HyVisual compliance Complete actor definition framework –define the meta-semantics for domain-polymorphic actors Behavioral types –support reflection –real-time properties as dependent types Complete code generation –elimination of memory management –100% of test suite must pass Complete C code generation –support key subset of Java libraries Integrate heterogeneous code generators –systematize hierarchy support –define Java subset that generates well to C

Mobies Phase 1 UC Berkeley 35 Technology Transition Software Releases Ptolemy II version –Major release with many enhancements PtPlot version 5.2 –Minor release with mainly 3’d party enhancements HyVisual version 2.2-beta –First domain-specific repackaging of Ptolemy II

Mobies Phase 1 UC Berkeley 36 Technology Transition Third Party Contributions (last 6 months) Many enhancements contributed by RIM: –Transition refinements –Higher-order components –Performance improvements –Expression language improvements –Matlab integration to expression language –Emacs integration Enhancements contributed by Agile Design –Undo/Redo –Port positioning –Icon customization Hardware synthesis capability from BYU Distributed optimization package from Spain Graduate class on MoCs at Virginia Tech Ice-cube project: paper on neutrino detection

Mobies Phase 1 UC Berkeley 37 Technology Transition Publication Summary (last 6 months) Published: –Multidimensional SDF paper (Tr. On Signal Processing) Invited: –Actor-Oriented Design (J. of Circuits, Systems and Computers) –Timed multitasking (Control Systems Magazine) Accepted: –Synchronous modeling (Science of Computer Programming) –Semantics of continuous models (Hybrid systems workshop) –Mod. & Sim. of hybrid systems (Tr. On Mod. and Comp. Sim.) –Event-driven embedded software (SAC’03) –Heterogeneous modeling (IEEE Proceedings) Book chapters –Embedded software (Advances in Computers) Conference papers: –Simulation of embedded control systems (a controls conference) Tech. Memos: –Behavioral Types –Component notations –Documentation for Ptolemy II v