EyeProlog is an ISO Prolog implementation for JavaScript that turns portable programs into answers and inspectable proofs.
Click the cover to read The Art of EyeProlog.
The single implementation reference is The Art of EyeProlog. It documents the language, built-ins, libraries, command line, JavaScript API, examples, proofs, conformance profile, and implementation.
The Euler project began in 2001 and became EYE, a Prolog-based reasoner, in 2006; it is still alive in 2026. In a symbolic way, EYE remembers Leonhard Euler, who lost sight in one eye. The Retina project began in 2021 and became EyeProlog in 2026; we hope to keep it growing for the next twenty years. That continuation offers a second quiet remembrance of Euler, who later lost sight in his other eye—while the project keeps trying to see farther through logic, proof, and reasoning.
EyeProlog requires Node.js 18 or newer:
node --versionIf necessary, upgrade through a Node version manager or the official Node.js download.
Run EyeProlog without installing it globally:
npx --yes eyeprolog
?- member(X, [prolog, logic]).
X = prolog
; X = logic.
?- halt.For a persistent command, use a user-owned npm prefix:
npm install --global --prefix "$HOME/.local" eyeprolog
export PATH="$HOME/.local/bin:$PATH"
eyeprologAdd the PATH export to your shell startup file. Do not use sudo npm install;
npm's EACCES guidance
also recommends a Node version manager or a user-owned prefix.
Run a program non-interactively:
printf 'human(socrates).\nmortal(X) :- human(X).\n' |
npx --yes eyeprolog --proof --goal 'mortal(socrates)' -Or play the answer out as a dialogue, with the proof checker as the opponent:
printf 'human(socrates).\nmortal(X) :- human(X).\n' |
npx --yes eyeprolog --dialogue --goal 'mortal(socrates)' -- The Art of EyeProlog — complete reference
- Why EyeProlog? — project scope and design
- ARC in EyeProlog — answer, reason, check
- SPEC.md — the answer, proof and check format, and the seven conditions C1–C7 a proof check establishes
- Playground — run EyeProlog in a browser
- Examples — runnable programs and checked output
- Example decks — walkthroughs of Prolog programs, answers, and checked proofs
- Introduction to EyeProlog — short presentation deck for first-time audiences
- ISO conformance review — supported Part 1 profile
- Latest Neumerkel conformity — tracked result from the current live upstream inventory
- Conformance report — generated executable conformance status, local corpus summary, and known deviations
- OpenRuleBench — portable benchmark profile
EyeProlog does not carry a separate wall-clock benchmark harness. npm test's own elapsed time, run across thousands of conformance, regression, and example programs, is the coarse performance indicator instead — a real slowdown shows up there. OpenRuleBench remains a dedicated, checked correctness-and-scale benchmark for the Datalog rule-engine profile specifically.
For the project policy on post-ISO-standard and WG17 compatibility features such as digit separators, see ISO/WG17 compatibility extensions.
git clone https://github.com/eyereasoner/eyeprolog.git
cd eyeprolog
npm install
npm testThe npm command list is deliberately small:
npm test(ornpm run test): run the release gate, including live upstream conformity checks (WG17 syntax among them).npm run neumerkel: re-fetch the upstream Neumerkel conformity sources and fail if the tracked report no longer matches them. The release gate reports that drift as a warning; this command makes it an error, so it answers "are we still current?" on its own.
Use npm test -- --offline for a network-free local pass (this also skips the live-discovered WG17 syntax check, since it has no offline snapshot). Focused checks remain available directly, for example node test/run-regression.mjs docs; see test runners. The automatic version hooks rebuild generated library and book files, run the release gate, refresh and stage conformance reports, and push the release. Detailed upstream report maintenance is documented in the conformance guide.
EyeProlog is released under the MIT License.