System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.

Slides:



Advertisements
Similar presentations
Synthesis of Protocol Converter Using Timed Petri-Nets Anh Dang Balaji Krishnamoorthy Manoj Iyer Presented by:
Advertisements

ARCHITECTURES FOR ARTIFICIAL INTELLIGENCE SYSTEMS
Interface Theories With Component Reuse Laurent DoyenEPFL Thomas HenzingerEPFL Barbara JobstmannEPFL Tatjana PetrovEPFL.
Timed Automata.
Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
Interface-based design Philippe Giabbanelli CMPT 894 – Spring 2008.
Requirements on the Execution of Kahn Process Networks Marc Geilen and Twan Basten 11 April 2003 /e.
Presented by: Thabet Kacem Spring Outline Contributions Introduction Proposed Approach Related Work Reconception of ADLs XTEAM Tool Chain Discussion.
DATAFLOW PROCESS NETWORKS Edward A. Lee Thomas M. Parks.
UC Berkeley Mobies Technology Project PI: Edward Lee CoPI: Tom Henzinger Process-Based Software Components for Networked Embedded Systems.
Interface Automata Dr. Winthrop T. Williams EE 290n, Concurrent models of computation U. C. Berkeley May 15, 2002.
Interface Automata 29-September Modeling Temporal Behavior of Component Component behaves with Environment Traditional (pessimistic) approach –
Introduction To System Analysis and Design
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,
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.
An Introduction to Input/Output Automata Qihua Wang.
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.
Behavioral Types as Interface Definitions for Concurrent Components Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley.
Using Interfaces to Analyze Compositionality Haiyang Zheng and Rachel Zhou EE290N Class Project Presentation Dec. 10, 2004.
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.
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.
An Extensible Type System for Component-Based Design
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.
Models of Computation for Embedded System Design Alvise Bonivento.
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.
Concurrent Models of Computation in System Level Design 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.
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 MESCAL Application Modeling and Mapping: Warpath Andrew Mihal and the MESCAL team UC Berkeley.
Router modeling using Ptolemy Xuanming Dong and Amit Mahajan May 15, 2002 EE290N.
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.
SE-565 Software System Requirements More UML Diagrams.
What’s Ahead for Embedded Software? - Edward A. Lee (2000) Wednesday November 10, 2010 Hokeun Kim.
Presenter : Cheng-Ta Wu Vijay D’silva, S. Ramesh Indian Institute of Technology Bombay Arcot Sowmya University of New South Wales, Sydney.
Modern Concurrency Abstractions for C# by Nick Benton, Luca Cardelli & C´EDRIC FOURNET Microsoft Research.
Composing Models of Computation in Kepler/Ptolemy II
Chapter 8 Architecture Analysis. 8 – Architecture Analysis 8.1 Analysis Techniques 8.2 Quantitative Analysis  Performance Views  Performance.
An Introduction to Software Architecture
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
School of Computer Science, The University of Adelaide© The University of Adelaide, Control Data Flow Graphs An experiment using Design/CPN Sue Tyerman.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Ptolemy & Models of Computation -by Hao Chen, Zhuang Fan, Jin Xiao School of Computer Science University of Waterloo Claudius Ptolemaeus, the second century.
CSCI1600: Embedded and Real Time Software Lecture 11: Modeling IV: Concurrency Steven Reiss, Fall 2015.
A facilitator to discover and compose services Oussama Kassem Zein Yvon Kermarrec ENST Bretagne.
SAFEWARE System Safety and Computers Chap18:Verification of Safety Author : Nancy G. Leveson University of Washington 1995 by Addison-Wesley Publishing.
High Performance Embedded Computing © 2007 Elsevier Lecture 4: Models of Computation Embedded Computing Systems Mikko Lipasti, adapted from M. Schulte.
I/O & Interface Automata By Josh Lessard, Josh Taylor, Real Xu.
CS 5991 Presentation Ptolemy: A Framework For Simulating and Prototyping Heterogeneous Systems.
Object-Oriented Analysis and Design
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Unified Modeling Language
Retargetable Model-Based Code Generation in Ptolemy II
Chapter 20 Object-Oriented Analysis and Design
An Introduction to Software Architecture
CSP-Style Rendezvous Communication Thomas Feng, Edward Lee, Yang Zhao
Design Yaodong Bi.
Presentation transcript:

System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson

Outline 1 Introduction 2 Ptolemy II – A Component-Based Design Environment 3 Overview of Interface Automata 3.1 An Example 3.2 Composition and Compatibility 3.3 Alternating Simulation 4 System-Level Types 4.1 Type Definition 4.2 System-Level Type Order and Polymorphism 4.3 Type Checking Examples 4.4 Reflection 5 Trade-offs in Type System Design 6 Conclusion and Future Work

1. Introduction Modern polymorphic type systems have led to considerable improvements in development productivity and software quality. Component-based design helps to handle complexity. Type systems ensure component compatibility by detecting mismatch at component interfaces. This paper extends type systems to capture the dynamic aspects of component interaction. The design of system-level types shares the same goals and trade-offs with the design of a data-level type system.

1. Introduction Researchers formed a polymorphic type system at the system-level through an approach similar to subtyping, where the interaction types were organized in a partial order to facilitate the design of polymorphic components and simplify type checking. Because no type system can capture all the properties of programs and keep the language flexible, certain compromises have to be made as to what properties to include in the system They chose to check the compatibility of communication protocols as the starting point because they are the central piece of many models of computation and it can be done efficiently.

2 Ptolemy II – A Component-Based Design Environment Ptolemy II is a system-level design environment that supports component-based heterogeneous modeling and design. Components are called actors, the channel of communication is implemented by a receiver. Ptolemy II is implemented in Java and the methods of the receiver are defined in a Java interface Receiver. Only assumption made is that of a producer/consumer model. Each actor interacts with the receivers in the following domains: Communicating Sequential Processes (CSP) Process Networks (PN) Synchronous Data Flow (SDF) Discrete Event (DE)

3.1 Overview of Interface Automata - An Example Interface automata model for an implementation of the consumer actor. Important that not all inputs always enabled. In SDF domain actor assumes that its fire() method will not be called again if it is inside the this method.

3.1 Overview of Interface Automata An Example / Fig. 2 ?=input !=output ;=internal Fire() method Invocation return Get() method Invocation Token return Token() method Invocation Return true Return false Start Fire() called Calls get() Token rec’d Fire() returns

3.2 Overview of Interface Automata Composition and Compatibility If two interface automata have disjoint transitions except for 1 input and output, they can be composed. This shared input and output is called a shared transition, and it is taken synchronously as an internal transition of the composition. Illegal states and states that can reach illegal states through output or internal transitions are pruned out. Compatibility: Two automata are compatible if their composition is not empty. Yields a straightforward algorithm for type checking.

3.2 Overview of Interface Automata Composition and Compatibility F.3,4 Two (artificial) director automata The composition of the artificial directors with the SDF Actor

3.3 Overview of Interface Automata Alternating Simulation For two interface automata P and Q, there is an alternating simulation relation from Q to P if: All the input steps to P can be simulated by Q. All the output steps of Q can be simulated by P.

4.1 System-Level Types – Type Definition / Fig 5 If not SDF, can’t assume that token present when fired. If token not present, returns to state 0. Simple example of domain-polymorphism. Interface w/ director Interface w/ receiver

4.1 System-Level Types – Type Definition / Fig 6 Interface automaton modeling the director and receiver for SDF domain Put() method call return “Director interface” “Receiver interface”

4.1 System-Level Types – Type Definition / Fig 7 Type signature for DE domain Actor may be fired without a token being put into the receiver at its input

4.1 System-Level Types – Type Definition / Fig 8 Type signature for CSP domain. Each actor runs on its own thread, and communication is synchronous Get() before put() Put() before get()

4.1 System-Level Types – Type Definition / Fig 9 Type signature for PN domain. Each actor runs on its own thread, and communication is asynchronous Get() before put() Put() before get()

4.2 System-Level Types – Order and Polymorphism In the set of all domain types, the alternating simulation relation induces a partial order, or system-level type order. Automaton lower in the hierarchy can simulate all the input steps of the ones above it, and the automaton higher in the hierarchy can simulate all the input steps of the ones above it. SDFDomain is a subtype of DEDomain and all others above it. NaT = Not a Type and DP = Domain Polymorphic

4.3 System-Level Types – Type Checking Examples / Figs.11-2 Composition of SDFActor with SDFDomain – because nonempty, they are compatible Composition of SDF Actor with DE domain – empty because incompatible because actor may call get() when there is not token in the receiver

4.3 System-Level Types – Type Checking Examples / Fig 13 Composition of DEDomain with PolyActor, which checks presence of token before reading from receiver

4.3 System-Level Types – Type Checking Examples / Fig 14 Since SDFDomain is below DEDomain in the system-level type order, PolyActor can work in the SDFDomain. As a sanity check, here is composition of SDFDomain with PolyActor.

4.4 System-Level Types - Reflection Another interesting use of automata is to reflect the component state in a run-time environment. Runs in parallel with a component, making a transition when component does that reflects what state the component is in Can obtain state of component by querying automaton.

5 Trade-offs in Type System Design Scope can be broadened from examples by adding actors, making a more detailed director, and adding features like deadlock freedom – but this increases the cost of type checking. Also there is a trade-off between static and run- time type checking – by increasing run-time checking, some of the burden can be taken off of static checking. Completely relying on run-time type checking makes it merely a debugging tool.

6 Conclusion and Future Work Interaction types and component behavior are described by interface automata, and type checking is done through automata composition. By having a domain polymorphic approach, a component may be compatible with multiple interaction types. Relation among the interaction types is captured by a system-level type order using the alternating simulation relation of interface automata. The system can be extended and design involves a set of trade-offs Reflection automata can provide information on when mutation is safe, and can be powerful debugging tools. Type system may facilitate the design of new components or Ptolemy II domains. It might be possible to show that the composition of a domain director and a group of actors behaves like a polymorphic actor in other domains.