3 ms·
Not even a full Prolog, but Datalog, is very well suited for querying about graphs. I.e., for quite a lot of things you want to do inside a compiler. See an exa
by sklogic 12y ago
Not even a full Prolog, but Datalog, is very well suited for querying about graphs. I.e., for quite a lot of things you want to do inside a compiler. See an example here: http://people.csail.mit.edu/mcarbin/papers/aplas05.pdf http://people.csail.mit.edu/mcarbin/papers/aplas05.pdf
I also use full Prolog to implement type systems.
Prolog extended with a constraint solver is another thing one may want to employ for an elaborate program analysis, see how https://github.com/eholk/harlan https://github.com/eholk/harlan is using cKanren for its region inference.
So, in my book, Prolog per se may have very limited use outside of teaching, but an embedded Prolog or a dumbed down Datalog can be an extremely powerful querying DSL which can make LINQ look dumb and clumsy.
- ogrisel 12y agoAgreed. I think this thought was the starting point of the http://cascalog.org/ http://cascalog.org/ project (a high level clojure frontend for Hadoop MapReduce).
- toblotron 12y agoWe use it a lot - we receive requests of up to 5 M size of .Net structures, and just wade through all the strange class-relations with Prolog :) I read that in 2014, 1/3 of all flight bookings in the word went through (Sicstus) Prolog. It has its uses, and I like working in it :)