Scalable Models Using Model Transformation Thomas Huining Feng Ph.D. Student, UC Berkeley Edward A. Lee Robert S. Pepper Distinguished Professor, UC Berkeley.

Slides:



Advertisements
Similar presentations
Architecture Representation
Advertisements

Rule Based Operational Semantics Specification in Ptolemy Yanwar Asrigo COMP 763B - Modeling and Simulation Based Design 30 th April 2008.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
Center for Hybrid and Embedded Software Systems College of Engineering, University of California at Berkeley Presented by: Edward A. Lee, EECS, UC Berkeley.
Component Technologies for Embedded Systems Johan Eker.
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 October 4, 2006 Alexandria, VA Edited and presented by Educating a New Generation of Students in Embedded Systems Edward A. Lee Chair of EECS,
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.
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.
Understandable and Scalable Concurrency Christopher Brooks Programmer/Analyst, University of California, Berkeley Edward A. Lee Robert S. Pepper Distinguished.
February 11, 2010 Center for Hybrid and Embedded Software Systems Ptolemy II - Heterogeneous Concurrent Modeling and Design.
Foundations of Hybrid and Embedded Software and Systems University of California, Berkeley, CHESS Vanderbilt University, ISIS Memphis State, Mathematics.
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.
February 23, 2012 Center for Hybrid and Embedded Software Systems Organization Board of Directors Edward A. Lee, EECS Thomas.
February 12, 2009 Center for Hybrid and Embedded Software Systems Encapsulated Model Transformation Rule A transformation.
Chess Review May 10, 2004 Berkeley, CA Advanced Tool Architectures Edited and Presented by Edward A. Lee, Co-PI UC Berkeley.
February 23, 2006 Center for Hybrid and Embedded Software Systems Ptalon Ptalon is an ADL with a simple goal: Make it easier.
An Extensible Type System for Component-Based Design
Frameworks and Tools for High-Confidence Design of Adaptive, Distributed Embedded Control Systems - Project Overview - Janos Sztipanovits ISIS-Vanderbilt.
Overview of CHESS Center for Hybrid and Embedded Software Systems
Center for Hybrid and Embedded Software Systems Christopher Brooks Executive Director, CHESS Center for Hybrid and Embedded Software Systems UC Berkeley.
Chess Review November 21, 2005 Berkeley, CA Edited and presented by Causality Interfaces and Compositional Causality Analysis Rachel Zhou UC Berkeley.
February 11, 2010 Center for Hybrid and Embedded Software Systems Cyber-Physical Systems (CPS): Orchestrating networked.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI A New System Science.
Ptolemy Miniconference May 9, 2003 Berkeley, CA Ptolemy Project Plans for the Future Edward A. Lee Professor Ptolemy Project Director.
Heterochronous Dataflow in Ptolemy II Brian K. Vogel EE249 Project Presentation, Dec. 4, 1999.
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 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.
February 23, 2006Electronic version with posters and hyperlinks available at Board of Directors Tom.
Center for Hybrid and Embedded Software Systems Jonathan Sprinkle Executive Director, CHESS Center for Hybrid and Embedded Software Systems UC Berkeley.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
McGill University Proposal Exam School of Computer Science Ph.D. Candidate in the Modelling, Simulation and Design Lab Eugene Syriani.
Composing Models of Computation in Kepler/Ptolemy II
Chad Berkley NCEAS National Center for Ecological Analysis and Synthesis (NCEAS), University of California Santa Barbara Long Term Ecological Research.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
Overview of the Center for Hybrid and Embedded Software Systems (CHESS) Christopher Brooks Executive Director, CHESS Center for Hybrid and Embedded Software.
Design Languages in 2010 Chess: Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley Panel Position Statement Forum on Design.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Future Work  Formal specification of modeling language semantic is key issue  Reliance on well-established formal models of computation (i.e. finite.
Actor Networks Edward A. Lee Robert S. Pepper Distinguished Professor Chair of EECS UC Berkeley Invited Talk Workshop Foundations and Applications of Component-based.
I ndustrial Cy ber- Ph ysical Systems October 16, 2015 CyPhySim CyPhySim is an open-source simulator for cyber-physical systems. The.
Incremental Checkpointing with Application to Distributed Discrete Event Simulation Thomas Huining Feng and Edward A. Lee {tfeng,
Satisfying Requirements BPF for DRA shall address: –DAQ Environment (Eclipse RCP): Gumtree ISEE workbench integration; –Design Composing and Configurability,
February 12, 2009 Center for Hybrid and Embedded Software Systems Timing-aware Exceptions for a Precision Timed (PRET)
Ptolemy Project Vision Edward A. Lee Robert S. Pepper Distinguished Professor Eighth Biennial Ptolemy Miniconference April 16, 2009 Berkeley, CA, USA.
February 11, 2016 Center for Hybrid and Embedded Software Systems Organization Faculty Edward A. Lee, EECS Alberto Sangiovanni-Vincentelli,
February 14, 2013 Center for Hybrid and Embedded Software Systems Organization Faculty Edward A. Lee, EECS Alberto Sangiovanni-Vincentelli,
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
An overview of the CHESS Center
Foundations of Hybrid and Embedded Software Systems
TRUST:Team for Research in Ubiquitous Secure Technologies
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Model Transformation with Hierarchical Discrete-Event Control
Model Transformation with Hierarchical Discrete-Event Control
Hiren D. Patel Isaac Liu Ben Lickly Edward A. Lee
Retargetable Model-Based Code Generation in Ptolemy II
Timing-aware Exceptions for a Precision Timed (PRET) Target
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
An overview of the CHESS Center
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Model Transformation with the Ptera Controller
An overview of the CHESS Center
A Semantic Type System and Propagation
Presentation transcript:

Scalable Models Using Model Transformation Thomas Huining Feng Ph.D. Student, UC Berkeley Edward A. Lee Robert S. Pepper Distinguished Professor, UC Berkeley 1st International Workshop on Model Based Architecting and Construction of Embedded Systems (ACESMB 2008) September 29, 2008 Toulouse, France

Feng & Lee, Berkeley 2 Context: Chess: Center for Hybrid and Embedded Software Systems Principal Investigators Thomas Henzinger (EPFL) Edward A. Lee (Berkeley) Alberto Sangiovanni-Vincentelli (Berkeley) Shankar Sastry (Berkeley) Janos Sztipanovits (Vanderbilt) Claire Tomlin (Berkeley) Executive Director Christopher Brooks Associated Faculty David Auslander (Berkeley, ME) Ahmad Bahai (Berkeley) Ruzena Bajcsy (Berkeley) Gautam Biswas (Vanderbilt) Ras Bodik (Berkeley, CS) Bella Bollobas (Memphis) Karl Hedrick (Berkeley, ME) Gabor Karsai (Vanderbilt) Kurt Keutzer (Berkeley) George Necula (Berkeley, CS) Koushik Sen (Berkeley, CS) Sanjit Seshia (Berkeley) Jonathan Sprinkle (Arizona) Masayoshi Tomizuka (Berkeley, ME) Pravin Varaiya (Berkeley) This center, founded in 2002, blends systems theorists and application domain experts with software technologists and computer scientists. Some Research Projects Precision-timed (PRET) machines Distributed real-time computing Systems of systems Theoretical foundations of CPS Hybrid systems Design technologies Verification Intelligent control Modeling and simulation Applications Building systems Automotive Synthetic biology Medical systems Instrumentation Factory automation Avionics the Berkeley directors of Chess

Feng & Lee, Berkeley 3 The Ptolemy Project A Project within Chess Staffing: 1 professor 9 graduate students 3 postdocs 3 full-time staff several visitors Sponsors: Government National Science Foundation Army Research Office Air Force Research Lab Air Force Office of Scientific Research State of California Micro Program Industry Agilent Bosch HSBC Lockheed-Martin National Instruments Toyota History: The Ptolemy project was started in 1990, though its mission and focus has evolved considerably. An open- source, extensible software framework (Ptolemy II) constitutes the experimental laboratory.

Feng & Lee, Berkeley 4 Model Transformation Model-based design has used static structure models such as UML class diagrams to provide meta models that guide model-based design processes. In this project, we are focusing more on actor models, which more directly express concurrency and system dynamics than what is possible with static structure models. Inspired by prior work on model-driven model transformation, we have prototyped a model-transformation mechanism that is actor-oriented.

Feng & Lee, Berkeley 5 Inspirations and Influences AGG [Taentzer, 1999] AToM3 [Lara, Vangheluwe, 2002] FUJABA [Nickel, Niere, Zündorf, 2000], GReAT [Agrawal, Karsai, Shi, 2003] OMG MOF QVT (Query/Views/Transformations) PROGRES [Schürr, Winter, Zündorf, 1995] VIATRA2 [Balogh, Varró, 2006]

Feng & Lee, Berkeley 6 Our Premise: Components are Actors rather than Objects The alternative: Actor oriented: actor name data (state) ports Input data parameters Output data What flows through an object is evolving data class name data methods call return What flows through an object is sequential control The established: Object-oriented: Things happen to objects Actors make things happen

Feng & Lee, Berkeley 7 Ptolemy II: Our Open-Source Laboratory for Experiments with Actor-Oriented Design Director from a library defines component interaction semantics Large, behaviorally- polymorphic component library. Visual editor supporting an abstract syntax Type system for transported data Concurrency management supporting dynamic model structure.

Feng & Lee, Berkeley 8 Approach: Concurrent Composition of Software Components, which are themselves designed with Conventional Languages (Java, C, C++ MATLAB, Python)

Feng & Lee, Berkeley 9 Key Prior Work from the Ptolemy Project: 1. Higher-Order Components Examples of HoCs: Replicate a submodel over an array of inputs Structured dataflow components (case, iterate, recursion) Mobile models Parameterizing models with models Lifecycle models

Feng & Lee, Berkeley 10 Key Prior Work from the Ptolemy Project: 2. Composition Languages Big Systems with Small Descriptions System is { Matrix(Component(2),20,3); } Component is { param n; port in[n*2+1]; port out[n*2+2]; } in { Blue(n, in[1..n*2], out[1..n*2]); Green(n, in[n*2+1], out[n*2+1]); } We have released a specification language that we call “Ptalon” for such systems, integrated into Ptolemy II [Cataldo 2006]

Feng & Lee, Berkeley 11 Demo: Pattern Matching and Graph Transformation Model transformation workflow specifies iterative graph rewriting to transform the top- right model into the bottom-left model. Executing the model at the left transforms the top model into the bottom model.

Feng & Lee, Berkeley 12 Applications Model optimization Support programming idioms Scalable model construction Adapt to problem size or parallelism Product families A single model transforms to multiple products Design refactoring Common model transformations Workflow automation Configuration, composition, testing, versioning shown next

Feng & Lee, Berkeley 13 Scalable Model Construction: MapReduce Pattern [Dean, Ghemawat, 2004] This pattern is intended to exploit parallel computing by distributing computations that fit the structure. The canonical example constructs an index of words found in a set of documents. Data Split Map Reduce Merge Result (key, value) output_value

Feng & Lee, Berkeley 14 A MapReduce Model in Ptolemy II Inputs of web documents “contents of the first document” “contents of the second document”... “contents of the last document” End of all documents false... true Merged word- counting outputs {“contents”, 3} {“first”, 1}... {“document”, 3} Word-value pairs {“contents”, 1} {“of”, 1}... {“document”, 1}

Feng & Lee, Berkeley 15 Complexity of the Model Structure A configurable application with m Map actors and n Reduce actors has O(m×n) connections. Inside each actor, parameters need to be configured as well.

Feng & Lee, Berkeley 16 Observations The visual representation is only helpful for small models. The construction process by visual editing is tedious and error prone. Adapting the size of the model to varying numbers of compute resources by visual editing is unreasonable. Replacing the Map or Reduce actors with alternative functions by visual editing is also not reasonable.

Feng & Lee, Berkeley 17 Transformation Rule PatternReplacement Map Reduce PatternReplacement Constraint:!Map.outputKeys.connectedPortList().contains(Reduce.inputKeys) A transformation rule to connect a Map actor to a Reduce actor Map and Reduce are matchers to match arbitrary actors with the specified ports.

Feng & Lee, Berkeley 18 Rule Application Subgraph isomorphism (an extension to the backtracking algorithms in [Ull76] [CFSV04] ) Generated XML change requests: Generated XML change requests: [Ull76]J. R. Ullmann. An algorithm for subgraph isomorphism. Journal of the ACM, 23(1), [CFSV04]L. P. Cordella, P. Foggia, C. Sansone, and M. Vento. A (sub)graph isomorphism algorithm for matching large graphs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(10), 2004.

Feng & Lee, Berkeley 19 A Set of Transformation Rules LinkMapReduce CreateMap CreateReduce

Feng & Lee, Berkeley 20 Model is built by repeatedly applying transformation rules drawn from a set Workflow mechanisms: Priority (AGG, AToM3) Imperative programs (PROGRES) Story diagrams (FUJABA) Control flow and data flow (GReAT) Abstract State Machines (VIATRA2) Ptolemy II models (our approach) LinkMapReduce CreateMap CreateReduce LinkSplitMap LinkReduceMerge... (More)

Feng & Lee, Berkeley 21 The TransformationRule Actor Replacement Pattern Correspondence Encapsulates a transformation rule Input: modelInput – actor tokens that contain model fragments Output: modelOutput – actor tokens that contain transformation results matched – whether the last transformation was successful This actor may be used in nearly any Ptolemy model (dataflow, process networks, discrete-events, etc.) Actor provides a custom visual interface for specifying model transformations

Feng & Lee, Berkeley 22 Ptolemy II Model Defines a Workflow This Ptolemy II model creates and executes a MapReduce application for a parameterized number of machines.

Feng & Lee, Berkeley 23 Using Other MoCs Here we have used Event-Relationship graphs [Schruben 83] to specify the transformation logic.

Feng & Lee, Berkeley 24 Summary Patterns, replacements, and workflows are all expressed using the same target modeling language(s) as the application. Mixing of modeling languages / models of computation (via the Ptolemy II framework) is supported in the application, patterns, replacements, and workflows. Visual syntaxes become more scalable and flexible. Applications Model optimization Scalable model construction Product families Design refactoring Workflow automation …