You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ArghDA M2: Cubical-Agda backend — the flag-profile island (#36)
## What & why
Cubical Agda (`--cubical --safe`, **not** `--without-K`) as a distinct
backend, `agda-cubical`. That completes the Agda family and the fifth
backend overall.
**Design note:** implemented as a separate `AgdaCubical` type rather
than the plan's `Agda::cubical()` constructor. A distinct type expresses
the *island* better — a `--cubical --safe` file and a `--safe
--without-K` file cannot import each other; Agda enforces this at
typecheck and arghda surfaces the resulting `Error` honestly rather than
pretending the edge is sound — and it avoids churning ~19 `Agda`
value-uses across the tree.
## Changes
- **`src/prover/agda.rs`** — `AgdaCubical` shares `invoke_agda()` (now
adds `--cubical`) and all graph methods with `Agda`; differs only in
name, `safe_mode` (`--cubical --safe`), and lint pack.
- **`src/lint/safe_pragma.rs`** — `SafePragma` is now parameterised by
required OPTIONS flags: `standard()` = `[--safe, --without-K]`,
`cubical()` = `[--cubical, --safe]`. A cubical file no longer trips a
spurious "missing --without-K" (which would be *wrong* — cubical is
incompatible with it), and a standard file is still flagged if it lacks
either.
- **`src/lint/mod.rs`** — `agda_cubical_rules()` swaps in the cubical
pragma; the rest of the pack is shared via a private `agda_pack()`.
- **`src/main.rs`** — `--backend agda-cubical` wired; `about`/help
updated.
## Verified (ran, not inferred)
- `cargo test` → **107 passing, 0 failed** (79 lib + 28 integration; +3
safe_pragma unit covering the standard/cubical split, +1
cubical-identity unit, +3 cubical integration).
- `cargo clippy -D warnings` clean · `cargo fmt --check` clean ·
`check-spdx.sh` OK.
- **Dogfooded real agda:** `check --backend agda-cubical` on a
`--cubical --safe` file → `proven-eligible`; the standard `agda` backend
on the *same* file → `rejected` (`missing-safe-pragma: missing
--without-K`). The island distinction demonstrated end-to-end.
## Milestone status
Five backends live across both interaction models: `agda`,
`agda-cubical`, `idris2` (Assistant); `z3`, `cvc5` (Solver). Next:
finish M0 (`arghda doctor`), then M6 (Lean4) / M11 (studio JSON +
Groove).
---
_Generated by [Claude
Code](https://claude.ai/code/session_012MpYSh6Wy8YMBH2E3qVyT7)_
Co-authored-by: Claude <noreply@anthropic.com>
"Flying-Logic epic M2: Cubical-Agda variant (Agda::cubical(), --cubical --safe island; cross-flag import edges forbidden). Small — extends the existing Agda backend.",
155
+
"M1 + M2 + M3 + M4 + M5 DONE. Five backends across both interaction models: agda, agda-cubical, idris2 (Assistant); z3, cvc5 (Solver). Next:",
156
+
"Finish M0: add the `arghda doctor` Rust subcommand — report which of the five backends are actually runnable (probe each binary), repoint `just doctor` at it, feed the Groove manifest. Closes the last M0 gap.",
140
157
"Flying-Logic epic M6: Lean4 adapter (lake build + #print axioms audit → honest Unknown soundness when the audit is absent). Lean 4.13.0 provisioned.",
141
-
"Finish M0: add the `arghda doctor` Rust subcommand (report which backends are runnable — now agda/idris2/z3/cvc5) and repoint `just doctor` at it.",
158
+
"Flying-Logic epic M11: studio JSON freeze (reason/0.1) + Groove /.well-known/groove manifest (the one open v0.1 milestone).",
0 commit comments