Lazy evaluation in logic programming

Author(s):  
S. Narain
2007 ◽  
Vol 7 (5) ◽  
pp. 537-582 ◽  
Author(s):  
ANTONIO J. FERNÁNDEZ ◽  
TERESA HORTALÁ-GONZÁLEZ ◽  
FERNANDO SÁENZ-PÉREZ ◽  
RAFAEL DEL VADO-VÍRSEDA

AbstractIn this paper, we present our proposal to Constraint Functional Logic Programming over Finite Domains (CFLP($\fd$)) with a lazy functional logic programming language which seamlessly embodies finite domain ($\fd$) constraints. This proposal increases the expressiveness and power of constraint logic programming over finite domains (CLP($\fd$)) by combining functional and relational notation, curried expressions, higher-order functions, patterns, partial applications, non-determinism, lazy evaluation, logical variables, types, domain variables, constraint composition, and finite domain constraints. We describe the syntax of the language, its type discipline, and its declarative and operational semantics. We also describe\toy(fd)$, an implementation forCFLP($\fd$), and a comparison of our approach with respect toCLP($\fd$) from a programming point of view, showing the new features we introduce. And, finally, we show a performance analysis which demonstrates that our implementation is competitive with respect to existingCLP($\fd$) systems and that clearly outperforms the closer approach toCFLP($\fd$).


1992 ◽  
Vol 2 (3) ◽  
pp. 273-321 ◽  
Author(s):  
Frank S. K. Silbermann ◽  
Bharat Jayaraman

AbstractThe integration of functional and logic programming languages has been a topic of great interest in the last decade. Many proposals have been made, yet none is completely satisfactory especially in the context of higher order functions and lazy evaluation. This paper addresses these shortcomings via a new approach: domain theory as a common basis for functional and logic programming. Our integrated language remains essentially within the functional paradigm. The logic programming capability is provided by set abstraction (via Zermelo-Frankel set notation), using the Herbrand universe as a set abstraction generator, but for efficiency reasons our proposed evaluation procedure treats this generator's enumeration parameter as a logical variable. The language is defined in terms of (computable) domain-theoretic constructions and primitives, using the lower (or angelic) powerdomain to model the set abstraction facility. The result is a simple, elegant and purely declarative language that successfully combines the most important features of both pure functional programming and pure Horn logic programming. Referential transparency with respect to the underlying mathematical model is maintained throughout. An implicitly correct operational semantics is obtained by direct execution of the denotational semantic definition, modified suitably to permit logical variables whenever the Herbrand universe is being generated within a set abstraction. Completeness of the operational semantics requires a form of parallel evaluation, rather than the more familiar left-most rule.


1990 ◽  
Author(s):  
John Burge ◽  
Bill Noah ◽  
Les Smith

Sign in / Sign up

Export Citation Format

Share Document