Electrical Engineering
      and Computer Sciences

Electrical Engineering and Computer Sciences

COLLEGE OF ENGINEERING

UC Berkeley

   

2009 Research Summary

Actor Model-to-C Embedded Programming

View Current Project Information

Man-Kit Leung, Christopher Brooks and Edward A. Lee

National Science Foundation 0720882, Army Research Office FA9550-06-0312 and Air Force Research Laboratory FA8750-08-2-0001

Embedded systems programming is often difficult because the current programming tools provide very little and only primitive mechanisms for expressing concurrency. Ptolemy II [1-3] addresses this problem. It is a software platform that allows safe and disciplined experimentation with various models of computation (MoCs). While its graphical syntax gives an intuitive easy-to-use user front end and component-based model, code generation (CG) is necessary for transforming applications from actor models to native code running on various embedded platforms. CG compiles actor models and specializes the code for performance and efficiency [4].

Compilation of actor models is not a straightforward process because application semantics can be expressed heterogeneously. This is realized by composition of MoCs. Each MoC inherently is expressed very differently in code (i.e., imagine the difference between an event-triggered program versus a dataflow program). CG needs to be able to express this composition as well [5]. This presents a wide range of challenges and optimization opportunities. CG uses a top-down mapping strategy using a special software architecture where helper classes are used as software containers to isolate the code complexity of director and actor classes. Various meta-programming techniques are used to maximize code reuse and statically parameterize the output code.

In addition to building primitive interface code and general optimizations, we also recognize the tradeoffs between different styles of code structure in various metrics relevant to embedded systems (e.g., code/data memory size, run-time performance, and parallel execution). The next step is to outline the metrics to measure CG and perform these measurements. We also want to gain understanding of the various kinds of parallelism provided by different hardware platforms. We envision automating the process of mapping software concurrency to parallel processing units.

[1]
C. Brooks, E. A. Lee, X. Liu, S. Neuendorffer, Y. Zhao, and H. Zheng (eds.), "Heterogeneous Concurrent Modeling and Design in Java (Volume 1: Introduction to Ptolemy II," UC Berkeley EECS Department Technical Report No. UCB/EECS-2008-28, April 1, 2008.
[2]
C. Brooks, E. A. Lee, X. Liu, S. Neuendorffer, Y. Zhao, and H. Zheng (eds.), "Heterogeneous Concurrent Modeling and Design in Java (Volume 2: Ptolemy II Software Architecture)," UC Berkeley EECS Department Technical Report No. UCB/EECS-2008-28, April 1, 2008.
[3]
C. Brooks, E. A. Lee, X. Liu, S. Neuendorffer, Y. Zhao, and H. Zheng (eds.), "Heterogeneous Concurrent Modeling and Design in Java (Volume 3: Ptolemy II Domains)," UC Berkeley EECS Department Technical Reports, UC Berkeley EECS Department Technical Report No. UCB/EECS-2008-37, April 15, 2008.
[4]
G. Zhou, M.-K. Leung, and E. A. Lee, "A Code Generation Framework for Actor-Oriented Models with Partial Evaluation," Proceedings of International Conference on Embedded Software and Systems 2007, LNCS Vol. 4523, Daegu, South Korea, May 14-16, 2007, pp. 786-799.
[5]
M.-K. Leung and E. A. Lee. "An Extensible Software Synthesis Framework for Heterogeneous Actor Models," Proceedings of SLA++P 2008, Model-driven High-level Programming of Embedded Systems, Artist, March 2008.