Metaprogramming with classical compiler technology is sim- ilar to model-based code generation. We discuss a particular tool, umod, that generates complex data model implementations in Java, and a par- ticular aspect of its support for declarative programming: The rewriting of data models in object-oriented style, based on the visitor pattern, with support for arbitrary reference graphs and nested collection-valued fields. We demonstrate that concerns of both compiler theory and model-based development apply, and that the distinction is overshadowed by a general commitment to semantic rigour.
['Markus Lepper', 'Baltasar Trancón y Widemann']
Rewriting Object Models With Cycles and Nested Collections A Model-Based Metaprogramming Problem