Skip to content

Commit c8c0acf

Browse files
hyperpolymathclaude
andcommitted
feat(provers): wire 8 new backends into mod.rs + fix unused-param warnings
- Add pub mod declarations (alphabetical order) - Extend ProverKind enum with 8 variants: CubicalAgda, Zipperposition, Prover9, OpenSmt, SmtRat, Rocq, UppaalStratego, MizAR - Register in all required match blocks: FromStr, all(), complexity(), tier(), implementation_time(), default_executable(), ProverFactory::create() - Prefix unused `state` params with `_` in all 8 new backends - 0 errors, 0 warnings on stable Rust Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b777b53 commit c8c0acf

16 files changed

Lines changed: 142 additions & 10 deletions

File tree

Cargo.lock

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ tempfile = "3"
8282
# 39 *TypeChecker discipline variants through discipline-specific TypeInfo.
8383
typed-wasm = { path = "crates/typed_wasm" }
8484

85+
# Canonical Term / Goal / ProofState / Tactic / TypeInfo types.
86+
# Extracted so vcl-ut (and any other proof-exchange client) can share them
87+
# without pulling in the full echidna binary. The `core` and `types`
88+
# modules in this crate are re-exported from lib.rs so downstream
89+
# `use crate::core::*` / `use crate::types::*` paths keep working.
90+
echidna-core = { path = "crates/echidna-core" }
91+
8592
[features]
8693
default = []
8794
chapel = [] # Enable Chapel parallel proof search (requires Zig FFI library)
@@ -113,6 +120,7 @@ harness = false
113120

114121
[workspace]
115122
members = [
123+
"crates/echidna-core",
116124
"crates/echidna-mcp",
117125
"crates/echidna-wire",
118126
"crates/typed_wasm",

crates/echidna-core/Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
3+
[package]
4+
name = "echidna-core"
5+
version = "0.1.0"
6+
edition = "2021"
7+
authors = ["Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>"]
8+
license = "PMPL-1.0-or-later"
9+
description = "Canonical Term / Goal / ProofState / Tactic types for ECHIDNA, re-used by vcl-ut and any future proof-exchange client without depending on the full echidna binary."
10+
repository = "https://github.com/hyperpolymath/echidna"
11+
12+
[dependencies]
13+
serde = { version = "1", features = ["derive"] }
14+
serde_json = "1"

crates/echidna-core/src/lib.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
3+
//! ECHIDNA canonical type surface.
4+
//!
5+
//! Holds the types that any client of ECHIDNA (local or over the wire) must
6+
//! agree on: [`core::Term`], [`core::Goal`], [`core::ProofState`],
7+
//! [`core::Tactic`], and the optional [`types::TypeInfo`] decoration.
8+
//!
9+
//! Kept minimal on purpose — only `serde` and `serde_json`. Downstream crates
10+
//! (`echidna` itself, `vcl-ut`, future clients) depend on this crate rather
11+
//! than duplicating the definitions.
12+
//!
13+
//! Internal cross-references (`crate::core::Term`, `crate::types::TypeInfo`)
14+
//! work unchanged because both modules live in this crate.
15+
16+
pub mod core;
17+
pub mod types;

src/rust/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
pub mod agent;
1010
pub mod anomaly_detection;
1111
pub mod aspect;
12-
pub mod core;
12+
// `core` and `types` live in the `echidna-core` crate so vcl-ut and other
13+
// proof-exchange clients can consume the canonical Term / Goal / ProofState /
14+
// Tactic / TypeInfo types without depending on the full echidna binary.
15+
// Re-exported as modules so existing `crate::core::*` and `crate::types::*`
16+
// paths throughout this crate keep resolving unchanged.
17+
pub use echidna_core::{core, types};
1318
pub mod disciplines; // Canonical TypeDiscipline taxonomy (katagoria transition)
1419
pub mod dispatch;
1520
pub mod exchange;
@@ -26,7 +31,6 @@ pub mod parsers;
2631
pub mod proof_encoding; // CBOR encoding + proof identity hashing
2732
pub mod proof_search; // Chapel parallel proof search (optional feature)
2833
pub mod provers;
29-
pub mod types;
3034
pub mod vcl_ut;
3135
pub mod verification;
3236
#[cfg(feature = "verisim")]

src/rust/provers/cubical_agda.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl ProverBackend for CubicalAgdaBackend {
9898

9999
async fn apply_tactic(
100100
&self,
101-
state: &ProofState,
101+
_state: &ProofState,
102102
_tactic: &Tactic,
103103
) -> Result<TacticResult> {
104104
Ok(TacticResult::Error(

src/rust/provers/mizar_ar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl ProverBackend for MizARBackend {
9191

9292
async fn apply_tactic(
9393
&self,
94-
state: &ProofState,
94+
_state: &ProofState,
9595
_tactic: &Tactic,
9696
) -> Result<TacticResult> {
9797
Ok(TacticResult::Error(

src/rust/provers/mod.rs

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub mod cameleer;
3131
pub mod cbmc;
3232
pub mod chuffed;
3333
pub mod coq;
34+
pub mod cubical_agda;
3435
pub mod cvc5;
3536
pub mod dafny;
3637
pub mod dedukti;
@@ -58,29 +59,36 @@ pub mod minisat;
5859
pub mod minizinc;
5960
pub mod minlog;
6061
pub mod mizar;
62+
pub mod mizar_ar;
6163
pub mod naproche;
6264
pub mod nitpick;
6365
pub mod nunchaku;
6466
pub mod nuprl;
6567
pub mod nusmv;
68+
pub mod opensmt;
6669
pub mod ortools;
6770
pub mod prism;
71+
pub mod prover9;
6872
pub mod proverif;
6973
pub mod pvs;
74+
pub mod rocq;
7075
pub mod scip;
7176
pub mod seahorn;
7277
pub mod spass;
78+
pub mod smtrat;
7379
pub mod spin_checker;
7480
pub mod tamarin;
7581
pub mod tlaps;
7682
pub mod tlc;
7783
pub mod twelf;
7884
pub mod typed_wasm;
7985
pub mod uppaal;
86+
pub mod uppaal_stratego;
8087
pub mod vampire;
8188
pub mod viper;
8289
pub mod why3;
8390
pub mod z3;
91+
pub mod zipperposition;
8492

8593
/// Enumeration of all supported provers
8694
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
@@ -307,6 +315,22 @@ pub enum ProverKind {
307315
/// Sibling to Nitpick; same negative-class story but not
308316
/// Isabelle-coupled, wider input format range.
309317
Nunchaku,
318+
/// Cubical Agda — Agda in --cubical mode; HIT, univalence, path types.
319+
CubicalAgda,
320+
/// Zipperposition — first-order + higher-order ATP (TPTP/TSTP output).
321+
Zipperposition,
322+
/// Prover9 — equational/clause-based ATP (McCune); pairs with Mace4.
323+
Prover9,
324+
/// OpenSMT — SMT solver with Craig interpolant generation.
325+
OpenSmt,
326+
/// SMT-RAT — nonlinear arithmetic SMT (NIA/NRA) from RWTH Aachen.
327+
SmtRat,
328+
/// Rocq — the 2024 Coq community rename; detects `rocq` binary first.
329+
Rocq,
330+
/// UPPAAL Stratego — strategy synthesis + stochastic model checking.
331+
UppaalStratego,
332+
/// MizAR — automated reasoning integrated with the Mizar Mathematical Library.
333+
MizAR,
310334
}
311335

312336
impl ProverKind {
@@ -517,6 +541,14 @@ impl std::str::FromStr for ProverKind {
517541
"mercury" | "mmc" => Ok(ProverKind::Mercury),
518542
"nitpick" => Ok(ProverKind::Nitpick),
519543
"nunchaku" => Ok(ProverKind::Nunchaku),
544+
"cubicalagda" | "cubical-agda" | "agda-cubical" => Ok(ProverKind::CubicalAgda),
545+
"zipperposition" => Ok(ProverKind::Zipperposition),
546+
"prover9" => Ok(ProverKind::Prover9),
547+
"opensmt" | "open-smt" => Ok(ProverKind::OpenSmt),
548+
"smtrat" | "smt-rat" => Ok(ProverKind::SmtRat),
549+
"rocq" | "rocq-compile" => Ok(ProverKind::Rocq),
550+
"uppaal-stratego" | "stratego" => Ok(ProverKind::UppaalStratego),
551+
"mizar-ar" | "mizatp" | "mizar-atp" => Ok(ProverKind::MizAR),
520552
_ => Err(anyhow::anyhow!("Unknown prover: {}", s)),
521553
}
522554
}
@@ -589,6 +621,14 @@ impl ProverKind {
589621
ProverKind::KeY,
590622
ProverKind::DReal,
591623
ProverKind::ABC,
624+
ProverKind::CubicalAgda,
625+
ProverKind::Zipperposition,
626+
ProverKind::Prover9,
627+
ProverKind::OpenSmt,
628+
ProverKind::SmtRat,
629+
ProverKind::Rocq,
630+
ProverKind::UppaalStratego,
631+
ProverKind::MizAR,
592632
]);
593633
provers
594634
}
@@ -624,6 +664,14 @@ impl ProverKind {
624664
ProverKind::Mercury => 3, // Logic programming with types/modes.
625665
ProverKind::Nitpick => 2, // Isabelle-wrapped counter-example finder.
626666
ProverKind::Nunchaku => 2, // Standalone counter-example finder.
667+
ProverKind::CubicalAgda => 4, // Cubical HoTT; harder than plain Agda.
668+
ProverKind::Zipperposition => 2, // Automated ATP.
669+
ProverKind::Prover9 => 2, // Classic equational ATP.
670+
ProverKind::OpenSmt => 2, // SMT solver.
671+
ProverKind::SmtRat => 3, // Nonlinear arithmetic needs careful encoding.
672+
ProverKind::Rocq => 3, // Same as Coq.
673+
ProverKind::UppaalStratego => 4, // Strategy synthesis is hard.
674+
ProverKind::MizAR => 3, // Mizar with ATP assist.
627675
ProverKind::Vampire => 2, // Automated, relatively simple
628676
ProverKind::EProver => 2, // Similar to Vampire
629677
ProverKind::SPASS => 2, // Automated FOL
@@ -744,6 +792,14 @@ impl ProverKind {
744792
ProverKind::Mercury => 4, // Specialised logic programming.
745793
ProverKind::Nitpick => 5, // Counter-example finder tier.
746794
ProverKind::Nunchaku => 5, // Counter-example finder tier.
795+
ProverKind::CubicalAgda => 2, // Tier 2: HoTT proof assistant.
796+
ProverKind::Zipperposition => 3, // Tier 3: HO-ATP.
797+
ProverKind::Prover9 => 4, // Tier 4: classic ATP.
798+
ProverKind::OpenSmt => 3, // Tier 3: interpolant SMT.
799+
ProverKind::SmtRat => 5, // Tier 5: research NL SMT.
800+
ProverKind::Rocq => 1, // Tier 1: Coq rename.
801+
ProverKind::UppaalStratego => 4, // Tier 4: strategy synthesis.
802+
ProverKind::MizAR => 3, // Tier 3: ATP-assisted Mizar.
747803

748804
// Tier 5: First-Order ATPs
749805
ProverKind::Vampire => 5,
@@ -867,6 +923,14 @@ impl ProverKind {
867923
ProverKind::Mercury => 2.0, // Logic programming interpreter bridge.
868924
ProverKind::Nitpick => 1.0, // Thin wrapper over Isabelle.
869925
ProverKind::Nunchaku => 1.5, // Standalone counter-example tool.
926+
ProverKind::CubicalAgda => 2.5, // Thin fork of Agda backend.
927+
ProverKind::Zipperposition => 1.5, // TSTP-output ATP.
928+
ProverKind::Prover9 => 1.5, // Simple output parsing.
929+
ProverKind::OpenSmt => 1.5, // SMT-LIB2 like CVC5.
930+
ProverKind::SmtRat => 1.5, // Same pattern.
931+
ProverKind::Rocq => 1.0, // Alias for Coq.
932+
ProverKind::UppaalStratego => 2.0, // Fork of UPPAAL backend.
933+
ProverKind::MizAR => 2.0, // Mizar ATP integration.
870934
ProverKind::Vampire => 1.5, // Automated, TPTP format
871935
ProverKind::EProver => 1.5, // Similar to Vampire
872936
ProverKind::SPASS => 1.5, // DFG format
@@ -1014,6 +1078,14 @@ impl ProverKind {
10141078
ProverKind::KeY => "key", // KeY Java verifier (Java, headless mode)
10151079
ProverKind::DReal => "dreal", // dReal delta-complete SMT solver
10161080
ProverKind::ABC => "abc", // Berkeley ABC logic synthesis system
1081+
ProverKind::CubicalAgda => "agda",
1082+
ProverKind::Zipperposition => "zipperposition",
1083+
ProverKind::Prover9 => "prover9",
1084+
ProverKind::OpenSmt => "opensmt",
1085+
ProverKind::SmtRat => "smtrat",
1086+
ProverKind::Rocq => "rocq",
1087+
ProverKind::UppaalStratego => "stratego",
1088+
ProverKind::MizAR => "mizar-atp",
10171089
// HP ecosystem — all route through the TypeLL kernel CLI;
10181090
// the discipline field on HPEcosystemBackend selects the
10191091
// actual upstream (typell / katagoria / tropical-resource-typing).
@@ -1261,6 +1333,14 @@ impl ProverFactory {
12611333
ProverKind::KeY => Ok(Box::new(key::KeyBackend::new(config))),
12621334
ProverKind::DReal => Ok(Box::new(dreal::DRealBackend::new(config))),
12631335
ProverKind::ABC => Ok(Box::new(abc::AbcBackend::new(config))),
1336+
ProverKind::CubicalAgda => Ok(Box::new(cubical_agda::CubicalAgdaBackend::new(config))),
1337+
ProverKind::Zipperposition => Ok(Box::new(zipperposition::ZipperpositionBackend::new(config))),
1338+
ProverKind::Prover9 => Ok(Box::new(prover9::Prover9Backend::new(config))),
1339+
ProverKind::OpenSmt => Ok(Box::new(opensmt::OpenSmtBackend::new(config))),
1340+
ProverKind::SmtRat => Ok(Box::new(smtrat::SmtRatBackend::new(config))),
1341+
ProverKind::Rocq => Ok(Box::new(rocq::RocqBackend::new(config))),
1342+
ProverKind::UppaalStratego => Ok(Box::new(uppaal_stratego::UppaalStrategoBackend::new(config))),
1343+
ProverKind::MizAR => Ok(Box::new(mizar_ar::MizARBackend::new(config))),
12641344
// TypeLL and KatagoriaVerifier are real HP upstream binaries —
12651345
// they continue to dispatch through HPEcosystemBackend.
12661346
ProverKind::TypeLL | ProverKind::KatagoriaVerifier => Ok(Box::new(

0 commit comments

Comments
 (0)