Process-Based Software Components Final Mobies Presentation

Similar documents
An Overview of the Ptolemy Project and Actor-Oriented Design

Actor-Oriented Design: Concurrent Models as Programs

Model-Based Design in the Ptolemy Project

The Ptolemy II Framework for Visual Languages

Component-Based Design of Embedded Control Systems

Advanced Tool Architectures. Edited and Presented by Edward A. Lee, Co-PI UC Berkeley. Tool Projects. Chess Review May 10, 2004 Berkeley, CA

Concurrent Models of Computation for Embedded Software

Embedded Software from Concurrent Component Models

Modal Models in Ptolemy

Process-Based Software Components. Subcontractors and Collaborators

Concurrent Component Patterns, Models of Computation, and Types

Hybrid System Modeling: Operational Semantics Issues

Giotto Domain. 5.1 Introduction. 5.2 Using Giotto. Edward Lee Christoph Kirsch

Actor-Oriented Design and The Ptolemy II framework

Future Directions. Edward A. Lee. Berkeley, CA May 12, A New Computational Platform: Ubiquitous Networked Embedded Systems. actuate.

System-Level Design Languages: Orthogonalizing the Issues

The Gigascale Silicon Research Center

Building Unreliable Systems out of Reliable Components: The Real Time Story

UC Berkeley Mobies Technology Project

The Future of the Ptolemy Project

Classes and Inheritance in Actor- Oriented Models

Hierarchical FSMs with Multiple CMs

Component-Based Design of Embedded Control Systems

The Ptolemy Project. Modeling and Design of Reactive Systems. Presenter: Praveen Murthy, PhD Postdoc and Presenter

Integration of OpenModelica in Ptolemy II

An Overview of the Ptolemy Project. Organizational

Ptolemy II The automotive challenge problems version 4.1

Overview of the Ptolemy Project

A PRIMITIVE EXECUTION MODEL FOR HETEROGENEOUS MODELING

SDF Domain. 3.1 Purpose of the Domain. 3.2 Using SDF Deadlock. Steve Neuendorffer

C Code Generation from the Giotto Model of Computation to the PRET Architecture

Interface Automata and Actif Actors

Advanced Tool Architectures

Concurrent Models of Computation

Discrete-Event Modeling and Design of Embedded Software

Scientific Workflows

Concurrent Models of Computation

Parameterized Modeling and Scheduling for Dataflow Graphs 1

VOLUME 1: INTRODUCTION TO PTOLEMY II. Document Version 3.0 for use with Ptolemy II 3.0 July 16, 2003

EE382N.23: Embedded System Design and Modeling

Integrated Design and Analysis Tools for Software Based Control Systems

SDL. Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 年 10 月 18 日. technische universität dortmund

Dynamic Dataflow Modeling in Ptolemy II. by Gang Zhou. Research Project

Simulation of LET Models in Simulink and Ptolemy

Actor-oriented Metaprogramming. Stephen Andrew Neuendorffer

Heterogeneous Concurrent Modeling and Design in Java (Volume 1: Introduction to Ptolemy II)

Concurrent Models of Computation for Embedded Software

Compositionality in Synchronous Data Flow: Modular Code Generation from Hierarchical SDF Graphs

A Code Generation Framework for Actor-Oriented Models with Partial Evaluation

DESIGN AND SIMULATION OF HETEROGENEOUS CONTROL SYSTEMS USING PTOLEMY II

Static Analysis of Actor Networks

Understandable Concurrency

VOLUME 1: INTRODUCTION TO PTOLEMY II. Document Version 5.0 for use with Ptolemy II 5.0 July 15, 2005

LabVIEW Based Embedded Design [First Report]

fakultät für informatik informatik 12 technische universität dortmund Data flow models Peter Marwedel TU Dortmund, Informatik /10/08

San Diego Supercomputer Center, UCSD, U.S.A. The Consortium for Conservation Medicine, Wildlife Trust, U.S.A.

A Code Generation Framework for Actor-Oriented Models with Partial Evaluation

By: Chaitanya Settaluri Devendra Kalia

Compositionality in system design: interfaces everywhere! UC Berkeley

Automatic Specialization of Actor-oriented Models in Ptolemy II by Stephen Neuendorffer. Research Project

The Problem with Treads

Fundamental Algorithms for System Modeling, Analysis, and Optimization

MODELING OF BLOCK-BASED DSP SYSTEMS

Heterogeneous Concurrent Modeling and Design in Java (Volume 1: Introduction to Ptolemy II)

System-Level Design Languages: Orthogonalizing the Issues. Kees Vissers

Course Development. Recall the Goal. Edited and Presented by Edward A. Lee, Co-PI UC Berkeley. Chess Review November 18, 2004 Berkeley, CA

Building Synchronous DataFlow graphs with UML & MARTE/CCSL

Modeling of Sensor Nets in Ptolemy II

Hierarchical Reconfiguration of Dataflow Models

FSMs & message passing: SDL

SysteMoC. Verification and Refinement of Actor-Based Models of Computation

Java Code Generation. Outline. Steve Neuendorffer UC Berkeley. Motivation Code generation architecture Component Specialization

Disciplined Concurrent Models of Computation for Parallel Software

Imperative model of computation

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

Model-Driven Development From Object-Oriented Design to Actor-Oriented Design

Overview of Dataflow Languages. Waheed Ahmad

Topics in Object-Oriented Design Patterns

Embedded Real-Time Systems

Specifications and Modeling

ESE532: System-on-a-Chip Architecture. Today. Process. Message FIFO. Thread. Dataflow Process Model Motivation Issues Abstraction Recommended Approach

Software Synthesis from Dataflow Models for G and LabVIEW

For 100% Result Oriented IGNOU Coaching and Project Training Call CPD TM : ,

fakultät für informatik informatik 12 technische universität dortmund Specifications Peter Marwedel TU Dortmund, Informatik /11/15

Classes and Subclasses in Actor-Oriented Design

Hierarchical Reconfiguration of Dataflow Models

METROII AND PTOLEMYII INTEGRATION. Presented by: Shaoyi Cheng, Tatsuaki Iwata, Brad Miller, Avissa Tehrani

Fusing Dataflow with Finite State Machines

Concurrent Semantics without the Notions of State or State Transitions

Engineering Structurally Configurable Models with Model Transformation

The Ptolemy Kernel Supporting Heterogeneous Design

Embedded Systems CS - ES

Node Prefetch Prediction in Dataflow Graphs

Dataflow Languages. Languages for Embedded Systems. Prof. Stephen A. Edwards. March Columbia University

Heterogeneous Design in Functional DIF

Balance between Formal and Informal Methods, Engineering and Artistry, Evolution and Rebuild

Modeling Stream-Based Applications using the SBF model of computation

The Distributed-SDF Domain

Concurrent Models of Computation

Lecture 2: Models of Computation

Transcription:

Process-Based Software Components Final Mobies Presentation Edward A. Lee Professor UC Berkeley PI Meeting, Savannah, GA January 21-23, 2004 PI: Edward A. Lee, 510-642-0455, eal@eecs.berkeley.edu Co-PI: Tom Henzinger, 510-643-2430, tah@eecs.berkeley.edu PM: John Bay Agent: Dale Vancleave, dale.vancleave@wpafb.af.mil Award end date: December, 2003 Contract number: F33615-00-C-1703 AO #: J655 Ptolemy Project Participants Director: Graduate Students: Edward A. Lee J. Adam Cataldo Chris Chang Staff: Elaine Cheong Christopher Hylands Sanjeev Kohli Susan Gardner (Chess) Xiaojun Liu Nuala Mansard Eleftherios D. Matsikoudis Mary P. Stewart Stephen Neuendorffer Neil E. Turner (Chess) James Yeh Yang Zhao Lea Turpin (Chess) Haiyang Zheng Postdocs,, Etc.: Rachel Zhou Joern Janneck, Postdoc Rowland R. Johnson, Visiting Scholar Kees Vissers,, Visiting Industrial Fellow Daniel Lázaro Cuadrado,, Visiting Scholar Lee, UC Berkeley 2

Project Goals and Problem Description 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. Lee, UC Berkeley 3 Where We Are Major Accomplishments Actor-oriented design Behavioral types Component specialization (vs. code generation) Hierarchical heterogeneous models Hierarchical modal models Hybrid systems operational semantics Hybrid system modeling and simulation with HSIF import Giotto and timed-multitasking models of computation Network integrated models (P&S, push-pull, discovery) Actor definition language principles Lee, UC Berkeley 4

Where We Are Going Current Efforts Actor-oriented classes, inheritance, interfaces and aspects Security with distributed and mobile models Higher-order components Model-based lifecycle management Behavioral and resource Interfaces for practical verification Modeling of Wireless Sensor nets Construction of Scientific Workflows Lee, UC Berkeley 5 Platforms big gap A platform is a set of designs. Relations between platforms represent design processes. Lee, UC Berkeley 6

Progress Many useful technical developments amounted to creation of new platforms. microarchitectures operating systems virtual machines processor cores configurable ISAs Lee, UC Berkeley 7 Desirable Properties From above: modeling expressiveness From below: correctness efficiency Lee, UC Berkeley 8

Model-Based Design Model-based design is specification of designs in platforms with useful modeling properties. Lee, UC Berkeley 9 Recent Action Giving the red platforms useful modeling properties (e.g. verification, SystemC, UML, MDA) Getting from red platforms to blue platforms (e.g. correctness, efficiency, synthesis of tools) Lee, UC Berkeley 10

Better Platforms Platforms with modeling properties that reflect requirements of the application, not accidental properties of the implementation. Lee, UC Berkeley 11 How to View This Design From above: Signal flow graph with linear, timeinvariant components. From below: Synchronous concurrent composition of components Lee, UC Berkeley 12

Embedded Platforms The modeling properties of these platforms are about the application problem, not about the implementation technology. Lee, UC Berkeley 13 Embedded Platforms The modeling properties of these platforms are about the application problem, not about the implementation technology. Lee, UC Berkeley 14

Actor-Oriented Platforms Actor oriented models compose concurrent components according to a model of computation. Time and concurrency become key parts of the programming model. Lee, UC Berkeley 15 Actor-Oriented Design Object orientation: class name data methods What flows through an object is sequential control call return Actor orientation: actor name data (state) parameters ports Input data Output data What flows through an object is streams of data Lee, UC Berkeley 16

Actor Orientation vs. Object Orientation Object oriented Actor oriented TextToSpeech initialize(): void notify(): void isready(): boolean getspeech(): double[] OO interface definition gives procedures that have to be invoked in an order not specified as part of the interface definition. actor-oriented interface definition says Give me text and I ll give you speech 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. Lee, UC Berkeley 17 But New Design Methods Need to Offer Best-Of-Class Methods Abstraction procedures/methods classes Modularity subclasses inheritance interfaces polymorphism aspects Correctness type systems Lee, UC Berkeley 18

Example of an Actor-Oriented Framework: Simulink basic abstraction mechanism is hierarchy. Lee, UC Berkeley 19 Less Conventional Actor-Oriented Framework: VisualSense model of a sensor node Based on Ptolemy II Connectivity is wireless Customized visualization Location-aware models Channel models include: packets losses power attenuation distance limitations collisions Component models include: Antenna gains Terrain models Jamming model of a channel Lee, UC Berkeley 20

Also Uses Hierarchy for Abstraction These 49 sensor nodes are actors that are instances of the same class, defined as: Lee, UC Berkeley 21 Observation By itself, hierarchy is a very weak abstraction mechanism. Lee, UC Berkeley 22

Tree Structured Hierarchy Does not represent common class definitions. Only instances. container hierarchical component container copy Multiple instances of the same hierarchical component are copies. leaf components: instances of an OO class Lee, UC Berkeley 23 Using Copies for Instances is Awkward Models become unmaintainable. Changes have be performed on all 49 copies of this: Lee, UC Berkeley 24

Alternative Hierarchy: Roles and Instances one definition, multiple containers class instance instance role hierarchy ( design-time view) instance hierarchy ( run time view) Lee, UC Berkeley 25 Role Hierarchy Multiple instances of the same hierarchical component are represented by classes with multiple containers. hierarchical class This makes hierarchical components are more similar to leaf components. Lee, UC Berkeley 26

Example Ptolemy II now supports a role hierarchy. Making these objects instances of a class rather than copies reduced the XML representation of the model from 1.1 Mbytes to 87 kbytes, and offered a number of other advantages. The definition below is a class and objects at the left are instances, not copies. Lee, UC Berkeley 27 Subclasses, Inheritance? Interfaces, Subtypes? Aspects? Now that we have classes, can we bring in more of the modern programming world? subclasses? inheritance? interfaces? subtypes? aspects? Lee, UC Berkeley 28

Actor Interfaces: Ports and Parameters input ports parameters: a 1 = value a 2 = value output port Example: p 1 p 2 p 3 input/output port port Lee, UC Berkeley 29 Subclasses? Inheritance? Interfaces? Subtypes? Aspects? Yes We Can! These are a part of what the Berkeley Center for Hybrid and Embedded Software Systems (Chess) is doing. Actor-oriented design: subclasses and inheritance hierarchical models that inherit structure from a base class interfaces and subtypes ports and parameters of actors form their interface aspects heterarchical models interweave multiple hierarchies, providing true multi-view modeling. All of these operate at the abstract syntax level, and are independent of the model of computation, and therefore can be used with any model of computation! Thus, they become available in domain-specific actor-oriented languages. Lee, UC Berkeley 30

Example A Simple Resource Interface EnergyConsumer interface has a single output port that produces a Double representing the energy consumed by a firing. Filter interface for a stream transformer component. in: Event energy: Double subtype relation in: Double out: Double in: Double EnergyConsumingFilter composed interface. out: Double power: Double Lee, UC Berkeley 31 Ethereal Sting OEP: Lessons on Dataflow Design Patterns Input data sequence, at samplingfrequency Hz Solution to E0 Challenge Problem E1 Challenge Problem Components Output data sequence, at detected baud rate. (not known apriori) Lee, UC Berkeley 32

SDF is More Flexible Than We Realized The Synchronous Dataflow (SDF) model of computation can be easily augmented to make it much more expressive without sacrificing static analyzability. Model-based lifecycle management can provide systematic ways to construct supervisory structures (resource management, task management). Lee, UC Berkeley 33 Dataflow Taxonomy Synchronous dataflow (SDF) Balance equation formalism Statically schedulable Decidable resource requirements Heterochronous Dataflow (HDF) Combines state machines with SDF graphs Very expressive, yet decidable Scheduling complexity can be high Boolean & Integer Dataflow (BDF, IDF) Balance equations are solved symbolically Turing-complete expressiveness Undecidable, yet often statically schedulable Process Networks (PN) Turing-complete expressiveness Undecidable (schedule and resource requirements) With higher-order components and modal models, SDF is sufficiently expressive for the SW radio OEP. Thread scheduling with interlocks provably executes with bounded resources when that is possible. Lee, UC Berkeley 34

SDF Principles Fixed production/consumption rates Balance equations (one for each channel): f A N = f B number of tokens consumed Schedulable statically number of firings per iteration Decidable: number of tokens produced buffer memory requirements deadlock M fire A { produce N } N channel M fire B { consume M } Lee, UC Berkeley 35 Undecidability: What SDF Avoids (Buck 93) Sufficient set of actors for undecidability: boolean functions on boolean tokens switch and select initial tokens on arcs 1 1 boolean function 1 b 1- b T F select 1 1 switch 1 1 T F b 1- b initial token Undecidable: deadlock bounded buffer memory existence of an annotated schedule Lee, UC Berkeley 36

Resampling Design Pattern Using Token Routing This pattern requires the use of a semantically richer dataflow model than SDF because the BooleanSwitch is not an SDF actor. This has a performance cost and reduces the static analyzability of the model. Lee, UC Berkeley 37 Resampling Design Pattern using Modal Models Uses transition refinements All SDF + FSM Can be captured in a higher-order component that makes the pattern easy to use. Lee, UC Berkeley 38

Scalability of Visual Syntaxes Iteration by Replication naïve approach: 8 tones 8 signal paths array in elements out hard to build hardwired scale distributor: converts an array of dimension 8 to a sequence of 8 tokens. Lee, UC Berkeley 39 Scalability of Visual Syntaxes Iteration by Dataflow Although sometimes useful, this design pattern has limitations: array size must be statically fixed actor to iterate must be stateless, or desired semantics must be to carry state across array elements Lee, UC Berkeley 40

Structured Programming in SDF A library of actors that encapsulate common design patterns: IterateOverArray: Serialize an array input and provide it sequentially to the contained actor. MapOverArray: Provide elements of an array input to distinct instances of the contained actor. Zip, Scan, Case, Like the higher-order functions of functional languages, but unlike functions, actors can have state. The implementation leverages the abstract semantics of Ptolemy II. Lee, UC Berkeley 41 Abstract Semantics The Key To Hierarchical Heterogeneity flow of control Initialization Execution Finalization communication Structure of signals Send/receive protocols preinitialize() declare static information, like type constraints, scheduling properties, temporal properties, structural elaboration initialize() initialize variables Lee, UC Berkeley 42

Abstract Semantics The Key To Hierarchical Heterogeneity flow of control Initialization Execution Finalization iterate() communication Structure of signals Send/receive protocols Lee, UC Berkeley 43 Abstract Semantics The Key To Hierarchical Heterogeneity flow of control Initialization Execution Finalization iterate() prefire() fire() postfire() communication Structure of signals Send/receive protocols stopfire() Lee, UC Berkeley 44

Lifecycle Management It is possible to hierarchically compose the Ptolemy II abstract semantics. Actors providing common patterns: RunCompositeActor is a composite actor that, instead of firing the contained model, executes a complete lifecycle of the contained model. ModelReference is an atomic actor whose function is provided by a complete execution of a referenced model in another file or URL. Provides systematic approach to building systems of systems. Lee, UC Berkeley 45 Hierarchical Composition of the Ptolemy II Abstract Semantics flow of control Initialization Execution Finalization iterate() prefire() fire() postfire() initialization Execution Finalization communication Structure of signals Send/receive protocols stopfire() Lee, UC Berkeley 46

Conclusion We aren t done yet Stay tuned Lee, UC Berkeley 47