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.

Slides:



Advertisements
Similar presentations
Discrete-Event Modeling and Design of Embedded Software Edward Lee UC Berkeley Workshop on Discrete Event Systems WODES 2000 Ghent, Belgium August,
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.
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.
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.
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.
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.
Modeling Heterogeneous Systems Edward Lee UC Berkeley Design for Safety Workshop NASA Ames Research Center Mountain View, CA 11 October, Design.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
Chess Review May 10, 2004 Berkeley, CA Advanced Tool Architectures Edited and Presented by Edward A. Lee, Co-PI UC Berkeley.
Actor-Oriented Design: A focus on domain-specific languages for embedded systems Edward A. Lee Professor, UC Berkeley Director, Center for Hybrid and Embedded.
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.
An Extensible Type System for Component-Based Design
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.
The Gigascale Silicon Research Center Edward A. Lee UC Berkeley The GSRC Semantics Project Tom Henzinger Luciano Lavagno Edward Lee Alberto Sangiovanni-Vincentelli.
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.
February 12, 2009 Center for Hybrid and Embedded Software Systems Model Transformation Using ERG Controller Thomas H. Feng.
MoBIES Working group meeting, September 2001, Dearborn Ptolemy II The automotive challenge problems version 4.1 Johan Eker Edward Lee with thanks.
The Caltrop Actor Language Johan Eker UC Berkeley MoBIES group, Carnegie Mellon, November 30, 2001.
Concurrent Models of Computation in System Level Design Edward Lee UC Berkeley Forum on Design Languages Workshop on System Specification & Design Languages.
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.
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 The Component Interaction Domain: Modeling Event-Driven and Demand- Driven Applications.
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.
Models of Computation as Program Transformations Chris Chang
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2003 Universität Dortmund Actual design flows and tools.
Composing Models of Computation in Kepler/Ptolemy II
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
CS 5991 Presentation Ptolemy: A Framework For Simulating and Prototyping Heterogeneous Systems.
T imed Languages for Embedded Software Ethan Jackson Advisor: Dr. Janos Szitpanovits Institute for Software Integrated Systems Vanderbilt University.
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, Boca Raton January 30, 2002

Mobies Phase 1 UC Berkeley 2 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 3 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

Mobies Phase 1 UC Berkeley 4 Subcontractors and Collaborators Subcontractor –Univ. of Maryland (C code generation) Collaborators –UCB Phase II –Kestrel –Vanderbilt –Penn Non-Mobies –The MathWorks –GSRC project (system-level IC design) –SEC program (Boeing, etc.)

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.

Mobies Phase 1 UC Berkeley 6 Actor View of Producer/Consumer Components Models of Computation: continuous-time dataflow rendezvous discrete events synchronous time-driven publish/subscribe …

Mobies Phase 1 UC Berkeley 7 Contrast with Object Orientation Call/return imperative semantics Concurrency is realized by ad-hoc calling conventions Patterns are supported by futures, proxies, monitors Object orientation emphasizes inheritance and procedural interfaces. Actor orientation emphasizes concurrency and communication abstractions.

Mobies Phase 1 UC Berkeley 8 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 9 Ptolemy II Domains Define the flow(s) of control –“execution model” –Realized by a Director class Define communication between components –“interaction model” –Realized by a Receiver class Emphasis of Ptolemy II is on methods and infrastructure for designing and building domains, understanding their semantics, and interfacing them heterogeneously.

Mobies Phase 1 UC Berkeley 10 Example Domains Time Driven (Giotto): –synchronous, time-driven multitasking – built for Mobies. Synchronous Data Flow (SDF): –stream-based communication, statically scheduled Discrete Event (DE): –event-based communication Continuous Time (CT): –continuous semantics, ODE solver simulation engine Synchronous/Reactive (SR): –synchronous, fixed point semantics Timed Multitasking (TM): –priority-driven multitasking, deterministic communication – built for SEC. Communicating Sequential Processes (CSP): –rendezvous-style communication Process Networks (PN): –asynchronous communication, determinism

Mobies Phase 1 UC Berkeley 11 Design Pattern: Periodic/Time-Driven Inside Continuous Time Giotto director indicates a new model of computation. Domain-polymorphic component. Domains can be nested and mixed.

Mobies Phase 1 UC Berkeley 12 Controller Heterogeneity Periodic, time-driven tasks Modes (normal & faulty) Controller task

Mobies Phase 1 UC Berkeley 13 Key to Domain Polymorphism: Receiver Object Model

Mobies Phase 1 UC Berkeley 14 Receiver Interface These polymorphic methods implement the communication semantics of a domain in Ptolemy II. The receiver instance used in communication is supplied by the director, not by the component.

Mobies Phase 1 UC Berkeley 15 Behavioral Types – Codification of Domain Semantics Capture the dynamic interaction of components in types Obtain benefits analogous to data typing. Call the result behavioral types. Communication has –data types –behavioral types Components have –data type signatures –domain type signatures Components are –data polymorphic –domain polymorphic

Mobies Phase 1 UC Berkeley 16 Second Version of a Behavioral Type System Based on interface automata –Proposed by de Alfaro and Henzinger –Concise composition (vs. standard automata) –Alternating simulation provides contravariance Compatibility checking –Done by automata composition –Captures the notion “components can work together” Alternating simulation (from Q to P) –All input steps of P can be simulated by Q, and –All output steps of Q can be simulated by P. –Provides the ordering we need for subtyping & polymorphism Key theorem about compatibility and alternating simulation

Mobies Phase 1 UC Berkeley 17 Example: Synchronous Dataflow (SDF) Consumer Actor Type Definition fRReturn from fire gget hThasToken ffire tToken hTTReturn True from hasToken hTFReturn False from hasToken Inputs: Outputs: Such actors are passive, and assume that input is available when they fire. execution interface communication interface

Mobies Phase 1 UC Berkeley 18 Type Definition – Synchronous Dataflow (SDF) Domain receiver interface director interface

Mobies Phase 1 UC Berkeley 19 Type Checking – Compose SDF Consumer Actor with SDF Domain Compose SDF Domain SDF Consumer Actor Interface automaton (IA) domain (by Yuhong Xiong) is used for experimentation.

Mobies Phase 1 UC Berkeley 20 Type Definition for Composition – SDF Consumer Actor in SDF Domain 1. receives token from producer interface to producer actor 2. accept token 3. internal action: fire consumer 4. internal action: call get() 5. internal action: get token 6. internal action: return from fire

Mobies Phase 1 UC Berkeley 21 Subtyping Relation Alternating Simulation: SDF  DE SDF Domain DE Domain  Partial order relation between behavioral types makes this a type system.

Mobies Phase 1 UC Berkeley 22 Summary of Behavioral Types Results We capture patterns of component interaction in a type system framework: behavioral types We describe interaction types and component behavior using interface automata. We do type checking through automata composition (detect component incompatibilities) Subtyping order is given by the alternating simulation relation, supporting polymorphism.

Mobies Phase 1 UC Berkeley 23 More Speculative We can reflect component dynamics in a run-time environment, providing behavioral reflection. –admission control –run-time type checking –fault detection, isolation, and recovery (FDIR) Timed interface automata may be able to model real-time requirements and constraints. –checking consistency becomes a type check –generalized schedulability analysis

Mobies Phase 1 UC Berkeley 24 Code Generation MoC semantics defines –flow of control across actors –communication protocols between actors Actors define: –functionality of components Actors are compiled by a MoC-aware compiler –generate specialized code for actors in context Hierarchy & heterogeneity: –Code generation at a level of the hierarchy produces a new actor definition We call this co-compilation. Multiple domains may be used in the same model

Mobies Phase 1 UC Berkeley 25 Integrated Code Generation Giotto codeE code Giotto compiler Java codeC code Java codeComponent Run time system

Mobies Phase 1 UC Berkeley 26 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 First version Ptolemy II Giotto code generator is implemented Domain was built for Mobies. Major part of the experiment was to interface this domain to others: CT above, FSM below for modal modeling, and SDF for task definition.

Mobies Phase 1 UC Berkeley 27 Modal Models – The FSM Domain Refines components in any domain –with CT, get hybrid systems –with Giotto, get on-line schedule customization –with SR, get statecharts semantics –with PN, get SDL-style semantics –… Design of Giotto domain was greatly simplified by leveraging the FSM domain. We improved the Giotto semantics by introducing modes with limited scope. We learned how to integrate Giotto with other MoCs.

Mobies Phase 1 UC Berkeley 28 Synchronous Dataflow (SDF) Preferred Domain for Task Definition Balance equations (one for each channel): F A N = F B M Scheduled statically Decidable resource requirements Available optimizations: eliminate checks for input data statically allocate communication buffers statically sequence actor invocations (and inline) send(0,t) get(0) token t NM A B Domains like Giotto, TM, orchestrate large-grain components. The components themselves need not be designed at the low level in C. They can be designed using other Ptolemy II domains.

Mobies Phase 1 UC Berkeley 29 Code Generation Objective 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. We aren’t there yet, but we have a plan…

Mobies Phase 1 UC Berkeley 30 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) –80% of SDF test suite passes –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 31 Actor Code is the Component Spec 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 32 Actor Definition: Caltrop 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 (Caltrop): –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 33 Summary of Accomplishments to Date Heterogeneous modeling –Domain polymorphism concept & realization –Behavioral type system –Giotto semantics & integration with other MoCs –Component definition principles (Caltrop) Code generation –Co-compilation concept –Giotto program generation –Java code generation from SDF 80% of SDF test suite passes –C code generation from Java Early phase, concept demonstration

Mobies Phase 1 UC Berkeley 34 Plans Midterm experiment –ETC and V2V models and code generators Complete actor definition framework –define the meta-semantics for domain-polymorphic actors Behavioral types –reflection –real-time properties as dependent types Complete SDF code generation –token unboxing –elimination of memory management –100% of test suite must pass Code generate Ptolemy II expressions –use of expression actor simplifies models 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