next up previous
Next: Creating renovation factories Up: Transforming COBOL Systems Previous: Analysis and Transformation

Computer-aided Language Engineering

Since context-free grammars form the starting point of our approach, we heavily depend on the availability of grammars of very high quality. It is not unusual in industrial settings that grammars are completely absent, that they are incomplete or that they are of a poor quality. Not surprisingly, we have therefore also created an entire factory dedicated to the recovery, analysis and improvement of grammars themselves. Recall our slogan that ``every expression has a grammar, so it can be represented as term'', and observe that a grammar has also a grammar, so a grammar can be represented as a term as well. Such terms can be transformed and analyzed. We call this reengineering approach to grammars computer aided language engineering (CALE). It includes development tools for grammars, tools to assess the quality of existing grammars (completeness, metrics), and tools for generating grammars from other sources, such as language reference manuals or the source code of a compiler [52,53].

The productivity gains using these tools can be considerable. On the one hand, we measured a productivity of 300 production rules per month for writing grammars by hand [16]: this involved the manual extraction of a COBOL grammar from language reference manuals. On the other hand, we measured a productivity of 3000 (generated) production rules using a CALE factory in one afternoon [53]: this involved the automatic extraction of the grammar for a language used by a telecommunications company from the source code of a compiler for that language. Obviously, it is no longer possible to process such large grammars without appropriate tool support.

Figure 5: Development environment for renovation factories.
\begin{figure}\centerline{\psfig{figure=npl1.eps,height=5cm}}\end{figure}


next up previous
Next: Creating renovation factories Up: Transforming COBOL Systems Previous: Analysis and Transformation
Paul Klint 2001-06-12