NonGNU-devel ELPA - eprolog

eprolog Atom Feed

Description
Native Prolog engine implementation
Latest
eprolog-0.3.2.0.20260308.150317.tar (.sig), 2026-May-02, 340 KiB
Maintainer
Website
https://github.com/tani/eprolog
Browse ELPA's repository
CGit or Gitweb
Badge

To install this package from Emacs, use package-install or list-packages.

Full description

ε-prolog (eprolog) is a complete Prolog engine implementation written
in pure Emacs Lisp.  It provides a fully functional Prolog system
integrated into the Emacs environment, offering traditional Prolog
programming capabilities with seamless Lisp interoperability.

Features:
- Complete unification algorithm with occurs check
- Backtracking and choice points with proper cut (!) semantics
- Clause database management for facts and rules
- Interactive query execution with solution enumeration
- Built-in predicates for type checking, control, and list operations
- Definite Clause Grammar (DCG) support
- Spy/debugging functionality for tracing execution
- Direct Lisp integration through special predicates

Quick Start:

  ;; Define facts and rules
  (eprolog-define-prolog-predicate parent (tom bob))
  (eprolog-define-prolog-predicate parent (bob ann))

  (eprolog-define-prolog-predicate grandparent (_x _z)
    (parent _x _y)
    (parent _y _z))

  ;; Query the database
  (eprolog-query (grandparent tom _x))

See README.org for detailed documentation.