Metamodeling plays a central role in managing the complexity of software development efforts. At their simplest, metamodels capture commonly recurring patterns of code and design and produce productivity benefits by leveraging code-generation techniques. This is arguably the most widespread modality of using metamodels today.
This paper explores a particular template-based language, formal template language, for expressing generative metamodels. The concrete application used is the generation of Z specifications representing relational database schemas. The choice of Z and relational database schemas is almost incidental, although it is an important application of the technology described in the paper for enterprise applications.
The core of the paper describes an extension to an existing template language [1] and provides semantics for instantiating a template expressed in this language. The extension simplifies the semantics and at the same time allows more general patterns that increase the expressiveness of the language.
The most interesting part of the semantics is the use of a fairly complex environment that specifies the instantiation of a template. Interestingly, the structure of the environment depends on the structure of the template itself. The complexity of constructing appropriate environments is addressed by a set of combinators. However, environment specification remains complex and at first sight error prone: the complexity that should ideally be masked by a metamodel peeks out in the environment specification. This and other limitations are indeed discussed in the paper, leading one to conclude that there is still scope for research and innovation in this area.