A Code Generation Framework for Actor-Oriented Models with Partial Evaluation

  • Gang Zhou
  • Man-Kit Leung
  • Edward A. Lee
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4523)


Embedded software requires concurrency formalisms other than threads and mutexes used in traditional programming languages like C. Actor-oriented design presents a high level abstraction for composing concurrent components. However, high level abstraction often introduces overhead and results in slower system. We address the problem of generating efficient implementation for the systems with such a high level description. We use partial evaluation as an optimized compilation technique for actor-oriented models. We use a helper-based mechanism, which results in flexible and extensible code generation framework. The end result is that the benefit offered by high level abstraction comes with (almost) no performance penalty. The code generation framework has been released in open source form as part of Ptolemy II 6.0.1.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Lee, E.A.: The Problem with Threads. IEEE Computer 39(5), 33–42 (2006)Google Scholar
  2. 2.
  3. 3.
    Thies, W., Karczmarek, M., Amarasinghe, S.: StreamIt: A Language for Streaming Applications. In: Horspool, R.N. (ed.) CC 2002 and ETAPS 2002. LNCS, vol. 2304, p. 179. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  4. 4.
  5. 5.
    Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (June 1993)MATHGoogle Scholar
  6. 6.
    Kohler, E., Morris, R., Chen, B.: Programming language optimizations for modular router configurations. In: Proceedings of the Architectural Support for Programming Languages and Operating Systems (ASPLOS), October 2002, pp. 251–263 (2002)Google Scholar
  7. 7.
    Gomard, C.K., Jones, N.D.: A partial evaluator for the untyped lambda-calculus. Journal of Functional Programming 1(1), 21–69 (1991)MATHMathSciNetCrossRefGoogle Scholar
  8. 8.
    Lloyd, J.W., Shepherdson, J.C.: Partial evaluation in logic programming. Journal of Logic Programming 11(3-4), 217–242 (1991)CrossRefMathSciNetMATHGoogle Scholar
  9. 9.
    Andersen, L.O.: Partial evaluation of C and automatic compiler generation. In: Pfahler, P., Kastens, U. (eds.) CC 1992. LNCS, vol. 641, pp. 251–257. Springer, Heidelberg (1992)Google Scholar
  10. 10.
    Schultz, U.P.: Partial evaluation for class-based object-oriented languages. In: Danvy, O., Filinski, A. (eds.) PADO 2001. LNCS, vol. 2053, p. 173. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  11. 11.
    Ommerling, R.V.: The Koala component model for consumer electronics software. IEEE Computer 33(3), 78–85 (2000)Google Scholar
  12. 12.
    Tsay, J.: A Code Generation Framework for Ptolemy II. ERL Technical Memorandum UCB/ERL No. M00/25, Dept. EECS, University of California, Berkeley, CA 94720 (May 19, 2000)Google Scholar
  13. 13.
    Pino, J.L., Ha, S., Lee, E.A., Buck, J.T.: Software Synthesis for DSP Using Ptolemy. Journal on VLSI Signal Processing 9(1), 7–21 (1995)CrossRefGoogle Scholar
  14. 14.
    Girault, A., Lee, B., Lee, E.A.: Hierarchical Finite State Machines with Multiple Concurrency Models. IEEE Transactions On Computer-aided Design Of Integrated Circuits And Systems 18(6) (1999)Google Scholar
  15. 15.
    Lee, E.A., Messerschmitt, D.G.: Synchronous Data Flow. Proc. of the IEEE (September 1987)Google Scholar

Copyright information

© Springer Berlin Heidelberg 2007

Authors and Affiliations

  • Gang Zhou
    • 1
  • Man-Kit Leung
    • 1
  • Edward A. Lee
    • 1
  1. 1.University of California, Berkeley 

Personalised recommendations