Jörn W. Janneck The Ptolemy Group University of California, Berkeley

Slides:



Advertisements
Similar presentations
1 OBJECTIVES To generate a web-based system enables to assemble model configurations. to submit these configurations on different.
Advertisements

A code generator for the CAL actor language Lars Wernli Supervisor: Joern Janneck, UC Berkeley Professor: Lothar Thiele, ETH Zuerich.
DATAFLOW PROCESS NETWORKS Edward A. Lee Thomas M. Parks.
Component Technologies for Embedded Systems Johan Eker.
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.
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.
February 12, 2009 Center for Hybrid and Embedded Software Systems Encapsulated Model Transformation Rule A transformation.
The Ptolemy Group University of California at Berkeley Jörn W. Janneck Actors, actor composition, and an actor language describing the semantics of (some)
Programming Languages Structure
MoBIES Working group meeting, September 2001, Dearborn Ptolemy II The automotive challenge problems version 4.1 Johan Eker Edward Lee with thanks.
The Caltrop Actor Language Johan Eker UC Berkeley MoBIES group, Carnegie Mellon, November 30, 2001.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI Program Review May 10,
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
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.
JSP Standard Tag Library
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Parser-Driven Games Tool programming © Allan C. Milne Abertay University v
CSC 338: Compiler design and implementation
Eurostat Expression language (EL) in Eurostat SDMX - TWG Luxembourg, 5 Jun 2013 Adam Wroński.
Languages for HW and SW Development Ondrej Cevan.
The course. Description Computer systems programming using the C language – And possibly a little C++ Translation of C into assembly language Introduction.
Chapter 1 Introduction. Chapter 1 - Introduction 2 The Goal of Chapter 1 Introduce different forms of language translators Give a high level overview.
Introduction to Compilers. Related Area Programming languages Machine architecture Language theory Algorithms Data structures Operating systems Software.
Component 4: Introduction to Information and Computer Science Unit 5: Overview of Programming Languages, Including Basic Programming Concepts Lecture 2.
RUBY by Ryan Chase.
A compiler is a computer program that translate written code (source code) into another computer language Associated with high level languages A well.
Actor Oriented Programming with CAL -designing embedded system components Johan Eker Department of Automatic Control, Lund University Chris Chang, Jörn.
Satisfying Requirements BPF for DRA shall address: –DAQ Environment (Eclipse RCP): Gumtree ISEE workbench integration; –Design Composing and Configurability,
CS223: Software Engineering
Ganga/Dirac Data Management meeting October 2003 Gennady Kuznetsov Production Manager Tools and Ganga (New Architecture)
TTCN-3 Testing and Test Control Notation Version 3.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
CHAPTER 1 INTRODUCTION TO COMPILER SUNG-DONG KIM, DEPT. OF COMPUTER ENGINEERING, HANSUNG UNIVERSITY.
Chapter 1. Introduction.
Operational Semantics of Scheme
Why don’t programmers have to program in machine code?
The language focusses on ease of use
Compiler Design (40-414) Main Text Book:
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Chapter 1 Introduction.
Lexical and Syntax Analysis
Introduction to Computer Science
Elaine Cheong Yang Zhao December 8, 2001
SOFTWARE DESIGN AND ARCHITECTURE
Welcome to CSE1002.
Chapter 1 Reasons to study concepts of PLs Programming Domains
Compiler Chapter 9. Intermediate Languages
Chapter 1 Introduction.
1.1 Reasons to study concepts of PLs
CMPE419 Mobile Application Development
TRUST:Team for Research in Ubiquitous Secure Technologies
Compiler Construction
Code Generation for Ptolemy II
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
Compiler 薛智文 TH 6 7 8, DTH Spring.
Compilation VS Interpretation
Retargetable Model-Based Code Generation in Ptolemy II
System Concept Simulation for Concurrent Engineering
Exploring the Power of EPDM Tasks - Working with and Developing Tasks in EPDM By: Marc Young XLM Solutions
Programming Languages 2nd edition Tucker and Noonan
Combining Compile-Time and Run-Time Components
Principles of Programming Languages
The Caltrop Actor Language a short introduction
6.001 SICP Interpretation Parts of an interpreter
Reasons To Study Programming Languages
CMPE419 Mobile Application Development
Modeling Event-Based Systems in Ptolemy II EE249 Project Status Report
Presentation transcript:

Jörn W. Janneck The Ptolemy Group University of California, Berkeley CAL - An actor language Jörn W. Janneck The Ptolemy Group University of California, Berkeley

CAL people Chris Chang Johan Eker (now Ericsson Mobile Platforms, Research) Ernesto Wandeler (ETH Zurich) Lars Wernli (then ETH Zurich) Ed Willink (Thales Research) Yang Zhao

Why another language? Writing simple actors should be simple. Ptolemy II API very rich actor writing requires considerable skill BUT: Actors have a lot of common structure. Models should allow efficient code generation. actor descriptions contain a lot of "admin" code local precedent: ptlang in Ptolemy Classic (J. Buck)

We should generate actors from a more abstract description. Why another language? We should generate actors from a more abstract description. reduces amount of code to be written makes writing actors more accessible reduces error probability makes code more versatile retargeting (other platforms, new versions of the Ptolemy API) analysis & composition

Simple actors actor firing º execution of one enabled action actor ID () In ==> Out : action [a] ==> [a] end end actor A (k) Input1, Input2 ==> Output: action [a], [b] ==> [k*(a + b)] end end actor Merge () Input1, Input2 ==> Output: action Input1: [x] ==> [x] end action Input2: [x] ==> [x] end end actor firing º execution of one enabled action

An actor with state actor Sum () Input ==> Output: sum := 0; action [a] ==> [sum] do sum := sum + a; end

Action guards action input patterns declaring variables actor FairMerge () Input1, Input2 ==> Output: s := 0; action Input1: [x] ==> [x] guard s = 0 do s := 1; end action Input2: [x] ==> [x] guard s = 1 action input patterns declaring variables guard specifying enabling conditions output expressions computing output tokens body modifying the actor state

Action schedules actor FairMerge () Input1, Input2 ==> Output: A: action Input1: [x] ==> [x] end B: action Input2: [x] ==> [x] end schedule fsm State0: State0 (A) --> State1; State1 (B) --> State0; end actor FairMerge () Input1, Input2 ==> Output: s := 0; action Input1: [x] ==> [x] guard s = 0 do s := 1; end action Input2: [x] ==> [x] guard s = 1 actor FairMerge () Input1, Input2 ==> Output: A: action Input1: [x] ==> [x] end B: action Input2: [x] ==> [x] end schedule regexp (A B)* end

First-class functions actor Sieve (predicate) Input ==> Output: filter := lambda (a) : false end; action [a] ==> [] guard filter(a) end action [a] ==> [a] guard not filter(a) var f = filter do filter := lambda(b) : f(b) or predicate(b,a) end; end

Programming language features optionally typed generic polymorphic type system full functional sub-language everything first-class citizen (well, almost) functions procedures NOT actors or actions (yet) lexically scoped no aliasing of stateful structures useful for handling concurrency

Executing CAL: Interpreter Ptolemy actor configured by CAL script smooth embedding into Ptolemy II first version in current release domain-dependent interpretation (Chris Chang) interpreter adapts to domain making actors more domain-polymorphic What's a model of computation?

Executing CAL: Translators XML for representing actors (CALML) persistent format infrastructure for checking, transformation XSLT as implementation language analysis program transformation code generation CAL CALML Canonical CALML generic Java generic C Palsjo/Koala (Lund) ... Pt/Java (UCB) JGrafChart (Lund) ...

Executing CAL: Composer/Translator model of computation A C CALML composition CALML B CAL CAL code generation a Ptolemy II model

Executing CAL: Discovering concurrency actor B () a, b ==> x, y: s := <something>; action a: [v] ==> x: [f(v, s)] end action b: [v] ==> y: [g(v)] do s := h(v, s); end

Conclusion CAL is a Ptolemy scripting language new research directions simple, portable description of actors can be analyzed, interpreted, compiled, composed new research directions composers as models of computation composer languages? infrastructure for executing actors component models, execution environments transformations/analyses of actor networks distribution efficient translation

Thank you. resources: www.gigascale.org/caltrop contact: janneck@eecs.berkeley.edu