Assimilating MetaBorg:: embedding language tools in languages

  • Authors:
  • Jonathan Riehl

  • Affiliations:
  • University of Chicago

  • Venue:
  • Proceedings of the 5th international conference on Generative programming and component engineering
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

The MetaBorg usage pattern allows concrete syntax to be associated with application programmer interfaces (API's). Once a concrete syntax is defined, library writers use the Stratego language to write transformations from the concrete syntax to API data and calls in the host language. The result is a compile time translator from the combined host and domain languages to the host language. This translator is not programmable at compile time, and little or none of the infrastructure can be leveraged by a program at run time.These limitations make the MetaBorg pattern difficult or impractical to use in interactive programming. One possibility for adding interactivity to language assimilation is the application of the MetaBorg pattern to Stratego/XT itself. Assimilating language tools into languages, especially dynamic languages, better serves incremental and interactive development. Furthermore, language tool assimilation allows experimentation with language extension at compiler-compile time, compile time, load time and run time.This paper looks at language tool assimilation and makes three contributions. First, it introduces the domain-specific optimization use case as an additional problem that Stratego and related technology might solve. Second, it "partially evaluates" the MetaBorg pattern on the domain-specific languages used in Stratego/XT. Third, and finally, it generalizes the result of the MetaBorg partial evaluation, identifying several applications and application strategies.