Skip to content

Commit f1f92ae

Browse files
committed
chore: reconnect branch history with main (favoring verified branch content)
2 parents d63b4eb + e76c949 commit f1f92ae

10 files changed

Lines changed: 1650 additions & 412 deletions

File tree

.github/workflows/live-provers.yml

Lines changed: 112 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,21 +226,127 @@ jobs:
226226
run: cargo test --test live_prover_suite --features live-provers -- --nocapture ${{ matrix.backend }}
227227

228228
# ============================================================================
229-
# Tier 3 — weekly. Container-provisioned provers. Wave-3 placeholder.
229+
# Tier 3 — weekly. Heavier upstream provers, best-effort provisioning.
230+
#
231+
# Backends grouped as:
232+
# A — live-provisioned today via apt / upstream tarball (tamarin, proverif,
233+
# metamath, twelf, ortools). Version-check runs, skip-if-absent.
234+
# B — heavy-build deferred (hol4, acl2, scip) and proprietary (imandra).
235+
# Provisioning step emits a skip note; test step runs the suite with
236+
# continue-on-error so the matrix stays green and the binary's absence
237+
# is logged as SKIP by the suite's `which` probe.
230238
# ============================================================================
231239
tier3:
232-
name: T3 container provers
240+
name: T3 / ${{ matrix.backend }}
233241
if: github.event_name == 'schedule' && github.event.schedule == '0 5 * * 0' || (github.event_name == 'workflow_dispatch' && (inputs.tier == '3' || inputs.tier == 'all'))
234242
runs-on: ubuntu-latest
235243
continue-on-error: true
244+
strategy:
245+
fail-fast: false
246+
matrix:
247+
backend:
248+
- tamarin
249+
- proverif
250+
- metamath
251+
- twelf
252+
- ortools
253+
- hol4
254+
- acl2
255+
- scip
256+
- imandra
236257
steps:
237258
- name: Checkout
238259
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
239-
- name: Announce Wave-3 TODO
260+
- name: Install Rust
261+
uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
262+
- name: Cache Cargo
263+
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
264+
- name: Provision ${{ matrix.backend }} (best-effort)
265+
continue-on-error: true
240266
run: |
241-
echo "Tier-3 backends (Tamarin, ProVerif, Imandra, SCIP, OR-Tools, HOL4, ACL2, Twelf, Metamath)"
242-
echo "are provisioned via per-backend Containerfiles in Wave-3 of L3."
243-
echo "See ~/Desktop/ECHIDNA-L3-LIVE-PROVER-CI-PROMPT.md for scope."
267+
set -euo pipefail
268+
sudo apt-get update
269+
case "${{ matrix.backend }}" in
270+
tamarin)
271+
# Tamarin publishes prebuilt Linux x86_64 tarballs.
272+
curl -fsSL -o /tmp/tamarin.tar.gz \
273+
https://github.com/tamarin-prover/tamarin-prover/releases/latest/download/tamarin-prover-linux64-ubuntu.tar.gz || \
274+
curl -fsSL -o /tmp/tamarin.tar.gz \
275+
https://github.com/tamarin-prover/tamarin-prover/releases/download/1.10.0/tamarin-prover-1.10.0-linux64-ubuntu.tar.gz
276+
sudo mkdir -p /opt/tamarin
277+
sudo tar xzf /tmp/tamarin.tar.gz -C /opt/tamarin
278+
# The tarball lays down tamarin-prover directly or in a version dir; link whichever we find.
279+
TAMARIN_BIN="$(find /opt/tamarin -type f -name tamarin-prover | head -n 1)"
280+
[ -n "$TAMARIN_BIN" ] && sudo ln -sf "$TAMARIN_BIN" /usr/local/bin/tamarin-prover
281+
;;
282+
proverif)
283+
# ProVerif is in the Ubuntu/Debian main repos.
284+
sudo apt-get install -y proverif
285+
;;
286+
metamath)
287+
# metamath-exe is small; apt-installable on Ubuntu with build fallback.
288+
sudo apt-get install -y metamath || {
289+
sudo apt-get install -y build-essential git autoconf automake
290+
git clone --depth=1 https://github.com/metamath/metamath-exe.git /tmp/mm
291+
(cd /tmp/mm && ./build.sh) || \
292+
(cd /tmp/mm && autoreconf -i && ./configure && make)
293+
sudo install -m 0755 /tmp/mm/metamath /usr/local/bin/metamath
294+
}
295+
;;
296+
twelf)
297+
# Twelf is in Debian with SML/NJ; on Ubuntu it may live in universe.
298+
sudo apt-get install -y twelf || \
299+
echo "twelf unavailable via apt on this runner; test will SKIP."
300+
;;
301+
ortools)
302+
# Google OR-Tools ships prebuilt Linux tarballs. The binary we
303+
# expose to echidna is a small wrapper that invokes the solver CLI.
304+
OR_URL="https://github.com/google/or-tools/releases/latest/download/or-tools_amd64_ubuntu-22.04_cpp_v9.11.4210.tar.gz"
305+
curl -fsSL -o /tmp/ortools.tar.gz "$OR_URL" || {
306+
echo "OR-Tools tarball unavailable at expected URL; test will SKIP."
307+
exit 0
308+
}
309+
sudo mkdir -p /opt/ortools
310+
sudo tar xzf /tmp/ortools.tar.gz -C /opt/ortools --strip-components=1
311+
# Echidna's ORTools backend invokes `ortools_solve`. The release
312+
# ships `bin/solve` or similar; create the expected symlink.
313+
OR_BIN="$(find /opt/ortools -type f \( -name ortools_solve -o -name solve \) | head -n 1)"
314+
[ -n "$OR_BIN" ] && sudo ln -sf "$OR_BIN" /usr/local/bin/ortools_solve
315+
;;
316+
hol4)
317+
# HOL4 requires Poly/ML and a full tree build (~15min+); defer to
318+
# container provisioning. Test step will SKIP on this runner.
319+
echo "hol4: heavy Poly/ML build deferred to Containerfile provisioning."
320+
;;
321+
acl2)
322+
# ACL2 requires a Common Lisp image (CCL/SBCL) and a 10min+ build;
323+
# defer to container provisioning. Test step will SKIP.
324+
echo "acl2: heavy SBCL+image build deferred to Containerfile."
325+
;;
326+
scip)
327+
# SCIP Optimization Suite needs a full cmake build (~10min). The
328+
# upstream tarball requires a form-gated download, so CI defers to
329+
# Containerfile provisioning. Test step will SKIP.
330+
echo "scip: form-gated upstream tarball; deferred to Containerfile."
331+
;;
332+
imandra)
333+
# Imandra is proprietary; no public Linux binary. Handled via
334+
# vendor-supplied container where a licence is available.
335+
echo "imandra: proprietary; no public CI provisioning available."
336+
;;
337+
esac
338+
# Best-effort version probe for the matrix log.
339+
case "${{ matrix.backend }}" in
340+
tamarin) tamarin-prover --version 2>&1 | head -n 1 || true ;;
341+
proverif) proverif --version 2>&1 | head -n 1 || true ;;
342+
metamath) echo exit | metamath 2>&1 | head -n 1 || true ;;
343+
twelf) twelf-server --help 2>&1 | head -n 1 || true ;;
344+
ortools) ortools_solve --help 2>&1 | head -n 1 || true ;;
345+
hol4|acl2|scip|imandra) true ;;
346+
esac
347+
- name: Run live test for ${{ matrix.backend }} (allow-fail while Wave-3 wires up)
348+
continue-on-error: true
349+
run: cargo test --test live_prover_suite --features live-provers -- --nocapture ${{ matrix.backend }}
244350

245351
# ============================================================================
246352
# Tier 4 — quarterly, best-effort / allow-fail.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,3 @@ deps/
193193
.cache/
194194
build/
195195
dist/
196-
*.stale-*

Justfile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,55 @@ vocab-canon:
7474
julia scripts/vocabulary_mine_corpus.jl
7575
julia scripts/vocabulary_canonicalize.jl
7676

77+
# ── Corpus / training pipeline ─────────────────────────────────
78+
#
79+
# Five steps in order: provision upstream mirrors, run every extractor,
80+
# merge per-prover proof_states into UNIFIED, align the premise files
81+
# to UNIFIED's fresh ids, then retrain. Each step is idempotent;
82+
# re-running only touches what has changed. See
83+
# scripts/provision_corpora.sh --list for the source catalogue.
84+
85+
# Clone every upstream prover corpus into external_corpora/.
86+
# Pass specific names to provision a subset: `just provision-corpora metamath mathlib4`.
87+
provision-corpora *NAMES:
88+
@if [ -z "{{NAMES}}" ]; then \
89+
scripts/provision_corpora.sh --all; \
90+
else \
91+
scripts/provision_corpora.sh {{NAMES}}; \
92+
fi
93+
94+
# Report which upstream corpora are on disk and their sizes.
95+
corpora-status:
96+
scripts/provision_corpora.sh --status
97+
98+
# Run every scripts/extract_*.jl against the provisioned corpora.
99+
# Pass names to run a subset: `just extract-corpora metamath mathlib4`.
100+
extract-corpora *NAMES:
101+
scripts/extract_all.sh {{NAMES}}
102+
103+
# Merge per-prover proof_states_*.jsonl into proof_states_UNIFIED.jsonl
104+
# with fresh sequential ids (dedupes by prover+theorem).
105+
merge-corpora:
106+
julia --project=src/julia scripts/merge_corpus.jl
107+
108+
# Rebuild premises_COMPLETE.jsonl with proof_ids that match UNIFIED.
109+
# merge-corpora rewrites every proof_state id to a fresh sequential
110+
# counter; the premise files keep the original extractor ids, so this
111+
# step re-joins premises to UNIFIED via (prover, theorem) — the durable
112+
# key merge_corpus.jl already dedupes on. Without this step the
113+
# dataloader's proof_id join matches ~0% of records.
114+
align-premises:
115+
julia --project=src/julia scripts/align_premises.jl
116+
117+
# Full retrain from provisioned corpora. Honours ECHIDNA_MAX_PROOF_STATES
118+
# (0 = unlimited), ECHIDNA_NUM_EPOCHS, ECHIDNA_NUM_NEGATIVES.
119+
retrain:
120+
julia --project=src/julia src/julia/run_training.jl
121+
122+
# End-to-end pipeline: provision → extract → merge → align → retrain.
123+
# Use `ECHIDNA_MAX_PROOF_STATES=0 just corpus-refresh` to lift the sample cap.
124+
corpus-refresh: provision-corpora extract-corpora merge-corpora align-premises retrain
125+
77126
# Run the eight-axis metrics suite against the current corpus and post
78127
# results to VeriSimDB. Falls back to training_data/metrics_<run_id>.jsonl
79128
# if VERISIM_URL is unreachable. Target values are documented in

0 commit comments

Comments
 (0)