Application Generators [entry]

Yannis Smaragdakis, Shan Shan Huang
1999 Wiley Encyclopedia of Electrical and Electronics Engineering   unpublished
Introduction When a programming activity is well-understood, it can be automated. Automation transforms software development from activities like rote coding and tedious debugging to that of specification, where the "what" of an application is declared and the "how" is left to a complex, but automatable mapping. Programs that perform such mappings are application generators (or just generators). In the technical sense, application generators are compilers for domain-specific programming
more » ... s (DSLs). There is no strict criterion for characterizing a language as "domain-specific" but the term is commonly used to describe programming languages for specialized tasks (as opposed to "general-purpose" programming languages). Examples are languages for implementing communication protocols, partial differential equation solvers, windowing software, etc. Although all compilers can be viewed as generators, generator research and practice has focused on problems different than those usually found in a classical treatment of compilers (e.g., [1]), such as programming language extensibility and program transformations. Before we delve further into generator specifics, it is worth addressing the following question: why are generators needed? Is it not sufficient to employ other programming tools (e.g., traditional software libraries)? One answer is that it is very hard to scale traditional tools to handle code that is highly complex, yet can be decomposed into simpler pieces in systematic ways. In this case, generators can be viewed as compact representations of software libraries of gigantic size-each library encoding all the useful code configurations that a generator can produce. With a generator, the same code is produced in a systematic way that allows a mechanical process to generate desired code configurations. Thus, for practical reasons, generators are the preferred way to represent large families of related applications. Another reason for using generators is that the specification languages that generators implement are much more concise and convenient than the language of the produced program (called the target language). The translation of specifications to target code is done correctly and quickly, thereby substantially increasing programmer productivity. Further, generators can apply domain-specific optimizations (which are tedious and error-prone if done by hand) and can perform advanced error-checking (thereby automating correctness checks performed by domain experts). Compared to traditional software libraries, generators offer a much greater potential for optimization and can provide better error-checking. There are many dimensions of variability among generators, despite their common goal. Some generators implement specification languages that have a sound theoretical basis (e.g., [44] [48]) and thus have been used extensively to implement formal specifications. More typically, full axiomatic theories simply do not exist and generator design is based on an informal understanding of a domain. Another important variability deals with implementation technology. Most generators are self-sufficient, stand-alone translators (in much the same way as compilers for general-purpose languages). Yet others take on a very different form, such as when generators are implemented using program transformation systems (e.g., [29] [37]). A program transformation system (or just transformation system) is a platform for expressing and executing program transformations-that is, mappings from programs to programs. Sets of transformations define the automatable mappings of a particular domain. In this case, a generator would be merely a set of transformations that may not even be encapsulated in a single module. In general, the field of application generators is a collage of ideas from various areas of computer science, such as programming languages, compiler technology, and software engineering, to name a few. An examination of the field reveals a few common principles and many distinct generator "camps", each promoting a different philosophy of what generators represent and how they should be built. Hence, a representative overview of generators needs to include both basic background and a sampling of approaches. This article cannot be fully comprehensive, however. For further reading, our references emphasize recent work which can serve as a starting point. Partsch and Steinbrueggen [34] provide a good survey of past work on transformation-based systems.
doi:10.1002/047134608x.w6902 fatcat:vqbubq6rerbvvgubim6rbufrka