Title :
Tool Demonstration: Silver Extensible Compiler Frameworks and Modular Language Extensions for Java and C
Author :
Van Wyk, Eric ; Krishnan, Lijesh ; Bodin, Derek ; Johnson, Eric ; Schwerdfeger, August ; Russell, Phil
Author_Institution :
University of Minnesota, USA
Abstract :
In this tool demonstration of Silver extensible compiler frameworks for Java and C we illustrate how new languages that are adapted to specific problem domains can be easily created, by their users, by importing a set of desired domain-specific language extensions into an extensible host language compiler. Language extensions for computational geometry and database access will be shown. We also show extensions that provide general purpose language features such as algebraic types and pattern matching can be imported into an extensible language compiler. Each Silver extensible compiler framework supports the development of language extensions that have two important facets. First, language extensions should satisfy a completeness requirement. That is, they should be as welldeveloped as host language features and fit seamlessly into the host language. In particular, the language feature designer should be able to specify new language constructs together with their domain-specific semantic analyses and techniques for their optimization. One aspect of this requirement is that language extension should report a useful error message when they are used incorrectly. Second, the extensions should be modular so that a programmer can extend his or her language by choosing from a collection of previously defined features knowing only the functionality they provide and with no implementation-level knowledge or a detailed analysis of their interactions. Thus we draw a distinction between the programmer importing an extension and the feature designer who implements it. We will show extensible compilers for both C and Java. These compilers are defined by an attribute grammar written in the Silver attribute grammar language. A Silver compiler analyses attribute grammar specifications and generates an executable compiler for the defined (extended) language by translating the Silver specifications into an efficient Haskell representation. Language extensions are also specified as Silv- er attribute grammar fragments and the framework tools automatically compose specifications of the host language and chosen language extensions into a specification for the custom extended language.
Keywords :
Computational geometry; Computer science; Design optimization; Domain specific languages; Engineering profession; Java; Pattern matching; Programming profession; Silver; Spatial databases;
Conference_Titel :
Source Code Analysis and Manipulation, 2006. SCAM '06. Sixth IEEE International Workshop on
Conference_Location :
Philadelphia, PA, USA
Print_ISBN :
0-7695-2353-6
DOI :
10.1109/SCAM.2006.32