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

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

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.
Event Driven Real-Time Programming CHESS Review University of California, Berkeley, USA May 10, 2004 Arkadeb Ghosal Joint work with Marco A. Sanvido, Christoph.
UC Berkeley Mobies Technology Project PI: Edward Lee CoPI: Tom Henzinger Process-Based Software Components for Networked Embedded Systems.
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.
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
Integrated Design and Analysis Tools for Software-Based Control Systems Shankar Sastry (PI) Tom Henzinger Edward Lee University of California, Berkeley.
Chess Review May 11, 2005 Berkeley, CA Advances In MIC Tools for Networked Embedded Systems Applications Edited and Presented by Janos Sztipanovits ISIS,
February 21, 2008 Center for Hybrid and Embedded Software Systems Organization Board of Directors Edward A. Lee, UC Berkeley.
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.
A denotational framework for comparing models of computation Daniele Gasperini.
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.
Chess Review November 21, 2005 Berkeley, CA Edited and presented by Advanced Tool Architectures Edward A. Lee UC Berkeley.
Chess Review May 11, 2005 Berkeley, CA Composable Code Generation for Distributed Giotto Tom Henzinger Christoph Kirsch Slobodan Matic.
February 23, 2012 Center for Hybrid and Embedded Software Systems Organization Board of Directors Edward A. Lee, EECS Thomas.
UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI CHESS Review May 10, 2004 Berkeley, CA Model-Based Design Edited by Janos Sztipanovits,
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.
Chess Review May 11, 2005 Berkeley, CA Introduction Edited and presented by Edward A. Lee, Professor, Chair of the EE Division, and Associate Chair of.
Chess Review May 10, 2004 Berkeley, CA Advanced Tool Architectures Edited and Presented by Edward A. Lee, Co-PI UC Berkeley.
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.
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.
A Denotational Semantics For Dataflow with Firing Edward A. Lee Jike Chong Wei Zheng Paper Discussion for.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI A New System Science.
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.
Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI NSF Model-Based Design DSML.
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.
November 18, 2004 Embedded System Design Flow Arkadeb Ghosal Alessandro Pinto Daniele Gasperini Alberto Sangiovanni-Vincentelli
Tool Integration of Ptolemy II EE290N Class Project Haiyang Zheng May
Embedded Software Challenges for the Next 10 Years Chess: Center for Hybrid and Embedded Software Systems Infineon Embedded Software Days Munich, Sept.
MOBIES Project Progress Report Engine Throttle Controller Design Using Multiple Models of Computation Edward Lee Haiyang Zheng with thanks to Ptolemy Group.
Models of Computation Reading Assignment: L. Lavagno, A.S. Vincentelli and E. Sentovich, “Models of computation for Embedded System Design”
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.
Chess Review October 4, 2006 Alexandria, VA Edited and presented by Model-Based Design Janos Sztipanovits Vanderbilt University.
Chess Review November 21, 2005 Berkeley, CA Edited and presented by Coupled Interface Modules for Heterogeneous Composition Ethan Jackson ISIS, Vanderbilt.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Composing Models of Computation in Kepler/Ptolemy II
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
C. André, J. Boucaron, A. Coadou, J. DeAntoni,
Design Languages in 2010 Chess: Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley Panel Position Statement Forum on Design.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Processes, interfaces and platforms. Embedded software modeling in Metropolis. Luciano Lavagno Politecnico di Torino EMSOFT 2002, CASES 2002 Grenoble,
Actor Networks Edward A. Lee Robert S. Pepper Distinguished Professor Chair of EECS UC Berkeley Invited Talk Workshop Foundations and Applications of Component-based.
Constraints Assisted Modeling and Validation Presented in CS294-5 (Spring 2007) Thomas Huining Feng Based on: [1]Constraints Assisted Modeling and Validation.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
T imed Languages for Embedded Software Ethan Jackson Advisor: Dr. Janos Szitpanovits Institute for Software Integrated Systems Vanderbilt University.
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
Retargetable Model-Based Code Generation in Ptolemy II
Concurrent Models of Computation for Embedded Software
Logical architecture refinement
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Multiple Aspect Modeling of the Synchronous Language Signal
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Presentation transcript:

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

Chess Review, November 18, Tool Projects Concurrent model-based design –E machine & S machine (Henzinger) –Giotto (Henzinger) –NP-Click (Keutzer) –Metropolis (Sangiovanni-Vincentelli) –Ptolemy II (Lee) –Streambit (Bodik) Meta modeling –GME (Sztipanovits, Vanderbilt) –GREAT=Language,Engine,C/G,Debugger (Karsai, Vanderbilt) –MOF-based Metamodeling (Sztipanovits, Vanderbilt) –DESERT - Design Space Exploration Tool (Karsai, Vanderbilt) –UDM - Universal Data Model (Karsai, Vanderbilt) Verification –Blast (Henzinger) –CCured (Necula) –Chic (Henzinger) –SMoLES (Karsai, Vanderbilt) investigator in charge

Chess Review, November 18, Tool Building vs. Architecture Principles Bottom up: We build tools and applications to make principles concrete and to develop deeper understanding of methods and problems. Top down: We identify guiding principles such as meta modeling, abstract syntax, and abstract semantics.

Chess Review, November 18, Abstract Syntax Concrete Syntax Syntax-Based Static Analysis: Type Systems Abstract Semantics Concrete Semantics Semantics-Based Static Analysis: Verification Outline Separable Tool Architecture Issues

Chess Review, November 18, Example: HyVisual In HyVisual, models of hybrid systems are hierarchical compositions of components that represent state machines and dynamical systems. What is the underlying structure?

Chess Review, November 18, An Abstract Syntax Entities Attributes on entities (parameters) Ports in entities Links between ports Width on links (channels) Hierarchy Abstract syntaxes similar to this can be used to describe concurrent objects interconnected actors state machines …

Chess Review, November 18, Meta-Modeling of an Abstract Syntax Using GME (from Vanderbilt) an abstract syntax is specified as an object model (in UML) with constraints (in OCL), or alternatively, with MOF. Such a spec can be used to synthesize visual editors and models transformers. Meta-model of Ptolemy II abstract syntax, constructed in GME by H. Y. Zheng.

Chess Review, November 18, Outline Separable Tool Architecture Issues Abstract Syntax Concrete Syntax Syntax-Based Static Analysis: Type Systems Abstract Semantics Concrete Semantics Semantics-Based Static Analysis: Verification

Chess Review, November 18, Concrete Syntax Example concrete syntax in XML: XML and XSLT have made concrete syntax even less important than it used to be. Going a step further, GReAT (from Vanderbilt) works with GME to synthesize model transformers from meta models.

Chess Review, November 18, Outline Separable Tool Architecture Issues Abstract Syntax Concrete Syntax Syntax-Based Static Analysis: Type Systems Abstract Semantics Concrete Semantics Semantics-Based Static Analysis: Verification

Chess Review, November 18, Actor-Oriented Type Systems Interfaces: Ports and Parameters input ports output port p1p1 p2p2 p3p3 parameters: a 1 = value a 2 = value input/output port p4p4 p2p2 p3p3 subtype While types in object- oriented languages are governed by the methods and fields of objects, in actor-oriented languages they are governed by the ports and parameters. Subtyping needs to be rethought. We have developed an actor-oriented type system that depends only an abstract syntax.

Chess Review, November 18, Actor-Oriented Type Systems Classes, Subclasses, and Inheritance instance subclass inherited actors override actors local class definition execution This type system builds on abstract syntax (not semantics) so it applies very broadly to actor-oriented models, including hybrid systems.

Chess Review, November 18, Outline Separable Tool Architecture Issues Abstract Syntax Concrete Syntax Syntax-Based Static Analysis: Type Systems Abstract Semantics Concrete Semantics Semantics-Based Static Analysis: Verification

Chess Review, November 18, Where We Are Headed An Abstract Semantics A Finer Abstract Semantics A Concrete Semantics (or Model of Computation)

Chess Review, November 18, Tagged Signal Abstract Semantics Tagged Signal Abstract Semantics: port may be an input or an output, or neither or both. It is irrelevant. signal is a member of a set of signals, where the set depends on the model of computation and resolved data type of the connection. a “process” is a subset of the signals with which it interacts. This outlines a general abstract semantics that gets specialized. When it becomes concrete you have a model of computation.

Chess Review, November 18, A Finer Abstraction Semantics Functional Abstract Semantics: port is now either an input or an output (or both). a process is now a function from input signals to output signals. This outlines an abstract semantics for deterministic producer/consumer actors.

Chess Review, November 18, Uses for Such an Abstract Semantics Give structure to the sets of signals –e.g. Use the Cantor metric to get a metric space. Give structure to the functional processes –e.g. Contraction maps on the Cantor metric space. Develop static analysis techniques –e.g. Conditions under which a hybrid systems is provably non-Zeno.

Chess Review, November 18, Another Finer Abstract Semantics Process Networks Abstract Semantics: port is either an input or an output or both. sets of signals are monoids, which allows us to incrementally construct them. E.g. stream event sequence rendezvous points … A process is a sequence of operations on its signals where the operations are the associative operation of a monoid This outlines an abstract semantics for actors constructed as processes that incrementally read and write port data. process is not necessarily functional (can be nondeterministic).

Chess Review, November 18, Concrete Semantics that Conform with the Process Networks Abstract Semantics Communicating Sequential Processes (CSP) [Hoare] Calculus of Concurrent Systems (CCS) [Milner] Kahn Process Networks (KPN) [Kahn] Nondeterministic extensions of KPN [Various] Actors [Hewitt] Some Implementations: Occam, Lucid, and Ada languages Ptolemy Classic and Ptolemy II (PN and CSP domains) System C Metropolis

Chess Review, November 18, Process Network Abstract Semantics in Ptolemy II actor contains ports port contains receivers director creates receivers receiver implements communication monoid operation to incrementally construct signals

Chess Review, November 18, Several Concrete Semantics Refine this Abstract Semantics communicating sequential processes Kahn process networks

Chess Review, November 18, Process Network Abstract Semantics in Metropolis process P{ port reader X; port writer Y; thread(){ while(true){... z = f(X.read()); Y.write(z); }}} medium M implements reader, writer{ int storage; int n, space; void write(int z){ await(space>0; this.writer ; this.writer) n=1; space=0; storage=z; } word read(){... } } interface reader extends Port{ update int read(); eval int n(); } interface writer extends Port{ update void write(int i); eval int space(); } M P1 X Y P2 X Y Env1 Env2 Model Process Medium Thanks to Doug Densmore

Chess Review, November 18, Leveraging Abstract Syntax for Joint Modeling of Architecture and Application Bus Arbiter Bus Mem Cpu OsSched MyArchNetlist mP1 mP2 mP1 mP2 MyFncNetlist M P1 P2 Env1 Env2 B(P1, M.write) B(mP1, mP1.writeCpu); E(P1, M.write) E(mP1, mP1.writeCpu); B(P1, P1.f) B(mP1, mP1.mapf); E(P1, P1.f) E(mP1, mP1.mapf); B(P2, M.read) B(P2, mP2.readCpu); E(P2, M.read) E(mP2, mP2.readCpu); B(P2, P2.f) B(mP2, mP2.mapf); E(P2, P2.f) E(mP2, mP2.mapf); MyMapNetlist Bus Arbiter Bus Mem Cpu OsSched MyArchNetlist … … … The abstract syntax provides natural points of the execution (where the monoid operations are invoked) that can be synchronized across models. Here, this is used to model operations of an application on a candidate implementation architecture.

Chess Review, November 18, A Finer Abstract Semantics Firing Abstract Semantics: port is still either an input or an output. signals are monoids (can be incrementally constructed) (e.g. streams, discrete-event signals). a process still a function from input signals to output signals, but that function now is defined in terms of a firing function. The process function F is the least fixed point of a functional defined in terms of f.

Chess Review, November 18, Models of Computation that Conform to the Firing Abstract Semantics Dataflow models (all variations) Discrete-event models Time-driven models (Giotto) In Ptolemy II, actors written to the firing abstract semantics can be used with directors that conform only to the process network abstract semantics. Such actors are said to be behaviorally polymorphic.

Chess Review, November 18, Leveraging the Abstract Semantics to get “Schedule Carrying Code” (SCC) Embedded (E) code  environment interaction  task release Scheduling (S) code  task execution  communication schedule Giotto code  firings that are concurrent yet atomic  periodic tasks and drivers  unit-delay state semantics  multi-modal

Chess Review, November 18, xGiotto and Metropolis xGiotto Formal Verification xGiotto functional description xGiotto-to- Metropolis MMM functional description Mapping1 Mapping2 Mapping3 Platform1 Metropolis Description Platform2 Metropolis Description Platform3 Metropolis Description WCET Estimator Schedulability Results Simulator Platform Selection xGiotto Code Verification Code for the Target platform Platform Estimation

Chess Review, November 18, Actor Language for the Firing Abstract Semantics: Cal Cal is an experimental actor language designed to provide statically inferable actor properties w.r.t. the firing abstract semantics. E.g.: Inferable firing rules and firing functions: actor Select () S, A, B ==> Output: action S: [sel], A: [v] ==> [v] guard sel end action S: [sel], B: [v] ==> [v] guard not sel end end Thanks to Jorn Janneck, Xilinx

Chess Review, November 18, A Still Finer Abstract Semantics Stateful Firing Abstract Semantics: port is still either an input or an output. a process still a function from input signals to output signals, but that function now is defined in terms of two functions. The function f gives outputs in terms of inputs and the current state. The function g updates the state. state space signals are monoids (can be incrementally constructed) (e.g. streams, discrete-event signals).

Chess Review, November 18, Models of Computation that Conform to the Stateful Firing Abstract Semantics Synchronous reactive Continuous time Hybrid systems Stateful firing supports iteration to a fixed point, which is required for hybrid systems modeling. In Ptolemy II, actors written to the stateful firing abstract semantics can be used with directors that conform only to the firing abstract semantics or to the process network abstract semantics. Such actors are said to be behaviorally polymorphic.

Chess Review, November 18, Leveraging This Abstract Semantics in HyVisual (based on Ptolemy II) Masses on Springs Consider two masses on springs which, when they collide, will stick together with a decaying stickiness until the force of the springs pulls them apart again.

Chess Review, November 18, Structure of the Spring-Masses Model A component in the continuous-time top-level model is defined by a finite state machine. The continuous time model requires the stateful firing abstract semantics for the ODE solver to work properly across these levels of the hierarchy.

Chess Review, November 18, Structure of the Spring-Masses Model Each state has a “refinement,” which is a contained model defining behavior. This requires a composable abstract semantics.

Chess Review, November 18, Where We Are Tagged Signal Semantics Process Networks Semantics Firing Semantics Stateful Firing Semantics

Chess Review, November 18, Where We Are Tagged Signal Semantics Process Networks Semantics Firing Semantics Stateful Firing Semantics Kahn process networks Giotto discrete events synchronous/ reactive hybrid systems continuous time

Chess Review, November 18, Meta Frameworks: Ptolemy II Tagged Signal Semantics Process Networks Semantics Firing Semantics Stateful Firing Semantics Kahn process networks dataflow discrete events synchronous/ reactive hybrid systems continuous time Ptolemy II emphasizes construction of “behaviorally polymorphic” actors with stateful firing semantics (the “Ptolemy II actor semantics”), but also provides support for broader abstract semantic models via its abstract syntax and type system.

Chess Review, November 18, Meta Frameworks: Metropolis Tagged Signal Semantics Process Networks Semantics Firing Semantics Stateful Firing Semantics Kahn process networks dataflow discrete events synchronous/ reactive hybrid systems continuous time Metropolis provides a process networks abstract semantics and emphasizes formal description of constraints, communication refinement, and joint modeling of applications and architectures.

Chess Review, November 18, Outline Separable Tool Architecture Issues Abstract Syntax Concrete Syntax Syntax-Based Static Analysis: Type Systems Abstract Semantics Concrete Semantics Semantics-Based Static Analysis: Verification

Chess Review, November 18, Verification Semantics-Based Static Analysis Refinement verification in Metropolis CHIC model checker for interface checking CHIC integration with Ptolemy II Blast

Chess Review, November 18, Leveraging the Abstract Semantics for Refinement Verification in Metropolis Y2T write() Th,Wk T2Y read() Implement the upper level services using the current services : refinement relation Metropolis represent both levels of abstraction explicitly, rather than replacing the upper level. Refinement relation is associated with properties to preserve through the refinement. Writer process Reader process  write(), read() Example: a unbounded FIFO v.s. a bounded FIFO with the finer service. Unbounded FIFO Level Bounded FIFO API, e.g. release space, move data FIFO width and length parameterized Bounded FIFO Level Thanks to Doug Densmore

Chess Review, November 18, Chic: A Tool for Checking Interface Compatibility (Thomas A. Henzinger et. al.) Output guarantee true x y z Input assumption true x=0  y=0 x y z true y = 0  x. ( true  ( x=0  y=0 )) Interface: Expresses assumptions made by module about environment, and guarantees made by module if assumptions are satisfied. Interface = Behavioral type Compatibility checking is a game between System and Environment; winning strategy of Environment gives correct way to use System. Web Service interfaces allow checking temporal properties of interaction between service components. Chic 1.1 is available as a plug-in for JBuilder, Ptolemy *. Implemented in Java. Supports static, dynamic (including pushdown) and resource interfaces. Support for web service interfaces is under development. (* Thanks to Eleftherios Matsikoudis) Download Chic 1.1 today !! Software Module interfaces allow pushdown analysis to check safety properties of recursive software components. Resource interfaces: automata-based type system for compositional resource-aware analysis of embedded software. eg. Node Limit Interfaces express requirements like mutex, limited buffer size, limited peak power. Path Limit Interfaces express requirements like limited battery capacity. Compositional and scalable.

Chess Review, November 18, BLAST Berkeley Lazy Abstraction Software Verification Tool - Automatic counterexample-guided abstraction-refinement - Scales to 100Kloc C Program (Source) Safe Error Trace Yes No Safety Property (API usage Rules) BLAST

Chess Review, November 18, The Big Question: How to Give Semantic Meta Models that are Usefully Manipulable Key ideas guiding us: Abstract semantics Ptolemy II directors Metropolis quantity managers The Metropolis language of constraints Interface theories Behavioral type systems Temporal logics (e.g. TLA) Set-valued semantics …