Skip to content
acrionPublic

About

A semantic network and reasoning engine in which rules, facts and numbers are nodes of one graph, so a statement is itself a node. Importing the statements of the 1.7 TB Wikidata dump builds 983 million nodes on a single machine, and reasoning over them has surfaced thousands of consistency violations in the Wikidata ontology.

Topics

Resources

Contributing

Security policy

Stars

16 stars

Watchers

2 watching

Forks

Repository files navigation

zelph

CI Build Documentation GitHub Release License: AGPL-3.0-or-later NGI0 Commons Fund

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.

📖 Documentation & Installation

The complete documentation, including tutorials, language references, and the architectural concepts behind "Semantic Math", is hosted on our documentation site:

👉 Read the zelph Documentation

Documentation for the latest release

The same pages appear on zelph.org, alongside the Wikidata reports generated using zelph.

Quick Links

Mathematics from the axioms up

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.

Funding and Collaboration

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.

Software Bill of Materials

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.

Licensing

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.

About

A semantic network and reasoning engine in which rules, facts and numbers are nodes of one graph, so a statement is itself a node. Importing the statements of the 1.7 TB Wikidata dump builds 983 million nodes on a single machine, and reasoning over them has surfaced thousands of consistency violations in the Wikidata ontology.

Topics

Resources

Contributing

Security policy

Stars

16 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages