A Syntactic Approach to Combining Functional Notation, Lazy Evaluation, and Higher-Order in LP Systems [chapter]

Amadeo Casas, Daniel Cabeza, Manuel V. Hermenegildo
2006 Lecture Notes in Computer Science  
Nondeterminism and partially instantiated data structures give logic programming expressive power beyond that of functional programming. However, functional programming often provides convenient syntactic features, such as having a designated implicit output argument, which allow function call nesting and sometimes results in more compact code. Functional programming also sometimes allows a more direct encoding of lazy evaluation, with its ability to deal with infinite data structures. We
more » ... t a syntactic functional extension, used in the Ciao system, which can be implemented in ISO-standard Prolog systems and covers function application, predefined evaluable functors, functional definitions, quoting, and lazy evaluation. The extension is also composable with higher-order features and can be combined with other extensions to ISO-Prolog such as constraints. We also highlight the features of the Ciao system which help implementation and present some data on the overhead of using lazy evaluation with respect to eager evaluation.
doi:10.1007/11737414_11 fatcat:gckkequ2sbhwrhwifdz4vrdfza