Soufflé: A Datalog Synthesis Tool for Static Analysis
souffle-lang.github.io
souffle-lang.github.io
But, Datalog is much better at deductive reasoning compared to SQL. There's a great interactive tutorial here: https://percival.ink/. To see how Datalog and SQL can be equivalent, I have a build of percival.ink that transforms simpler queries to SQLite: https://percival.jake.tl/
You can also see how Souffle itself can be useful in this blog post: https://ianthehenry.com/posts/drinking-with-datalog/
That post describes building a recipe engine that can tell you, given a bunch of recipes + the current contents of your bar cart, what drinks you can make, as well as giving you top ingredients you could buy that would allow you to make new drinks. It's quite a readable walkthrough of a very practical application of Datalog/Souffle in a place where SQL would certainly struggle.
[1]: https://github.com/ekzhang/percival/blob/main/crates/perciva...
[2]: https://www.hytradboi.com/2022/percival-a-reactive-language-...
Datalog is a formalism like relational algebra but additionally supports recursion.
So it can roughly play the role of SQL. Compiler writers have used it to query their symbol tables and identify patterns for example (seems to be the origin of Soufflé, "static analysis").
I believe the reemergence of datalog is at least in part due to compute and memory being more plentiful so it is more affordable and practical to use a declarative query language. A lot of databases (or the part that is relevant for answering a particular query) comfortably fits in a single machine's memory and an expressive query language is fun to use. There is also an incremental evaluation story.
Another potential reason is that the logical data model makes it easy to represent any kind of data without schema changes and such.
A lot of programs end up either doing SQL or something SQL-like. There are therefore many applications of such datalog like languages.
In many places where people use custom "rule languages" they could use datalog instead. (edited: typo & rule languages)
GitHub's CodeQL [3] is another Datalog dialect used for detecting bugs and vulnerabilities.
Datomic [4] is a database that uses Datalog as the query language.
[1] https://bitbucket.org/yanniss/doop/src/master/
[2] https://github.com/GaloisInc/cclyzerpp
At the moment, I use GCC's -fanalyzer, the LLVM sanitizers + static analyzer, FB's Infer, and PVS Studio.
Static analyses tend to be depend on each other (mutually recursive) so slamming all the rules together in a single system is useful. Loops in your programs lead to loops in your analysis somewhere, so the recursive nature of datalog is also useful. The monotonic accumulating and terminating nature of datalog are also desirable properties of static analyses. The logic of program analyses is subtle and complex to get right, so it's nice to have a high level declarative way to state and adjust them as time goes on. See monotone frameworks https://tudelft-cs4200-2019.github.io/lectures/statics/monot...
Mostly, I just think it's all kind of neat. Same with most other CS topics. I only work in the software industry because I find something compelling about the subject matter. That's true for most of us I assume. Well and money of course :). Some bits of CS I don't care about until I find some reason related to things I already think are neat.
Great name...not.
I know coming up with a name for a project is hard but why not at least google something before you chose is as a name first? This is horrible. Just go and take some lesser known Hindu deity if you have no idea at all and don't care. There are many.