First commit: parsing/unifying
This commit is contained in:
19
src/main.rs
Normal file
19
src/main.rs
Normal file
@ -0,0 +1,19 @@
|
||||
use nanolog::ast::{Body, Module, Predicate};
|
||||
|
||||
fn main()
|
||||
{
|
||||
//println!("{:#?}", Module::parse_from_file("1.pl"));
|
||||
let module: Module = "
|
||||
integer(zero).
|
||||
integer(s(X)) :- integer(X).
|
||||
"
|
||||
.into();
|
||||
|
||||
let a: Predicate = "zero".into();
|
||||
let b: Predicate = "X".into();
|
||||
|
||||
println!("{:?}", a.unify(&b));
|
||||
|
||||
// let body: Body = "integer(s(s(s(s(zer))))).".into();
|
||||
// body.prove(&module);
|
||||
}
|
||||
Reference in New Issue
Block a user