ECHIDNA is a Rust workspace with Julia ML, Idris2 ABI, Zig FFI, and ReScript UI.
The main binary and library. Key modules:
| File/Dir | Purpose |
|---|---|
main.rs |
CLI entry (clap) |
lib.rs |
Library root — re-exports all modules |
core.rs |
Core types: Term, ProofState, Tactic, Goal, Context, Theorem |
repl.rs |
Interactive REPL |
server.rs |
HTTP API server |
dispatch.rs |
Full trust-hardening dispatch pipeline |
neural.rs |
Neural premise selection |
aspect.rs |
Aspect tagging |
provers/ |
30 prover backend implementations |
provers/mod.rs |
ProverBackend trait, ProverKind enum (48 variants), ProverFactory |
verification/ |
Trust pipeline modules |
integrity/ |
Solver binary integrity (SHAKE3-512, BLAKE3) |
executor/ |
Sandboxed execution (Podman, bubblewrap) |
exchange/ |
Cross-prover proof exchange (OpenTheory, Dedukti) |
agent/ |
Agentic proof search (actor model) |
parsers/ |
Proof file parsers |
ffi/ |
Foreign function interface |
| Module | Purpose |
|---|---|
portfolio.rs |
SMT portfolio solving / cross-checking |
certificates.rs |
Proof certificate checking (Alethe, DRAT/LRAT, TSTP) |
axiom_tracker.rs |
Axiom usage tracking (Safe, Noted, Warning, Reject) |
confidence.rs |
5-level trust hierarchy, Bayesian scoring |
mutation.rs |
Mutation testing for specifications |
pareto.rs |
Pareto frontier for multi-objective proof search |
statistics.rs |
Statistical confidence + Bayesian timeout estimation |
Three workspace members under src/interfaces/:
| Dir | Tech | Port | Notes |
|---|---|---|---|
graphql/ |
async-graphql | 8081 | Query/Mutation/Subscription |
grpc/ |
tonic | 50051 | 4 services |
rest/ |
axum + utoipa | 8000 | OpenAPI spec |
Invariant: Interfaces stay under src/interfaces/ — never extract to separate repos.
Logistic regression for tactic prediction. Runs on port 8090. Future: Flux.jl Transformer models.
7 modules with dependent type proofs. Zero believe_me.
| File | Purpose |
|---|---|
Types.idr |
Core types with proofs |
GraphQL.idr |
Query/Mutation/Subscription operations |
GRPC.idr |
gRPC service definitions |
REST.idr |
REST endpoint definitions (18 endpoints, 6 groups) |
FFI.idr |
GADT constructors for C ABI functions |
echidnaabi.ipkg |
Package definition |
4 shared libraries. Bridges Idris2 ABI to C ABI.
28 files. Deno runtime.
Optional parallel proof dispatch. Requires Chapel compiler.
The core abstraction in src/rust/provers/mod.rs:
pub trait ProverBackend: Send + Sync {
fn name(&self) -> &str;
fn kind(&self) -> ProverKind;
fn prove(&self, goal: &Goal, timeout: Duration) -> ProofResult;
fn check_certificate(&self, cert: &Certificate) -> CertificateResult;
fn supports_exchange(&self) -> bool;
}48 variants in ProverKind enum. ProverFactory creates instances.
Full trust-hardening flow:
- Select candidate provers (aspect tags + neural ranking)
- Verify solver binary integrity (SHAKE3-512 + BLAKE3)
- Execute in sandbox (Podman/bubblewrap/none)
- Portfolio cross-check (multiple solvers on same goal)
- Verify proof certificates
- Track axiom usage
- Score confidence (Bayesian, 5-level hierarchy)
- Optional: mutation testing, Pareto frontier
just build # Debug build
just build-release # Release build
just test # Unit tests (232)
just test-all # All tests (389)
just test-integration # Integration tests (38)
just test-neural # Julia ML tests
just lint # Clippy
just fmt # Rustfmt
just pre-commit # fmt-check + lint + test
just container-build # Minimal container
just container-build-full # Full container
just build-chapel-ffi # Zig FFI for Chapel
just build-chapel-poc # Chapel PoC binary
just chapel-all # Full Chapel stack
just doctor # Check prerequisites
just heal # Install instructions- Add variant to
ProverKindenum insrc/rust/provers/mod.rs - Implement
ProverBackendtrait insrc/rust/provers/<name>.rs - Register in
ProverFactory - Add tests (unit + integration)
- Update Julia layer (
src/julia/) with prover metadata - Update Chapel layer (
chapel_poc/) if parallel dispatch applies - Run
just test-all
[workspace]
members = [".", "src/interfaces/graphql", "src/interfaces/grpc", "src/interfaces/rest"]tokio— Async runtimeclap— CLI parsingserde/serde_json/toml— Serializationanyhow/thiserror— Error handlingasync-graphql— GraphQLtonic/prost— gRPCaxum/utoipa— REST + OpenAPIsha3/blake3— Integrity hashing
All in .machine_readable/:
6a2/STATE.a2ml— Current state6a2/META.a2ml— Architecture decisions6a2/ECOSYSTEM.a2ml— Ecosystem position6a2/AGENTIC.a2ml,NEUROSYM.a2ml,PLAYBOOK.a2ml
NEVER create these in the root directory.
guix.scm— Guix package definition (uses cargo-build-system)flake.nix— Nix flake (with rust-overlay)Containerfile— Podman container
- 232 unit tests (
cargo test --lib) - 38 integration tests (
cargo test --test integration_tests) - 119 additional tests (doc tests, property tests)
- Total: 389
- No Python anywhere (use Julia for ML)
- No Docker (use Podman)
- No TypeScript (use ReScript)
- No
believe_me/assert_totalin Idris2 - PMPL-1.0-or-later license throughout
17 workflows in .github/workflows/:
hypatia-scan.yml,codeql.yml,scorecard.yml,quality.ymlmirror.yml,instant-sync.yml- All actions SHA-pinned
PMPL-1.0-or-later. Author: Jonathan D.A. Jewell j.d.a.jewell@open.ac.uk Git author: 6759885+hyperpolymath@users.noreply.github.com