1 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and.

Slides:



Advertisements
Similar presentations
Continuing Abstract Interpretation We have seen: 1.How to compile abstract syntax trees into control-flow graphs 2.Lattices, as structures that describe.
Advertisements

Translation-Based Compositional Reasoning for Software Systems Fei Xie and James C. Browne Robert P. Kurshan Cadence Design Systems.
A System to Generate Test Data and Symbolically Execute Programs Lori A. Clarke September 1976.
Based on: Petri Nets and Industrial Applications: A Tutorial
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Algorithms + L. Grewe.
Chapter 10 Algorithmic Thinking. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning Objectives List the five essential.
An Automata-based Approach to Testing Properties in Event Traces H. Hallal, S. Boroday, A. Ulrich, A. Petrenko Sophia Antipolis, France, May 2003.
DATAFLOW PROCESS NETWORKS Edward A. Lee Thomas M. Parks.
1 Basic abstract interpretation theory. 2 The general idea §a semantics l any definition style, from a denotational definition to a detailed interpreter.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
UML – Class Diagrams.
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.
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 Java Code Generation Steve Neuendorffer 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.
1 8. Safe Query Languages Safe program – its semantics can be at least partially computed on any valid database input. Safety is tied to program verification,
Complexity Analysis (Part I)
CS 536 Spring Global Optimizations Lecture 23.
February 12, 2009 Center for Hybrid and Embedded Software Systems Encapsulated Model Transformation Rule A transformation.
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.
A Denotational Semantics For Dataflow with Firing Edward A. Lee Jike Chong Wei Zheng Paper Discussion for.
Data Flow Analysis Compiler Design Nov. 8, 2005.
Prof. Fateman CS 164 Lecture 221 Global Optimization Lecture 22.
February 12, 2009 Center for Hybrid and Embedded Software Systems Model Transformation Using ERG Controller Thomas H. Feng.
Orderings and Bounds Parallel FSM Decomposition Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 10 Update and modified by Marek.
Review CSC 171 FALL 2004 LECTURE 21. Topics Objects and Classes Fundamental Types Graphics and Applets Decisions Iteration Designing Classes Testing and.
Chapter 2: Developing a Program Extended and Concise Prelude to Programming Concepts and Design Copyright © 2003 Scott/Jones, Inc.. All rights reserved.
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 MESCAL Application Modeling and Mapping: Warpath Andrew Mihal and the MESCAL team UC Berkeley.
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
Prof. Bodik CS 164 Lecture 16, Fall Global Optimization Lecture 16.
The Fundamentals: Algorithms, the Integers & Matrices.
Fundamentals of Python: From First Programs Through Data Structures
Abstract Interpretation (Cousot, Cousot 1977) also known as Data-Flow Analysis.
Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU.
Fundamentals of Python: First Programs
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
Abstract Data Types (ADTs) and data structures: terminology and definitions A type is a collection of values. For example, the boolean type consists of.
Composing Models of Computation in Kepler/Ptolemy II
Algorithm Input Output An algorithm is a step-by-step procedure for solving a problem in a finite amount of time. Chapter 4. Algorithm Analysis (complexity)
Chapter 1 In-lab Quiz Next week
1 Relational Expressions Relational expressions: –Expressions that compare operands –Sometimes called conditions –Evaluated to yield a result –Typically.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
The minimum cost flow problem. Simplifying assumptions Network is connected (as an undirected graph). – We can consider each connected component separately.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 Storing Organizational Information - Databases.
Algorithms & Flowchart
Learning the Structure of Related Tasks Presented by Lihan He Machine Learning Reading Group Duke University 02/03/2006 A. Niculescu-Mizil, R. Caruana.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
Week III  Recap from Last Week Review Classes Review Domain Model for EU-Bid & EU-Lease Aggregation Example (Reservation) Attribute Properties.
Algorithms 1.Notion of an algorithm 2.Properties of an algorithm 3.The GCD algorithm 4.Correctness of the GCD algorithm 5.Termination of the GCD algorithm.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Constraints Assisted Modeling and Validation Presented in CS294-5 (Spring 2007) Thomas Huining Feng Based on: [1]Constraints Assisted Modeling and Validation.
Incremental Checkpointing with Application to Distributed Discrete Event Simulation Thomas Huining Feng and Edward A. Lee {tfeng,
Software Engineering Issues Software Engineering Concepts System Specifications Procedural Design Object-Oriented Design System Testing.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
System To Generate Test Data: The Analysis Program Syed Nabeel.
Engineering Optimization Most engineering design involves using optimization software Minimizes or maximizes a merit function Applies functional constraints.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
T imed Languages for Embedded Software Ethan Jackson Advisor: Dr. Janos Szitpanovits Institute for Software Integrated Systems Vanderbilt University.
Topics  Direct Predicate Characterization as an evaluation method.  Implementation and Testing of the Approach.  Conclusions and Future Work.
Functional Programming
Unified Modeling Language
Chapter 5 Decisions. Chapter 5 Decisions ssential uestion: How are Boolean expressions or operators used in everyday life?
An Introduction to Software Architecture
Model Transformation with the Ptera Controller
Presented By: Darlene Banta
Presentation transcript:

1 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. Ptolemy Hierarchical Orthogonal Multi-Attribute Solver (PtHOMAS) Ptolemy mini-conference April Jackie Mankit Leung, Thomas Huining Feng (UC Berkeley) Thomas Mandl, Elizabeth Latronico, Charles Shelton (Bosch)

2 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. Motivation  Cars are networked software systems Up to 70 Electronic Control Units Software crucial for many features Electronic stability control Parking assist Emissions control Engine Start/Stop Active and passive safety  How can we manage increasing complexity and interconnectedness?  Analysis approaches promising, but hand-annotation has drawbacks Time intensive to develop and maintain People are inconsistent, make errors Repeat for every composition

3 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. How can a computer think like a software designer?  Constant / Non-constant example All sources are constant, so Display is constant (here, 21) If any source is non-constant, Display could be non-constant  How does a person know that?  How are constant and non-constant related?  What are the rules for each individual actor?  What rules govern the connections among actors? 21 ? ?

4  The ontology consists of two things: A property lattice, consisting of: Property (“Concept”) Edge (“Relationship”) Constraints on property-able objects (actors, expressions, …) Inequality terms Monotonic functions  Implementation Re-use Ptolemy type system constraint solving algorithms New! Graphical interface (for both lattice, inequality constraints) Java class definition for special cases PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. Frame the problem with an ontology For example: P(output) >= P(input) Property Edge

5 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. Property lattice example  Complete partial ordering of our properties Common bottom element Common top element Can promote higher in lattice, but not lower  Type system is a familiar example Integer to Double is OK 3 to 3.0 Double to Integer is not! 3.14 to 3 General Boolean Not a Type Integer Double Complex Scalar Long Simplified Ptolemy type system

6 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. Constant / Non-constant lattice  How are constant and non-constant related? Define a new lattice: Constant: Value is always the same Non-constant: Value might change (but, perhaps does not) Correct but conservative In this case, since there are no branches, Non-constant is the common top element  Can define your own lattice for your properties! Constant Non-Constant Unknown

7 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. Constraint analysis process  Ptolemy has a scalable and efficient solver algorithm Linear with the number of constraints Static analysis, so no execution required Accepts a list of pairwise inequalities Solves for least (what we want) or greatest upper bound  Constraint generation Need rules for each object in library; sharing possible Map objects to inequality terms (ports for most actors) Set of rules for finite state machines and expressions Constraint list a >= Constant b >= a c >= a Solver Result a, b, c == Constant Rule output >= input Constraint list Actor.out >= Actor.in1 Actor.out >= Actor.in2 Actor2.out >= Actor2.in1

8 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. Property constraints for actors in example  Const actor: output >= Constant  Sequence actor: output >= Non-constant  Math actors (AddSubtract, MultiplyDivide, Maximum) output >= input, for all input signals output >= input1 output >= input2 Extends to multiple channels for multiport

9 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. Model-wide property constraints for connections  Model-wide constraints are specified in new “solver box” actor  Here, sink >= source for connections Add1.input >= C1.output Add1.input >= C2.output Multiply3.input >= Add1.output Add1.input C2.output C1.output Add1.output Multiply3.input

10 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. Results for the example  Property annotation at every point in large models with minimal user effort All constant sourcesOne non-constant source

11 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. Future topics  Ontologies New lattices for a variety of properties and use cases Learn about existing ontologies from different communities What ontology concepts are expressible in a lattice?  Model transformation Use property annotations to guide and simplify model transformation  Property correctness and extraction Verify hand-written rules Automatically extract rules for new objects Relate to partial evaluation / program specialization  For a more interesting demo, see us at the break!  Thanks! 

12 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. Backup slides

13 PtHOMAS project, Ptolemy mini-conference '09 CR/RTC3-NA Elizabeth Latronico; UC Berkeley Jackie Mankit Leung | 4/16/2009 | © 2009 Robert Bosch LLC and affiliates. All rights reserved. package ptolemy.data.properties.lattice.logicalAND; public class Lattice extends PropertyLattice { public Property TRUE = new True(this); public Property FALSE = new False(this); public Property UNKNOWN = new Unknown(this); public Lattice() { addNodeWeight(TRUE); addNodeWeight(FALSE); addNodeWeight(UNKNOWN); addEdge(UNKNOWN, TRUE); addEdge(TRUE, FALSE); if (!isLattice()) { throw new Exception("The PropertyLattice is not a lattice."); } Lattice Java Class The package defines the use- case / ontology for this lattice. Properties are defined as public fields. Relationship is specified by adding edges from one element to another.