Purely functional lazy nondeterministic programming

  • Authors:
  • Sebastian Fischer;Oleg Kiselyov;Chung-chieh Shan

  • Affiliations:
  • -;-;-

  • Venue:
  • Journal of Functional Programming - Dedicated to ICFP 2009
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Functional logic programming and probabilistic programming have demonstrated the broad benefits of combining laziness (nonstrict evaluation with sharing of the results) with nondeterminism. Yet these benefits are seldom enjoyed in functional programming because the existing features for nonstrictness, sharing, and nondeterminism in functional languages are tricky to combine. We present a practical way to write purely functional lazy nondeterministic programs that are efficient and perspicuous. We achieve this goal by embedding the programs into existing languages (such as Haskell, SML, and OCaml) with high-quality implementations, by making choices lazily and representing data with nondeterministic components, by working with custom monadic data types and search strategies, and by providing equational laws for the programmer to reason about their code.