4 ms·
I wonder if you could implement a compiler with this.
by modeless 5y ago
I wonder if you could implement a compiler with this.
- sriram_malhar 5y agoMost language structures are acyclic, so a simple dataflow pipeline is sufficient. Mutual references (class A referring to class B and vice versa) are resolved by separating the signature from method implementation (for example) to break cycles.
- FridgeSeal 5y agoSomeone 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.
- akiselev 5y agoThey 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-05-19.md https://github.com/frankmcsherry/blog/blob/master/posts/2018... [2] https://github.com/rust-lang/datafrog https://github.com/rust-lang/datafrog [3] https://crates.io/crates/polonius-engine https://crates.io/crates/polonius-engine