[0] https://www.complang.tuwien.ac.at/ulrich/prolog_misc/acomip....
I don't think I've ever felt like it's OK for my program to provide a list of answers where some are right and some are wrong, but reading this... and generally believing in P != NP.... maybe that's a decent way of looking at some stuff!
Returning 3 was "wrong", but infinitely more correct than retuning 0.
If so, the language they thought they were using (and that they should actually use) is datalog, not prolog.
Datalog has declarative semantics: All facts that are derivable from the base database and the rules will be derived by the interpreter, and it will not add extra hallucinated facts. If that's not true, it's a bug in the runtime, not in the language.
So it's not that they "discovered" anything about Prolog; they already knew the language inside out.
This article explains how to appropriately use Prolog declaratively and with full generality.
Understanding is a personal achievement and has nothing to do with "forbidden knowledge" when the source of said knowledge is both quoted above and freely available.
[0] https://github.com/flix/flix
[1] https://github.com/rust-lang/polonius
[2] RDFox
[3] https://github.com/eclipse-biscuit/biscuit
[4] https://github.com/vmware-archive/differential-datalog [5] https://github.com/brurucy/pydbsp
But you can use it for lots of things. Whenever I'm frustrated with graph based tools being slow (like build systems), I run the graph through a datalog engine for comparison. It's usually much, much faster.
This loops Prolog, but terminates in Datalog:
p :- p.
p.
?- p.
This is because the underlying mechanism is completely different. Datalog is like SQL with recursion, you start with known facts and repeatedly applies rules to derive all consequences until nothing new appears. In Prolog, you start from the query and works backward through rules until it either finds a proof or fails.
So, Datalog treats Horn clauses as database constraints/inference rules while Prolog treats Horn clauses as a search program. They use the same mathematical substrate, but completely different computational models.
Here[0] is an example of using Ruby and Prolog to solve a real-world AWS management problem.
0 - https://web.archive.org/web/20190525163234/https://dev.to/da...