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.

Slides:



Advertisements
Similar presentations
Introduction to Compilation of Functional Languages Wanhe Zhang Computing and Software Department McMaster University 16 th, March, 2004.
Advertisements

Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
1 OBJECTIVES To generate a web-based system enables to assemble model configurations. to submit these configurations on different.
Ewa Deelman, Integrating Existing Scientific Workflow Systems: The Kepler/Pegasus Example Nandita Mangal,
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.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
Component Technologies for Embedded Systems Johan Eker.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
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.
February 12, 2009 Center for Hybrid and Embedded Software Systems Encapsulated Model Transformation Rule A transformation.
3/12/ Modeling and controlling the Caltech Ducted Fan Vehicle Steve Neuendorffer, Ptolemy Group, UC Berkeley.
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.
Programming with actors Jörn W. Janneck Xilinx Research Labs.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 PTIDES: A Programming Model for Time- Synchronized Distributed Real-time Systems Yang.
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,
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 JHDL Hardware Generation Mike Wirthlin and Matthew Koecher
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 The Component Interaction Domain: Modeling Event-Driven and Demand- Driven Applications.
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 MESCAL Application Modeling and Mapping: Warpath Andrew Mihal and the MESCAL team UC Berkeley.
Lee & Henzinger ESWG #1 UC Berkeley Mobies Technology Project Process-Based Software Components for Networked Embedded Systems PI: Edward Lee CoPI: Tom.
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.
© 2008 IBM Corporation Behavioral Models for Software Development Andrei Kirshin, Dolev Dotan, Alan Hartman January 2008.
Chapter 6 – Architectural Design Lecture 2 1Chapter 6 Architectural design.
JSP Standard Tag Library
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Chapter 1. Introduction.
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
1 Programming Languages Tevfik Koşar Lecture - II January 19 th, 2006.
CSC 338: Compiler design and implementation
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
1 COMP 3438 – Part II-Lecture 1: Overview of Compiler Design Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
Eurostat Expression language (EL) in Eurostat SDMX - TWG Luxembourg, 5 Jun 2013 Adam Wroński.
Languages for HW and SW Development Ondrej Cevan.
Compressed Abstract Syntax Trees as Mobile Code Christian H. Stork Vivek Haldar University of California, Irvine.
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.
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.
Incremental Checkpointing with Application to Distributed Discrete Event Simulation Thomas Huining Feng and Edward A. Lee {tfeng,
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
Presented by : A best website designer company. Chapter 1 Introduction Prof Chung. 1.
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.
Objective of the course Understanding the fundamentals of the compilation technique Assist you in writing you own compiler (or any part of compiler)
Chapter 1. Introduction.
The language focusses on ease of use
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.
Chapter 1 Introduction.
TRUST:Team for Research in Ubiquitous Secure Technologies
Code Generation for Ptolemy II
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
Retargetable Model-Based Code Generation in Ptolemy II
Programming Languages 2nd edition Tucker and Noonan
Jörn W. Janneck The Ptolemy Group University of California, Berkeley
Principles of Programming Languages
The Caltrop Actor Language a short introduction
6.001 SICP Interpretation Parts of an interpreter
Presentation transcript:

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

Ptolemy Miniconference 2 C AL 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

Ptolemy Miniconference 3 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)

Ptolemy Miniconference 4 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

Ptolemy Miniconference 5 actor ID () In ==> Out : action [a] ==> [a] end end Simple actors 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

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

Ptolemy Miniconference 7 Action guards 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 do s := 0; end action input patterns declaring variables guard specifying enabling conditions output expressions computing output tokens body modifying the actor state

Ptolemy Miniconference 8 Action schedules 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 do s := 0; end 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: A: action Input1: [x] ==> [x] end B: action Input2: [x] ==> [x] end schedule regexp (A B)* end

Ptolemy Miniconference 9 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

Ptolemy Miniconference 10 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

Ptolemy Miniconference 11 Executing C AL : Interpreter Ptolemy actor –configured by C AL 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?

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

Ptolemy Miniconference 13 Executing C AL : Composer/Translator A C B C AL ML composition C AL ML C AL code generation model of computation a Ptolemy II model

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

Ptolemy Miniconference 15 Conclusion C AL is a Ptolemy scripting language –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

Ptolemy Miniconference 16 Thank you. resources: contact: