
Next: Benchmarks
Up: FLIP: Functional-plus-Logic Programming on
Previous: The Assembler and
In this work, a general and flexible technology for loosely integrating
relational and functional languages on the basis of abstract machines
was developed.
We first highlight several aspects of this integration before discussing
its achievements and possible enhancements:
- Relational and functional languages, when individually compilable
into abstract machines (as in the case of PROLOG-like
and
LISP-like languages),
can be integrated by extending their abstract machines by
only a few, usually very simple instructions.
- The mutual access thus achieved on the abstract machine level is
then used to integrate the languages on the source level. In the case of
PROLOG-like
relational languages (e.g. REL), the is
builtin is generalized to allow functions defined in the functional
language in addition to (usually builtin) arithmetical functions on
its right-hand side. The functional
language, if desired, can access relations either via once,
retrieving only the first solution, or a bagof-like
construct,
retrieving all solutions.
- Deterministic predicates, for which a PROLOG computation rule
foundation is developed in this work,
can be detected and transformed into functions, thus
improving their efficiency considerably since the overhead
of unification
and backtracking
is avoided.
Let us mention here three major contributions of our
functional-plus-logic programming on an integrated platform (FLIP):
- FLIP can be regarded as an implementation technique for relational
languages (e.g. PROLOG) and relational-functional languages
(e.g. RELFUN), where deterministic predicates exploit special-purpose
compilation into a functional stack machine (LLAMA) loosely
coupled to the language's principal abstract machine.
In the case of RELFUN, the functional language LL needed for this
implementation can even be regarded as a version of the
functional source language component itself.
- Algorithms from existing software libraries can be combined even
if specified in different paradigms without the need of re-implementation.
Since the development and maintenance of software is very
expensive, the loss of some declarativeness
usually caused by hybrid integrations is justifiable.
- Since the seminal paper [\protect\citeauthoryearWarren et al.1977]
there has been a dispute about the
relative efficiencies of LISP and PROLOG: the authors gave examples
where their PROLOG was as efficient as the LISPs of that time.
In the current work we contribute to the efficiency of both
language paradigms individually and in combination.
While it is difficult to assert a definitive efficiency advantage
for one of these paradigms, our benchmarks tend to support
the view that LISP can still be made faster than PROLOG:
in case of the integration of REL and LL, a factor of about 2-4
was achieved by transforming deterministic predicates into
LL functions. This is mainly caused by
LL being on a lower (though still declarative) level than
relational languages,
i.e. allowing much more operational specifications.
In the future, this integration can be improved in several
directions:

Next: Benchmarks
Up: FLIP: Functional-plus-Logic Programming on
Previous: The Assembler and