A cookbook for using the model-view controller user interface paradigm in Smalltalk-80
Journal of Object-Oriented Programming
Design patterns: elements of reusable object-oriented software
Design patterns: elements of reusable object-oriented software
Generation of formatters for context-free languages
ACM Transactions on Software Engineering and Methodology (TOSEM)
Abstract syntax from concrete syntax
ICSE '97 Proceedings of the 19th international conference on Software engineering
Unparsing expressions with prefix and postfix operators
Software—Practice & Experience
Javaserver Pages
Stratego: A Language for Program Transformation Based on Rewriting Strategies
RTA '01 Proceedings of the 12th International Conference on Rewriting Techniques and Applications
Generating Code from UML with Velocity Templates
UML '02 Proceedings of the 5th International Conference on The Unified Modeling Language
Disambiguation Filters for Scannerless Generalized LR Parsers
CC '02 Proceedings of the 11th International Conference on Compiler Construction
Pretty printing
Code Generation in Action
Enforcing strict model-view separation in template engines
Proceedings of the 13th international conference on World Wide Web
There and back again: arrows for invertible programming
Proceedings of the 2005 ACM SIGPLAN workshop on Haskell
Repleo: a syntax-safe template engine
GPCE '07 Proceedings of the 6th international conference on Generative programming and component engineering
RASCAL: A Domain Specific Language for Source Code Analysis and Manipulation
SCAM '09 Proceedings of the 2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation
Accomplishments and research challenges in meta-programming
SAIG'01 Proceedings of the 2nd international conference on Semantics, applications, and implementation of program generation
Invertible syntax descriptions: unifying parsing and pretty printing
Proceedings of the third ACM Haskell symposium on Haskell
Hi-index | 0.00 |
A code generator is a program translating an input model into code. In this paper we focus on template-based code generators in the context of the model view controller architecture (MVC). The language in which the code generator is written is known as a metalanguage in the code generation parlance. The metalanguage should be, on the one side, expressive enough to be of practical value, and, on the other side, restricted enough to enforce the separation between the view and the model, according to the MVC. In this paper we advocate the notion of unparser-complete metalanguages as providing the right level of expressivity. An unparser-complete metalanguage is capable of expressing an unparser, a code generator that translates any legal abstract syntax tree into an equivalent sentence of the corresponding context-free language. A metalanguage not able to express an unparser will fail to produce all sentences belonging to the corresponding context-free language. A metalanguage able to express more than an unparser will also be able to implement code violating the model/view separation. We further show that a metalanguage with the power of a linear deterministic tree-to-string transducer is unparser-complete. Moreover, this metalanguage has been successfully applied in a non-trivial case study where an existing code generator is refactored using templates.