zelph is an innovative semantic network system and reasoning engine written in C++ with an embedded Janet scripting layer. It treats logic, rules, and mathematics not as external code, but as homoiconic structures within the graph itself.
By blending the flexibility of semantic webs (like Wikidata) with logic programming concepts (deep unification, constructive rules, negation as failure), zelph effectively transforms a static knowledge base into an executable graph.
Four lines are the entire concept:
zelph> "is part of" ~ "transitive relation"
zelph> (R ~ "transitive relation", X R Y, Y R Z) => (X R Z)
zelph> Canada "is part of" "American continent"
zelph> "American continent" "is part of" "Earth's surface"
(Canada "is part of" "Earth's surface") ⇐ {(Canada "is part of" "American continent") ("is part of" ~ "transitive relation") ("American continent" "is part of" "Earth's surface")}
The rule never mentions is part of. It quantifies over the relation itself, and the first line – an ordinary fact of the kind any dataset can carry – is what makes it apply here. Wikidata carries exactly this one, so this single rule covers every relation that Wikidata declares transitive.
The complete documentation, including tutorials, language references, and the architectural concepts behind "Semantic Math", is hosted on our documentation site:
👉 Read the zelph Documentation
The same pages appear on zelph.org, alongside the Wikidata reports generated using zelph.
- 🕹️ Try zelph in your browser – the complete reasoning engine as WebAssembly, no installation required.
- 🚀 Installation & Quick Start Guide – Get started immediately with pre-compiled binaries for all major platforms (no build required).
- 🧠 Core Concepts & Homoiconicity
- 🧮 Semantic Math & Rule-based Addition
- 📜 Scripting with Janet
- 🦀 The Rust layer – safe bindings for a host application, over the same C ABI any other language uses.
- 🗃️ Use Case: Wikidata
- 🛠️ Contributing – what a change to the engine has to bring with it.
- 🔒 Security Policy – how to report a vulnerability privately.
Since the C++ core contains no arithmetic, the entire mathematical stack in stdlib/ is implemented via zelph rules – digits, numerals, integers, polynomials, symbolic differentiation. Six tutorials progress from proving an identity to a full refutation of the Jacobian conjecture – the July-2026 Alpöge/Fable counterexample, verified over the integers using rules exclusively. Each example on those pages was executed against the actual binary and its real output pasted in.
zelph is supported by NLnet’s NGI0 Commons Fund for Auditable Reasoning over Linked Open Data: streaming import adapters for RDF/N-Triples and JSON-LD, an open proof-export format that publishes derivation chains as Linked Data, a reusable constraint-rule library, and a web-based proof explorer. Earlier work was funded by two Wikimedia Community Fund (Rapid Fund) grants, both completed and reported: Wikidata Contradiction Detection and Constraint Integration and Transitive Reasoning, Qualifier Support, and SPARQL-Subset Integration.
The project addresses real-world challenges in large-scale ontology management through direct collaboration with the Wikidata Ontology Cleaning Task Force and the Mereology Task Force.
The progress of the NLnet-funded work is monitored via the project status page.
The following external dependencies are compiled into zelph during compilation. CMake retrieves each one at build time, specifically at the version specified and locked in the build configuration, with no alterations applied to any of them. zelph --version displays the set of components included in a given binary.
| Component | Version | Licence | Used for | Included in |
|---|---|---|---|---|
| Janet | 1.41.2 | MIT | the embedded scripting layer | all builds |
| unordered_dense | 4.8.1 | MIT | hash maps | all builds |
| Cap'n Proto | 1.4.0 | MIT | the .bin network format |
native builds, not WebAssembly |
| bzip2 | 1.0.8 | bzip2 licence (BSD-style) | reading compressed dumps | native builds, not WebAssembly |
| mimalloc | 3.4.5 | MIT | memory allocation | standalone Linux builds |
Used only for building, testing or documenting zelph, and not included in its distribution: doctest 2.5.2 (MIT) for the test suite, bindgen 0.72 (BSD-3-Clause) for the Rust bindings, and MkDocs paired with Material for MkDocs, pymdown-extensions, and mkdocs-redirects for the documentation. The WebAssembly build is generated using Emscripten and contains the runtime code produced by Emscripten (MIT or University of Illinois/NCSA licence).
Loaded by the browser from cdn.jsdelivr.net upon viewing a page, and not distributed with zelph: xterm.js 5.5.0 along with its fit add-on 0.10.0 (MIT) in the playground, and Mermaid (MIT) as well as svg-pan-zoom (BSD-2-Clause) in the graph pages that zelph writes.
zelph is dual-licensed: AGPL-3.0-or-later for open-source use, and a commercial licence from acrion innovations GmbH for closed-source integration or special requirements (acrion.ch/sales). Offering the commercial option adds a possibility and takes nothing away from anyone using the open-source licence, commercial users included.