UC Berkeley Mobies Technology Project PI: Edward Lee CoPI: Tom Henzinger Process-Based Software Components for Networked Embedded Systems.

Slides:



Advertisements
Similar presentations
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
Advertisements

DATAFLOW PROCESS NETWORKS Edward A. Lee Thomas M. Parks.
Discrete-Event Modeling and Design of Embedded Software Edward Lee UC Berkeley Workshop on Discrete Event Systems WODES 2000 Ghent, Belgium August,
ACM SIGPLAN 2001 Workshop on Languages, Compilers, and Tools for Embedded Systems (LCTES'2001) Jun 22-23, 2001, Snowbird, Utah, USA Embedded Software from.
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.
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.
Ptolemy II - Heterogeneous Modeling and Design in Java The Ptolemy project studies modeling, simulation, and design of concurrent, real-time, embedded.
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.
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.
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.
UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI CHESS Review May 10, 2004 Berkeley, CA Model-Based Design Edited by Janos Sztipanovits,
System-Level Design Languages: Orthogonalizing the Issues Edward A. Lee UC Berkeley The GSRC Semantics Project Tom Henzinger Luciano Lavagno Edward Lee.
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.
3/12/ Modeling and controlling the Caltech Ducted Fan Vehicle Steve Neuendorffer, Ptolemy Group, UC Berkeley.
An Extensible Type System for Component-Based Design
Defining Domains Edward A. Lee Professor, UC Berkeley Ptolemy Ptutorial, Feb. 12, 2007.
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.
Chess Review November 21, 2005 Berkeley, CA Edited and presented by Causality Interfaces and Compositional Causality Analysis Rachel Zhou UC Berkeley.
MoBIES PI-Meeting, July 2001, Jackson Hole Controller Design Using Multiple Models of Computation Edward Lee Johan Eker with thanks to Paul Griffiths,
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.
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.
Tool Integration of Ptolemy II EE290N Class Project Haiyang Zheng May
Panel: What Comes After C++ in System-Level Specification Edward Lee UC Berkeley Forum on Design Languages Workshop on System Specification & Design Languages.
P t o l e m y A Framework For Simulating and Prototyping Heterogeneous Systems by Joseph Buck, Soonhoi Ha, Edward A. Lee & David G. Messerschmitt P r e.
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.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
What’s Ahead for Embedded Software? - Edward A. Lee (2000) Wednesday November 10, 2010 Hokeun Kim.
Composing Models of Computation in Kepler/Ptolemy II
Introduction to Object Oriented Programming CMSC 331.
C. André, J. Boucaron, A. Coadou, J. DeAntoni,
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Ptolemy & Models of Computation -by Hao Chen, Zhuang Fan, Jin Xiao School of Computer Science University of Waterloo Claudius Ptolemaeus, the second century.
PTII Model  VHDL Codegen Verification Project Overview 1.Generate VHDL descriptions for Ptolemy models. 2.Maintain bit and cycle accuracy in implementation.
What’s Ahead for Embedded Software? (Wed) Gilsoo Kim
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.
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Code Generation for Ptolemy II
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:

UC Berkeley Mobies Technology Project PI: Edward Lee CoPI: Tom Henzinger Process-Based Software Components for Networked Embedded Systems

Example:An Automotive Active-Suspension System Vehicle Dynamic DSP RAM mP ASIC I/O DXL Hydraulic Actuator Road Surface Steering Breaking Acceleration... Discrete-Event Continuous-Time Finite State Machine Heterogeneous Modeling

Discrete Event Continuous Time Finite State Machine physical environment, analog circuits, sensors/actuators, … digital circuit, real-time software, … control sequences, operation modes,... Continuous & Discrete Dynamics

Actuator controller Br Acc Ba car model vehicle dynamics DXL S Components and Composition

Abstract Syntax for Component-Based Design hierarchy connectivity

Not Abstract Syntax Semantics of component interactions Type system File format (a concrete syntax) API (another concrete syntax) An abstract syntax is the logical structure of a design. What are the pieces, and how are they related?

The GSRC Abstract Syntax Models hierarchical connected components – block diagrams, object models, state machines, … – abstraction and refinement – recursive constructs Supports classes and instances – object models – inheritance – static and instance variables Specified by concrete syntaxes – sets and functions – UML object model – XML file format

Abstract Syntax Object Model Constraints (in OCL?): Links do not cross levels of hierarchy If interface i is derived from j then it inherits its ports and properties An instance hierarchy has only singleton entities. A role hierarchy has some non-singleton entities.

Component Semantics Entities are: States? Processes? Threads? Differential equations? Constraints? Objects?

process { … read(); … } One Class of Semantic Models: Producer / Consumer process { … write(); … } channel port receiver Are actors active? passive? reactive? Are communications timed? synchronized? buffered?

Domains – Provide semantic models for component interactions CSP – concurrent threads with rendezvous CT – continuous-time modeling DE – discrete-event systems DT – discrete time (cycle driven) PN – process networks 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!

Component Interfaces Represent not just data types, but interaction types as well. value conversionbehavior conversion

Approach – System-Level Types General String Scalar Boolean Complex Double Long Int NaT actor represent interaction semantics as types on these ports. Need a new type lattice representing subclassing & ad-hoc convertibility.

Type Lattice Simulation relation Achievable properties: Strong typing Polymorphism Propagation of type constraints User-defined types Reflection

SDF Receiver Type Signature Input alphabet: g: get p: put h: hasToken Output alphabet: 0: false 1: true t: token v: void e: exception

DE Receiver Type Signature Input alphabet: g: get p: put h: hasToken Output alphabet: 0: false 1: true t: token v: void e: exception Put does not necessarily result in immediate availability of the data. This automaton simulates the previous one

System-Level Types Declare dynamic properties of component interfaces Declare timing properties of component interfaces Benefits: Ensure component compatibility Clarify interfaces Provide the vocabulary for design patterns Detect errors sooner Promote modularity Promote polymorphic component design

Our Hope – Polymorphic Interfaces actor polymorphic interfaces

More Common Approach – Interface Synthesis actor protocol adapter rigid, pre-defined interfaces

Ptolemy II – A Starting Point? Ptolemy II – – Java based, network integrated – Many domains implemented – Multi-domain modeling – XML syntax for persistent data – Block-diagram GUI – Extensible type system – Code generator on the way

Type System Infrastructure Ptolemy II has an extensible type system infrastructure with a plug-in interface for specifying a type lattice. At the left, an applet illustrates type resolution over a (simplified) type lattice representing data types exchanged between actors.

Nascent Generator Infrastructure Domain semantics defines communication, flow of control Ptolemy II model scheduler Schedule: - fire Gaussian0 - fire Ramp1 - fire Sine2 - fire AddSubtract5 - fire SequenceScope10 parser method call if block method call block code generator … for (int i = 0; i < plus.getWidth(); i++) { if (plus.hasToken(i)) { if (sum == null) { sum = plus.get(i); } else { sum = sum.add(plus.get(i)); } … All actors will be given in Java, then translated to embedded Java, C, VHDL, etc. target code abstract syntax tree First version created by Jeff Tsay.

Generator Approach Actor libraries are built and maintained in Java – more maintainable, easier to write – polymorphic libraries are rich and small Java + Domain translates to target language – concurrent and imperative semantics Efficiency gotten through code transformations – specialization of polymorphic types – code substitution using domain semantics – removal of excess exception handling

Code transformations (on AST) // Original actor source Token t1 = in.get(0); Token t2 = in.get(1); out.send(0, t1.multiply(t2)); specialization of Token declarations // With specialized types IntMatrixToken t1 = in.get(0); IntMatrixToken t2 = in.get(1); out.send(0, t1.multiply(t2)); The Ptolemy II type system supports polymorphic actors with propagating type constraints and static type resolution. The resolved types can be used in optimized generated code. See Jeff Tsay, A Code Generation Framework for Ptolemy II

Code transformations (on AST) transformation using domain semantics // With specialized types IntMatrixToken t1 = in.get(0); IntMatrixToken t2 = in.get(1); out.send(0, t1.multiply(t2)); Domain-polymorphic code is replaced with specialized code. Extended Java (from Titanium project) treats arrays as primitive types. // Extended Java with specialized communication int[][] t1 = _inbuf[0][_inOffset = (_inOffset+1)%5]; int[][] t2 = _inbuf[1][_inOffset = (_inOffset+1)%5]; _outbuf[_outOffset = (_outOffset+1)%8] = t1 + t2; See Jeff Tsay, A Code Generation Framework for Ptolemy II

Code transformations (on AST) convert extended Java to ordinary Java // Extended Java with specialized communication int[][] t1 = _inbuf[0][_inOffset = (_inOffset+1)%5]; int[][] t2 = _inbuf[1][_inOffset = (_inOffset+1)%5]; _outbuf[_outOffset = (_outOffset+1)%8] = t1 + t2; // Specialized, ordinary Java int[][] t1 = _inbuf[0][_inOffset = (_inOffset+1)%5]; int[][] t2 = _inbuf[1][_inOffset = (_inOffset+1)%5]; _outbuf[_outOffset = (_outOffset+1)%8] = IntegerMatrixMath.multiply(t1, t2); See Jeff Tsay, A Code Generation Framework for Ptolemy II

Near-Term Goals Interface definitions for relevant domains – Those with potential for real-time execution Abstraction of real-time properties – requirements and performance Evolution of generator infrastructure – Demonstrate synthesis of embedded Java Explore real-time Java – Better safety, network integration

Process Website shared with Phase II Berkeley project – mailing list with archiving – discussion forums – CVS archive Quasi-weekly meetings – Comparing software architectures – Comparing approaches Software – nightly builds – automated test suite – design and code reviews – UML modeling Embedded systems lab – Construction starts in July