5.5 UNFUG



next up previous contents
Next: 5.6 VOOPS Up: 5 Software Engineering Aspects Previous: 5.4 TAC

5.5 UNFUG

   

Raising the abstraction level is an indispensable technique in engineering large-scale software systems [Shaw89]. A valuable aid in doing this are code-generators or systems actively supporting code generation.

UNFUG (UNiversal FUnction Generator) was written to support automatic code generation out of templates in VISTA. The German word ``Unfug'' means ``mischief`` or ``nonsense'', but UNFUG rather tries to help the programmer avoid superfluous coding of repeated parts of almost identical code, and also aids programming in higher-level concepts (see Section 5.6). Since UNFUG is implemented in LISP, it integrates seamlessly with the rest of the VISTA CASE tools, especially with VMAKE and VOOPS, which again helps to preserve conceptual integrity within the framework.

Depending on the nature of the code to be generated, sometimes a considerably large extent may be automatically produced. For example, the PBL (PAI Basic Layer) of VISTA defines an interface to PLBs on the level of twelve different primitive data items like integers, floats, strings, and booleans. Many interface functions for inquiring, reading and writing now have to be generated, each for a specific data type. Coding all interface functions by hand would be a tedious task; using UNFUG, just one template function has to be coded for each interface function, with data-type specifics substituted in a coding loop. The template code is just one seventh of the size of the resulting C code (it is not one twelfth, as one might presume, because data type independent (e.g. administrative) routines exist just once).

Code generation using UNFUG is independent of the implementation language, since UNFUG uses special delimiters for its syntax constructs which do not interfere with a programming language syntax, and therefore can be used in any programming language source code to form a so-called template file for UNFUG out of it. It should be noted that this feature of language independence, and the fact that UNFUG itself is implemented in LISP and thus homogeneously fits into the VISTA case environment result in portability of UNFUG itself and a high degree of flexibility in its applicability. Thus UNFUG's use is not only limited to programming language source files, furthermore any textual data representation can be augmented with UNFUG constructs to effect automatic code generation.

A detailed description of UNFUG's requirements on input files and the syntax of UNFUG statements as well as simple example demonstrating the usage of UNFUG is given in Appendix B.



next up previous contents
Next: 5.6 VOOPS Up: 5 Software Engineering Aspects Previous: 5.4 TAC



Martin Stiftinger
Tue Nov 29 19:41:50 MET 1994