A command‑line interactive Prolog REPL shell built with PySwip. Supports lazy solution enumeration and can load Prolog source files at startup.
Python 3.10+
Install dependencies:
python3 -m pip install -r requirements.txt
Ensure PySwip can find SWI-Prolog on your system. See Installing SWI-Prolog.
usage: main.py [-h] [-V] [files ...]positional arguments:
files Prolog source files to consult at startupoptions:
-h, --help show this help message and exit-V, --version show program's version number and exit| Command | Action |
|---|---|
<query> | Execute a Prolog query. |
; | Get the next solution of the last query. |
exit | Exit the shell. |
? | Show help. |
- The period at the end of a query is optional.
- Using
;after a query that hasn't produced any solutions will cause an error message. - The shell does not support
traceordebugin interactive mode, but those predicates can still be called inside a query.