A pure Haskell implementation of Datalog
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src/Database Remove some debugging output Sep 16, 2014
tests Add a test for the last big bugfix Sep 17, 2014
.gitignore Initial commit Jul 5, 2012
.travis.yml Switch to multi-ghc-travis Oct 31, 2015
CHANGES.md Include changelog, version bump Sep 18, 2014
LICENSE Initial commit Jul 5, 2012
README.md Add a README note Jul 29, 2012
datalog.cabal Merge branch 'master' of nochair.net:private-git/research/datalog Jun 25, 2016


This is a pure Haskell implementation of Datalog, as a library

Datalog is a logic language that allows for recursive database queries. This implementation is distinguished from many others in that it is embeddable as a library in other (Haskell) programs. A driver program that operates on textual input is also planned.

It is currently just a semi-naive evaluator, but it is reasonably efficient. The implementation is currently in its early stages but it seems to produce reasonably correct results. See the test suite for some details.

Planned Enhancements

  • Magic sets transformation
  • Optional BDD backend for a subset of queries
  • Rewrite literals like f(X,X) into f(X,Y), X=Y. A few internals assume that the same variable doesn't appear twice in a literal.