All Projects → matsud224 → wamcompiler

matsud224 / wamcompiler

Licence: Unlicense license
Prolog implementation based on Warren's abstract machine

Programming Languages

common lisp
692 projects
prolog
421 projects
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to wamcompiler

wam
A simple compiler from Prolog to WAM (Warren Abstract Machine) and a runtime for WAM.
Stars: ✭ 18 (-53.85%)
Mutual labels:  wam

README

This is a prolog compiler written in Common Lisp which compiles prolog code to bytecode of Warren's abstract machine (WAM).

I recommend using Steel Bank Common Lisp (SBCL). To start REPL, eval the following expression:

(load "wamcompiler.lisp")
(repl)

Input ';' to show the next solution, 'y' to stop finding solutions, or 'a' to show all solutions.

To show the compiled bytecode, eval the following expression:

(show-wamcode "predicate-name" predicate-arity)

An article of this program (in Japanese): 「すごいPrologつくって学ぼう?!」 pp.23-37 http://www.kitcc.org/share/lime/lime56.pdf

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].