Skip to content

Commit 1073d60

Browse files
proofs: declare the strict flag set in every module that can take it (#357)
## Summary #355 made the code compatible with the strict Agda flag set. This PR declares the flags in the files, which is what downstream repos need. `--cubical-compatible` is coinfective: a module that declares it may only import modules that also declare it. choreographic-types imports `experimental/echo-additive/Grade.agda`, and through it `EchoGraded`, `Echo`, `EchoCharacteristic` and `EchoResidue`. It cannot adopt the strict set until these modules declare the flag. - **141 modules:** the `OPTIONS` pragma gains `--cubical-compatible --exact-split --no-sized-types --no-guardedness`, keeping `--safe --without-K`. - **6 modules left unchanged:** | Module | Why | |---|---| | `EchoCNOBridge`, `EchoThermodynamicsArbitrary` | Import absolute-zero's `CNO`, which does not declare `--cubical-compatible` yet | | `All`, `Smoke` | Import those two | | `EchoImageFactorizationPropCubical` | The `--cubical` island | | `EchoImageFactorizationPropPostulated` | The quarantined postulate block | A module without the flag may still import modules that have it, so these all keep building. Once absolute-zero lands the flag, a follow-up adds it to the first four. - **`scripts/kernel-guard.sh`:** the safety-relaxing-flag check matched the substring `--cubical` inside `--cubical-compatible`, which strengthens safety rather than relaxing it. It now matches whole flags only. ## Verification (Agda 2.6.3, stdlib 2.3) - Every CI root compiles with `--ignore-interfaces`: - `All` - `Smoke` - `characteristic/All` - `examples/All` - `experimental/echo-additive/All` - `tutorial/All` compiles. - `scripts/kernel-guard.sh`: PASS. Negative controls: planting `--cubical`, `--sized-types` or `--guardedness` in `Echo.agda` still fails the guard. - `tools/check-guardrails.sh`: OK (137 modules). - A trial build of choreographic-types with these pragmas, plus strict pragmas on resource-algebra and epistemic-types, passes all of its gates: 17 modules, 5 rejections, and the minimal-laws certificate. Companion PR: epistemic-types (same change). --- _Generated by [Claude Code](https://claude.ai/code/session_01MF5GeeBBDF6sUzr6pZTjWV)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1939e7e commit 1073d60

142 files changed

Lines changed: 144 additions & 143 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.

‎proofs/agda/AntiEcho.agda‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# OPTIONS --safe --without-K #-}
1+
{-# OPTIONS --safe --without-K --cubical-compatible --exact-split --no-sized-types --no-guardedness #-}
22
-- SPDX-License-Identifier: MPL-2.0
33
-- SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44

‎proofs/agda/AntiEchoTropical.agda‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# OPTIONS --safe --without-K #-}
1+
{-# OPTIONS --safe --without-K --cubical-compatible --exact-split --no-sized-types --no-guardedness #-}
22
-- SPDX-License-Identifier: MPL-2.0
33
-- SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44

‎proofs/agda/AntiEchoTropicalGeneric.agda‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# OPTIONS --safe --without-K #-}
1+
{-# OPTIONS --safe --without-K --cubical-compatible --exact-split --no-sized-types --no-guardedness #-}
22
-- SPDX-License-Identifier: MPL-2.0
33
-- SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44

‎proofs/agda/Dyadic.agda‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# OPTIONS --safe --without-K #-}
1+
{-# OPTIONS --safe --without-K --cubical-compatible --exact-split --no-sized-types --no-guardedness #-}
22
-- SPDX-License-Identifier: MPL-2.0
33
-- SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44

‎proofs/agda/DyadicEchoBridge.agda‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# OPTIONS --safe --without-K #-}
1+
{-# OPTIONS --safe --without-K --cubical-compatible --exact-split --no-sized-types --no-guardedness #-}
22
-- SPDX-License-Identifier: MPL-2.0
33
-- SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44

‎proofs/agda/Echo.agda‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# OPTIONS --safe --without-K #-}
1+
{-# OPTIONS --safe --without-K --cubical-compatible --exact-split --no-sized-types --no-guardedness #-}
22
-- SPDX-License-Identifier: MPL-2.0
33
-- SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44

‎proofs/agda/Echo/Index/ThinPoset.agda‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# OPTIONS --safe --without-K #-}
1+
{-# OPTIONS --safe --without-K --cubical-compatible --exact-split --no-sized-types --no-guardedness #-}
22
-- SPDX-License-Identifier: MPL-2.0
33
-- SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44

‎proofs/agda/Echo/Measure/Examples.agda‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# OPTIONS --safe --without-K #-}
1+
{-# OPTIONS --safe --without-K --cubical-compatible --exact-split --no-sized-types --no-guardedness #-}
22
-- SPDX-License-Identifier: MPL-2.0
33
-- SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44

‎proofs/agda/Echo/Measure/Interface.agda‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# OPTIONS --safe --without-K #-}
1+
{-# OPTIONS --safe --without-K --cubical-compatible --exact-split --no-sized-types --no-guardedness #-}
22
-- SPDX-License-Identifier: MPL-2.0
33
-- SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44

‎proofs/agda/Echo/Modality/Core.agda‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# OPTIONS --safe --without-K #-}
1+
{-# OPTIONS --safe --without-K --cubical-compatible --exact-split --no-sized-types --no-guardedness #-}
22
-- SPDX-License-Identifier: MPL-2.0
33
-- SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44

0 commit comments

Comments
 (0)