kirancodes.me
To Proof Maintenance & Beyond!

Producing all ideals of a forest, functionally

Jean-Christophe Filliâtre, François Pottier

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.

Related papers