Next: Compilation Phases Up: Indexing in RELFUN Previous: Indexing in RELFUN

The RELFUN Implementation Structure

Although RELFUN provides both relational and functional clauses [Bol90], for the purpose of indexing it can be regarded as a kind of PROLOG since indexing affects the clause head and perhaps some body premises (``guards''), but never the (functional) foot.

The compilation task is divided into several horizontal and vertical compilation steps. The reason for this is that we prefer to do most of the compilation work at source level (rather than at code level) in order to be independent from a special low-level language or machine structure as much as possible.

One of the most important features of the RELFUN compiler is a special language between the RELFUN language and the low-level WAM code. This language, called ``classified clauses'', was developed by Harold Boley and Thomas Krause [Kra91][Kra90][BEHK91] and is based on a tagged PROLOG-in-LISP syntax, extended with global and local information.

The right place to collect all indexing information which is necessary for our indexing scheme is this intermediate language. So one modification had to take place in the first vertical compilation step between the RELFUN program and the classified clauses.

Another modification had to generate the indexing WAM code and thus had to take place in the second vertical compilation step between the classified clauses and the WAM code.

Finally, the emulator had to be changed a little bit to allow new (better) indexing methods. Our emulator is based on the -WAM ([Nys85]), a LISP implementation of the WAM ([War83]), good for rapid prototyping and experimental extensions. It was changed for handling RELFUN's functional extensions by Hans-Günther Hein (see [Hei89]).



Next: Compilation Phases Up: Indexing in RELFUN Previous: Indexing in RELFUN


Michael Sintek - sintek@dfki.uni-kl.de