Producing all ideals of a forest, functionally

  • Authors:
  • Jean-Christophe Filliâtre;François Pottier

  • Affiliations:
  • Laboratoire de Recherche en Informatique, Université Paris Sud, 91405 Orsay Cedex, France (e-mail: Jean-Christophe.Filliatre@lri.fr);INRIA Rocquencourt, B.P. 105, 78153 Le Chesnay Cedex, France (e-mail: Francois.Pottier@inria.fr)

  • Venue:
  • Journal of Functional Programming
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present functional implementations of Koda and Ruskey's algorithm for generating all ideals of a forest poset as a Gray code. Using a continuation-based approach, we give an extremely concise formulation of the algorithm's core. Then, in a number of steps, we derive a first-order version whose efficiency is comparable to that of a C implementation given by Knuth.