Modeling Heterogeneous Systems Edward Lee UC Berkeley Design for Safety Workshop NASA Ames Research Center Mountain View, CA 11 October, 2000 - Design.

Slides:



Advertisements
Similar presentations
Modelos de Computação Básicos Prof. Dr. César Augusto Missio Marcon Parcialmente extraído de trabalhos de Axel Jantch, Edward Lee e Alberto Sangiovanni-Vincentelli.
Advertisements

Discrete Event Models: Getting the Semantics Right Edward A. Lee Robert S. Pepper Distinguished Professor Chair of EECS UC Berkeley With thanks to Xioajun.
Discrete-Event Modeling and Design of Embedded Software Edward Lee UC Berkeley Workshop on Discrete Event Systems WODES 2000 Ghent, Belgium August,
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.
Overview of PTIDES Project
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.
Component Technologies for Embedded Systems Johan Eker.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,
SRC ETAB Summer Study Colorado Springs, June 25-26, 2001 Model-Based Approaches to Embedded Software Design Edward A. Lee UC Berkeley & GSRC.
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.
February 11, 2010 Center for Hybrid and Embedded Software Systems Ptolemy II - Heterogeneous Concurrent Modeling and Design.
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.
6th Biennial Ptolemy Miniconference Berkeley, CA May 12, 2005 Operational Semantics of Hybrid Systems Haiyang Zheng and Edward A. Lee With contributions.
System-Level Design Languages: Orthogonalizing the Issues Edward A. Lee UC Berkeley The GSRC Semantics Project Tom Henzinger Luciano Lavagno Edward Lee.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
Chess Review May 11, 2005 Berkeley, CA Operational Semantics of Hybrid Systems Haiyang Zheng and Edward A. Lee With contributions from the Ptolemy group.
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.
Discrete Event Models: Getting the Semantics Right Edward A. Lee Robert S. Pepper Distinguished Professor Chair of EECS UC Berkeley With special thanks.
MoBIES PI-Meeting, July 2001, Jackson Hole Controller Design Using Multiple Models of Computation Edward Lee Johan Eker with thanks to Paul Griffiths,
Hierarchical Reconfiguration of Dataflow Graphs Stephen Neuendorffer UC Berkeley Poster Preview May 10, 2004.
Run-Time Models for Measurement & Control Systems and Their Support in Ptolemy II Jie Liu EECS, UC Berkeley 9/13/2000 Agilent Technologies.
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.
Chess Review May 11, 2005 Berkeley, CA Discrete-Event Systems: Generalizing Metric Spaces and Fixed-Point Semantics Adam Cataldo Edward Lee Xiaojun Liu.
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.
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.
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.
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.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
Embedded Software: Building the Foundations Edward A. Lee Professor, Chair of EE, and Associate Chair of EECS CHESS: Center for Hybrid and Embedded Software.
What’s Ahead for Embedded Software? - Edward A. Lee (2000) Wednesday November 10, 2010 Hokeun Kim.
Composing Models of Computation in Kepler/Ptolemy II
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
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.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
Ptolemy & Models of Computation -by Hao Chen, Zhuang Fan, Jin Xiao School of Computer Science University of Waterloo Claudius Ptolemaeus, the second century.
Actor Oriented Programming with CAL -designing embedded system components Johan Eker Department of Automatic Control, Lund University Chris Chang, Jörn.
What’s Ahead for Embedded Software? (Wed) Gilsoo Kim
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
Embedded System Design Specifications and Modeling
Retargetable Model-Based Code Generation in Ptolemy II
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Embedded Systems: A Focus on Time
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Hybrid and Embedded Systems: Generalized Hybrid Systems
Presentation transcript:

Modeling Heterogeneous Systems Edward Lee UC Berkeley Design for Safety Workshop NASA Ames Research Center Mountain View, CA 11 October, Design for Understanding -

Edward A. Lee, UC Berkeley actuator controller Br Acc Ba vehicle model vehicle dynamics sensor S Components and Composition modes

Edward A. Lee, UC Berkeley Common Approaches Threads or processes – Sun says in the on-line Java tutorial: “The first rule of using threads is this: avoid them if you can. Threads can be difficult to use, and they tend to make programs harder to debug.” Semaphores, monitors, mutex – Deadlock, livelock, liveness – hard to understand Priorities, deadlines – Plug and pray

Edward A. Lee, UC Berkeley Understanding Component Interactions - Frameworks What is a component (ontology)? – States? Processes? Threads? Differential equations? Constraints? Objects (data + methods)? What knowledge do components share (epistemology)? – Time? Name spaces? Signals? State? How do components communicate (protocols)? – Rendezvous? Message passing? Continuous-time signals? Streams? Method calls? What do components communicate (lexicon)? – Objects? Transfer of control? Data structures? ASCII text?

Edward A. Lee, UC Berkeley A Laboratory for Exploring Component Frameworks Ptolemy II – – Java based, network integrated – Several frameworks implemented – A realization of a framework is called a “domain.” Multiple domains can be mixed hierarchically in the same model.

Edward A. Lee, UC Berkeley action { … read(); … } One Class of Component Interaction Semantics: Producer / Consumer action { … write(); … } channel port receiver Are actors active? passive? reactive? Flow of control is mediated by a director. Are communications timed? synchronized? buffered? Communications are mediated by receivers.

Edward A. Lee, UC Berkeley Domain – A Realization of a Component Framework CSP – concurrent threads with rendezvous CT – continuous-time modeling DE – discrete-event systems DT – discrete time (cycle driven) PN – process networks PN’ – Petri nets SDF – synchronous dataflow SR – synchronous/reactive PS – publish-and-subscribe Each of these defines a component ontology and an interaction semantics between components. There are many more possibilities! Each is realized as a director and a receiver class in Ptolemy II

Edward A. Lee, UC Berkeley 1. Continuous Time (Coupled ODEs) Semantics: – actors define relations between functions of time (ODEs or algebraic equations) – a behavior is a set of signals satisfying these relations Examples: Spice, HP ADS, Simulink, Saber, Matrix X, …

Edward A. Lee, UC Berkeley 1. Continuous Time in Ptolemy II The continuous time (CT) domain in Ptolemy II models components interacting by continuous-time signals. A variable- step size, Runge- Kutta ODE solver is used, augmented with discrete-event management (via modeling of Dirac delta functions).

Edward A. Lee, UC Berkeley 1. CT: Strengths and Weaknesses Strengths: – Accurate model for many physical systems – Determinate under simple conditions – Established and mature (approximate) simulation techniques Weaknesses: – Covers a narrow application domain – Tightly bound to an implementation – Relatively expensive to simulate – Difficult to implement in software

Edward A. Lee, UC Berkeley 2. Discrete Time Semantics: – blocks are relations between functions of discrete time (difference equations) – a behavior is a set of signals satisfying these relations Examples: System C HP Ptolemy, SystemView,...

Edward A. Lee, UC Berkeley 2. DT: Strengths and Weaknesses Strengths: – Useful model for embedded DSP – Determinate under simple conditions – Easy simulation (cycle-based) – Easy implementation (circuits or software) Weaknesses: – Covers a narrow application domain – Global synchrony may overspecify some systems

Edward A. Lee, UC Berkeley 3. Discrete Events Examples: SES Workbench, Bones, VHDL Verilog... Semantics: – Events occur at discrete points on a time line that is often a continuum. The components react to events in chronological order. time events

Edward A. Lee, UC Berkeley 3. Discrete-Events in Ptolemy II The discrete-event (DE) domain in Ptolemy II models components interacting by discrete events placed in time. A calendar queue scheduler is used for efficient event management, and simultaneous events are handled systematically and deterministically.

Edward A. Lee, UC Berkeley 3. DE: Strengths and Weaknesses Strengths: – Natural for asynchronous digital hardware – Global synchronization – Determinate under simple conditions – Simulatable under simple conditions Weaknesses: – Expensive to implement in software – May over-specify and/or over-model systems

Edward A. Lee, UC Berkeley Mixing Domains Example: MEMS Accelerometer M. A. Lemkin, “Micro Accelerometer Design with Digital Feedback Control”, Ph.D. dissertation, EECS, University of California, Berkeley, Fall 1997

Edward A. Lee, UC Berkeley Accelerometer Applet This model mixes two Ptolemy II domains, DE (discrete events) and CT (continuous time).

Edward A. Lee, UC Berkeley Hierarchical Heterogeneous Models Continuous-time model Discrete-event model

Edward A. Lee, UC Berkeley Hierarchical Heterogeneity vs. Amorphous Heterogeneity Color is a domain, which defines both the flow of control and interaction protocols. Hierarchical Color is a communication protocol only, which interacts in unpredictable ways with the flow of control. Amorphous

Edward A. Lee, UC Berkeley 4. Synchronous/Reactive Models A discrete model of time progresses as a sequence of “ticks.” At a tick, the signals are defined by a fixed point equation: A C B Examples: Esterel, Lustre, Signal, Argos,...

Edward A. Lee, UC Berkeley 4. SR: Strengths and Weaknesses Strengths: – Good match for control-intensive systems – Tightly synchronized – Determinate in most cases – Maps well to hardware and software Weaknesses: – Computation-intensive systems are overspecified – Modularity is compromised – Causality loops are possible – Causality loops are hard to detect

Edward A. Lee, UC Berkeley 5. Process Networks Processes are prefix- monotonic functions mapping sequences into sequences. One implementation uses blocking reads, non-blocking writes, and unbounded FIFO channels. Dataflow special cases have strong formal properties. A C B process channel stream Examples: SDL, Unix pipes,...

Edward A. Lee, UC Berkeley 5. Strengths and Weaknesses Strengths: – Loose synchronization (distributable) – Determinate under simple conditions – Implementable under simple conditions – Maps easily to threads, but much easier to use – Turing complete (expressive) Weaknesses: – Control-intensive systems are hard to specify – Bounded resources are undecidable

Edward A. Lee, UC Berkeley 6. Rendezvous Models Events represent rendezvous of a sender and a receiver. Communication is unbuffered and instantaneous. Often implicitly assumed with “process algebra” or even “concurrent.” A C B process events Examples: CSP, CCS, Occam, Lotos,...

Edward A. Lee, UC Berkeley 6. Strengths and Weaknesses Strengths: – Models resource sharing well – Partial-order synchronization (distributable) – Supports naturally nondeterminate interactions Weaknesses: – Oversynchronizes some systems – Difficult to make determinate (and useful)

Edward A. Lee, UC Berkeley Making Sense of the Options: Component Interfaces actor represent interaction semantics as types on these ports. represent data types for messages exchanged on ports. classical type system system-level types

Edward A. Lee, UC Berkeley Approach – System-Level Types General String Scalar Boolean Complex Double Long Int NaT actor represent interaction semantics as types on these ports. A classical type system is based on fixed-points of monotonic functions on a lattice where order represents subclassing. Our system-level types are use the simulation relation between automata to provide an order relation.

Edward A. Lee, UC Berkeley Our Hope – Domain Polymorphic Interfaces actor domain polymorphic interfaces

Edward A. Lee, UC Berkeley Benefits of System-Level Types Clarify assumptions of components Understandable component composition Data polymorphic component libraries Domain polymorphic component libraries More efficient synthesis (?)

Edward A. Lee, UC Berkeley *Charts: Exploiting Domain Polymorphism A C D B x y z G F E x y z G F E FSM domain Modal model XXX domain YYY domain Domain-polymorphic component interface

Edward A. Lee, UC Berkeley Special Case: Hybrid Systems The stickiness is exponentially decaying with respect to time. Example: Two point masses on springs on a frictionless table. They collide and stick together.

Edward A. Lee, UC Berkeley Hybrid System: Block Diagram FSM domain CT domain CT

Edward A. Lee, UC Berkeley Ptolemy II Execution Because of domain polymorphism, moreover, Ptolemy II can combine FSMs hierarchically with any other domain, delivering models like statecharts (with SR) and SDL (with process networks) and many other modal modeling techniques.

Edward A. Lee, UC Berkeley Summary There is a rich set of component interaction models – models of computation – domains Hierarchical heterogeneity – yields more understandable designs than amorphous heterogeneity System-level types – Define the dynamics of a component interface Domain polymorphism – More flexible component libraries – A very powerful approach to heterogeneous modeling

Edward A. Lee, UC Berkeley Acknowledgements The entire Ptolemy project team contributed immensely to this work, but particularly – John Davis – Chamberlain Fong – Tom Henzinger – Christopher Hylands – Jie Liu – Xiaojun Liu – Steve Neuendorffer – Sonia Sachs – Neil Smyth – Kees Vissers – Yuhong Xiong