Next: LL Up: Transforming Relational Languages Previous: RELFUN

The next transformation step transforms clauses represented as into clauses (only information contained in is needed). clauses are RELFUN clauses with the following features:

For our example, the following clauses created:


fac/2-1(Arg#1) :- equal(0, Arg#1) & 1.
fac/2-1(Arg#1) :-& *(Arg#1, fac/2-1(-(Arg#1, 1))).

f/2-1(Arg#1) :-
         structp(Arg#1),
         equal(s, functor(Arg#1)),
         equal(2, arity(Arg#1)),
         X is elt(Arg#1, 0),
         equal(X, fac/2-1(X)),
         Y is elt(Arg#1, 1),
         equal(X, -(Y, X)),
         equal(Y, fac/2-1(Y))
         & struct(u, Arg#1, Arg#1).
f/2-1(Arg#1) :-& cons(Arg#1, cons(Arg#1, nil)).


Harold Boley & Michael Sintek (sintek@dfki.uni-kl.de)