First commit: parsing/unifying

This commit is contained in:
2026-02-07 14:49:06 +01:00
commit 4039394e42
9 changed files with 530 additions and 0 deletions

19
src/main.rs Normal file
View 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);
}