MELT - a Translated Domain Specific Language Embedded in the GCC Compiler

Basile Starynkevitch
(CEA, LIST)

The GCC free compiler is a very large software, compiling source in several languages for many targets on various systems. It can be extended by plugins, which may take advantage of its power to provide extra specific functionality (warnings, optimizations, source refactoring or navigation) by processing various GCC internal representations (Gimple, Tree, ...). Writing plugins in C is a complex and time-consuming task, but customizing GCC by using an existing scripting language inside is impractical. We describe MELT, a specific Lisp-like DSL which fits well into existing GCC technology and offers high-level features (functional, object or reflexive programming, pattern matching). MELT is translated to C fitted for GCC internals and provides various features to facilitate this. This work shows that even huge, legacy, software can be a posteriori extended by specifically tailored and translated high-level DSLs.

In Olivier Danvy and Chung-chieh Shan: Proceedings IFIP Working Conference on Domain-Specific Languages (DSL 2011), Bordeaux, France, 6-8th September 2011, Electronic Proceedings in Theoretical Computer Science 66, pp. 118–142.
Published: 1st September 2011.

ArXived at: https://dx.doi.org/10.4204/EPTCS.66.6 bibtex PDF
References in reconstructed bibtex, XML and HTML format (approximated).
Comments and questions to: eptcs@eptcs.org
For website issues: webmaster@eptcs.org