A [miniKanren
]-family relational logic programming language embedded in Rust.
In addition to core miniKanren language, proto-vulcan currently provides support for: * Disequality constraints CLP(Tree) * Finite-domain constraints CLP(FD) * Various operators: anyo, conda, condu, onceo, project * Writing goals in Rust embedded inline within proto-vulcan * User extension interface
The language is embedded into Rust with macros which parse the language syntax and convert it
into Rust. For parsing the language syntax, it uses the [tt-call
] library.
Due to heavy macro-usage, the default recursion limit is not sufficient. It can be increased with: ```rust
```
```rust
extern crate protovulcan; use protovulcan::*;
fn main() { let query = protovulcanquery!(|q| { conde { q == 1, q == 2, q == 3, } });
for result in query.run() {
println!("q = {}", result.q);
}
}
The example program produces three solutions:
text
q = 1
q = 2
q = 3
```
New relations can be defined as Rust-functions using proto_vulcan!
-macro.
```rust
use protovulcan::*;
use protovulcan::relation::emptyo;
use proto_vulcan::relation::conso;
use std::rc::Rc;
pub fn appendo
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.