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,

Slides:



Advertisements
Similar presentations
Event Driven Real-Time Programming CHESS Review University of California, Berkeley, USA May 10, 2004 Arkadeb Ghosal Joint work with Marco A. Sanvido, Christoph.
Advertisements

UC Berkeley Mobies Technology Project PI: Edward Lee CoPI: Tom Henzinger Process-Based Software Components for Networked Embedded Systems.
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.
ACM SIGPLAN 2001 Workshop on Languages, Compilers, and Tools for Embedded Systems (LCTES'2001) Jun 22-23, 2001, Snowbird, Utah, USA Embedded Software from.
2/11/2010 BEARS 2010 On PTIDES Programming Model John Eidson Jeff C. Jensen Edward A. Lee Slobodan Matic Jia Zou PtidyOS.
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.
SRC ETAB Summer Study Colorado Springs, June 25-26, 2001 Model-Based Approaches to Embedded Software Design Edward A. Lee UC Berkeley & GSRC.
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.
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.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI A New System Science.
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.
Building Unreliable Systems out of Reliable Components: The Real Time Story Edward A. Lee Professor, Chair of EE, and Associate Chair of EECS CHESS: Center.
February 11, 2010 Center for Hybrid and Embedded Software Systems Ptolemy II - Heterogeneous Concurrent Modeling and Design.
Causality Interface  Declares the dependency that output events have on input events.  D is an ordered set associated with the min ( ) and plus ( ) operators.
Chess Review October 4, 2006 Alexandria, VA Edited and presented by Advanced Tool Architectures Edward A. Lee UC Berkeley.
Chess Review November 21, 2005 Berkeley, CA Edited and presented by Advanced Tool Architectures Edward A. Lee UC Berkeley.
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.
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.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
Hybrid System Modeling: Operational Semantics Issues Edward A. Lee Professor UC Berkeley Center for Hybrid and embedded software systems OMG Technical.
Building Unreliable Systems out of Reliable Components: The Real Time Story Edward A. Lee Professor, Chair of EE, and Associate Chair of EECS CHESS: Center.
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.
Models of Computation for Embedded System Design Alvise Bonivento.
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.
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.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 PTIDES: A Programming Model for Time- Synchronized Distributed Real-time Systems Yang.
State of the Art Lecture IEEE Instrumentation and Measurement Technology Conference Budapest, Hungary, May 21-23, 2001 Computing for Embedded Systems Edward.
Designing Predictable and Robust Systems Tom Henzinger UC Berkeley and EPFL.
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
Embedded Software Challenges for the Next 10 Years Chess: Center for Hybrid and Embedded Software Systems Infineon Embedded Software Days Munich, Sept.
Panel: What Comes After C++ in System-Level Specification Edward Lee UC Berkeley Forum on Design Languages Workshop on System Specification & Design Languages.
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.
Model-Driven Development From Object-Oriented Design to Actor-Oriented Design Chess: Center for Hybrid and Embedded Software Systems Edward A. Lee Professor.
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
Composing Models of Computation in Kepler/Ptolemy II
Hybrid Systems Concurrent Models of Computation EEN 417 Fall 2013.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
C. André, J. Boucaron, A. Coadou, J. DeAntoni,
Design Languages in 2010 Chess: Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley Panel Position Statement Forum on Design.
Actor Networks Edward A. Lee Robert S. Pepper Distinguished Professor Chair of EECS UC Berkeley Invited Talk Workshop Foundations and Applications of Component-based.
Ptolemy & Models of Computation -by Hao Chen, Zhuang Fan, Jin Xiao School of Computer Science University of Waterloo Claudius Ptolemaeus, the second century.
What’s Ahead for Embedded Software? (Wed) Gilsoo Kim
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CS 5991 Presentation Ptolemy: A Framework For Simulating and Prototyping Heterogeneous Systems.
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
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 PI Meeting, New York July 24, 2002 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 –UCB Phase II –Kestrel –Vanderbilt –Penn Non-Mobies –GSRC project (system-level IC design) –SEC program (Boeing, etc.)

Mobies Phase 1 UC Berkeley 3 Program Objectives 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 View of Concurrent Components: Actors with Ports and Attributes Model of Computation: Messaging schema Flow of control Concurrency Key idea: The model of computation is part of the framework within which components are embedded not part of the components themselves. It enforces patterns. our basic meta model

Mobies Phase 1 UC Berkeley 6 Actor-Oriented View of Producer/Consumer Components Models of Computation: continuous-time dataflow rendezvous discrete events synchronous time-driven publish/subscribe push/pull … our meta model for producer/consumer models of computation

Mobies Phase 1 UC Berkeley 7 Examples of Actor-Oriented Component Frameworks Simulink (The MathWorks) Labview (National Instruments) OCP, open control platform (Boeing) GME, actor-oriented meta-modeling (Vanderbilt) SPW, signal processing worksystem (Cadence) System studio (Synopsys) ROOM, real-time object-oriented modeling (Rational) Port-based objects (U of Maryland) I/O automata (MIT) VHDL, Verilog, SystemC (Various) Polis & Metropolis (UC Berkeley) Ptolemy & Ptolemy II (UC Berkeley) …

Mobies Phase 1 UC Berkeley 8 Mixing Models of Computation Tool integration is about semantics integration –Tools essentially reflect the models of computation they implement or assume. Simulink – continuous-time/mixed signal Stateflow – finite-state machines Charon – hybrid automata Teja – timed automata Giotto – time triggered architecture ns (network simulator) – discrete event Esterel – synchronous/reactive … –Not all semantic models are interchangeable –Not all semantic models are compositional –Not all tools are developed to work with other tools Ptolemy II is a framework to study semantics integration

Mobies Phase 1 UC Berkeley 9 Part I: Networks of Automata - Heterogeneous Mixtures of Automata and Actors - Swimming pool HSIF example imported into Ptolemy II via XSLT translator to MoML, the Ptolemy II XML Schema.

Mobies Phase 1 UC Berkeley 10 Semantics Questions What automata can be expressed? –nondeterministic, guard expression language, actions, … How are transitions in distinct automata coordinated? –synchronous, time-driven, event-driven, dataflow, … –can outputs and updates be separated? What can automata communicate? –messages, events, triggers How communications carried out? –synchronous, rendezvous, buffered, lossy, … How are continuous variables shared? –global name space, scoping, mutual exclusion, … What is the meaning of directed cycles? –fixed point, error, infinite loop, … What is the meaning of simultaneous events? –secondary orderings, such as data precedences, priorities, …

Mobies Phase 1 UC Berkeley 11 Possible Interaction Semantics Between Automata Asynchronous –Promela (specification language for Spin) –SDL –Ptolemy II (PN+FSM, DE+FSM) Synchronous w/ fixed point –Esterel –Simulink –Ptolemy II (SR+FSM) Synchronous w/out fixed point –Giotto –Ptolemy II (SDF+FSM) –HSIF

Mobies Phase 1 UC Berkeley 12 Tool Integration Efforts First attempt: Charon –Created a Charon parser (in Java) to import into Ptolemy II CT+FSM domains –Created a Charon code generator to produce Charon from Ptolemy II CT+FSM models Second attempt: HSIF –Created an XSLT translator from HSIF to MoML, creating Ptolemy II models in CT+FSM. –This is ongoing, as we are resolving semantics mismatches.

Mobies Phase 1 UC Berkeley 13 Difficulties CT+FSM does not model the two sources of nondeterminism in HSIF: –At each time step, we order execution of the automata according to data precedences, as done by Simulink, for example. We believe this is a flaw in HSIF –The FSM domain rejects nondeterminism where more than one guard is enabled at a state. We believe this is a flaw in the FSM domain of Ptolemy II, but: What should a simulator do with such nondetermism? It is incorrect to just choose one of the enabled transitions (because it will lead to untrustable simulations). Several other difficulties with global variables and directed cycles in HSIF.

Mobies Phase 1 UC Berkeley 14 Order of Execution Question Given an event from the event source, which of these should react first? HSIF declares this to be nondeterministic. Simulink and the Ptolemy II CT domain declare this to be deterministic, based on data precedences. Actor1 executes before Actor2.

Mobies Phase 1 UC Berkeley 15 Using HSIF Semantics to Get Determinism is Hard turn one trigger into N, where N is the number of actors encode the desired sequence as an automaton that produces a schedule embellish the guards with conditions on the schedule conditionally execute the simple function, conditioned on the schedule broadcast the schedule

Mobies Phase 1 UC Berkeley 16 Using CT or Simulink Semantics to Get Nondeterminism is Easy At a time when the event source yields a positive number, both transitions are enabled. Ptolemy’s FSM domain throws an exception upon encountering such nondeterminism. Stateflow uses the position of transitions to disambiguate. Neither of these correctly reflects HSIF semantics.

Mobies Phase 1 UC Berkeley 17 HSIF Premise Time as a binding agent makes sense. –Because of time-based differential equations. –Hence, rule out asynchronous semantics. Global variables for sharing continuous signals –How to enforce or analyze mutual exclusion? Nondeterminate –Automata can have multiple enabled transitions –Simultaneous triggers yield nondeterminate ordering of reactions We quibble with the latter: –It surprises the designer –It is hard to get determinism when this is desired –Getting the desired nondeterminism is easy using the former –Writing simulators that are trustworthy is difficult It is incorrect to just pick one possible behavior! –With this semantics, it makes no sense to export to HSIF from Ptolemy II CT+FSM models or from Simulink+Stateflow models.

Mobies Phase 1 UC Berkeley 18 Part II: Real-Time Actor Semantics Simulink –underlying continuous-time semantics –good support for periodic real-time tasks –code generation via real-time workshop Giotto –underlying time-triggered semantics –execution on embedded machine Timed Multitasking (TM) –reactive, aperiodic semantics –delayed output commit, as in Giotto Others: –Real-time CORBA –Port-based objects (PBO) –Timed process networks –Timed CSP

Mobies Phase 1 UC Berkeley 19 Simulink Semantics continuous time discrete actors are logically instantaneous separation of output/update methods to support algebraic loops, integration, and zero-crossing detection output method invoked many times multitasking mode for periodic discrete-time tasks. multitasking mode requires Giotto-like delayed output commit image from Writing S-Functions, version 4, The MathWorks

Mobies Phase 1 UC Berkeley 20 Giotto – Periodic Hard-Real-Time Tasks with Precise Mode Changes t+10ms ttt+5ms Higher frequency Task Lower frequency task: Giotto compiler targets the E Machine Giotto/Simulink integration Ptolemy II Giotto code generator Major part of the Mobies effort is to interface this domain to others: CT above, FSM below for modal modeling, and SDF for task definition. Task 1.2: Demonstrate ability to model domain specific model semantics

Mobies Phase 1 UC Berkeley 21 Timed Multitasking (TM) - Extending this Concept to Event-Driven Models - Actors are triggered by input events Snapshot of inputs upon triggering Concurrent execution according to priorities t o = t i + T + P –t o = Time of outputs –t i = Time of inputs –T = declared execution time –P = preemption time trigger snapshot inputs firing w/ preemption declared execution time + preemption time = elapsed time overrun, if it occurs, is delegated to an overrun handler produce outputs Task 1.1: Demonstrate ability of modeling cross cutting physical constraints

Mobies Phase 1 UC Berkeley 22 Overrun Handlers in TM high fidelity low fidelity controller high fidelity controller low fidelity controller TM overrun slack detected exec time: 10ms When overrun occurs, handler can: commit partial results (for anytime algorithms) roll back (transaction semantics) switch to degraded mode operation; suspend rogue tasks raise an alarm 2.7 Demonstrate ability to guarantee properties of generated systems

Mobies Phase 1 UC Berkeley 23 Comparisons Giotto, Simulink, and TM, all achieve data determinism with snapshot of inputs and delayed commit of outputs. Giotto introduces a unit delay in any communication. Simulink introduces a unit delay only on sample rate changes. TM does not introduce a unit delay. Simulink requires output/update separation. The others do not. TM builds in the notion of an overrun handler. The others do not. Common principles: –responsible frameworks –precise reactions

Mobies Phase 1 UC Berkeley 24 Abstract Semantics The “right” abstract semantics would allow these models of computation to be composed with one another and with other MoCs. This abstract semantics will have: output/update separation –required by Simulink finite actor computation –required by all predictable execution times –required by all declared execution times –required by TM, and by Giotto and Simulink for schedulability analysis. 1.5 Demonstrate ability to integrate different models of concurrency 1.6 Demonstrate ability to integrate domain specific modeling tools 1.7 Demonstrate ability to compose multiple view models

Mobies Phase 1 UC Berkeley 25 A Theory of Responsible Frameworks - Ensures Finite Actor Computation - A precise reaction is a finite piece of computation depends solely on its trigger and leads to a well-defined state. A compositional precise reaction leads a composite actor to a quiescent state. A responsible framework only sends responsible triggers, thus guarantees compositional precise reaction. trigger finish quiescent state responsible trigger computation 1.5 Demonstrate ability to integrate different models of concurrency

Mobies Phase 1 UC Berkeley 26 Status update: Code Generation It is not sufficient to build a mechanism for generating code from one, fixed, modeling environment. Modeling strategies must be nested hierarchically. Code generators have to be heterogeneously composable. Task 2.3: Demonstrate ability to compose generators from components

Mobies Phase 1 UC Berkeley 27 Code Generation Status 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 28 Actor Definition Status Update A C D B public TypedIOPort input; public TypedIOPort output; public Parameter constant; public void fire() { Token t = input.get(0); Token sum = t.add(constant.getToken()); output.send(0, t2); } Code generate a domain- polymorophic component definition.

Mobies Phase 1 UC Berkeley 29 Actor Definition: Cal Java is not the ideal actor definition language. Key meta-data is hard to extract: –token production/consumption patterns –firing rules (preconditions) –state management (e.g. recognize stateless actors) –type constraints must be explicitly given –modal behavior Defining an actor definition format (Cal): –enforce coding patterns –make meta-data available for code generation –infer behavioral types automatically –analyze domain compatibility –support multiple back-ends (C, C++, Java, Matlab)

Mobies Phase 1 UC Berkeley 30 Summary of Accomplishments to Date Heterogeneous modeling –Domain polymorphism concept & realization –Behavioral type system –Giotto semantics & integration with other MoCs –Component definition principles (Cal) Tool integration –Charon import/export from Ptolemy II –(partial) HSIF import to Ptolemy II –Matlab integration with Ptolemy II Code generation –Co-compilation concept –Giotto program generation –Java code generation from SDF –C code generation from Java Early phase, concept demonstration

Mobies Phase 1 UC Berkeley 31 Plans OEP –ETC and V2V models and code generators HSIF –Resolve semantics questions and create Ptolemy II interface Complete actor definition framework –define the meta-semantics for domain-polymorphic actors Behavioral types –support reflection –real-time properties as dependent types Complete SDF code generation –token unboxing –elimination of memory management –100% of test suite must pass

Mobies Phase 1 UC Berkeley 32 More Plans Code generate Ptolemy II expressions –use of expression actor simplifies models –expressions for guards and actions in FSMs Implement FSM code generation –support modal models 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 Investigate Simulink/Ptolemy II interaction –focus on the abstract semantics