3 ms·
One of the easiest to get started on Datalog in my opinion is really clingo https://potassco.org/clingo/ https://potassco.org/clingo/ , which can be pip install
by philzook 3y ago
One of the easiest to get started on Datalog in my opinion is really clingo https://potassco.org/clingo/ https://potassco.org/clingo/ , which can be pip installed and has python bindings. Answer Set Programming goes beyond datalog, but it holds datalog semantics as a sublanguage. It is unfortunate this is not well advertised.
pip install clingo
#! clingo
edge(1,2).
edge(2,3).
path(X,Y) :- edge(X,Y).
path(X,Z) :- edge(X,Y), path(Y,Z).
Datalog has some really cool use cases for program analysis (more or less relations represent an overapproximation of possible values variables can have). The declarative constrained nature of the language enables incrementalization, composition of analysis, and connection back to other formal aspects like types.
Souffle is very good, logica has a nice install story. https://colab.research.google.com/drive/1KJ6xKSwpw5FWWkvUOyBCpAcU_jVZV7Gs?usp=sharing https://colab.research.google.com/drive/1KJ6xKSwpw5FWWkvUOyB... . Many other interesting datalog systems.
- https://www.philipzucker.com/notes/Languages/datalog/ https://www.philipzucker.com/notes/Languages/datalog/
- https://www.philipzucker.com/notes/Logic/answer-set-programming/ https://www.philipzucker.com/notes/Logic/answer-set-programm...