This paper discusses an approach called Metapro-grammable Interpreters for Model-driven Engineering (MIME), which integrates C++ meta-programming techniques into model interpreters for domain-specific modeling languages (DSMLs). The goal of MIME is to reduce reinvention of core model interpretation logic across model interpreters that use the Visitor software design pattern. Experience from applying MIME's approach to realistic DSMLs show it overcomes limitations of existing Visitor-based model interpreters by (1) decoupling interpreter-logic from generation-logic and (2) allowing developers to suppress either aspect of the model interpreter, while promoting maximal reuse of code.
['James H. Hill', 'Aniruddha Gokhale']
Using Template Metaprogramming to Enhance Reuse in Visitor-Based Model Interpreters