λProlog
A Haskell interpreter for the higher-order hereditary Harrop fragment of λProlog: simply-typed λ-terms, pattern unification, and uniform proof search with pi and =>.
What is λProlog?
Hereditary Harrop formulas extend Horn clauses with implication and universal quantification in goals. Operationally that means a program is not a flat clause store: proving D => G installs D for the duration of G, and proving pi x\ G introduces a fresh eigenvariable. Nested programs and signatures are the hierarchical structure unique to this language.
Build
git clone git@github.com:rybla/lambda-prolog.git lambda-prolog cd lambda-prolog stack build stack run lambda-prolog -- examples/tutorial.mod
Browse the examples — hover any token on an example page for its role.
References
- Programming with Higher-Order Logic — Miller & Nadathur
- Teyjus
- ELPI