Code Generation in Ptolemy II
Jeffrey Tsay, Shuvra S. Bhattacharyya1, Christopher Hylands2, Edward A. Lee2 , 1University of Maryland at College Park 2 UC Berkeley
ssb@eng.umd.edu

In this poster, we describe a software architecture and associated infrastructure for developing component-based software and hardware synthesis tools in Ptolemy II. Previous related efforts on synthesis tools have maintained a high degree of separation between inter-component and intra-component compilation, which limits opportunities for effective optimization. The Ptolemy II synthesis infrastructure parses intra-component Java source code and integrates this source code analysis with analysis of the relevant inter-component model of computation. Customized code generators can then be invoked to synthesize code for arbitrary target languages from the Ptolemy II integrated intermediate representation. To provide further flexibility, Ptolemy II also provides a shallow code generation mode that reads in a model and generates Java code for a composite actors that implements that model.