Logician is free forever. No paid tiers. No enterprise upsells. No asterisks.
Why Logician?
SMT solvers are powerful. Getting them into your Rust project shouldn't require a PhD.
| Approach | Setup | Type Safety | Multi-Solver | Watchdog |
|---|---|---|---|---|
| FFI Bindings | C++ toolchain, platform pain | Yes | Manual | Manual |
| String Builders | Easy | None—pray your strings parse | Manual | Manual |
| Logician | cargo add logician |
Yes, with clear panics | Built-in | Built-in |
What you get:
- Fluent Term API — Build formulas in Rust, not strings. Sort mismatches panic immediately with actionable diagnostics.
- Multi-solver fallback — Z3 timed out? Logician automatically retries on CVC5.
- Process watchdog — Hung solver? Dead. Entire process tree terminated cleanly.
- Optional async — Enable
tokiofeature when you need it.
// This panics immediately: "and requires Bool sort for other"
let bad = bool_var.and;
// This works and serializes to valid SMT-LIB
let good = x.and;
No silent failures. No malformed queries reaching the solver. No orphan processes.
Quick Start
[]
= "0.1"
You need an SMT solver in your PATH (e.g., Z3).
use Config;
use Solver;
use Response;
use ;
use Duration;
Features
Type-Safe Terms
let a = Var;
let c = Var;
// Works
let f1 = a.and;
let f2 = c.eq;
// Panics: "and requires Bool sort for other"
let bad = a.and;
Multi-Solver Fallback
use MultiSolver;
let mut ms = new;
ms.declare;
ms.assert;
// Tries Z3 first; if it fails, replays everything on CVC5
match ms.check
Process Watchdog
let config = Config ;
Uses kill_tree to terminate the solver and all child processes.
SMT-LIB Tracing
let config = Config ;
Async Support
[]
= { = "0.1", = ["tokio"] }
let mut solver = new.await?;
solver.assert.await?;
let result = solver.check.await?;
Philosophy
The Invariant Superhighway
Logician doesn't just check for errors—it enforces architectural guarantees.
Every critical code path has runtime invariants that:
- Record what was checked (for auditing)
- Panic immediately on violations (no silent corruption)
- Enable contract testing (verify the guards are watching)
// In code
assert_invariant!;
// In tests
let tags = get_invariant_tags;
assert!;
This is Predictive Property-Based Testing (PPT)—the same methodology used in high-reliability systems.
What Logician Is
- A driver for SMT solvers via subprocess (stdin/stdout)
- Type-safe term construction with sort enforcement
- Multi-solver orchestration with automatic fallback
- Process lifecycle management with timeout handling
What Logician Is Not
- Not FFI bindings (no C++ compilation required)
- Not a solver itself (you bring Z3, CVC5, Yices, etc.)
- Not a theorem prover framework
- Not pursuing advanced SMT-LIB features (arrays, bitvectors, quantifiers are not in scope)
See ROADMAP.md for the full scope definition and planned features.
Supported Solvers
| Solver | Configuration |
|---|---|
| Z3 | program: "z3", args: ["-in"] |
| CVC5 | program: "cvc5", args: ["--lang", "smt2"] |
| Yices 2 | program: "yices-smt2" |
Any SMT-LIB 2 compliant solver should work.
Testing
# Single-threaded (required for global invariant state)
# With coverage
Current: 24 tests, 90%+ coverage.
Sponsors
If Logician saves you time, consider sponsoring development.
| Tier | What You Get |
|---|---|
| $5/month Coffee Hero | My eternal gratitude + sponsor badge |
| $25/month Developer | Priority support + name in SPONSORS.md |
| $100/month Corporate | Logo on README + monthly office hours |
| $500/month Enterprise | Direct support + feature input |
Companies: Need invoicing? Email michaelallenkuykendall@gmail.com
See SPONSORS.md for the current sponsor list.
Contributing
Logician is open source but not open contribution. See CONTRIBUTING.md.
Bug reports via GitHub Issues are welcome. For security issues, see SECURITY.md.
License
MIT — see LICENSE.