Giter Site home page Giter Site logo

matsud224 / wamcompiler Goto Github PK

View Code? Open in Web Editor NEW
37.0 6.0 5.0 98 KB

Prolog implementation based on Warren's abstract machine

License: The Unlicense

Python 1.68% Prolog 2.84% Common Lisp 95.40% Shell 0.07%
warren-abstract-machine wam prolog compiler common-lisp

wamcompiler's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.