3 ms·
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?
by archgoon 7y ago
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?
- fiddlerwoaroof 7y agoYou 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”
- fiddlerwoaroof 7y agoThe Clojurescript web framework fulcro uses this also for the sorts of things graphql is used for.
- jcranmer 7y agoI'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.
- muydeemer 7y agoYou might find https://github.com/graknlabs/grakn 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';