4 ms·
In the Rust ecosystem, I believe the next-generation IDE support is already beginning to incorporate some ideas like this, although I believe it uses Prolog rat
by kibwen 6y ago
In the Rust ecosystem, I believe the next-generation IDE support is already beginning to incorporate some ideas like this, although I believe it uses Prolog rather than Datalog (I'd be interested to learn more about how they differ). The logic library is called Chalk ( https://github.com/rust-lang/chalk https://github.com/rust-lang/chalk ), and it's designed to be a full trait resolution engine for Rust (trait resolution being a necessary step to e.g. autocomplete methods on types); rust-analyzer has been using it for quite a while now, and it's slowly being incorporated into rustc itself. Not as impressive as basing the entire IDE on queries, of course!
The Rust project is also using the differential-datalog library mentioned in the OP to underlie their third-generation borrow checker: https://github.com/rust-lang/polonius https://github.com/rust-lang/polonius
- namibj 6y agoIt seems polonius is using datafrog instead. Where do you see a differential engine referenced?
- kibwen 6y agoThe post linked from the readme mentions it: https://smallcultfollowing.com/babysteps/blog/2018/04/27/an-alias-based-formulation-of-the-borrow-checker/ https://smallcultfollowing.com/babysteps/blog/2018/04/27/an-... , although it's two years old at this point so I wouldn't be surprised if things have changed.
- namibj 6y agoIt's not the 2 years that caused the change. Feel free to read up on Frank's blog post about how datafrog came into existence: https://github.com/frankmcsherry/blog/blob/master/posts/2018-05-19.md#acks https://github.com/frankmcsherry/blog/blob/master/posts/2018...
- mmarx 6y ago> I believe it uses Prolog rather than Datalog (I'd be interested to learn more about how they differ). Datalog is the positive, function-free fragment of Prolog, i.e., what Prolog offers over Datalog is negation and “value invention” through function terms. One consequence of that is that deciding whether a Prolog program entails a fact is undecidable (i.e., Prolog is Turing-complete), deciding whether a Datalog program entails a fact is can be done in polynomial time with respect to the size of the database.