[comp.lang.prolog] Functions AND relations

narain@randvax.UUCP (Sanjai Narain) (11/21/89)

Systems which combine logic and functional programming avoid the need to
ask the question "functions vs. relations".  For example, it is shown in
the LOG(F) system how SLD-resolution can be made to perform lazy reduction
of function applications at approximately the speed of logical inferences.

From a practical point of view, if you have a fast Prolog you have a
practical lazy reduction engine as well.  The language is expressive (e.g.
allows pattern matching).  Logic programs can freely call the lazy
reduction primitive and, in important cases, vice versa.  This
implementation has a sound theoretical basis as well.

The functional language is only first-order.  However, it is shown how
rules of combinatory logic can be expressed within the constraints of this
language.  As a higher-order functional language can be compiled into
combinatory logic, a practical implementation of it could perhaps be
obtained in Prolog.  I haven't examined this point closely.

For references to similar work see recent proceedings of logic programming
conferences and also DeGroot, D., Lindstrom, G. (editors) [1986], Logic
programming.  Functions, relations and equations, Prentice Hall, N.J.

LOG(F)-related references:
--------------------------
1. Chau, H., Parker, D. [1989].  Narrowing Grammar. Proceedings of the
Sixth International Conference on Logic Programming, Lisbon, Portugal.

2. Livezey, B., Muntz, R. [1989]. ASPEN: A stream processing environment.
Proceedings of PARLE '89, Lecture Notes in Computer Science, No. 366,
Springer Verlag.

3. Narain, S. [1990]. Lazy evaluation in logic programming. Proceedings of
IEEE International Conference on Computer Languages, New Orleans, LA.

4. Narain, S. [1989]. Optimization by non-deterministic, lazy rewriting.
Proceedings of Rewriting Techniques and Applications Conference,
Chapel Hill, NC.

5. Narain, S. [1986]. A Technique for Doing Lazy Evaluation in Logic.
Journal of Logic Programming, vol. 3, no. 3, October.

6. Parker D., Muntz, R., Chau, L. [1989]. The Tangram stream query
processing system, Proceedings of Fifth International Conference on
Data Engineering,.