Version 0.9.5
This is a beta release with major new capabilities, following version 0.9.4.
🚀 Context: The 0.9.x series
Version 0.9.0 was a major milestone supported by a Wikimedia Rapid Fund.
For details on the architecture and the full grant report, please see:
👉 Full 0.9.0 Grant Report
📦 Changes in v0.9.5
-
Janet Scripting Integration:
- Embedded Janet as a full scripting layer — every zelph statement is parsed into Janet before execution.
- Rich API:
zelph/fact,zelph/query,zelph/resolve,zelph/set,zelph/list,zelph/list-chars,zelph/rule,zelph/negate,zelph/exists,zelph/name,zelph/sources,zelph/targets,zelph/car,zelph/cdr. - Inline (
%expr), block (%...%), and unquote (,var) syntax for seamless interplay between zelph and Janet. - JSON import/export and CSV support via Janet's standard library and
spork.
-
Lists, Sets & Deep Unification:
- Lisp-style cons-list topology (
< a b c >and compact<abc>syntax). - Unordered sets (
{ a b c }) with proper rule matching. - Deep unification over arbitrarily nested structures, enabling pattern matching on statements-about-statements.
- Lisp-style cons-list topology (
-
Reasoning Engine:
- Negation as failure with
¬(pattern)syntax sugar andzelph/negateAPI. - Inequality constraints (
!=) as built-in guard — filters variable bindings after unification, essential for Wikidata ontology validation. - Fresh variables in rule consequences — the engine generates new anonymous nodes for constructive reasoning.
- Conjunction syntax sugar — comma-separated conditions:
(cond1, cond2) => consequence. - Reasoning speedup by factor 22× through optimized evaluation order.
- Negation as failure with
-
Proof of Concept: Rule-based Arithmetic:
- Multi-digit addition implemented purely via graph inference rules — no hard-coded arithmetic.
- Numbers represented as cons-lists of digit nodes; a 200-entry lookup table and eight inference rules handle arbitrary-precision addition with carry propagation.
-
Performance & Memory:
- Integrated mimalloc; significantly reduced peak RAM for Wikidata import.
- Optimized
adjacency_setwith custom Flexible Array Member block allocator. - Removed Boost dependency entirely; migrated from
std::wstringto UTF-8std::string.
-
Testing:
- Adopted doctest as the test framework with CTest integration.
- Comprehensive test suite covering parsing, nested unification, negation, inequality semantics, Janet integration, meta-rules, contradiction detection, and multi-digit arithmetic — all run in both parallel and single-core mode.
-
Documentation & Packaging:
- Moved documentation to GitHub Pages via MkDocs.
- New pages: Scripting with Janet, Import & Export, Logic Programming Perspective.
- Added Debian packages (
.deb) for both amd64 and arm64. - Extended
--versionoutput with third-party licensing info (.licensescommand).
-
Build & Refactoring:
- Refactored large source files into thematic compilation units; restructured namespaces.
- Cross-compilation support for Linux ARM64 via QEMU in CI.
- Improved Mermaid diagram rendering (dynamic depth, subgraph support).
- Added reasoning profiler for performance diagnostics.
Binaries for Windows, Linux (x64 & ARM64), and macOS are automatically attached below, both as .zip archives and as .deb packages (Linux).