Models of Computation as Program Transformations Chris Chang

Slides:



Advertisements
Similar presentations
Types and Programming Languages Lecture 13 Simon Gay Department of Computing Science University of Glasgow 2006/07.
Advertisements

Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
Unified Modeling Language
Rule Based Operational Semantics Specification in Ptolemy Yanwar Asrigo COMP 763B - Modeling and Simulation Based Design 30 th April 2008.
A code generator for the CAL actor language Lars Wernli Supervisor: Joern Janneck, UC Berkeley Professor: Lothar Thiele, ETH Zuerich.
Winter 2007SEG2101 Chapter 41 Chapter 4 SDL – Structure and Behavior.
Component Technologies for Embedded Systems Johan Eker.
Type System, March 12, Data Types and Behavioral Types Yuhong Xiong Edward A. Lee Department of Electrical Engineering and Computer Sciences University.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
February 11, 2010 Center for Hybrid and Embedded Software Systems Ptolemy II - Heterogeneous Concurrent Modeling and Design.
Using Interfaces to Analyze Compositionality Haiyang Zheng and Rachel Zhou EE290N Class Project Presentation Dec. 10, 2004.
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 C AL - An actor language Jörn W. Janneck The Ptolemy Group University of California, Berkeley.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
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.
Chapter 10-Arithmetic-logic units
Heterochronous Dataflow in Ptolemy II Brian K. Vogel EE249 Project Presentation, Dec. 4, 1999.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley System-Level Types for Component-Based Design Edward A.
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.
1 Info 1409 Systems Analysis & Design Module Lecture 8 – Modelling tools and techniques HND Year /9 De Montfort University.
Introduction to Software Engineering CS-300 Fall 2005 Supreeth Venkataraman.
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
C++ fundamentals.
Terms: Test (Case) vs. Test Suite
1.1 1 Introduction Foundations of Computer Science  Cengage Learning.
C++ Object Oriented 1. Class and Object The main purpose of C++ programming is to add object orientation to the C programming language and classes are.
Unit B065 – Coding a solution PREP WORK 1)Make sure you keep a work log / diary. Use the table on page 16 of the hand book as a template 2)Keep a bibliography.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Voicu Groza, 2008 SITE, HARDWARE/SOFTWARE CODESIGN OF EMBEDDED SYSTEMS Hardware/Software Codesign of Embedded Systems Voicu Groza SITE Hall, Room.
Chapter 13: Implementation Phase 13.3 Good Programming Practice 13.6 Module Test Case Selection 13.7 Black-Box Module-Testing Techniques 13.8 Glass-Box.
Requirements Engineering Requirements Elicitation Process Lecture-8.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
SaveUML System design. System overview Possible...
Paper written by Flavio Oquendo Presented by Ernesto Medina.
Procedures for managing workflow components Workflow components: A workflow can usually be described using formal or informal flow diagramming techniques,
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
How Solvable Is Intelligence? A brief introduction to AI Dr. Richard Fox Department of Computer Science Northern Kentucky University.
Lyra – A service-oriented and component-based method for the development of communicating systems (by Sari Leppänen, Nokia/NRC) Traditionally, the design,
C. André, J. Boucaron, A. Coadou, J. DeAntoni,
Copyright © 2013 Curt Hill UML Unified Modeling Language.
1 Capturing Requirements As Use Cases To be discussed –Artifacts created in the requirements workflow –Workers participating in the requirements workflow.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
CSE 311 Foundations of Computing I Lecture 26 Computability: Turing machines, Undecidability of the Halting Problem Spring
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
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.
Week 04 Object Oriented Analysis and Designing. What is a model? A model is quicker and easier to build A model can be used in simulations, to learn more.
A Mediated Approach towards Web Service Choreography Michael Stollberg, Dumitru Roman, Juan Miguel Gomez DERI – Digital Enterprise Research Institute
Actor Oriented Programming with CAL -designing embedded system components Johan Eker Department of Automatic Control, Lund University Chris Chang, Jörn.
Arithmetic-logic units1 An arithmetic-logic unit, or ALU, performs many different arithmetic and logic operations. The ALU is the “heart” of a processor—you.
What’s Ahead for Embedded Software? (Wed) Gilsoo Kim
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Algorithms and Problem Solving
Object-Oriented Analysis and Design
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Unified Modeling Language
About the Presentations
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Code Generation for Ptolemy II
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
Modeling Heterogeneous Semantics in Ptolemy
Introduction To software engineering
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Algorithms and Problem Solving
Presentation transcript:

Models of Computation as Program Transformations Chris Chang

Overview Outline: –What is a model of computation? –One concrete example of a model of computation as an automaton: Ptolemy II. –A model of computation as a program transformation: the grand scheme. –The actual project: an “SDF Compiler”. One of the goals of this project is to formalize the notion of a model of computation.

What is a model of computation? Vague, overloaded term: different meanings to different people. E.g., in computer science: –Turing Machine –Lambda Calculus One definition, from the Ptolemy II manual: –“Executable models are constructed under a model of computation, which is a set of ‘laws of physics’ that govern the interaction of components in the model…a set of rules that govern the interaction of components is called the semantics of the model of computation.”

Component = Actor An actor is a special type of object that: –Communicates with other actors by sending and receiving data via its input and output ports. No shared state between actors. An actor can’t call methods of another actor. –Executes in atomic steps (firings).

Actors alone are not enough a port a connection Suppose you had a description for each of these atomic actors (say in Java). Could you then say how this entire network should behave? Not without some more information! an actor

Handwaving continued… What exactly is the mechanism for passing data between actors? How and when do actors fire? Etc… What we have is a bunch of actors… But no director!

Some analogies The actors are like puppets, but they are lifeless without a puppeteer. This puppeteer (or model of computation, or director…) imposes a semantics on the network. Swap puppeteers, and the result is a different program.

An idealized example actors are black boxes… …with an interface to the director

Actors + Director = Program t t n Here comes the director… We can imagine what the data looks like at a connection:

Some observations The interface to the director is the same for all directors (models of computation). –And furthermore, actors are black boxes: this interface is the only way for the director to talk to an actor. Ideally, an actor would be polymorphic: –the same actor would still work under different models of computation, but it would behave differently. The actor network, combined with the model of computation, behaves just like another actor: it is a composite actor.

Ptolemy II (Lee, et. al.) Ptolemy II works more or less like this. –More: A model of computation in Ptolemy II is very much like a puppeteer or an automaton. It directly controls the execution of the actors. –Less: Black boxes aren’t opaque. The interface specification is a moving target: it’s hard to anticipate what features new models of computation will need. Many actors are not polymorphic.

Prelude to a different approach A composite actor is indistinguishable from an atomic actor to the outside world. A director is needed to create a composite actor. Why not look at the director as a compositing transformation?

Prelude to a different approach Suppose you had a language for describing actors. –But the language says nothing about the process of combining actors together in a network. Several members of the Ptolemy group are working on such a language: –CAL (Cal Actor Language).

A thought experiment Theoretically, given any single black box (actor), we could then describe it in CAL. –But we have no way of knowing if the black box is an atomic actor or a composite actor. –Therefore, we should be able to describe the behavior of composite actors as well as atomic ones.

CAL should be able to describe any of these: CAL code ? = CAL code ? = CAL code ? =

Why not generate the CAL code autmatically? This first transformation is not very interesting—let’s just assume that atomic actors are written in CAL; hence this would just be an identity transformation. CAL code ?

Why not generate the CAL code autmatically? These transformations are more interesting; they are compositing transformations. ? ? CAL code ? CAL code ?

An idea Represent each model of computation with a different compiler. –The input: a bunch of actors, each with CAL source descriptions, and a data structure representing the network connections. –The output: CAL source code for the composite actor (corresponding to that model of computation). –A source to source transformation.

Model of computation = program transformation = = CAL code CAL code

Observations The automaton view of a model of computation was very much a “live” view: the automaton actively controls the actors. As a compiler, the model of computation is a static textual transformation. Gut feeling: the program transformation approach seems complimentary to the automaton approach. –Different philosophies.

The grand scheme Ideally, we want to discover this magic box (a compiler compiler)… ? Then we would finally be able to say what a model of computation really is! …and its associated magic input. ? ?

Humble beginnings Before trying to figure out what the magic box should be, we first implement a few specific cases. This project involves implementing a single, an SDF compiler. –The input: a network consisting of a special class of actors known as static data-flow (SDF) actors. –The output: a composite SDF actor.

Details The SDF compiler should perform these tasks: –“Typecheck”: make sure the input actors are indeed all of the SDF variety. –Schedule: compute a schedule for the network. The schedule, which is fixed during execution, gives the order in which actors are fired. –Combine: given the actor network, and the schedule, generate the composite actor.

Details, continued SDF “Typechecking” is trivial to implement in CAL, due to the static information available (more later). There are also standard algorithms for scheduling SDF networks. The last task, combining, involves some standard techniques covered in CS264. –Implementation in XSLT (experimental)