EyeProlog turns portable ISO Prolog 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.
EyeProlog requires Node.js 18 or newer:
node --version
If necessary, upgrade through a Node version manager or the official Node.js download.
Run EyeProlog without installing it globally:
npx --yes eyeprolog
?- use_module(library(lists)).
true.
?- 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"
eyeprolog
Add 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)' -
EyeProlog can sit behind an RDF knowledge graph without inventing a private graph representation. rdf-prolog-roundtrip converts RDF 1.2 datasets to ordinary rdf(Subject, Predicate, Object, Graph) facts, EyeProlog applies portable rules, and ground rdf/4 results can be converted back to RDF.
The checked Symbiotic Knowledge Graphs example uses named graphs and RDF 1.2 triple terms to distinguish trusted knowledge, AI-proposed statements, and human review. Its wide-audience companion explains why this is a useful present-day software model for human/AI/KG co-evolution: RDF supplies shared semantic memory, Prolog supplies explicit deliberation, AI supplies new hypotheses, and people remain participants in meaning and judgment.
The same RDF → Prolog → RDF boundary is exercised by five additional checked scenarios: cross-organization data sharing, explainable EV-depot configuration, operational incident response, software supply-chain vulnerability response, and a scientific evidence graph. Together they cover policy decisions, reversible configuration reasoning, dependency-graph diagnosis, transitive SBOM exposure, and evidence aggregation with explicit disagreement.
git clone https://github.com/eyereasoner/eyeprolog.git
cd eyeprolog
npm install
npm test
EyeProlog is released under the MIT License.