An Extensible and Retargetable Code Generation Framework for Actor Models
Man-Kit Leung
EECS Department, University of California, Berkeley
Technical Report No. UCB/EECS-2009-187
December 19, 2009
http://www2.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-187.pdf
Model-based code generation (MBCG) is a new field of research that arises from the advancement of high-level modeling languages. It is the syntactical transformation of a source model into some textual representation or program. Its applicability ranges from accelerating execution, targeting various platforms to enhancing model interoperability. MBCG is a key agent in sharing models across different research communities and maximizing the impact of the model-based design methodology. However, because of the raised level of abstractions, code generation in a model-based environment brings up a new set of problems beyond traditional compiler research.
Using Ptolemy II as an exemplar modeling environment, this report explores the challenges and problems that exist for model-based code generation. The report describes a reusable code generation framework built using two simple design patterns, code template and adapter, that are well-suited for an actor-based environment. The extensible infrastructure helps simplify the process for future experiments, especially for new models of computation (MoCs). The report tackles the challenges posed by configurable higher-order actors. It also demonstrates a system for incorporating multiple datatypes and specializing polymorphic functions to increase code efficiency.
Advisors: Edward A. Lee
BibTeX citation:
@mastersthesis{Leung:EECS-2009-187, Author= {Leung, Man-Kit}, Title= {An Extensible and Retargetable Code Generation Framework for Actor Models}, School= {EECS Department, University of California, Berkeley}, Year= {2009}, Month= {Dec}, Url= {http://www2.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-187.html}, Number= {UCB/EECS-2009-187}, Abstract= {Model-based code generation (MBCG) is a new field of research that arises from the advancement of high-level modeling languages. It is the syntactical transformation of a source model into some textual representation or program. Its applicability ranges from accelerating execution, targeting various platforms to enhancing model interoperability. MBCG is a key agent in sharing models across different research communities and maximizing the impact of the model-based design methodology. However, because of the raised level of abstractions, code generation in a model-based environment brings up a new set of problems beyond traditional compiler research. Using Ptolemy II as an exemplar modeling environment, this report explores the challenges and problems that exist for model-based code generation. The report describes a reusable code generation framework built using two simple design patterns, code template and adapter, that are well-suited for an actor-based environment. The extensible infrastructure helps simplify the process for future experiments, especially for new models of computation (MoCs). The report tackles the challenges posed by configurable higher-order actors. It also demonstrates a system for incorporating multiple datatypes and specializing polymorphic functions to increase code efficiency.}, }
EndNote citation:
%0 Thesis %A Leung, Man-Kit %T An Extensible and Retargetable Code Generation Framework for Actor Models %I EECS Department, University of California, Berkeley %D 2009 %8 December 19 %@ UCB/EECS-2009-187 %U http://www2.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-187.html %F Leung:EECS-2009-187