Software Generators

Software generators, as the name suggests, are programs that produce other programs. In this regard, software generators are a kind of "meta-reusable" software component, since the programs they produce might themselves be treated as reusable components. The most common example of software generators are parser and lexical analyzer generators. Of course, other kinds of generators have been produced including code generator generators, full compiler generators, report generators, and various application generators. We have developed language-directed editor generators, user interface generators, formal specification (Gist) generators, and spreadsheet application generators [Cast 86]. As these generators all produce operational stand-alone programs in the range of a 1K-25K+ lines of code, such programs become more interesting when they can be generated as complete subsystems that can be rapidly composed or integrated into larger systems or environments. We have some experience with this in the SOFTMAN environment where we can generate language-directed editors for new languages that are easy to integrate into an existing or new SOFTMAN environment instance. We have also investigated other meta-tools and generators of software development environments as well [Karr 91].

However, we are also interested in exploring the idea of cascading different software generators together, so that the output of one generator becomes the input to one or more other generators. For example, when we built a spreadsheet application generator a few years ago, its input specification language was a subset of the Gist language. The generator in turn transformed the input specification into a working program approximately 10 times the size of the input specification (as measured by number of statements–admittedly a crude measure). We also developed a Gist generator that accepted a structured, form-based informal language as input, that in turn paraphrased the input into a different Gist subset. In this case, the output-input ratio was roughly 3-1. Finally, in a systematic study of the specification and implementation of a dozen software systems using Gist and C, we observed a C-Gist ratio of between 25-1 and 30-1. Thus, the hypothesis I then derived was that if we could restructure the Gist specification subsets used by the two generators, it might therefore be possible to connect (or cascade) the specification generator to the spreadsheet application generator, then expansion ratios of 30-1 or more might be possible. Further, if the Gist subsets could be expanded to the full Gist language, and another intermediate generator added to handle the additional constructs, then it might be possible to demonstrate a software generator cascade that could produce programs with an expansion ratio of 100-1 or more. However, the students who were working with me on this project graduated and took industrial positions before the project was completed. Thus, I think of domain-specific cascaded software generators as still a promising mechanism for research.