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.

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

Rule Based Operational Semantics Specification in Ptolemy Yanwar Asrigo COMP 763B - Modeling and Simulation Based Design 30 th April 2008.
DATAFLOW PROCESS NETWORKS Edward A. Lee Thomas M. Parks.
Discrete Event Models: Getting the Semantics Right Edward A. Lee Robert S. Pepper Distinguished Professor Chair of EECS UC Berkeley With thanks to Xioajun.
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.
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
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.
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.
Ptolemy Miniconference May 9, 2003 Berkeley, CA Ptolemy Project Status and Overview Edward A. Lee Professor Ptolemy Project Director.
February 11, 2010 Center for Hybrid and Embedded Software Systems Ptolemy II - Heterogeneous Concurrent Modeling and Design.
Causality Interface  Declares the dependency that output events have on input events.  D is an ordered set associated with the min ( ) and plus ( ) operators.
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.
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.
Actor-Oriented Design: A focus on domain-specific languages for embedded systems Edward A. Lee Professor, UC Berkeley Director, Center for Hybrid and Embedded.
Unified Modeling (Part I) Overview of UML & Modeling
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.
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,
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.
Balancing Expressiveness and Analyzability in Stream Formalisms Edward A. Lee Robert S. Pepper Distinguished Professor EECS Department, UC Berkeley Invited.
Chess Review November 21, 2005 Berkeley, CA Edited and presented by Causality Interfaces and Compositional Causality Analysis Rachel Zhou UC Berkeley.
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 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.
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.
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)
Ptolemy Project 1 Streaming Models of Computation in The Ptolemy Project Edward A. Lee Professor UC Berkeley Workshop on Streaming Systems, Endicott House,
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.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Voicu Groza, 2008 SITE, HARDWARE/SOFTWARE CODESIGN OF EMBEDDED SYSTEMS Hardware/Software Codesign of Embedded Systems Voicu Groza SITE Hall, Room.
Composing Models of Computation in Kepler/Ptolemy II
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.
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.
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,
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
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:

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 Meeting Feb. 4, 2004 Anaheim, CA, USA Special thanks to the entire Ptolemy Team.

Lee, UC Berkeley 2 Abstract The Ptolemy Project at UC Berkeley studies modeling, simulation, and design of concurrent, real-time, and embedded systems. The focus is on assembly of concurrent components under "actor-oriented" models of computation, where components are conceptually concurrent and communicate through one of several messaging schemas. This talk describes the principles of actor-oriented design, including common features across models of computation, such as abstract syntax and type systems, and features that differ across models of computation, such concurrent threads of control and messaging schemas. Mechanisms that support the use of heterogeneous mixtures of models of computation are also described. The Ptolemy II system, which is the experimental framework used by the project in its investigations, will be described and used to illustrate key points. The Ptolemy Project at UC Berkeley is part of Chess, the Berkeley Center for Hybrid and Embedded Software Systems.

Lee, UC Berkeley 3 Ptolemy Project Participants Director: Edward A. Lee Staff: Christopher Hylands Susan Gardner (Chess) Nuala Mansard Mary P. Stewart Neil E. Turner (Chess) Lea Turpin (Chess) Postdocs, Etc.: Joern Janneck, Postdoc Rowland R. Johnson, Visiting Scholar Kees Vissers, Visiting Industrial Fellow Daniel L á zaro Cuadrado, Visiting Scholar Graduate Students: J. Adam Cataldo Chris Chang Elaine Cheong Sanjeev Kohli Xiaojun Liu Eleftherios D. Matsikoudis Stephen Neuendorffer James Yeh Yang Zhao Haiyang Zheng Rachel Zhou

Lee, UC Berkeley 4 Software Legacy of the Project Gabriel ( ) Written in Lisp Aimed at signal processing Synchronous dataflow (SDF) block diagrams Parallel schedulers Code generators for DSPs Hardware/software co-simulators Ptolemy Classic ( ) Written in C++ Multiple models of computation Hierarchical heterogeneity Dataflow variants: BDF, DDF, PN C/VHDL/DSP code generators Optimizing SDF schedulers Higher-order components Ptolemy II ( ) Written in Java Domain polymorphism Multithreaded Network integrated and distributed Modal models Sophisticated type system CT, HDF, CI, GR, etc. Each of these served us, first-and-foremost, as a laboratory for investigating design. PtPlot (1997-??) Java plotting package Tycho ( ) Itcl/Tk GUI framework Diva ( ) Java GUI framework Focus has always been on embedded software.

Lee, UC Berkeley 5 Ptolemy Classic Example From 1995 (adaptive nulling in an antenna array) Ptolemy application developed by Uwe Trautwein, Technical University of Ilmenau, Germany streams hierarchical components higher-order components

Lee, UC Berkeley 6 Ptolemy II Ptolemy II: Our current framework for experimentation with actor-oriented design, concurrent semantics, visual syntaxes, and hierarchical, heterogeneous design. Ptolemy II is truly free software (cf. GPL) Hierarchical component modal model dataflow controller example Ptolemy II model: hybrid control system

Lee, UC Berkeley 7 At Work in the Chess Software Lab Chess = Center for Hybrid and Embedded Software Systems

Lee, UC Berkeley 8 Platforms A platform is a set of designs. Relations between platforms represent design processes. big gap

Lee, UC Berkeley 9 Progress Many useful technical developments amounted to creation of new platforms. microarchitectures operating systems virtual machines processor cores configurable ISAs

Lee, UC Berkeley 10 Desirable Properties From above: modeling expressiveness From below: correctness efficiency

Lee, UC Berkeley 11 Model-Based Design Model-based design is specification of designs in platforms with “useful modeling properties.”

Lee, UC Berkeley 12 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 13 Better Platforms Platforms with modeling properties that reflect requirements of the application, not accidental properties of the implementation.

Lee, UC Berkeley 14 How to View This Design From above: Signal flow graph with linear, time- invariant components. From below: Synchronous concurrent composition of components

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

Lee, UC Berkeley 16 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

Lee, UC Berkeley 17 “Actors” vs. “Capsules” Actors are more like UML capsules than like UML actors The term “actors” was introduced in the 1970’s by Carl Hewitt of MIT to describe autonomous reasoning agents. The term evolved through the work of Gul Agha and others to refer to a family of concurrent models of computation, irrespective of whether they were being used to realize autonomous reasoning agents. The term “actor” has also been used since 1974 in the dataflow community in the same way, to represent a concurrent model of computation.

Lee, UC Berkeley 18 Abstract Syntax: Hierarchical Entities, Ports, Connections and Attributes Our abstract syntax choices: Hierarchy is tree structured (like XML). A relation mediates connections. Ports can link multiple relations and relations can link multiple ports. Ports mediate connections across levels of the hierarchy (no statecharts-style level-crossing links) … Abstract syntax defines the structure of a model, but says little about what it means.

Lee, UC Berkeley 19 MoML – An XML Concrete Syntax (Modeling Markup Language) MoML is the persistent file format of Ptolemy II.

Lee, UC Berkeley 20 Visual Renditions of Models Ptolemy II model rendered in Vergil, a visual editor:

Lee, UC Berkeley 21 Semantics of Producer/Consumer Components Models of Computation: continuous-time dataflow rendezvous discrete events synchronous time-driven publish/subscribe … This abstract syntax is compatible with many semantic interpretations. The concurrency and communication model together is what we call the model of computation (MoC).

Lee, UC Berkeley 22 Examples of Actor-Oriented Component Frameworks Simulink (The MathWorks) Labview (National Instruments) Modelica (Linkoping) Polis & Metropolis (UC Berkeley) 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) Easy5 (Boeing) Port-based objects (U of Maryland) I/O automata (MIT) VHDL, Verilog, SystemC (Various) … Unlike Ptolemy II, most of these define a fixed model of computation.

Lee, UC Berkeley 23 Ptolemy Project Principle Director from a library defines the model of computation MoC-polymorphic component library. The model of computation is not built in to the software framework.

Lee, UC Berkeley 24 Actor-Oriented Design is not One But Many Techniques A rich set of possible semantic and syntactic approaches, each with useful modeling and implementation properties.

Lee, UC Berkeley 25 Actor-Oriented Platforms Actor oriented models compose concurrent components according to a model of computation.

Lee, UC Berkeley 26 Examples of Models of Computation Dataflow Discrete events Continuous time Finite state machines Synchronous reactive Time driven Publish and subscribe Communicating sequential processes Process networks … Each of these has several competing variants

Lee, UC Berkeley 27 Start With Dataflow Computation graphs [Karp & Miller ] Visual programs [Sutherland – 1966] Process networks [Kahn ] Static dataflow [Dennis ] Dynamic dataflow [Arvind, 1981] Structured dataflow [Matwin & Pietrzykowski 1985] K-bounded loops [Culler, 1986] Synchronous dataflow [Lee & Messerschmitt, 1986] Structured dataflow [Kodosky, 1986] PGM: Processing Graph Method [Kaplan, 1987] Synchronous languages [Lustre, Signal, 1980’s] Well-behaved dataflow [Gao, 1992] Boolean dataflow [Buck and Lee, 1993] Multidimensional SDF [Lee, 1993] Cyclo-static dataflow [Lauwereins, 1994] Integer dataflow [Buck, 1994] Bounded dynamic dataflow [Lee and Parks, 1995] Heterochronous dataflow [Girault, Lee, & Lee, 1997] … Many tools, software frameworks, and hardware architectures have been built to support one or more of these.

Lee, UC Berkeley 28 Synchronous Dataflow (SDF) (Lee and Messerschmitt, 1986) SDF offers feedback, multirate, static scheduling, deadlock analysis, parallel scheduling, static memory allocation. SDF director

Lee, UC Berkeley 29 Synchronous Dataflow (SDF) Fixed Production/Consumption Rates Balance equations (one for each channel): Schedulable statically Get a well-defined “iteration” Decidable: buffer memory requirements deadlock fire B { … consume M … } fire A { … produce N … } channel N M number of tokens consumed number of firings per “iteration” number of tokens produced

Lee, UC Berkeley 30 Dynamic Dataflow (DDF) Actors have firing rules Set of finite prefixes on input sequences For determinism: No two such prefixes are joinable under a prefix order Firing function applied to finite prefixes yield finite outputs Scheduling objectives: Do not stop if there are executable actors Execute in bounded memory if this is possible Maintain determinacy if possible Policies that fail: Data-driven execution Demand-driven execution Fair execution Many balanced data/demand-driven strategies Policy that succeeds (Parks 1995): Execute with bounded buffers Increase bounds only when deadlock occurs key properties of DDF models are undecidable (deadlock, bounded memory, schedule)

Lee, UC Berkeley 31 Application of Dynamic Dataflow: Resampling of Streaming Media 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 32 Undecidability: What SDF Avoids (Buck ’93) Sufficient set of actors for undecidability: boolean functions on boolean tokens switch and select initial tokens on arcs Undecidable: deadlock bounded buffer memory existence of an annotated schedule boolean function select switch initial token b 1- b b T F T F

Lee, UC Berkeley 33 Resampling Design Pattern using Hierarchical Heterogeneity Hierarchically mixing synchronous dataflow with finite state machines offers a much more powerful model of computation than either alone. And everything remains decidable!

Lee, UC Berkeley 34 State Machines & Block Diagrams A C D B guard/action Sequential Concurrent invariant/activity signal actor

Lee, UC Berkeley 35 Useful State Machine Models Von-Neumann computers Imperative programming languages Finite state machines (FSMs)

Lee, UC Berkeley 36 Concurrency + Control Logic A C D B x y z G F E x y z x y z G F E Compositional construction Concurrent FSMs DE CT Continuous-time modeling of physical subsystems Modal model Discrete-event model (e.g. environment model) Control logic

Lee, UC Berkeley 37 Contrast With Statecharts Statecharts bundle orthogonal semantic issues state machines concurrency Statecharts chooses synchronous semantics for the concurrency model what if I want an asynchronous model? what if I want continuous time (to get hybrid systems)? what if I want time-stamped discrete events?

Lee, UC Berkeley 38 The Principle of Hierarchical Heterogeneity A C D B G F H E G F H E “Use the best tool for the job.” With some discipline, you can use distinct semantics at different levels of the hierarchy.

Lee, UC Berkeley 39 Example: Heterochronous Dataflow (HDF) Combines Dataflow with FSMs We can keep everything decidable, but greatly improve expressiveness.

Lee, UC Berkeley 40 Another Example: Hybrid Systems Combines Continuous Time with FSMs Hybrid systems are hierarchical combinations of continuous-time models and state machines.

Lee, UC Berkeley 41 Heterogeneous Models We refer to models that combine FSMs hierarchically with concurrent models of computation as modal models. Modal models are one example of a family of hierarchically heterogeneous models, where diverse models of computation are combined in a hierarchy.

Lee, UC Berkeley 42 How Does This Work? Abstract Semantics is the Key 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 43 Abstract Semantics – The Key To Hierarchical Heterogeneity flow of control Initialization Execution Finalization communication Structure of signals Send/receive protocols iterate()

Lee, UC Berkeley 44 Abstract Semantics – The Key To Hierarchical Heterogeneity flow of control Initialization Execution Finalization communication Structure of signals Send/receive protocols iterate() prefire() fire() postfire() stopFire() In hierarchical heterogeneity, the fire() method iterates a submodel, but according to its model of computation. The order in which component methods prefire(), fire(), postfire(), depends on the model of computation.

Lee, UC Berkeley 45 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 46 Hierarchical Composition of the Ptolemy II Abstract Semantics flow of control Initialization Execution Finalization communication Structure of signals Send/receive protocols iterate() prefire() fire() postfire() stopFire() initialization Execution Finalization

Lee, UC Berkeley 47 Other Stream-Like Models of Computation Compatible with this Abstract Semantics Discrete events (e.g. NS) data tokens have time stamps Synchronous languages (e.g. Esterel) sequence of values, one per clock tick fixed-point semantics Time triggered (e.g. Giotto) similar, but no fixed-point semantics Process networks separate thread per actor asynchronous communication Communicating sequential processes separate thread per actor synchronous communication Push/Pull (e.g. Click) dataflow with disciplined nondeterminism

Lee, UC Berkeley 48 Is Using Visual Syntaxes a Good Idea? naïve approach: 8 elements 8 signal paths hard to build hardwired scale distributor: converts an array of dimension 8 to a sequence of 8 tokens. array inelements out Example: Need to separately process elements of an array

Lee, UC Berkeley 49 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 50 Analogy to Structured Programming in Actor-Oriented Models 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 51 What About All Those Wires? If You Don’t Want Them, Don’t Use Them Ptolemy II framework for modeling wireless sensor networks 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 sensor node model of a channel

Lee, UC Berkeley 52 What About Abstraction? These 49 sensor nodes are actors that are instances of the same class, defined as:

Lee, UC Berkeley 53 What About Modularity? The definition below is a class and objects at the left are instances, not copies. 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.

Lee, UC Berkeley 54 Now that we have classes, can we bring in more of the modern programming world? subclasses? inheritance? interfaces? subtypes? aspects?

Lee, UC Berkeley 55 Actor Interfaces: Ports and Parameters input ports output port p1p1 p2p2 p3p3 parameters: a 1 = value a 2 = value input/output port Example:

Lee, UC Berkeley 56 Subclasses? Inheritance? Interfaces? Subtypes? Aspects? Yes We Can! 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. These are a part of what the Berkeley Center for Hybrid and Embedded Software Systems (Chess) is doing.

Lee, UC Berkeley 57 Conclusion Actor-oriented design remains a relatively immature area, but one that is progressing rapidly. Ptolemy II is free and open software for experimenting with actor-oriented design techniques. see