adamjstewart / prolog

An implementation of Prolog written in OCaml
MIT License
2 stars 3 forks source link

modified ast #1

Closed ZaidQureshi closed 6 years ago

ZaidQureshi commented 6 years ago

this is the ast I am thinking. As per Elsa's suggestions I removed strings and ints. The Term type represents both atoms and compound terms.

ZaidQureshi commented 6 years ago

ok i changed the name const to atomic. I put Terms (both compound terms and atoms) in there because to me they seem like an atomic thing just like a boolean const. I added the pred type to allow for a signle term, or a conjunction of preds or a disjunction of preds. Head is just an atomic.