travitch/datalog

A pure Haskell implementation of Datalog

Haskell

105

40 commits

updated Aug 18, 2020

See the code

README

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.

Contributors

travitch

38 commits

alanz

1 commits

chrisdone

1 commits

Languages

Haskell

100.0%

travitch/datalog

A pure Haskell implementation of Datalog

Haskell

105

40 commits

updated Aug 18, 2020

See the code

README

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.

Contributors

travitch

38 commits

alanz

1 commits

chrisdone

1 commits

Languages

Haskell

100.0%