MELT-a Translated Domain Specific Language Embedded in the GCC Compiler
CEA, LIST
arXiv:1109.0779v1 [cs.PL] (5 Sep 2011)
@article{starynkevitch2011melt,
title={MELT-a Translated Domain Specific Language Embedded in the GCC Compiler},
author={Starynkevitch, B.},
journal={Arxiv preprint arXiv:1109.0779},
year={2011}
}
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.
November 7, 2011 by hgpu