I wonder if you could implement a compiler with this.

Someone who knows more can probably correct/refine me, but I believe Rusts compiler actually has a little “differential datalog” engine it, which uses differential data flow under the hood.

They used to but Frank McSherry (author of differential dataflow) wrote them a specialized version without all the dataflow infrastructure [1]. It's part of the rust-lang nursery [2] now but hasn't been updated in a while, so I'm not sure what happened to it.

Edit: Looks like the rustc_mir crate that implements the non-lexical borrow checker uses `polonius_engine` [3] which uses `datafrog` so it's still used by the compiler!

[1] https://github.com/frankmcsherry/blog/blob/master/posts/2018...

[2] https://github.com/rust-lang/datafrog

[3] https://crates.io/crates/polonius-engine