Exotic Programming Ideas: Part 4 (Datalog)

#artificialintelligence 

Continuing on in our series on exotic programming ideas, we're going to explore the topic of logic programming and a particular form known as datalog. Datalog is executed by a query processor that given these two inputs, finds all instance of facts implied by both the databased and rules. For our examples we're going to be coding our examples in the Souffle language. The namesake of the language is an acronym for the Systematic, Ontological, Undiscovered Fact Finding Logic Engine. Souffle is a minimalist datalog system designed for complex queries over large data sets, such as those encountered in the context of doing static program analysis over large codebases.