human(socrates).
human(aristotle).
human(plato).
god(zeus).
god(apollo).
mortal(X) :- human(X).
?- human(socrates)
program : rule+ query+
query : '?-' term '.'
rule : term '.'
| term :- terms '.'
terms : term
| term ',' terms
term : PREDICATE '(' terms ')'
| PREDICATE
| VARIABLE
This grammar is rather simplistic and allows non-sensical input like A :- a. Or a :- A.
- https://en.wikipedia.org/wiki/Twelve_Olympians
- List support
- Numbers?
- Strings
- other examples from Prolog books
- https://github.com/maldoinc/mamba/blob/master/setup.py