Non-deterministic functions are functions that can return multiple answers. When such a function calls itself recursively it can produce an infinite number of answers where only finitely many distinct results exist. Tabling is a technique that allows the combination of recursion and non-determinism in Prolog. In this paper we construct the Table Monad, introducing tabling for non-deterministic functions in Haskell. This monad is constructed using the "Effect-Handlers"-approach. A variation on tabling, tabling with aggregates is also discussed. Benchmarks show that for some cases this kind of tabling is more efficient.
@inproceedings{ifl2015,
title = {The Table Monad in Haskell},
author = {Alexander Vandenbroucke and Tom Schrijvers and Frank Piessens},
year = {2015},
booktitle = {IFL 2015},
url = {/Research/papers/ifl2015.pdf},
abstract = {Non-deterministic functions are functions that can return multiple answers.
When such a function calls itself recursively it can produce an infinite
number of answers where only finitely many distinct results exist. Tabling is
a technique that allows the combination of recursion and non-determinism in
Prolog.
In this paper we construct the Table Monad, introducing tabling for
non-deterministic functions in Haskell. This monad is constructed using the
"Effect-Handlers"-approach. A variation on tabling, tabling with aggregates is
also discussed. Benchmarks show that for some cases this kind of tabling is
more efficient.
},
}