Behavioral Types as Interface Definitions for Concurrent Components Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley.

Slides:



Advertisements
Similar presentations
Topic 2: Balance between formal and informal methods, engineering and artistry, evolution and rebuild Edward A. Lee Professor UC Berkeley Center for Hybrid.
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.
SRC ETAB Summer Study Colorado Springs, June 25-26, 2001 Model-Based Approaches to Embedded Software Design Edward A. Lee UC Berkeley & GSRC.
Overview of Ptolemy II Edward A. Lee Professor UC Berkeley October 9, 2003.
Chess Review May 8, 2003 Berkeley, CA Classes and Inheritance in Actor- Oriented Models Stephen Neuendorffer Edward Lee 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.
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.
Component-Based Design of Embedded Control Systems Luca Dealfaro Chamberlain Fong Tom Henzinger Christopher Hylands John Koo Edward A. Lee Jie Liu Xiaojun.
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.
6th Biennial Ptolemy Miniconference Berkeley, CA May 12, 2005 Ptolemy Project Status and Overview Edward A. Lee Ptolemy Project Director, UC Berkeley.
Modeling Heterogeneous Systems Edward Lee UC Berkeley Design for Safety Workshop NASA Ames Research Center Mountain View, CA 11 October, Design.
Are “Embedded Systems" Just Systems Made with Small Computers? Chess: Center for Hybrid and Embedded Software Systems Invited Talk Artist International.
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 12, 2009 Center for Hybrid and Embedded Software Systems Encapsulated Model Transformation Rule A transformation.
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
Defining Domains Edward A. Lee Professor, UC Berkeley Ptolemy Ptutorial, Feb. 12, 2007.
Model-Based Design in the Ptolemy Project A Chess Project Center for Hybrid and Embedded Software Systems Edward A. Lee UC Berkeley Presented at Boeing,
Mixing Models of Computation Jie Liu Palo Alto Research Center (PARC) 3333 Coyote Hill Rd., Palo Alto, CA joint work with Prof. Edward.
The Gigascale Silicon Research Center Edward A. Lee UC Berkeley The GSRC Semantics Project Tom Henzinger Luciano Lavagno Edward Lee Alberto Sangiovanni-Vincentelli.
Chess Review November 21, 2005 Berkeley, CA Edited and presented by Causality Interfaces and Compositional Causality Analysis Rachel Zhou UC Berkeley.
Hierarchical Reconfiguration of Dataflow Graphs Stephen Neuendorffer UC Berkeley Poster Preview May 10, 2004.
HAS. Patterns The use of patterns is essentially the reuse of well established good ideas. A pattern is a named well understood good solution to a common.
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.
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.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 PTIDES: A Programming Model for Time- Synchronized Distributed Real-time Systems Yang.
Process-Based Software Components Final Mobies Presentation Edward A. Lee Professor UC Berkeley PI Meeting, Savannah, GA January 21-23, 2004 PI: Edward.
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.
Embedded Software: Leveraging Concurrent Models of Computation Edward A. Lee Professor, UC Berkeley Center for Hybrid and Embedded Software Systems (CHESS)
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.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
An Overview of the Ptolemy Project and Actor-Oriented Design Edward A. Lee Professor UC Berkeley Center for Hybrid and embedded software systems OMG Technical.
Composing Models of Computation in Kepler/Ptolemy II
© 2005 Prentice Hall9-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
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.
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
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
TRUST:Team for Research in Ubiquitous Secure Technologies
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Presentation transcript:

Behavioral Types as Interface Definitions for Concurrent Components Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley Invited Talk NEXT TTA Workshop on the Specification of Linking Interfaces Oct Philadelphia, PA, USA

Chess, UC Berkeley, E. A. Lee 2 Object-Oriented Design An Approach to Component Interface Specification Interface is a collection of methods and their type signatures. UML static structure diagram Inheritance Implementation

Chess, UC Berkeley, E. A. Lee 3 Focus on Actor-Oriented Design Object orientation: class name data methods call return What flows through an object is sequential control Actor orientation: actor name data (state) ports Input data parameters Output data What flows through an object is streams of data

Chess, UC Berkeley, E. A. Lee 4 Actor Orientation vs. Object Orientation Identified problems with object orientation: –Says little or nothing about concurrency and time –Concurrency typically expressed with threads, monitors, semaphores –Components tend to implement low-level communication protocols –Re-use potential is disappointing Actor orientation offers more potential for useful modeling properties, and hence for model-based design. OO interface definition gives procedures that have to be invoked in an order not specified as part of the interface definition. TextToSpeech initialize(): void notify(): void isReady(): boolean getSpeech(): double[] actor-oriented interface definition says “Give me text and I’ll give you speech” Actor oriented Object oriented

Chess, UC Berkeley, E. A. Lee 5 Example of Actor-Oriented Design (in this case, with a visual syntax) Director from a library defines component interaction semantics Large, polymorphic component library. Ptolemy II example: Key idea: The model of computation is part of the framework within which components are embedded rather than part of the components themselves. Thus, components need to declare behavioral properties. Model of Computation: Messaging schema Flow of control Concurrency Component

Chess, UC Berkeley, E. A. Lee 6 Examples of Actor-Oriented Component Frameworks Simulink (The MathWorks) Labview (National Instruments) Modelica (Linkoping) OCP, open control platform (Boeing) GME, actor-oriented meta-modeling (Vanderbilt) Easy5 (Boeing) 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) …

Chess, UC Berkeley, E. A. Lee 7 Actor View of Producer/Consumer Components Models of Computation: push/pull continuous-time dataflow rendezvous discrete events synchronous time-driven publish/subscribe … Many actor-oriented frameworks assume a producer/consumer metaphor for component interaction.

Chess, UC Berkeley, E. A. Lee 8 Actor Orientation vs. Object Orientation Object Orientation –procedural interfaces –a class is a type (static structure) –type checking for composition –separation of interface from implementation –subtyping –polymorphism Actor Orientation –concurrent interfaces –a behavior is a type –type checking for composition of behaviors –separation of behavioral interface from implementation –behavioral subtyping –behavioral polymorphism This is a vision of the future: Few actor- oriented frameworks fully offer this view. Eventually, all will. Focus on this

Chess, UC Berkeley, E. A. Lee 9 Polymorphism Data polymorphism: –Add numbers (int, float, double, Complex) –Add string (concatenation) –Add composite types (arrays, records, matrices) –Add user-defined types Behavioral polymorphism: –In dataflow, add when all connected inputs have data –In a time-triggered model, add when the clock ticks –In discrete-event, add when any connected input has data, and add in zero time –In process networks, execute an infinite loop in a thread that blocks when reading empty inputs –In CSP, execute an infinite loop that performs rendezvous on input or output –In push/pull, ports are push or pull (declared or inferred) and behave accordingly –In real-time CORBA, priorities are associated with ports and a dispatcher determines when to add By not choosing among these when defining the component, we get a huge increment in component re- usability. But how do we ensure that the component will work in all these circumstances?

Chess, UC Berkeley, E. A. Lee 10 Object-Oriented Approach to Achieving Behavioral Polymorphism 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. Recall: Behavioral polymorphism is the idea that components can be defined to operate with multiple models of computation and multiple middleware frameworks.

Chess, UC Berkeley, E. A. Lee 11 Behavioral Polymorphism The Object Oriented View Interface Implementation

Chess, UC Berkeley, E. A. Lee 12 But What If… The component requires data at all connected input ports? The component can only perform meaningful operations on 2 successive inputs? The component can produce meaningful output before the input is known (enabling it to break potential deadlocks)? The component has a mutex monitor with another component (e.g. to access a common hardware resource)? None of these is expressed in the object-oriented interface definition, yet each can interfere with behavioral polymorphism.

Chess, UC Berkeley, E. A. Lee 13 Behavioral Types – A Practical Approach 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 –behavioral type signatures Components are –data polymorphic –behaviorally polymorphic See Liskov & Wing, ACM, 1994 for an intro to behavioral types.

Chess, UC Berkeley, E. A. Lee 14 Behavioral Type System execution interface communication interface A type signature for a consumer actor. We capture patterns of component interaction in a type system framework. We describe interaction types and component behavior using extended interface automata (de Alfaro & Henzinger) We do type checking through automata composition (detect component incompatibilities) Subtyping order is given by the alternating simulation relation, supporting behavioral polymorphism. These behavioral types are an example of an interface theory (Henzinger, et al).

Chess, UC Berkeley, E. A. Lee 15 Enabled by a Behavioral Type System Checking behavioral compatibility of components that are composed. Checking behavioral compatibility of components and their frameworks. Behavioral subclassing enables interface/implementation separation. Helps with the definition of behaviorally- polymorphic components.

Chess, UC Berkeley, E. A. Lee 16 Enabled by Behavioral Polymorphism (1): More Re-Usable Component Libraries UML package diagram of key actor libraries included with Ptolemy II. Data polymorphic components Behaviorally polymorphic components

Chess, UC Berkeley, E. A. Lee 17 Enabled by Behavioral Polymorphism (2): Hierarchical Heterogeneity Giotto director indicates a new model of computation. Domain-polymorphic component. Domains can be nested and mixed.

Chess, UC Berkeley, E. A. Lee 18 Enabled by Behavioral Polymorphism (3): Modal Models Periodic, time-driven tasks Modes (normal & faulty) Controller task

Chess, UC Berkeley, E. A. Lee 19 Enabled by Behavioral Polymorphism (4): Mobile Models Model-based distributed task management: MobileModel actor accepts a StringToken containing an XML description of a model. It then executes that model on a stream of input data. PushConsumer actor receives pushed data provided via CORBA, where the data is an XML model of a signal analysis algorithm. Authors: Yang Zhao Steve Neuendorffer Xiaojun Liu Data and behavioral type safety will help make such models secure

Chess, UC Berkeley, E. A. Lee 20 Conclusion – What to Remember Actor-oriented design –concurrent components interacting via ports Models of computation –principles of component interaction Behavioral types –a practical approach to verification and interface definition Behavioral polymorphism –defining components for use in multiple contexts