In this chapter, the three facets of the integration of relational languages and LL are described:

- their integration by loose coupling on the abstract machine and source language level,
- the transformation of deterministic predicates into LL functions, and
- the implementation of extra-logicals with the help of LL.

In section 4.1, the loose coupling of REL and LL is described, where the emphasis is on the accessibility of LL functions from predicates (since the other direction is not part of our prototypical implementation).

In section 4.2, the detection and transformation of deterministic predicates is portrayed. For this, first a theoretical foundation of determinism in relational languages is developed (using SLD resolution trees), and then algorithms for the detection and transformation of deterministic predicates, using several intermediate representation languages, are given.

In section 4.3, the implementation of extra-logicals
in relational languages via LL functions is described
by giving a simple example (global variables and,
building upon them, `bagof`).