Abstract
Twig is a language for writing typemaps, programs which transform the type of a value while preserving its underlying meaning. Typemaps are typically used by tools that generate code, such as multi-language wrapper generators, to automatically convert types as needed. Twig builds on existing typemap tools in a few key ways. Twig's typemaps are composable so that complex transformations may be built from simpler ones. In addition, Twig incorporates an abstract, formal model of code generation, allowing it to output code for different target languages. We describe Twig's formal semantics and show how the language allows us to concisely express typemaps. Then, we demonstrate Twig's utility by building an example typemap.
- Python/C API Reference Manual. http://docs.python.org/c-api/, Jan. 2012.Google Scholar
- F. Baader and T. Nipkow. Term Rewriting and All That. Cambridge University Press, New York, NY, USA, 1998. Google Scholar
Digital Library
- D. M. Beazley. Automated scientific software scripting with SWIG. Future Gener. Comput. Syst., 19: 599--609, July 2003. Google Scholar
Digital Library
- M. Blume. No-longer-foreign: Teaching an ML compiler to speak C natively. Electronic Notes in Theoretical Computer Science, 59(1): 36--52, 2001.Google Scholar
Cross Ref
- K. Fisher, R. Pucella, and J. Reppy. Data-level interoperability. In Electronic Notes in Theoretical Computer Science, 2001.Google Scholar
- K. Fisher, R. Pucella, and J. Reppy. A framework for interoperability. In Proceedings of the First International Workshop on Multi-Language Infrastructure and Interoperability (BABEL'01), volume 59 of Electronic Notes in Theoretical Computer Science, Sept. 2001.Google Scholar
Cross Ref
- K. Fisher and J. Reppy. The design of a class mechanism for Moby. In Proceedings of the SIGPLAN 1999 Conference on Programming Language Design and Implementation, pages 37--49, New York, NY, May 1999. ACM. Google Scholar
Digital Library
- G. Hulette, M. Sottile, and A. Malony. Wool: A workflow programming language. ESCIENCE '08: Proceedings of the 2008 Fourth IEEE International Conference on eScience, Dec 2008. Google Scholar
Digital Library
- J. Reppy and C. Song. Application-specific foreign-interface generation. In Proceedings of the Fifth International Conference on Generative Programming and Component Engineering, pages 49--58, Oct. 2006. Google Scholar
Digital Library
- E. Visser and Z. el Abidine Benaissa. A core language for rewriting. Electronic Notes in Theoretical Computer Science, 15: 422--441, Jan 1998.Google Scholar
Cross Ref
Index Terms
Composing typemaps in Twig
Recommendations
Composing typemaps in Twig
GPCE '12: Proceedings of the 11th International Conference on Generative Programming and Component EngineeringTwig is a language for writing typemaps, programs which transform the type of a value while preserving its underlying meaning. Typemaps are typically used by tools that generate code, such as multi-language wrapper generators, to automatically convert ...
Composing schema mappings: second-order dependencies to the rescue
PODS '04: Proceedings of the twenty-third ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systemsA schema mapping is a specification that describes how data structured under one schema (the source schema) is to be transformed into data structured under a different schema (the target schema). Schema mappings play a key role in numerous areas of ...






Comments