Skip to content

refactor(interop): make Interop/ a collection of sub-projects, with Interop/Aeneas the first - #1209

Open
dtumad wants to merge 3 commits into
Verified-zkEVM:mainfrom
dtumad:dtumad/interop-subprojects
Open

dtumad wants to merge 3 commits into
Verified-zkEVM:mainfrom
dtumad:dtumad/interop-subprojects

Conversation

@dtumad

@dtumad dtumad commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

Interop/ becomes a collection of sub-projects for working with code and tools outside Lean. Each
sub-project is a directory Interop/<Sub>/ with its own Lake package, trusted base, assumptions and
implementations, rather than one package whose libraries are sorted by kind of content. Two tools
whose Lean libraries declare the same names cannot share a Lake package, so separate packages are
what lets such tools live side by side.

Today's package becomes the first sub-project, Interop/Aeneas. All of it rests on one trusted
base: hax 0.5's Lean output goes through Charon and Aeneas, and the lift, the triples, the
interaction-tree bridges and the hax examples all use Aeneas's RustM. A later sub-project is a
new directory and a row in the index; CI finds it without changes.

Layout

The first commit only moves files (git mv, no content changes); the second updates names, paths,
CI and docs.

  • Package. Interop/{lakefile.toml,lake-manifest.json,lean-toolchain,.gitignore} move to
    Interop/Aeneas/, with srcDir = "../..", packagesDir = "../../.lake/packages" and VCVio at
    path = "../..". The requires, pins and options are unchanged, so the root's dependency cache is
    still shared. The package is renamed VCVioInteropAeneas, and its libraries InteropAeneas and
    InteropAeneasHaxExtraction, so that names stay distinct if one sub-project ever requires
    another.

  • Modules keep the Interop. prefix the core import guard matches on, and follow their paths:

    • Interop/Rust/* → Interop/Aeneas/Lift/* (Interop.Aeneas.Lift.{Common,Run,RustM,Triple});
    • Interop/Aeneas/{ITree,WP}.lean stay where they are;
    • Interop/Hax/** → Interop/Aeneas/Hax/** (Interop.Aeneas.Hax.…).

    Declaration names do not change: the namespaces Interop.Rust, Interop.Hax and
    Aeneas.Data.Coinductive describe content, not location. Interop/ is declared unstable, so
    there are no deprecations.

  • Extractions. Each crate's hax.toml points aeneas at the repository root from one level
    deeper (-dest "../../../.."; cargo-hax runs aeneas in the crate directory) and at the new
    -subdir. The committed extracted modules change only in their imports, which aeneas derives
    from -subdir. scripts/regenerate-hax.sh and .github/workflows/hax-extraction.yml follow
    the new paths.

Shared rules and checks

  • Index. Interop/README.md lists the sub-projects (what each connects, trusted base,
    assumptions, implementations covered) and states the shared rules: core never imports Interop;
    a sub-project imports another only through a declared require; generic code moves to VCVio or
    PolyFun first; each sub-project is its own package, sharing the root's dependency cache when its
    pins equal the root's; sources are read from the repository root; tests run through the
    sub-project's own test driver. It also fixes the README template: connects to, trusted base,
    assumptions, implementations covered, what is proved, stability, build and test.
    Interop/Aeneas/README.md follows it, from the old README and Hax/README.md; the latter keeps
    the layout, regeneration and proof recipe of the hax examples.
  • CI. The Interop Bridges job becomes a matrix, Interop <Sub>, over every directory
    Interop/<Sub>/ with a lakefile.toml (scripts/interop-subprojects.py list). Each entry runs
    lake exe cache get, lake build, lake test when lake check-test finds a driver, and the
    axiom sweep against scripts/axiom_baseline.json. The sweep roots are listed once, as the roots
    of the libraries in the lakefile's defaultTargets (scripts/interop-subprojects.py roots); for
    Interop/Aeneas they are the same 13 modules the old job listed. The helper reads
    lakefile.toml, and has its own tests, scripts/test-interop-subprojects.py, run before the
    matrix and by scripts/validate.sh. Tool-specific checks stay with their sub-project:
    hax-extraction.yml belongs to Interop/Aeneas.
  • Isolation. scripts/CheckImports.lean adds the rule between sub-projects: a module of
    Interop/<A>/ may import Interop.<B>.… for B ≠ A only when A B is listed in
    scripts/interop_import_allowlist.txt, which lists nothing. scripts/test-interop-isolation.py
    covers forbidden edges (another sub-project, its umbrella, bare Interop, an Interop.lean
    umbrella), an allowed pair, the pair's direction and a malformed entry.
  • Docs. docs/agents/interop.md, AGENTS.md (repository map, module layering, Building,
    the axiom sweep and the stale claim that no job builds Interop/),
    docs/design/repository-layout.md, docs/agents/gotchas.md, the root lakefile.lean and
    README.md, the comments in scripts/AxiomSweep.lean and the comment-fence scripts, and the
    Interop/ row of docs/reading/upstream-alignment.md, which still called it dormant. The line
    that let a bridge without Lake dependencies build in the root package is gone.

Evidence

  • cd Interop/Aeneas && lake build succeeds. Its only Interop warnings are the two Std.Do
    deprecation warnings that hax's mvcgen_trivial macro raises in the Barrett and Examples
    proofs, on lines this PR does not change. The moved manifest is unchanged by the build.
  • lake exe axiomsweep, run as the CI step runs it: 156 declarations across the 13 roots, with no
    sorry and no nonstandard axiom. lake check-test finds no test driver, so CI skips lake test.
  • scripts/check-interop-isolation.sh and scripts/check-extern-isolation.sh pass;
    scripts/test-interop-isolation.py (7 tests) and scripts/test-interop-subprojects.py
    (4 tests) pass, and each new test fails when the rule it covers is removed.
  • ./scripts/validate.sh passes (build and warning budget, boundaries, comment fences, init sweep,
    style linters, agent docs and doc names).
  • Not run locally: scripts/regenerate-hax.sh --check, which needs cargo-hax. Its paths and the
    workflow's path filters all name existing files, and the workflow runs on this PR because the
    crates moved. The new CI jobs also run for the first time on this PR.

dtumad and others added 3 commits November 21, 2026 15:12
Move the package files, `Interop/Rust/` and `Interop/Hax/` into the new sub-project directory
`Interop/Aeneas/`, beside `ITree.lean` and `WP.lean`: `Interop/Rust/` becomes
`Interop/Aeneas/Lift/` and `Interop/Hax/` becomes `Interop/Aeneas/Hax/`. Renames only; the next
commit updates module names, paths and the package configuration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each directory `Interop/<Sub>/` is a sub-project with its own Lake package, trusted base,
assumptions and implementations. `Interop/Aeneas` is the first: the hax and Aeneas bridges, which
all rest on Aeneas's `RustM`.

- Package: `Interop/Aeneas/lakefile.toml` reads sources from the repository root
  (`srcDir = "../.."`), shares the root's packages (`packagesDir = "../../.lake/packages"`) and
  requires VCVio at `../..`. The package is `VCVioInteropAeneas`, with the libraries
  `InteropAeneas` and `InteropAeneasHaxExtraction`; requires, pins and options are unchanged.
- Modules: `Interop.Rust.*` becomes `Interop.Aeneas.Lift.*` and `Interop.Hax.*` becomes
  `Interop.Aeneas.Hax.*`. Declaration names are unchanged. The crates' `hax.toml` files extract
  into the new paths, and the committed extractions import the new module names.
- CI: the Interop job is a matrix over every `Interop/<Sub>/lakefile.toml`, listed by
  `scripts/interop-subprojects.py`. Each entry builds, runs `lake test` when the package has a
  test driver, and sweeps the roots of its default libraries for axioms.
- Isolation: a module of `Interop/<A>/` imports `Interop.<B>.…` only when `A B` is listed in
  `scripts/interop_import_allowlist.txt`, which lists nothing.
- Docs: `Interop/README.md` indexes the sub-projects, states their shared rules and fixes the
  README template that `Interop/Aeneas/README.md` follows; the agent guides, the repository layout
  and the script comments describe the new layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

🤖 PR Summary

Structural Refactoring: Interop/ Becomes a Collection of Independent Sub-Projects

This PR restructures the monolithic Interop/ directory into a collection of independent sub-projects, each a separate Lake package with its own trusted base, assumptions, CI job, and README. Interop/Aeneas/ is the first such sub-project. The changes are purely structural: no new theorems, definitions, or proofs are added or modified. File moves and import path updates constitute the core content; the remaining changes are to CI, scripts, and documentation to match the new layout.

Critically, no sorry or admit placeholders are added anywhere in this PR.

Layout & Namespace Changes

  • Package moved. All files previously under Interop/Hax/ and Interop/Rust/ now reside under Interop/Aeneas/.
  • Module paths updated.
    • Interop/Rust/* → Interop/Aeneas/Lift/* (modules become Interop.Aeneas.Lift.{Common,Run,RustM,Triple}).
    • Interop/Hax/** → Interop/Aeneas/Hax/** (modules become Interop.Aeneas.Hax.…).
    • Interop/Aeneas/{ITree,WP}.lean stay in place.
  • Declaration names (namespaces) do not change. The namespaces Interop.Rust, Interop.Hax, and Aeneas.Data.Coinductive remain describing content, not location.
  • Configuration and README files (Interop/Hax/**/hax.toml, Interop/lakefile.toml, Interop/Hax/README.md) are deleted and recreated under Interop/Aeneas/.
  • Package name is renamed to VCVioInteropAeneas, with libraries InteropAeneas and InteropAeneasHaxExtraction, to keep names distinct if one sub-project ever requires another.
  • The first commit is git mv only (no content changes).

Infrastructure & CI

  • CI matrix for sub-projects. The Interop Bridges job becomes a matrix Interop <Sub> over every directory Interop/<Sub>/ with a lakefile.toml. A new script scripts/interop-subprojects.py provides list and roots commands to programmatically discover sub-projects and their axiom-sweep targets.
  • Axiom sweep per sub-project. Each sub-project's CI job runs its own axiom sweep against scripts/axiom_baseline.json, using roots derived from the sub-project's lakefile.toml (instead of the previous single hardcoded list).
  • hax extraction workflow (hax-extraction.yml) is updated to point to Interop/Aeneas/ paths.
  • Import isolation enforced. A new file scripts/interop_import_allowlist.txt lists permitted cross-sub-project imports (currently empty). scripts/CheckImports.lean is extended to check that a module from Interop/<A>/ may import Interop.<B>.… for B ≠ A only if the pair is in the allowlist and the importer's lakefile.toml has a matching [[require]].
  • New test scripts. scripts/test-interop-subprojects.py (4 tests) verifies the sub-project discovery and root derivation logic. scripts/test-interop-isolation.py (7 tests, updated from previous paths) covers the isolation rules.
  • Cache comments and free-ci-disk-space.sh references updated for per-sub-project working directories.

Documentation

All documentation files are updated to describe the new sub-project architecture. Key changes:

  • Interop/README.md is updated to list sub-projects, state shared rules (no import from core, cross-import via allowlist, generic code to VCVio/PolyFun), and fix the README template.
  • docs/agents/interop.md is substantially rewritten: rules for trusted base, directory, Lake package, and README template are now per sub-project. CI job naming changed from Interop Bridges to Interop <Sub>. API references updated to Interop.Aeneas.Lift.*.
  • docs/design/repository-layout.md and docs/reading/upstream-alignment.md updated to reflect the new structure.
  • AGENTS.md, README.md, lakefile.lean comments updated.
  • docs/agents/gotchas.md updated for sub-project-specific build instructions.

Scripts / Build System

  • scripts/regenerate-hax.sh uses Interop/Aeneas/ paths throughout.
  • scripts/check-comment-fences.py clarifies each Interop/<Sub>/ has its own lakefile.toml.
  • scripts/AxiomSweep.lean updated docstring to clarify that Interop sub-projects are separate Lake packages and their sweep roots come from scripts/interop-subprojects.py roots.
  • scripts/validate.sh adds scripts/test-interop-subprojects.py to boundary checks.

Statistics

Metric Count
📝 Files Changed 95
✅ Lines Added 826
❌ Lines Removed 429

Lean Declarations

✏️ Added: 2 declaration(s)

scripts/CheckImports.lean (2)

  • private def interopAllowlist : IO (List (String × String))
  • private def interopSubprojectAllowed (allow : List (String × String)) (path : FilePath)

sorry Tracking

  • No sorrys were added, removed, or affected.

📋 **Additional Analysis**

No findings.


📄 **Per-File Summaries**
  • .github/workflows/build.yml: The workflow now dynamically discovers Interop sub-projects via a new interop_subprojects job that runs scripts/interop-subprojects.py list, and then builds each sub-project (e.g., Interop/Aeneas, Interop/Rust) in a matrix (interop ${{ matrix.subproject }}) using its own lakefile.toml. Each sub-project now gets its own build, test (via lake test if available), and axiom sweep (roots determined by scripts/interop-subprojects.py roots .), replacing the previous single monolithic Interop job that built all bridges together with hardcoded axiom roots. Cache-related comments and the free-ci-disk-space.sh reference were updated to reflect per‑sub‑project working directories, and the main axiom sweep comment now notes that each Interop sub‑project's job sweeps its own roots instead of being bounded by an import‑isolation gate.
  • .github/workflows/hax-extraction.yml: The workflow file was updated to reflect that the hax extraction sub-project now lives under Interop/Aeneas/ rather than directly under Interop/. The top comment was revised to identify the check as belonging to the Interop/Aeneas sub-project, and all trigger paths (push, pull_request) were moved from Interop/Hax/*/... and Interop/lakefile.toml to the corresponding Interop/Aeneas/Hax/*/... and Interop/Aeneas/lakefile.toml paths, ensuring the workflow only runs on changes within the new directory structure.
  • .github/workflows/interop-isolation.yml: The workflow's header comment was updated to clarify the dependency contract enforced by this check. The original comment specified that Interop/** must not depend on downstream libraries (LatticeCrypto, Examples, etc.), but the change adds an additional rule: a sub-project Interop/<A>/ may import Interop.<B>.… only if that import is listed in scripts/interop_import_allowlist.txt. This ensures cross-sub-project dependencies inside Interop/ are explicitly controlled rather than allowed freely.
  • AGENTS.md: AGENTS.md was updated to reflect the restructuring of the Interop/ directory from a single package with subdirectories into multiple independent Lake sub-projects (e.g., Interop/Aeneas/), each with its own lakefile.toml, README, and CI job. The dependency diagram now shows a one-way contract per sub-project and allows cross-Interop requires only via an explicit allowlist; the import isolation policy was extended to also forbid imports from HashSig/ and HashSigTest/. The axiom-sweep section now notes that each Interop/ sub-project runs its own sweep job rather than being excluded entirely, and the warning/job section clarifies that Interop/ sub-projects do not gate on warnings.
  • Interop/Aeneas/Hax/Adc/Cargo.toml: This change simply renames the file Interop/Hax/Adc/Cargo.toml to Interop/Aeneas/Hax/Adc/Cargo.toml, reflecting a directory restructuring that adds an Aeneas layer to the project path. No content within the file was modified.
  • Interop/Aeneas/Hax/Adc/Extraction/Funs.lean: The file Interop/Hax/Adc/Extraction/Funs.lean was renamed to Interop/Aeneas/Hax/Adc/Extraction/Funs.lean. The public imports were updated from Interop.Hax.Adc.Extraction.Types and Interop.Hax.Adc.Extraction.FunsExternal to Interop.Aeneas.Hax.Adc.Extraction.Types and Interop.Aeneas.Hax.Adc.Extraction.FunsExternal, respectively, reflecting a new Aeneas segment in the module path. No definitions, theorems, or proofs were added, removed, or changed.
  • Interop/Aeneas/Hax/Adc/Extraction/FunsExternal.lean: The file Interop/Hax/Adc/Extraction/FunsExternal.lean was renamed to Interop/Aeneas/Hax/Adc/Extraction/FunsExternal.lean, and its public import statement was updated from Interop.Hax.Adc.Extraction.Types to Interop.Aeneas.Hax.Adc.Extraction.Types to match the new path, ensuring the module continues to properly depend on the correct types module after the directory restructuring.
  • Interop/Aeneas/Hax/Adc/Extraction/Specs.lean: This diff renames the file from Interop/Hax/Adc/Extraction/Specs.lean to Interop/Aeneas/Hax/Adc/Extraction/Specs.lean and updates its two public import statements — for Interop.Hax.Adc.Extraction.Types and Interop.Hax.Adc.Extraction.Funs — to use the new path Interop.Aeneas.Hax.Adc.Extraction.Types and Interop.Aeneas.Hax.Adc.Extraction.Funs, respectively. No theorems, definitions, structures, or proofs are added or changed; the file's public import Aeneas, public import CoreModels, public import Hax, and the @[expose] public section block remain identical.
  • Interop/Aeneas/Hax/Adc/Extraction/Types.lean: The file Interop/Hax/Adc/Extraction/Types.lean has been renamed to Interop/Aeneas/Hax/Adc/Extraction/Types.lean. The public import path for Interop.Hax.Adc.Extraction.TypesExternal has been updated to Interop.Aeneas.Hax.Adc.Extraction.TypesExternal to reflect the new directory structure. No other definitions, theorems, structures, or instances were added or modified in this file.
  • Interop/Aeneas/Hax/Adc/Extraction/TypesExternal.lean: The file TypesExternal.lean was moved from Interop/Hax/Adc/Extraction/ to Interop/Aeneas/Hax/Adc/Extraction/. This is a pure rename with no changes to content (similarity index 100%). The relocation reflects a restructuring of the project's directory hierarchy to include an Aeneas subdirectory within the interop layer.
  • Interop/Aeneas/Hax/Adc/Verification.lean: The file was moved from Interop/Hax/Adc/Verification.lean to Interop/Aeneas/Hax/Adc/Verification.lean, and all its public import statements were updated to reflect the new path — Interop.Hax.Adc.Extraction.Specs became Interop.Aeneas.Hax.Adc.Extraction.Specs, Interop.Hax.Holds became Interop.Aeneas.Hax.Holds, Interop.Rust.RustM became Interop.Aeneas.Lift.RustM, and Interop.Rust.Triple became Interop.Aeneas.Lift.Triple. The comment pointing to the vendored Rust source file was also updated from Interop/Hax/Adc/src/lib.rs to Interop/Aeneas/Hax/Adc/src/lib.rs, and the path to the hax extraction in the descriptive text was updated from Interop.Hax.Adc.Extraction to Interop.Aeneas.Hax.Adc.Extraction. This is a pure restructuring/rename; no theorems, definitions, or proofs were added or modified.
  • Interop/Aeneas/Hax/Adc/hax.toml: Added a new configuration file Interop/Aeneas/Hax/Adc/hax.toml for the hax tool. It defines a backend scenario named adc that extracts Rust code to the Lean backend. The configuration disables project-files generation and passes aeneas arguments (-dest, -subdir) to output the extraction into Lean modules under the path Interop/Aeneas/Hax/Adc/Extraction, respecting the crate-adjacent directory structure.
  • Interop/Aeneas/Hax/Adc/src/lib.rs: Relocated Adc/src/lib.rs to a new Interop/Aeneas/Hax/Adc/ directory and updated its documentation comment to reflect the migrated path of the corresponding Verification.lean proof file.
  • Interop/Aeneas/Hax/Barrett/Extraction/Funs.lean: The file Interop/Hax/Barrett/Extraction/Funs.lean is renamed to Interop/Aeneas/Hax/Barrett/Extraction/Funs.lean, and its two public import paths (for Types and FunsExternal) are updated to include Aeneas in the module path. This aligns the file's location and imports with an ongoing reorganization that moves extraction interop definitions under an Interop.Aeneas namespace, consistent with other files in the repository.
  • Interop/Aeneas/Hax/Barrett/Extraction/FunsExternal.lean: The file was renamed from Interop/Hax/Barrett/Extraction/FunsExternal.lean to Interop/Aeneas/Hax/Barrett/Extraction/FunsExternal.lean, and the public import of Interop.Hax.Barrett.Extraction.Types was updated to Interop.Aeneas.Hax.Barrett.Extraction.Types to match the new directory structure. No other definitions, theorems, or proofs were modified; the change is a purely mechanical path update.
  • Interop/Aeneas/Hax/Barrett/Extraction/Specs.lean: This file was renamed from Interop/Hax/Barrett/Extraction/Specs.lean to Interop/Aeneas/Hax/Barrett/Extraction/Specs.lean, and its two public import statements were updated accordingly to reference Interop.Aeneas.Hax.Barrett.Extraction.Types and Interop.Aeneas.Hax.Barrett.Extraction.Funs. This is purely a structural refactor to move the extraction specifications into the Aeneas-namespace subtree, which affects the module's visibility and import paths but does not alter any theorems, definitions, or logical content.
  • Interop/Aeneas/Hax/Barrett/Extraction/Types.lean: The file Types.lean was renamed from Interop/Hax/Barrett/Extraction/Types.lean to Interop/Aeneas/Hax/Barrett/Extraction/Types.lean with no changes to its content. This move integrates the file into an Aeneas subdirectory, likely reflecting a reorganization of the extraction pipeline or namespace.
  • Interop/Aeneas/Hax/Barrett/Verification.lean: This diff renames the file from Interop/Hax/Barrett/Verification.lean to Interop/Aeneas/Hax/Barrett/Verification.lean, reflecting a migration of the project structure from Interop/Hax/ to Interop/Aeneas/. All public import statements are updated accordingly: Interop.Hax.Barrett.Extraction.Specs → Interop.Aeneas.Hax.Barrett.Extraction.Specs, Interop.Hax.Holds → Interop.Aeneas.Hax.Holds, Interop.Rust.RustM → Interop.Aeneas.Lift.RustM, and Interop.Rust.Triple → Interop.Aeneas.Lift.Triple. The module-level docstring also corrects the file path reference for the vendored Rust crate to Interop/Aeneas/Hax/Barrett/src/lib.rs, and adjusts the description of the hax extraction output directory to Interop.Aeneas.Hax.Barrett.Extraction.
  • Interop/Aeneas/Hax/Barrett/hax.toml: This new hax.toml configuration file is added for the Barrett crate, which configures a Lean extraction scenario named barrett. It sets the backend to lean, disables the generation of project-files, and specifies extraction arguments that direct the output to the Interop/Aeneas/Hax/Barrett/Extraction subdirectory, intended to produce Lean modules under the Interop.Aeneas.Hax.Barrett.Extraction.* namespace.
  • Interop/Aeneas/Hax/Barrett/src/lib.rs: The file lib.rs was renamed from Interop/Hax/Barrett/src/lib.rs to Interop/Aeneas/Hax/Barrett/src/lib.rs, placing it under the Aeneas subdirectory of the Interop hierarchy. No other changes to the file content were made; the diff reflects only the move, which reorganizes the project structure but does not alter the Rust library code.
  • Interop/Aeneas/Hax/Cargo.toml: The file Interop/Hax/Cargo.toml was renamed to Interop/Aeneas/Hax/Cargo.toml, and its comments were updated to reflect the new path prefix Interop/Aeneas/Hax/ (instead of Interop/Hax/) for the Rust crate source directories, and to reference Interop/Aeneas/lakefile.toml (instead of Interop/lakefile.toml) for the hax Lean library dependency.
  • Interop/Aeneas/Hax/CenteredBinomial/Extraction/Funs.lean: This diff renames the file Interop/Hax/CenteredBinomial/Extraction/Funs.lean to Interop/Aeneas/Hax/CenteredBinomial/Extraction/Funs.lean and updates its public import paths accordingly: Interop.Hax.CenteredBinomial.Extraction.Types becomes Interop.Aeneas.Hax.CenteredBinomial.Extraction.Types, and similarly for FunsExternal. No definitions, theorems, or proofs are added or modified; the change is purely relocational, moving the file under an Aeneas subdirectory in the import hierarchy, which likely re-aligns the module path with the rest of the project structure.
  • Interop/Aeneas/Hax/CenteredBinomial/Extraction/FunsExternal.lean: The file Interop/Aeneas/Hax/CenteredBinomial/Extraction/FunsExternal.lean is created by renaming from Interop/Hax/CenteredBinomial/Extraction/FunsExternal.lean (92% similarity). The only semantic change is updating one public import to reflect the new path: Interop.Aeneas.Hax.CenteredBinomial.Extraction.Types instead of Interop.Hax.CenteredBinomial.Extraction.Types. No theorems, definitions, or proofs (sorry/admit) are added or modified; the change is purely a namespace/path relocation to align with the new Aeneas directory structure.
  • Interop/Aeneas/Hax/CenteredBinomial/Extraction/Specs.lean: The file was renamed from Interop/Hax/CenteredBinomial/Extraction/Specs.lean to Interop/Aeneas/Hax/CenteredBinomial/Extraction/Specs.lean, reflecting a new Aeneas directory in the path. The two public import statements were updated to match the new path: Interop.Aeneas.Hax.CenteredBinomial.Extraction.Types and Interop.Aeneas.Hax.CenteredBinomial.Extraction.Funs. No theorems, definitions, or proofs were changed; this is purely a restructuring to align the module’s imports with the renamed directory hierarchy.
  • Interop/Aeneas/Hax/CenteredBinomial/Extraction/Types.lean: The file Interop/Hax/CenteredBinomial/Extraction/Types.lean was renamed to Interop/Aeneas/Hax/CenteredBinomial/Extraction/Types.lean with no content changes. This move restructures the file path under the Aeneas subdirectory, likely to align the extraction types with the project's Aeneas-related interoperability layer.
  • Interop/Aeneas/Hax/CenteredBinomial/Verification.lean: The file was renamed from Interop/Hax/CenteredBinomial/Verification.lean to Interop/Aeneas/Hax/CenteredBinomial/Verification.lean. All four public import paths were updated to reflect the new directory structure: Interop.Hax.CenteredBinomial.Extraction.Specs became Interop.Aeneas.Hax.CenteredBinomial.Extraction.Specs, and three Interop.Rust.* imports were changed to Interop.Aeneas.Lift.*. The doc-comment references to the adjacent Rust source file and to the hax extraction target were also updated from Interop/Hax/... to Interop/Aeneas/Hax/... and from Interop.Hax.CenteredBinomial.Extraction to Interop.Aeneas.Hax.CenteredBinomial.Extraction, respectively.
  • Interop/Aeneas/Hax/CenteredBinomial/hax.toml: Added a new hax.toml configuration file for the CenteredBinomial crate, defining a scenario.cbd scenario with the Lean backend. This configures the Hax extraction tool to generate Lean modules (Interop.Aeneas.Hax.CenteredBinomial.Extraction.*) from the Rust crate's code, with the output placed in the project's Interop/Aeneas/Hax/CenteredBinomial/Extraction directory. This file establishes the extraction pipeline that will produce the Lean formalization of the crate's centered binomial distribution logic, though no extraction output (Lean files) is present in this diff — only the configuration that drives it.
  • Interop/Aeneas/Hax/CenteredBinomial/src/lib.rs: The file Interop/Hax/CenteredBinomial/src/lib.rs has been moved to Interop/Aeneas/Hax/CenteredBinomial/src/lib.rs. No other changes were made to the file.
  • Interop/Aeneas/Hax/Computation/Extraction/Funs.lean: This diff moves the Funs.lean file from Interop/Hax/Computation/Extraction/ to Interop/Aeneas/Hax/Computation/Extraction/ and updates its public import statements to reflect the new path: Interop.Hax.Computation.Extraction.Types becomes Interop.Aeneas.Hax.Computation.Extraction.Types, and Interop.Hax.Computation.Extraction.FunsExternal becomes Interop.Aeneas.Hax.Computation.Extraction.FunsExternal. Since only these import paths and the module location changed, no theorems, definitions, structures, or proof terms were added, removed, or modified.
  • Interop/Aeneas/Hax/Computation/Extraction/FunsExternal.lean: This file was renamed from Interop/Hax/Computation/Extraction/FunsExternal.lean to Interop/Aeneas/Hax/Computation/Extraction/FunsExternal.lean, and its public import Interop.Hax.Computation.Extraction.Types was updated to public import Interop.Aeneas.Hax.Computation.Extraction.Types. This change reflects a reorganization of the project's directory structure under the Aeneas namespace, ensuring that module imports remain consistent and correctly resolved in the new location.
  • Interop/Aeneas/Hax/Computation/Extraction/Specs.lean: The file was renamed from Interop/Hax/Computation/Extraction/Specs.lean to Interop/Aeneas/Hax/Computation/Extraction/Specs.lean. Its two public import statements were updated to reflect the new module paths: Interop.Aeneas.Hax.Computation.Extraction.Types and Interop.Aeneas.Hax.Computation.Extraction.Funs. This is a structural move that consolidates Aeneas-related interop files under an Aeneas subdirectory; no theorems, definitions, or sorry/admit are affected.
  • Interop/Aeneas/Hax/Computation/Extraction/Types.lean: The file Interop/Aeneas/Hax/Computation/Extraction/Types.lean was renamed from Interop/Hax/Computation/Extraction/Types.lean and updates its public import to reflect the new path (Interop.Aeneas.Hax.Computation.Extraction.TypesExternal). All other content, including the module declaration, exposed section, and open statements, remain unchanged.
  • Interop/Aeneas/Hax/Computation/Extraction/TypesExternal.lean: This diff renames the file Interop/Hax/Computation/Extraction/TypesExternal.lean to Interop/Aeneas/Hax/Computation/Extraction/TypesExternal.lean, relocating it within the directory structure to reside under the new Interop/Aeneas/ hierarchy. The content of the file is unchanged (100% similarity index), so this is purely a structural move with no modifications to definitions, theorems, or proofs.
  • Interop/Aeneas/Hax/Computation/Verification.lean: The file Interop/Hax/Computation/Verification.lean has been moved to Interop/Aeneas/Hax/Computation/Verification.lean as part of a restructuring into the Aeneas namespace. All public import directives were updated to reflect the new path: Interop.Aeneas.Hax.Computation.Extraction.Specs replaces Interop.Hax.Computation.Extraction.Specs, and Interop.Aeneas.Lift.Triple replaces Interop.Rust.Triple. The docstring was also updated to note that the hax extraction now places its output into Interop.Aeneas.Hax.Computation.Extraction instead of Interop.Hax.Computation.Extraction, and the Rust source file path was adjusted accordingly. These changes maintain the same logical content while integrating the file into the Interop/Aeneas/ directory hierarchy.
  • Interop/Aeneas/Hax/Computation/hax.toml: This file introduces a new hax.toml configuration for the computation crate within the Interop/Aeneas/Hax/Computation directory. It configures the Hax extraction tool to use the Lean backend, setting project-files to false, and directing extracted Lean output via aeneas-args to the Interop/Aeneas/Hax/Computation/Extraction subdirectory. This establishes the build pipeline for extracting verified Rust code into Lean modules alongside the crate itself.
  • Interop/Aeneas/Hax/Computation/src/lib.rs: The file Interop/Hax/Computation/src/lib.rs was renamed to Interop/Aeneas/Hax/Computation/src/lib.rs. This move reflects a directory restructuring to include the Aeneas component in the path, with no changes to the file's contents.
  • Interop/Aeneas/Hax/Division/Extraction/Funs.lean: The file Funs.lean was relocated from Interop/Hax/Division/Extraction/ to Interop/Aeneas/Hax/Division/Extraction/, and its two public import lines were updated to reflect the new path (Interop.Aeneas.Hax.Division.Extraction.Types and Interop.Aeneas.Hax.Division.Extraction.FunsExternal). This keeps the import structure consistent with the project's reorganized directory layout. No theorems, definitions, or proofs were added or modified; the file contains only module, import, and section declarations.
  • Interop/Aeneas/Hax/Division/Extraction/FunsExternal.lean: This change renames FunsExternal.lean from Interop/Hax/Division/Extraction/ to Interop/Aeneas/Hax/Division/Extraction/ and updates its sole public import to reflect the new path (Interop.Aeneas.Hax.Division.Extraction.Types). The module declaration, public import of Aeneas and CoreModels, open commands, and @[expose] public section are otherwise unaltered. This path correction ensures that the dependency on the extracted types resolves correctly after the module has been moved into the Aeneas subdirectory of the interop layer. No definitions, theorems, or proofs are added, removed, or changed, and no sorry or admit appears in the diff.
  • Interop/Aeneas/Hax/Division/Extraction/Specs.lean: This diff renames the file from Interop/Hax/Division/Extraction/Specs.lean to Interop/Aeneas/Hax/Division/Extraction/Specs.lean and updates its public import directives accordingly: the two imports Interop.Hax.Division.Extraction.Types and Interop.Hax.Division.Extraction.Funs are changed to Interop.Aeneas.Hax.Division.Extraction.Types and Interop.Aeneas.Hax.Division.Extraction.Funs respectively. No theorems, definitions, or sorry/admit are added or removed—the change is purely a path/namespace restructuring to insert the Aeneas layer into the module hierarchy.
  • Interop/Aeneas/Hax/Division/Extraction/Types.lean: This diff only renames/moves the file Interop/Hax/Division/Extraction/Types.lean to Interop/Aeneas/Hax/Division/Extraction/Types.lean, with no other changes to the file's content. The purpose is to relocate the file into a new Aeneas subdirectory within the Interop path, likely to reflect a restructuring of the project's interoperability layer.
  • Interop/Aeneas/Hax/Division/Verification.lean: This diff renames Interop/Hax/Division/Verification.lean to Interop/Aeneas/Hax/Division/Verification.lean and updates all local and upstream import paths accordingly: Interop.Hax.Division.Extraction.Specs becomes Interop.Aeneas.Hax.Division.Extraction.Specs, and Interop.Rust.RustM, Interop.Rust.Run, Interop.Rust.Triple become Interop.Aeneas.Lift.RustM, Interop.Aeneas.Lift.Run, Interop.Aeneas.Lift.Triple. The documentation comments are also adjusted to reflect the new directory structure (Interop/Aeneas/Hax/Division/src/lib.rs and Interop.Aeneas.Hax.Division.Extraction). No theorems, definitions, or proof content are added, removed, or altered; the file itself is unchanged beyond the import path updates.
  • Interop/Aeneas/Hax/Division/hax.toml: This new file hax.toml configures a Hax extraction scenario named division that targets the Lean backend and instructs the tool to place extracted Lean modules into Interop/Aeneas/Hax/Division/Extraction.*, relative to the parent crate's location. By setting project-files = false, the extraction produces standalone Lean files rather than a full project.
  • Interop/Aeneas/Hax/Division/src/lib.rs: The file Interop/Hax/Division/src/lib.rs has been renamed to Interop/Aeneas/Hax/Division/src/lib.rs with no changes to its content (similarity index 100%). This move aligns the division interop directory structure with the Aeneas subproject, likely integrating it under the Aeneas workspace for consistent build or dependency management. The rename itself is the only change — no definitions, APIs, or proofs were added, removed, or modified.
  • Interop/Aeneas/Hax/Examples/Extraction/Funs.lean: The file Funs.lean was renamed from Interop/Hax/Examples/Extraction/ to Interop/Aeneas/Hax/Examples/Extraction/, and its two public import statements were updated to reference Interop.Aeneas.Hax.Examples.Extraction.Types and Interop.Aeneas.Hax.Examples.Extraction.FunsExternal accordingly. This change reflects a reorganization of the project hierarchy under Interop/Aeneas/Hax/ and ensures the module’s external dependencies remain valid.
  • Interop/Aeneas/Hax/Examples/Extraction/FunsExternal.lean: The file Interop/Aeneas/Hax/Examples/Extraction/FunsExternal.lean was renamed from Interop/Hax/Examples/Extraction/FunsExternal.lean (93% similarity). The only substantive change is that the public import Interop.Hax.Examples.Extraction.Types statement was updated to public import Interop.Aeneas.Hax.Examples.Extraction.Types, reflecting a restructuring of the module path to include the Aeneas intermediate directory. No theorems, definitions, or sorry/admit declarations were added or modified.
  • Interop/Aeneas/Hax/Examples/Extraction/Specs.lean: The file Interop/Aeneas/Hax/Examples/Extraction/Specs.lean was moved from the old path Interop/Hax/Examples/Extraction/Specs.lean (a rename-only diff with no content changes to definitions or theorems). Two public import lines were updated to reflect the new directory structure: Interop.Hax.Examples.Extraction.Types became Interop.Aeneas.Hax.Examples.Extraction.Types and similarly for Interop.Hax.Examples.Extraction.Funs. No theorems, definitions, instances, or structures were added, modified, or removed, and the file contains no sorry or admit.
  • Interop/Aeneas/Hax/Examples/Extraction/Types.lean: This diff renames the module from Interop/Hax/Examples/Extraction/Types.lean to Interop/Aeneas/Hax/Examples/Extraction/Types.lean and updates its public import accordingly. Specifically, the file is reimported, and the public import statement changes from Interop.Hax.Examples.Extraction.TypesExternal to Interop.Aeneas.Hax.Examples.Extraction.TypesExternal, reflecting the insertion of Aeneas into the module path.
  • Interop/Aeneas/Hax/Examples/Extraction/TypesExternal.lean: The file Interop/Hax/Examples/Extraction/TypesExternal.lean was renamed to Interop/Aeneas/Hax/Examples/Extraction/TypesExternal.lean, with no other changes to its content. This moves the file into the Aeneas subdirectory under Interop, likely as part of a project restructuring or integration of the Aeneas toolchain.
  • Interop/Aeneas/Hax/Examples/Verification.lean: This diff renames the file from Interop/Hax/Examples/Verification.lean to Interop/Aeneas/Hax/Examples/Verification.lean and updates all of its public import paths and module-doc string references from Interop.Hax.* to Interop.Aeneas.Hax.* and Interop.Rust.* to Interop.Aeneas.Lift.*. Specifically, the imports Interop.Hax.Examples.Extraction.Specs, Interop.Hax.Holds, Interop.Rust.RustM, and Interop.Rust.Triple become Interop.Aeneas.Hax.Examples.Extraction.Specs, Interop.Aeneas.Hax.Holds, Interop.Aeneas.Lift.RustM, and Interop.Aeneas.Lift.Triple. The documentation comments are updated to reflect the new module paths for the extracted contract (Interop.Aeneas.Hax.Examples.Extraction), the add_or_panic spec, and the panic-probability verification modules. No new theorems, definitions, or proofs are added, and no sorry or admit are introduced.
  • Interop/Aeneas/Hax/Examples/hax.toml: This new hax.toml configuration file defines a scenario.add-or-panic rule that directs the Aeneas extraction tool (backend lean) to extract Rust source from the nearby crate into Lean modules under Interop/Aeneas.Hax.Examples.Extraction. This establishes the extraction pipeline for the example project, enabling the generated Lean code to be placed into the project’s module hierarchy at the specified subdirectory.
  • Interop/Aeneas/Hax/Examples/src/lib.rs: This change is a file rename only: Interop/Hax/Examples/src/lib.rs has been moved to Interop/Aeneas/Hax/Examples/src/lib.rs (with 100% similarity, meaning no content was modified). No definitions, theorems, or APIs were added, removed, or altered. The relocation appears to integrate the examples under an Aeneas subdirectory, reorganizing the project structure without affecting functionality.
  • Interop/Aeneas/Hax/Holds.lean: This diff renames the file from Interop/Hax/Holds.lean to Interop/Aeneas/Hax/Holds.lean and updates its single import: the public import Interop.Rust.RustM is replaced with public import Interop.Aeneas.Lift.RustM. This realigns the module's dependency to reflect the new Aeneas-based project structure, which is a necessary step for the ongoing refactoring of the interop layer.
  • Interop/Aeneas/Hax/README.md: Added Interop/Aeneas/Hax/README.md, which documents the hax examples in the Interop/Aeneas sub-project. It describes the layout of each example (Rust crate, Extraction/ modules generated by the hax CLI, and a hand-written Verification.lean), explains the regeneration process via scripts/regenerate-hax.sh, details how contracts are proved using hax_mvcgen, Interop.Hax.holds_ok, and Interop.Rust.triple_liftRustM_of_imp, and provides instructions for adding new examples.
  • Interop/Aeneas/Lift/Common.lean: The file Interop/Rust/Common.lean has been renamed to Interop/Aeneas/Lift/Common.lean. The module-level documentation comment was updated to reflect the new path: the reference to Interop.Rust.RustM was changed to Interop.Aeneas.Lift.RustM. No other content—definitions, structures, theorems, or code logic—was added, removed, or modified. The rename and doc fix align the file's path and comments with the project's restructured module hierarchy for the Aeneas lift functionality, ensuring internal consistency between the file location and its documentation.
  • Interop/Aeneas/Lift/Run.lean: This change renames the file from Interop/Rust/Run.lean to Interop/Aeneas/Lift/Run.lean and updates the corresponding module import from Interop.Rust.Common to Interop.Aeneas.Lift.Common. Since the diff only shows a file rename and a single import path adjustment, there are no new or modified theorems, definitions, instances, or sorry/admit statements to note.
  • Interop/Aeneas/Lift/RustM.lean: This diff renames the file Interop/Rust/RustM.lean to Interop/Aeneas/Lift/RustM.lean and updates its sole import from Interop.Rust.Common to Interop.Aeneas.Lift.Common. This change reflects a reorganization of the project's structure, moving the RustM module and its dependency under the Interop/Aeneas/Lift hierarchy, likely to better align with the Aeneas lifting framework.
  • Interop/Aeneas/Lift/Triple.lean: The file Interop/Aeneas/Lift/Triple.lean is created by renaming the former Interop/Rust/Triple.lean. The only content change is updating the public import of Interop.Rust.RustM to Interop.Aeneas.Lift.RustM, presumably to reflect a reorganization or renaming of the Rust monad module within the Aeneas interop hierarchy.
  • Interop/Aeneas/README.md: This new Interop/Aeneas/README.md documents the first sub-project of Interop/, which bridges Rust code extracted by hax and Aeneas into VCVio's OracleComp via a RustM lift. It specifies the pinned dependencies (hax 0.5, a fork of Aeneas, Lean/Mathlib 4.36.0), describes the trusted base (the translation toolchain and Rust models), and lists the assumptions under which extracted Rust functions are interpreted. The README provides a table of the six example crates (e.g., CenteredBinomial, Barrett, Adc) and what each demonstrates, and an overview of the eleven modules that implement the lift, specification triples, interaction tree bridges, and the verification results for each example.
  • Interop/Aeneas/lakefile.toml: This file adds the lakefile.toml configuration for the new VCVioInteropAeneas sub-project, which manages Rust code extracted by hax and Aeneas and lifted into VCVio. It defines two libraries: InteropAeneas as the default target containing the lift, interaction-tree bridges, and proofs (e.g., in Interop.Aeneas.Lift.Triple and Interop.Aeneas.Hax.Adc.Verification), and InteropAeneasHaxExtraction for the generated extraction modules (e.g., Interop.Aeneas.Hax.Barrett.Extraction.+) where the header linter is disabled. The file pins dependencies for hax, aeneas, and mathlib (at v4.36.0), matches the root package's srcDir, packagesDir, and leanOptions, and explicitly notes that VCVio's dependents must not resolve these requires.
  • Interop/Aeneas/lean-toolchain: The lean-toolchain file was moved from Interop/ to Interop/Aeneas/, creating a dedicated toolchain configuration for the Aeneas interop layer. This change ensures that the Aeneas-specific component has its own version-pinning independent of any other lean-toolchain in the Interop directory, which matters for consistent builds and CI isolation of the Aeneas integration.
  • Interop/Hax/Adc/hax.toml: The file Interop/Hax/Adc/hax.toml was deleted. This configuration previously defined a Hax extraction scenario named adc using the Lean backend, with arguments instructing Aeneas to output the extracted Lean modules into Interop/Hax/Adc/Extraction/. Its removal disables that extraction pipeline step, meaning the ADC crate will no longer be automatically extracted to Lean modules under Interop.Hax.Adc.Extraction.*.
  • Interop/Hax/Barrett/hax.toml: The hax.toml configuration file for the Barrett interop was deleted. This file previously defined a [scenario.barrett] extraction step using the lean backend with output directed to Interop/Hax/Barrett/Extraction. Its removal changes the pipeline by no longer triggering this hax-based extraction for the Barrett crate, indicating the extraction process has been altered or replaced.
  • Interop/Hax/CenteredBinomial/hax.toml: The file Interop/Hax/CenteredBinomial/hax.toml has been deleted. This configuration file previously instructed a Hax extraction scenario ([scenario.cbd]) to generate Lean modules into the Interop.Hax.CenteredBinomial.Extraction.* namespace, using a specific output destination and subdirectory. Its removal indicates that the downstream extraction build configuration for the CenteredBinomial crate is no longer needed, or that this extraction setup has been migrated or replaced elsewhere.
  • Interop/Hax/Computation/hax.toml: The file Interop/Hax/Computation/hax.toml has been deleted. Previously, it configured a Hax extraction scenario named computation targeting the Lean backend, with output directed to Interop/Hax/Computation/Extraction (via aeneas-args). This removal eliminates that specific extraction pipeline; the corresponding Lean modules or alternate configuration must now be managed elsewhere.
  • Interop/Hax/Division/hax.toml: The file Interop/Hax/Division/hax.toml, which previously configured the extraction of Rust division-related code into Lean modules under Interop.Hax.Division.Extraction, has been entirely deleted. This removal indicates that the scenario for extracting division functionality is no longer needed; consequently, the corresponding extraction pipeline step or the feature it supported has been discontinued or superseded.
  • Interop/Hax/Examples/hax.toml: The file Interop/Hax/Examples/hax.toml has been deleted. This file configured the extraction of a Rust crate's add-or-panic scenario into Lean modules under Interop.Hax.Examples.Extraction using the lean backend, with project-files disabled and aeneas-args specifying the destination path and subdirectory. Its removal removes that extraction configuration from the project, which may indicate that the extraction output is no longer needed, has been moved elsewhere, or its workflow has been reorganized.
  • Interop/Hax/README.md: This diff deletes the entire Interop/Hax/README.md file, which previously documented the structure and workflow for integrating Rust programs extracted by the hax CLI into the VCVio project. The file described the layout of example directories (containing hand-written Rust crates, hax-generated Lean extraction modules, and hand-written verification proofs), the process for regenerating extractions via scripts/regenerate-hax.sh, and the method for proving contracts using hax_mvcgen and the Interop.Hax and Interop.Rust APIs. The removal removes all orientation information about how these hax examples are organized, built, and verified, including details on specific examples (CenteredBinomial, Barrett, Adc, Computation, Division, Examples) and their purpose.
  • Interop/README.md: The Interop/README.md has been restructured and expanded to reflect a shift from a single-bridge package (for Rust tools hax and Aeneas) to a collection of independent sub-projects under Interop/<Sub>/ (e.g., Interop/Aeneas), each with its own Lake package, trusted base, assumptions, and implementations. The new structure adds a table of sub-projects, a 'Shared rules' section codifying import isolation (core never imports Interop), Lake package conventions, and a 'README template' for consistency. The CI section is updated to describe per-sub-project build/test/axiom-sweep jobs discovered automatically by a new scripts/interop-subprojects.py script, alongside the existing import isolation checks.
  • Interop/lakefile.toml: This commit deletes the Interop/lakefile.toml configuration, which previously defined a separate VCVioInterop package. That package contained the require directives for the hax, aeneas, and mathlib dependencies, the InteropRust and InteropHaxExtraction library targets, and associated leanOptions, all isolated to prevent dependency resolution for VCVio's dependents. Its removal indicates that these dependency and library configurations have been moved, likely into the root lakefile, streamlining the build setup.
  • README.md: The README.md description of the Interop/ directory was expanded. Previously it only mentioned experimental bridges to Rust verification frontends; now it specifies that Interop/ contains experimental sub-projects (each its own Lake package) that connect VCVio to external tools, and it explicitly names Interop/Aeneas as the sub-project that verifies Rust code extracted by hax and Aeneas.
  • docs/agents/gotchas.md: The documentation file docs/agents/gotchas.md was updated to reflect the restructuring of the Interop/ directory into multiple independent packages. Specifically, the description of how library roots are declared was changed from a single Interop/lakefile.toml to each sub-project having its own lakefile.toml (e.g., Interop/Aeneas/lakefile.toml). Additionally, the note about Interop/ building separately was refined to state that the sub-projects each build as their own package, and that the modules hax extracts retain the form the tool emits — capturing two distinct, related changes about the internal package organization.
  • docs/agents/interop.md: This documentation diff reorganizes and expands the rules for managing external verification tool sub-projects under Interop/. It introduces a new requirement that each sub-project must have its own trusted base, directory, Lake package, and README template. The rules for require placement and pin management are updated to refer to the sub-project level (e.g., Interop/Aeneas/) rather than the top-level Interop/ directory. Import restrictions are tightened: cross-sub-project imports now require an explicit require of the other sub-project's package and must be listed in scripts/interop_import_allowlist.txt. A new rule mandates that generic code be placed in VCVio or PolyFun before being shared between sub-projects. API references are updated (e.g., Interop.Rust.liftRustM → Interop.Aeneas.Lift.RustM, Interop.Rust.Triple → Interop.Aeneas.Lift.Triple). The building instructions are revised to target individual sub-projects, and CI job naming is updated from Interop Bridges to Interop <Sub>.
  • docs/design/repository-layout.md: The documentation in docs/design/repository-layout.md was updated with two main changes. First, the description of the Interop/ directory was expanded to clarify that it contains sub-projects connecting VCVio to external code and tools, each structured as a separate Lake package (Interop/<Sub>/) with its own trusted base, and that cross-imports between sub-projects require an explicit require. Second, a new paragraph about Interop/ was added to the 'Optional backends and external bridges' section, noting that each sub-project has independent trusted base, assumptions, and coverage, and that Interop/README.md indexes them and states shared rules. Additionally, the description of Lean.parseImports' usage was refined to explicitly include that it guards boundaries between Interop/ sub-projects.
  • docs/reading/upstream-alignment.md: This documentation change updates the description of the Interop/ directory structure within the upstream-alignment documentation. It replaces the previous characterization of Interop/ as a single non-module excluded from the build with a new description stating that it contains sub-projects, each as its own Lake package with a dedicated CI job. The change also adds a cross-reference to Interop/README.md for further detail on the 'one package per trusted base' design.
  • lakefile.lean: The comment in lakefile.lean explaining the build strategy for interoperability sub-projects was updated to be more specific. Previously it referred vaguely to "Rust bridges" and "the separate package in Interop/lakefile.toml"; now it names the exact sub-project (Interop/Aeneas) and clarifies that each sub-directory under Interop/ has its own lakefile.toml rather than a single shared one. This improves the documentation for developers who need to understand why certain require statements are absent from the main lakefile and where to find the actual build configurations.
  • scripts/AxiomSweep.lean: The docstring for defaultRoots in scripts/AxiomSweep.lean was revised to clarify that Interop is excluded because its sub‑projects are separate Lake packages, outside the certified surface and not built by the main CI build job. The new text explains that each sub‑project’s own CI job runs the sweeper from its own directory with an explicit --root per root of its default libraries, referencing scripts/interop-subprojects.py roots as the source of those roots.
  • scripts/CheckImports.lean: Added a pair of private functions—interopAllowlist (reads scripts/interop_import_allowlist.txt into a list of (String × String) pairs after stripping comments) and interopSubprojectAllowed (checks whether a module import from Interop/<B> is allowed from a given path, either because the importer's sub‑project matches the imported one or because the pair is in the allowlist)—and extended main to load the allowlist when not in --extern mode and to report a forbidden import if interopSubprojectAllowed returns false for any Interop module. The module‑level docstring was also updated to document the new inter‑sub‑project import rule.
  • scripts/check-comment-fences.py: Updated the docstring comment in scripts/check-comment-fences.py to clarify the description of the Interop/ directory: instead of referring to a single Interop/lakefile.toml package, it now correctly describes each sub-project within Interop/ as having its own Interop/<Sub>/lakefile.toml that sets weak.linter.mathlibStandardSet.
  • scripts/interop-subprojects.py: Added a new Python script, scripts/interop-subprojects.py, which provides two CLI commands for CI and local use: list outputs a JSON array of sub-project directory names (e.g. Interop/<Sub>) that each contain a lakefile.toml, and roots DIR outputs the axiom-sweep root modules for the Lake package in DIR, derived from the package's defaultTargets that name lean_lib entries, validating that such libraries specify roots (or use the library name as default) and rejecting any that use globs without explicit roots. This enables the Interop Sub-projects CI job to discover sub-projects and their sweep targets programmatically.
  • scripts/interop_import_allowlist.txt: A new file scripts/interop_import_allowlist.txt has been added. It serves as a configuration file for the scripts/check-interop-isolation.sh script, defining which inter-sub-project imports within the Interop/ directory are permitted. The file specifies that each line should contain an <importer> and an <imported> pair, optionally annotated with a # reason, and that such allowed imports also require a corresponding [[require]] entry in the importer's lakefile.
  • scripts/regenerate-hax.sh: The script scripts/regenerate-hax.sh was updated to reflect a project restructuring: all paths referencing Interop/Hax/ and Interop/lakefile.toml were changed to Interop/Aeneas/Hax/ and Interop/Aeneas/lakefile.toml, respectively. The Python inline script now reads the hax commit pin from Interop/Aeneas/lakefile.toml and checks Interop/Aeneas/Hax/Cargo.toml for consistency. The extraction, copy, and cleanup loops now operate under Interop/Aeneas/Hax/, and corresponding output messages (e.g., regenerate-hax: regenerated Interop/Aeneas/Hax/*/Extraction) were adjusted. A long error message string was split across two lines for readability. No changes to extraction logic or behavior were introduced.
  • scripts/test-comment-fences.sh: Updated the comment in scripts/test-comment-fences.sh to more accurately describe why the linter.style.whitespace linter does not generate warnings in Interop/ directories: the previous wording claimed they are not elaborated, but the corrected comment explains that their CI jobs simply do not gate on warnings. The comment also splits the explanation for lakefile.lean and Interop/ into separate clauses for clarity.
  • scripts/test-interop-isolation.py: The test file scripts/test-interop-isolation.py was updated to reflect a reorganization of the Interop module hierarchy: Interop.Hax is now Interop.Aeneas.Hax, Interop.Rust becomes Interop.Aeneas.Lift, and the path Interop/Hax/X.lean is moved to Interop/Aeneas/Hax/X.lean. A new test test_imports_between_interop_subprojects was added to enforce that imports between different Interop sub-projects (e.g., Interop.Aeneas vs Interop.Other) are forbidden by default, but can be allowed via a whitespace-delimited allowlist file (scripts/interop_import_allowlist.txt); the test also validates that the allowlist format <importer> <imported> is enforced and that allowed imports work only in the specified direction. Additionally, the existing test test_allowed_edges_comments_and_multiple_imports now includes an import of Interop.Aeneas.Lift.RustM in one test case, and the test_extern_boundary test path was updated to use the new path Interop/Aeneas/Hax/X.lean.
  • scripts/test-interop-subprojects.py: This diff adds a new test script scripts/test-interop-subprojects.py that exercises the interop-subprojects.py script with four test cases. test_list_takes_every_directory_with_a_lakefile verifies that list returns only directories under Interop/ that contain a lakefile.toml, filtering out other files and directories. test_roots_are_those_of_the_default_libraries checks that roots returns both explicit roots and default-target library names from the lakefile for a given subproject. test_roots_refuse_an_empty_or_glob_only_sweep ensures roots fails with a non-zero exit code and no stdout when the subproject has no default library, a glob-only default library, or a library with an empty roots list. test_repository_subprojects_have_sweep_roots runs list and roots against the actual repository, asserting that every listed subproject (e.g., Aeneas) has a non-zero exit code from roots and that each declared root is a `startswith(
  • scripts/test-validation.py: In scripts/test-validation.py, test-interop-subprojects.py was added to the list of script files that are either executed with a fixed script (exit 0) or overwritten with a trivial pass placeholder during the validation test suite. This ensures that a new test script for interop subprojects is excluded from actual test logic during validation, maintaining the isolation pattern used for other test scripts.
  • scripts/validate.sh: Added scripts/test-interop-subprojects.py to the boundary checks executed by scripts/validate.sh. The --help text now lists this listing of Interop sub-projects and their axiom-sweep roots as part of the boundary checks alongside PolyFun, broad expose, Extern and Interop isolation. The script is invoked via uv run in the file's command sequence, just after the Interop isolation checks.
  • Interop/Aeneas/.gitignore: (minor changes, +0/-0)
  • Interop/Aeneas/Hax/.gitignore: (minor changes, +0/-0)
  • Interop/Aeneas/Hax/Barrett/Cargo.toml: (minor changes, +0/-0)
  • Interop/Aeneas/Hax/CenteredBinomial/Cargo.toml: (minor changes, +0/-0)
  • Interop/Aeneas/Hax/Computation/Cargo.toml: (minor changes, +0/-0)
  • Interop/Aeneas/Hax/Division/Cargo.toml: (minor changes, +0/-0)
  • Interop/Aeneas/Hax/Examples/Cargo.toml: (minor changes, +0/-0)
  • 2 file(s) filtered as noise (lockfiles, generated, or trivial): Interop/Aeneas/Hax/Cargo.lock, Interop/Aeneas/lake-manifest.json

Last updated: 2026-11-21 21:33 UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant