タグ

ブックマーク / s-arash.github.io (1)

  • Logic programming in Rust

    use ascent::ascent; ascent! { relation edge(i32, i32); relation path(i32, i32); path(x, y) <-- edge(x, y); path(x, z) <-- edge(x, y), path(y, z); } fn main() { let mut prog = AscentProgram::default(); prog.edge = vec![(1, 2), (2, 3)]; prog.run(); println!("path: {:?}", prog.path); } Features Lattices Ascent supports computing fixed points of user-defined lattices. The lattice keyword defines a lat

  • 1