A syntactic approach to combining functional notation, lazy evaluation, and higher-order in LP systems

  • Authors:
  • Amadeo Casas;Daniel Cabeza;Manuel V. Hermenegildo

  • Affiliations:
  • Depts. of Comp. Science and Electr. and Comp. Eng., Univ. of New Mexico;School of Computer Science, T.U. Madrid (UPM), Spain;Depts. of Comp. Science and Electr. and Comp. Eng., Univ. of New Mexico

  • Venue:
  • FLOPS'06 Proceedings of the 8th international conference on Functional and Logic Programming
  • Year:
  • 2006

Quantified Score

Hi-index 0.02

Visualization

Abstract

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 present 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.