Skip to content

Commit 82fead8

Browse files
hyperpolymathclaude
andcommitted
feat(batch_driver): wire alt-ergo, metamath, cadical — 13 active provers
New runners (direct binary invocation + output parsing): - alt_ergo : parses "Valid" / "Invalid" / "I don't know" / "Timeout" - metamath : reads file via stdin, parses ?Error / "were not proved" - cadical : exit 10=SAT, 20=UNSAT, 0=unknown (both 10/20 → success) New targets in TARGETS[]: safety/altergo (existing .smt2 corpus) invariant/metamath (proofs/metamath/*.mm) model-check/cadical (proofs/dimacs/*.cnf) correctness/z3 + cvc5 (proofs/smt-lib-mined/*.smt2 — 15 synthetic LIA/ NIA/BV/UF/AX/NRA problems) Strategy MV + certificate landscape after several batch runs: 7 PROVEN certs: {safety,correctness,linearity,model-check} × {z3,cvc5, vampire,idris2,cadical} 2 SANCTIFIED: safety (z3+cvc5+vampire, 214 attempts), correctness (z3+cvc5, 150 attempts) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5ceed6a commit 82fead8

1 file changed

Lines changed: 80 additions & 11 deletions

File tree

bots/echidnabot/scripts/batch_driver.sh

Lines changed: 80 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ TARGETS=(
4141
"echidna|safety|cvc5|examples|smt2"
4242
"echidna|safety|cvc5|proofs/z3|smt2"
4343
"echidna|safety|vampire|proofs/tptp|p"
44+
"echidna|safety|altergo|examples|smt2"
45+
"echidna|safety|altergo|proofs/z3|smt2"
46+
"echidna|invariant|metamath|proofs/metamath|mm"
47+
"echidna|model-check|cadical|proofs/dimacs|cnf"
48+
"echidna|correctness|z3|proofs/smt-lib-mined|smt2"
49+
"echidna|correctness|cvc5|proofs/smt-lib-mined|smt2"
4450
"echidna|equiv|coq|proofs/coq|v"
4551
"echidna|equiv|lean|proofs/lean|lean"
4652
"echidna|equiv|agda|proofs/agda|agda"
@@ -156,6 +162,66 @@ run_dafny() {
156162
fi
157163
}
158164

165+
run_alt_ergo() {
166+
local file="$1"
167+
local t0 t1 output rc
168+
t0=$(date +%s%3N)
169+
output=$(timeout "${TIMEOUT_SEC}s" alt-ergo "$file" 2>&1)
170+
rc=$?
171+
t1=$(date +%s%3N)
172+
echo $((t1 - t0))
173+
[ $rc -eq 124 ] && { echo timeout; return; }
174+
# alt-ergo prints "Valid" / "Invalid" / "I don't know" / "Timeout" per goal.
175+
if echo "$output" | grep -q "Valid" && ! echo "$output" | grep -qE "Invalid|Timeout"; then
176+
echo success
177+
elif echo "$output" | grep -qE "Invalid"; then
178+
echo failure
179+
elif echo "$output" | grep -qE "Timeout"; then
180+
echo timeout
181+
else
182+
echo unknown
183+
fi
184+
}
185+
186+
run_metamath() {
187+
local file="$1"
188+
local t0 t1 output rc
189+
t0=$(date +%s%3N)
190+
output=$(echo "read \"$file\"
191+
verify proof *
192+
exit" | timeout "${TIMEOUT_SEC}s" metamath 2>&1)
193+
rc=$?
194+
t1=$(date +%s%3N)
195+
echo $((t1 - t0))
196+
[ $rc -eq 124 ] && { echo timeout; return; }
197+
# metamath exits 0 regardless; parse output for ?Error / "were not proved".
198+
if echo "$output" | grep -qE "^\?Error|were not proved"; then
199+
echo failure
200+
elif echo "$output" | grep -q "All proofs in the database were verified"; then
201+
echo success
202+
else
203+
echo unknown
204+
fi
205+
}
206+
207+
run_cadical() {
208+
local file="$1"
209+
local t0 t1 rc
210+
t0=$(date +%s%3N)
211+
timeout "${TIMEOUT_SEC}s" cadical -q "$file" >/dev/null 2>&1
212+
rc=$?
213+
t1=$(date +%s%3N)
214+
echo $((t1 - t0))
215+
[ $rc -eq 124 ] && { echo timeout; return; }
216+
# cadical exit codes: 10=SAT, 20=UNSAT, 0=unknown. Both 10 and 20 count
217+
# as "solver ran and produced a decision" → success for our purposes.
218+
case $rc in
219+
10|20) echo success ;;
220+
0) echo unknown ;;
221+
*) echo failure ;;
222+
esac
223+
}
224+
159225
run_why3() {
160226
local file="$1"
161227
local t0 t1 output rc
@@ -281,17 +347,20 @@ run_vampire() {
281347
run_prover() {
282348
local prover="$1" file="$2"
283349
case "$prover" in
284-
z3) run_z3 "$file" ;;
285-
cvc5) run_cvc5 "$file" ;;
286-
coq) run_coq "$file" ;;
287-
lean) run_lean "$file" ;;
288-
agda) run_agda "$file" ;;
289-
idris2) run_idris2 "$file" ;;
290-
acl2) run_acl2 "$file" ;;
291-
vampire) run_vampire "$file" ;;
292-
dafny) run_dafny "$file" ;;
293-
why3) run_why3 "$file" ;;
294-
*) echo 0; echo unknown ;;
350+
z3) run_z3 "$file" ;;
351+
cvc5) run_cvc5 "$file" ;;
352+
altergo) run_alt_ergo "$file" ;;
353+
coq) run_coq "$file" ;;
354+
lean) run_lean "$file" ;;
355+
agda) run_agda "$file" ;;
356+
idris2) run_idris2 "$file" ;;
357+
acl2) run_acl2 "$file" ;;
358+
vampire) run_vampire "$file" ;;
359+
dafny) run_dafny "$file" ;;
360+
why3) run_why3 "$file" ;;
361+
metamath) run_metamath "$file" ;;
362+
cadical) run_cadical "$file" ;;
363+
*) echo 0; echo unknown ;;
295364
esac
296365
}
297366

0 commit comments

Comments
 (0)