This document provides an indicative state of progress on formal guarantees for the SMTLib.jl Julia package as of 2026-08-14. It consolidates information from:
-
EXPLAINME.adoc— Implementation evidence for README claims -
README.md— Project overview and features -
src/SMTLib.jl— Monolithic module with solver bindings
| Component | Status | Details |
|---|---|---|
Bidirectional SMT-LIB2 pipeline |
✅ LANDED |
Julia ↔ SMT-LIB2 ↔ Solvers (Z3, CVC5, Yices, MathSAT) |
Julia to SMT-LIB2 conversion |
✅ LANDED |
|
SMT-LIB2 to Julia parsing |
✅ LANDED |
|
Operator mapping |
✅ LANDED |
35+ Julia operators mapped to SMT-LIB2 equivalents |
Logic support |
✅ LANDED |
10 SMT-LIB2 logics (QF_LIA, QF_LRA, QF_NIA, QF_NRA, QF_BV, QF_AUFLIA, LIA, LRA, AUFLIRA, QF_S) |
Solver auto-detection |
✅ LANDED |
|
Context management |
✅ LANDED |
|
Incremental solving |
✅ LANDED |
push!/pop! for interactive workflows |
Named assertions |
✅ LANDED |
|
Unsat core extraction |
✅ LANDED |
|
Model parsing |
✅ LANDED |
Solver models parsed into Julia structures |
Theory helpers |
✅ LANDED |
Convenience functions for common theory operations |
CEGIS engine |
✅ LANDED |
Counterexample-Guided Inductive Synthesis (Synthesis.jl submodule) |
Test coverage |
✅ LANDED |
468 test assertions |
Synthesis submodule |
✅ LANDED |
CEGIS implementation integrated |
Overall: SMTLib.jl provides a complete bidirectional pipeline from Julia to SMT-LIB2 to external solvers (Z3, CVC5, Yices, MathSAT) and back. All core functionality is implemented and tested with 468 test assertions.
The package is the symbolic verification tier for the hyperpolymath estate,
used by Axiom.jl for @prove verification and by other projects for formal
reasoning about code.
| Direction | Implementation | Status | Evidence |
|---|---|---|---|
Julia → SMT-LIB2 |
|
✅ Landed |
|
SMT-LIB2 → Julia |
|
✅ Landed |
|
Operator mapping |
|
✅ Landed |
|
Logic support |
|
✅ Landed |
|
Solver detection |
|
✅ Landed |
|
Honest assessment: The bidirectional pipeline is fully functional. All 35+ Julia operators are mapped to SMT-LIB2 equivalents, and all 10 supported logics are recognized. Solver detection works across platforms.
| Feature | Implementation | Status | Evidence |
|---|---|---|---|
Context type |
|
✅ Landed |
|
Push/Pop |
|
✅ Landed |
|
Incremental declarations |
|
✅ Landed |
|
Named assertions |
|
✅ Landed |
|
Unsat core extraction |
|
✅ Landed |
|
Solver capability check |
|
MathSAT and CVC5 support; Yices may have limitations |
Algorithm:
- Context maintains an assertion stack
- check_sat invokes the solver
- Unsat core is extracted via solver’s (get-unsat-core) command parsing
- Named assertions enable identifying which constraints cause UNSAT
Caveat: Unsat core extraction requires solver support. Not all solvers expose unsat cores. MathSAT and CVC5 support it; Yices may have limitations.
| Category | Operators | Status | Evidence |
|---|---|---|---|
Arithmetic |
+, -, *, /, div, mod, rem, abs |
✅ Landed |
|
Comparison |
==, !=, <, >, ⇐, >=, unicode variants |
✅ Landed |
|
Logical |
!, &&, |
, ∧, ∨, ⟹, xor, iff |
|
✅ Landed |
|
Implication |
⟹ |
✅ Landed |
|
Total |
35+ operators |
| Logic | Description | Status | Evidence |
|---|---|---|---|
QF_LIA |
Quantifier-Free Linear Integer Arithmetic |
✅ Landed |
|
QF_LRA |
Quantifier-Free Linear Real Arithmetic |
✅ Landed |
|
QF_NIA |
Quantifier-Free Non-Linear Integer Arithmetic |
✅ Landed |
|
QF_NRA |
Quantifier-Free Non-Linear Real Arithmetic |
✅ Landed |
|
QF_BV |
Quantifier-Free Bit-Vectors |
✅ Landed |
|
QF_AUFLIA |
Quantifier-Free Array + Uninterpreted Functions + Linear Integer Arithmetic |
✅ Landed |
|
LIA |
Linear Integer Arithmetic (with quantifiers) |
✅ Landed |
|
LRA |
Linear Real Arithmetic (with quantifiers) |
✅ Landed |
|
AUFLIRA |
Array + Uninterpreted Functions + Linear Integer/Real Arithmetic |
✅ Landed |
|
QF_S |
Quantifier-Free Strings |
✅ Landed |
|
| Structure | Purpose | Status | Evidence |
|---|---|---|---|
|
Solver metadata: name, path, capabilities |
✅ Landed |
|
|
Result: status (:sat, :unsat, :unknown), model, statistics |
✅ Landed |
|
|
Context: logic, declarations, assertions, options, solver reference, scopes |
✅ Landed |
|
|
Expression AST for SMT-LIB2 |
✅ Landed |
Internal representation |
| Path | Purpose | Status |
|---|---|---|
|
Monolithic module (70KB) |
✅ Landed — 25+ exported functions |
Lines 59-90 |
Module documentation and architecture overview |
✅ Landed — 18 lines, no code |
Lines 88-106 |
Constants: |
✅ Landed |
Lines ~115-160 |
Operator mapping dictionary |
✅ Landed — within JULIA_OP_TO_SMT_MAP |
Lines ~200+ |
|
✅ Landed |
Lines ~250+ |
|
✅ Landed |
Lines ~300+ |
|
✅ Landed |
Lines ~400+ |
Solver detection: |
✅ Landed |
Lines ~500+ |
Expression conversion: |
✅ Landed |
Lines ~600+ |
Context operations: |
✅ Landed |
Lines ~700+ |
Model parsing and theory helpers |
✅ Landed |
Lines ~800+ |
CEGIS/Synthesis submodule |
✅ Landed |
|
Test suite |
✅ Landed — 468 assertions |
|
Implementation evidence |
✅ Current |
|
ABI/FFI standard documentation |
✅ Current |
|
Architecture overview |
✅ Current |
|
Project overview |
✅ Current |
Architecture note: The 70KB monolithic design means all solver interaction
code is in one file. This is maintainable but could be refactored into:
- src/solver_detection.jl
- src/smt_generation.jl
- src/result_parsing.jl
- src/context.jl
for better organization (noted in EXPLAINME.adoc caveat).
-
Test file:
test/runtests.jl -
Test count: 468 assertions (per README line 249)
-
Test command:
julia --project=. -e 'using Pkg; Pkg.test()'
| Action | Command |
|---|---|
Instantiate |
|
Precompile |
|
Run tests |
|
Import |
|
Create context |
|
Declare variable |
|
Assert constraint |
|
Check satisfiability |
|
Get unsat core |
|
Push scope |
|
Pop scope |
|
Find solver |
|
Expected Results: - Package instantiates successfully - Package precompiles without errors - All 468 tests pass - Bidirectional conversion works correctly - Solver detection finds available solvers - Incremental solving with push/pop works - Unsat core extraction returns correct subset
| Gap | Impact | Resolution |
|---|---|---|
Monolithic file |
Organization could be improved |
Refactor into separate modules (noted, not blocking) |
Solver dependency |
Requires external solver (Z3, CVC5, Yices, MathSAT) |
Documented prerequisite; tests skip gracefully |
Yices unsat cores |
May have limitations |
Use MathSAT or CVC5 for full unsat core support |
Quantifier support |
Quantifiers in non-QF logics |
Supported but less tested than QF logics |
| Solver | Role | Status |
|---|---|---|
Z3 |
Microsoft SMT solver |
✅ Upstream dependency (auto-detected) |
CVC5 |
Stanford SMT solver (successor to CVC4) |
✅ Upstream dependency (auto-detected) |
Yices |
SRI SMT solver |
✅ Upstream dependency (auto-detected, unsat cores may be limited) |
MathSAT |
MathSAT SMT solver |
✅ Upstream dependency (auto-detected, full unsat core support) |
Relationship: SMTLib.jl is a thin wrapper around these external solvers. It provides a uniform Julia interface to their SMT-LIB2 capabilities.
| Project | Integration | Status |
|---|---|---|
Axiom.jl |
Uses SMTLib for |
✅ Downstream consumer |
PolyglotFormalisms.jl |
Proposed cross-language semantic equivalence checking |
✅ Planned |
ProvenCrypto.jl |
Exports verification certificates to SMT solvers |
✅ Planned |
proven |
Rust equivalent that imports SMTLib specs |
✅ Conceptual sibling |
hypatia |
Static analysis with SMT-based reasoning |
✅ Similar pattern |
verdecimal |
Floating-point verification via SMT |
✅ Similar pattern |
Role: SMTLib.jl is the symbolic verification tier for the hyperpolymath ecosystem. It provides the SMT-LIB2 bridge that enables formal reasoning about code across multiple projects.
| Aspect | Status | Confidence |
|---|---|---|
Bidirectional pipeline |
✅ Landed |
High — Julia ↔ SMT-LIB2 ↔ Solvers |
Julia to SMT-LIB2 |
✅ Landed |
High — to_smtlib() works for all 35+ operators |
SMT-LIB2 to Julia |
✅ Landed |
High — from_smtlib() parses solver output correctly |
Operator mapping |
✅ Landed |
High — 35+ operators comprehensively mapped |
Logic support |
✅ Landed |
High — 10 SMT-LIB2 logics supported |
Solver auto-detection |
✅ Landed |
High — finds Z3, CVC5, Yices, MathSAT on PATH |
Context management |
✅ Landed |
High — SMTContext with scopes and declarations |
Incremental solving |
✅ Landed |
High — push!/pop! works correctly |
Named assertions |
✅ Landed |
High — assert! with name tagging |
Unsat core extraction |
✅ Landed |
Medium — requires solver support; works with MathSAT/CVC5 |
CEGIS engine |
✅ Landed |
High — Synthesis submodule integrated |
Test coverage |
✅ Landed |
High — 468 assertions |
Documentation accuracy |
✅ Current |
High — EXPLAINME is authoritative |
Honest headline: SMTLib.jl provides a complete, tested bidirectional pipeline from Julia to SMT-LIB2 to external solvers and back. It is the symbolic verification tier for the hyperpolymath ecosystem, enabling formal reasoning about code via SMT solvers. All core functionality is landed and tested with 468 assertions.
-
EXPLAINME.adoc — Implementation evidence (authoritative)
-
README.md — Project overview and features
-
ABI-FFI-README.md — ABI/FFI standard documentation
-
ARCHITECTURE.md — Architecture overview
-
src/SMTLib.jl — Monolithic module (70KB, 25+ exported functions)
-
test/runtests.jl — Test suite (468 assertions)
-
Axiom.jl — Downstream consumer (@prove verification)
-
PolyglotFormalisms.jl — Planned integration
-
proven — Rust sibling with similar SMTLib specs
-
Z3 — Upstream SMT solver
-
CVC5 — Upstream SMT solver
-
Yices — Upstream SMT solver
-
MathSAT — Upstream SMT solver