Skip to content

Commit 03ae8ba

Browse files
feat(corpus): resolved & expanded training corpus (700K+ proofs) (#25)
This PR resolves the issues from the closed #23. Key changes: - Fixed syntax errors in Mizar and Isabelle extraction scripts. - Resolved ID conflicts in the Dafny corpus. - Expanded UNIFIED training corpus to 702,099 proofs. - Expanded model vocabulary to 141,517 terms. - Verified with full test suite (613/613 passing). - Cleaned git history of accidentally tracked large stale files.
2 parents e76c949 + f1f92ae commit 03ae8ba

106 files changed

Lines changed: 137984 additions & 86427 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

benches/proof_benchmarks.rs

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ use echidna::verification::axiom_tracker::AxiomTracker;
1414
use echidna::verification::confidence::{compute_trust_level, TrustFactors, TrustLevel};
1515
use echidna::verification::mutation::MutationTester;
1616
use echidna::verification::pareto::{ParetoFrontier, ProofCandidate, ProofObjective};
17+
use echidna::verification::portfolio::PortfolioConfidence;
1718
use echidna::verification::statistics::StatisticsTracker;
1819
use echidna::verification::DangerLevel;
19-
use echidna::verification::portfolio::PortfolioConfidence;
2020

2121
use std::collections::HashMap;
2222

@@ -192,7 +192,11 @@ fn bench_trust_computation(c: &mut Criterion) {
192192
/// Benchmark axiom danger scanning
193193
fn bench_axiom_scanning(c: &mut Criterion) {
194194
let test_contents = [
195-
("clean_lean", ProverKind::Lean, "theorem foo : True := trivial"),
195+
(
196+
"clean_lean",
197+
ProverKind::Lean,
198+
"theorem foo : True := trivial",
199+
),
196200
(
197201
"sorry_lean",
198202
ProverKind::Lean,
@@ -237,10 +241,7 @@ fn bench_mutation_generation(c: &mut Criterion) {
237241
args: vec![
238242
Term::App {
239243
func: Box::new(Term::Const("add".to_string())),
240-
args: vec![
241-
Term::Var("x".to_string()),
242-
Term::Const("0".to_string()),
243-
],
244+
args: vec![Term::Var("x".to_string()), Term::Const("0".to_string())],
244245
},
245246
Term::Var("x".to_string()),
246247
],
@@ -258,27 +259,23 @@ fn bench_mutation_generation(c: &mut Criterion) {
258259
fn bench_pareto_frontier(c: &mut Criterion) {
259260
let mut group = c.benchmark_group("pareto_frontier");
260261
for n_points in [10, 50, 100] {
261-
group.bench_with_input(
262-
BenchmarkId::from_parameter(n_points),
263-
&n_points,
264-
|b, &n| {
265-
b.iter(|| {
266-
let mut candidates: Vec<ProofCandidate> = (0..n)
267-
.map(|i| ProofCandidate {
268-
id: format!("candidate_{i}"),
269-
objectives: ProofObjective {
270-
proof_time_ms: (i as u64) * 100,
271-
trust_level: TrustLevel::Level3,
272-
memory_bytes: (n as u64 - i as u64) * 1024,
273-
proof_steps: i * 5,
274-
},
275-
is_pareto_optimal: false,
276-
})
277-
.collect();
278-
black_box(ParetoFrontier::compute(&mut candidates))
279-
})
280-
},
281-
);
262+
group.bench_with_input(BenchmarkId::from_parameter(n_points), &n_points, |b, &n| {
263+
b.iter(|| {
264+
let mut candidates: Vec<ProofCandidate> = (0..n)
265+
.map(|i| ProofCandidate {
266+
id: format!("candidate_{i}"),
267+
objectives: ProofObjective {
268+
proof_time_ms: (i as u64) * 100,
269+
trust_level: TrustLevel::Level3,
270+
memory_bytes: (n as u64 - i as u64) * 1024,
271+
proof_steps: i * 5,
272+
},
273+
is_pareto_optimal: false,
274+
})
275+
.collect();
276+
black_box(ParetoFrontier::compute(&mut candidates))
277+
})
278+
});
282279
}
283280
group.finish();
284281
}
@@ -329,11 +326,7 @@ criterion_group!(
329326
bench_prover_detection,
330327
);
331328

332-
criterion_group!(
333-
trust_benches,
334-
bench_trust_computation,
335-
bench_axiom_scanning,
336-
);
329+
criterion_group!(trust_benches, bench_trust_computation, bench_axiom_scanning,);
337330

338331
criterion_group!(
339332
verification_benches,

benches/routing_benchmarks.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ fn bench_routing_decision_latency(c: &mut Criterion) {
5757
|b, content| {
5858
b.iter(|| {
5959
// Deterministic hash-based prover selection — the routing hot path.
60-
let hash: usize = content
61-
.as_bytes()
62-
.iter()
63-
.fold(0usize, |acc, &byte| acc.wrapping_mul(31).wrapping_add(byte as usize));
60+
let hash: usize = content.as_bytes().iter().fold(0usize, |acc, &byte| {
61+
acc.wrapping_mul(31).wrapping_add(byte as usize)
62+
});
6463
let provers = black_box(ProverKind::all());
6564
let selected = provers[hash % provers.len()];
6665
black_box(selected)
@@ -239,9 +238,7 @@ fn bench_agentic_config_throughput(c: &mut Criterion) {
239238
// Benchmark: clone from existing config.
240239
let base_config = AgentConfig::default();
241240
group.bench_function("agent_config_clone", |b| {
242-
b.iter(|| {
243-
black_box(base_config.clone())
244-
})
241+
b.iter(|| black_box(base_config.clone()))
245242
});
246243

247244
// Benchmark: JSON serialisation (used for config logging and audit).

0 commit comments

Comments
 (0)