Defining Domains Edward A. Lee Professor, UC Berkeley Ptolemy Ptutorial, Feb. 12, 2007.

Slides:



Advertisements
Similar presentations
Software Engineering Implementation Lecture 3 ASPI8-4 Anders P. Ravn, Feb 2004.
Advertisements

Written by: Dr. JJ Shepherd
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,
UC Berkeley Mobies Technology Project PI: Edward Lee CoPI: Tom Henzinger Process-Based Software Components for Networked Embedded Systems.
Process-Based Software Components for Networked Embedded Systems Edward A. Lee, PI UC Berkeley Core Technical Team (Mobies, SEC, and GSRC): Christopher.
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.
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 Java Code Generation Steve Neuendorffer 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.
February 11, 2010 Center for Hybrid and Embedded Software Systems Ptolemy II - Heterogeneous Concurrent Modeling and Design.
Chess Review October 4, 2006 Alexandria, VA Edited and presented by Advanced Tool Architectures Edward A. Lee UC Berkeley.
Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Flexible Scientific Workflows Using Dynamic Embedding Anne H.H. Ngu, Nicholas Haasch Terence.
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.
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.
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.
Implementing Quantity Managers in Ptolemy II EE 290N Project Haibo Zeng Dec 10 th, 2004.
February 23, 2006 Center for Hybrid and Embedded Software Systems Ptalon Ptalon is an ADL with a simple goal: Make it easier.
Modeling and Visualization of CFSM Networks in JavaTime Michael Shilman James Shin Young EE249 Project Presentation December 8, 1998.
An Extensible Type System for Component-Based Design
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.
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,
Summary of the Course What, Why, When. 2 The Y-chart view of the Course System Behavior System Architecture Behavior on Architecture Mapping Refine Implementation.
Hierarchical Reconfiguration of Dataflow Graphs Stephen Neuendorffer UC Berkeley Poster Preview May 10, 2004.
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.
II. Middleware for Distributed Systems
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.
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.
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
Concurrent Models of Computation Edward A. Lee Professor, UC Berkeley Ptolemy Project CHESS: Center for Hybrid and Embedded Software Systems HP Workshop.
Models of Computation as Program Transformations Chris Chang
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
Building a KEPLER Extension using Ptolemy II KEPLER Collaboration Staff Presented by: Ilkay Altintas and Efrat San Diego Supercomputer Center,
Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU.
Composing Models of Computation in Kepler/Ptolemy II
SEA Side Software Engineering Annotations Annotation 13: Use Cases Professor Sara Stoecklin Director of Software Engineering- Panama City
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.
Ptolemy & Models of Computation -by Hao Chen, Zhuang Fan, Jin Xiao School of Computer Science University of Waterloo Claudius Ptolemaeus, the second century.
Incremental Checkpointing with Application to Distributed Discrete Event Simulation Thomas Huining Feng and Edward A. Lee {tfeng,
Written by: Dr. JJ Shepherd
Satisfying Requirements BPF for DRA shall address: –DAQ Environment (Eclipse RCP): Gumtree ISEE workbench integration; –Design Composing and Configurability,
© 2006 Pearson Addison-Wesley. All rights reserved 1-1 Chapter 1 Review of Java Fundamentals.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Written by: Dr. JJ Shepherd
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
null, true, and false are also reserved.
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Presentation transcript:

Defining Domains Edward A. Lee Professor, UC Berkeley Ptolemy Ptutorial, Feb. 12, 2007

Lee 05: 2 Ptolemy II Software Architecture Built for Extensibility Ptolemy II packages have carefully constructed dependencies and interfaces PN CSP CT DE FSM SDF Kernel Data ActorMath Graph

Lee 05: 3 Ptolemy II Extension Points Define actors Interface to foreign tools (e.g. Python, MATLAB) Interface to verification tools (e.g. Chic) Define actor definition languages Define directors (and models of computation) Define visual editors and displays Define textual syntaxes and editors Packaged, branded configurations All of our “domains” are extensions built on a core infrastructure.

Lee 05: 4 Abstract Semantics of Actor-Oriented Models of Computation Actor-Oriented Models of Computation that we have implemented: dataflow (several variants) process networks distributed process networks Click (push/pull) continuous-time CSP (rendezvous) discrete events distributed discrete events synchronous/reactive time-driven (several variants) … execution controldata transport init() fire()

Lee 05: 5 Object Model for Executable Components

Lee 05: 6 Object Model (Simplified) for Communication Infrastructure

Lee 05: 7 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.

Lee 05: 8 Extension Exercise 1 Build a director that subclasses PNDirector to allow ports to alter the “blocking read” behavior. In particular, if a port has a parameter named “tellTheTruth” then the receivers that your director creates should “tell the truth” when hasToken() is called. That is, instead of always returning true, they should return true only if there is a token in the receiver. Parameterizing the behavior of a receiver is a simple form of communication refinement, a key principle in, for example, Metropolis.

Lee 05: 9 Implementation of the NondogmaticPNDirector package doc.tutorial; import … public class NondogmaticPNDirector extends PNDirector { public NondogmaticPNDirector(CompositeEntity container, String name) throws IllegalActionException, NameDuplicationException { super(container, name); } public Receiver newReceiver() { return new FlexibleReceiver(); } public class FlexibleReceiver extends PNQueueReceiver { public boolean hasToken() { IOPort port = getContainer(); Attribute attribute = port.getAttribute("tellTheTruth"); if (attribute == null) { return super.hasToken(); } // Tell the truth... return _queue.size() > 0; }

Lee 05: 10 Using It With NondogmaticPNDirector: With PNDirector:

Lee 05: 11 Extension Exercise 2 Build a director that subclasses Director and allows different receiver classes to be used on different connections. This is a form of what we call “amorphous heterogeneity.”

Lee 05: 12 Implementation of the AmorphousDirector package doc.tutorial; import … public class AmorphousDirector extends Director { public AmorphousDirector(CompositeEntity container, String name) throws IllegalActionException, NameDuplicationException { super(container, name); } public Receiver newReceiver() { return new DelegatingReceiver(); } public class DelegatingReceiver extends AbstractReceiver { private Receiver _receiver; public DelegatingReceiver() { super(); _receiver = new SDFReceiver(); } public DelegatingReceiver(IOPort container) throws IllegalActionException { super(container); _receiver = new SDFReceiver(container); } public void clear() throws IllegalActionException { IOPort container = getContainer(); if (container != null) { StringParameter receiverClass = (StringParameter) container.getAttribute("receiverClass", StringParameter.class); if (receiverClass != null) { String className = ((StringToken)receiverClass.getToken()).stringValue(); try { Class desiredClass = Class.forName(className); _receiver = (Receiver)desiredClass.newInstance(); } catch (Exception e) { throw new IllegalActionException(container, e, "Invalid class for receiver: " + className); } _receiver.clear(); } public Token get() throws NoTokenException { return _receiver.get(); } …

Lee 05: 13 Using It

Lee 05: 14 Extension Exercise 3 Build a director that fires actors in left-to-right order, as they are laid out on the screen.

Lee 05: 15 Implementation of the LeftRightDirector package doc.tutorial; import java.util.Comparator; import … public class LeftRightDirector extends StaticSchedulingDirector { public LeftRightDirector(CompositeEntity container, String name) … { super(container, name); setScheduler(new LeftRightScheduler(this, "LeftRightScheduler")); } public class LeftRightScheduler extends Scheduler { public LeftRightScheduler(LeftRightDirector director, String name) … { super(director, name); } protected Schedule _getSchedule() … { StaticSchedulingDirector director = (StaticSchedulingDirector) getContainer(); CompositeActor compositeActor = (CompositeActor) (director.getContainer()); List actors = compositeActor.deepEntityList(); Iterator actorIterator = actors.iterator(); TreeSet sortedActors = new TreeSet(new LeftRightComparator()); while (actorIterator.hasNext()) { Actor actor = (Actor) actorIterator.next(); sortedActors.add(actor); } Schedule schedule = new Schedule(); Iterator sortedActorsIterator = sortedActors.iterator(); while (sortedActorsIterator.hasNext()) { Actor actor = (Actor) sortedActorsIterator.next(); Firing firing = new Firing(); firing.setActor(actor); schedule.add(firing); } return schedule; } public class LeftRightComparator implements Comparator { public int compare(Object o1, Object o2) {... } public boolean equals(Object o) { … }

Lee 05: 16 Getting More Information: Design Document Volume 1: User-Oriented Volume 2: Developer-Oriented Volume 3: Researcher-Oriented