Sciweavers

CORR
2008
Springer

Declarative Combinatorics: Isomorphisms, Hylomorphisms and Hereditarily Finite Data Types in Haskell

14 years 16 days ago
Declarative Combinatorics: Isomorphisms, Hylomorphisms and Hereditarily Finite Data Types in Haskell
This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals etc.) and their extension to hereditarily finite universes through hylomorphisms derived from ranking/unranking and pairing/unpairing operations. An embedded higher order combinator language provides any-to-any encodings automatically. A few examples of "free algorithms" obtained by transferring operations between data types are shown. Other applications range from stream iterators on combinatorial objects to succinct data representations and generation of random instances. The paper is part of a larger effort to cover in a declarative programming paradigm some fundamental combinatorial generation algorithms along the lines of Knuth's recent work (Knuth 2006). In 440 lines of Haskell code we cover 20 data types and, thr...
Paul Tarau
Added 09 Dec 2010
Updated 09 Dec 2010
Type Journal
Year 2008
Where CORR
Authors Paul Tarau
Comments (0)