Re:Prolog's Death (2010)
by archgoon on Friday May 10, 2019 @05:47PM
(#19882552)
Hey; that sounds intersting; can you give an example of how you use Prolog in a SQL like context? How do you setup your 'DB'? How large does it scale?
[ Parent
| on HN ]
I've used Datalog (which is essentially a stripped down version of Prolog) in the past for a pointer analysis. Essentially, you literally print out the inference rules and then the basic facts to a text stream, and then you use interactive queries on the text stream.
Re:Prolog's Death (2010)
by fiddlerwoaroof on Friday May 10, 2019 @05:56PM
(#19882623)
You might look at how datomic or datascript use a limited subset of prolog (datalog, with a lispy syntax) to express queries: you end up doing things like:
[[?person :name “Bob”]
[?person :state :tx]]
To query for “the person named Bob who lives in Texas”
Re:Prolog's Death (2010)
by fiddlerwoaroof on Friday May 10, 2019 @05:57PM
(#19882639)
The Clojurescript web framework fulcro uses this also for the sorts of things graphql is used for.
You might find https://github.com/graknlabs/grakn of interest. Datalog was one of our main sources of inspiration. The query mentioned in this thread (the person named Bob who lives in Texas) would be something like:
$x has name 'Bob'; ($x, $y) isa lives; $y has name 'tx';