Log(F): An Optimal Combination of Logic Programming, Rewriting, and Lazy Evaluation
Abstract
A new approach for combining logic programming, rewriting, and lazy evaluation is described. It rests upon subsuming within logic programming, instead of upon extending it with, rewriting, and lazy evaluation. A non- terminating, non-deterministic rewrite rule system, F* and a reduction strategy for it, select, are refined. F* is shown to be reduction-complete in that select simplifies terms whenever possible. A class of F* programs called Deterministic F* is defined and shown to satisfy confluence, directedness, and minimality. Confluence ensures that every term can be simplified in at most one way. Directedness eliminates searching in simplification of terms. Minimality ensures that select simplifies terms in a minimum number of steps. Completeness and minimality enable select to exhibit, respectively, weak and strong forms of laziness. F* can be compiled into Horn clauses in such a way that when SLD- resolution interprets these, it directly simulates the behavior of select. Thus, SLD-resolution is make to exhibit laziness. LOG(F) is defined to be a logic programming system augmented with an F* compiler, and the equality axiom X=X. LOG(F) can be used to do lazy functional programming in logic, implement useful cases of the rule of substitution of equals for equals, and obtain a new proof of confluence for combinatory logic. (aw)
Document Details
- Document Type
- Technical Report
- Publication Date
- Apr 01, 1988
- Accession Number
- ADA216644
Entities
People
- Sanjai Narain
Organizations
- RAND Corporation