Harold Boley, Klaus Elsbernd, Hans-Günther Hein,
Thomas Krause, Markus Perling, Michael Sintek, Werner Stein
Third, Revised Edition
The compilation of RELFUN programs consists of two main stages, horizontal transformations and vertical translations. The horizontal transformer performs both source-to-source steps into a subset of RELFUN and source-to-intermediate steps into a RELFUN-like language. The vertical translator is also divided into two phases, the classifier and the code generator. The classifier produces a declarative clause language; the code generator optimizes target code for underlying WAM emulators. These parts can be used incrementally-individually, as a relational/functional compilation laboratory, or batch-composed, as a complete RELFUN compiler. All intermediate steps employ explicit declarative representations, which can be displayed via RELFUN's user interface. The compiler is implemented in a subset of COMMON LISP; one emulator runs in COMMON LISP, the other in ANSI C.