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

  • Amadeo Casas
  • Daniel Cabeza
  • Manuel V. Hermenegildo
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3945)

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.

Keywords

Declarative Languages Logic Functional and Logic- Functional Programming Lazy Evaluation Higher Order 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Amadeo Casas
    • 1
  • Daniel Cabeza
    • 2
  • Manuel V. Hermenegildo
    • 1
    • 2
  1. 1.Depts. of Comp. Science and Electr. and Comp. Eng.Univ. of New MexicoUSA
  2. 2.School of Computer ScienceT.U. Madrid (UPM)Spain

Personalised recommendations