Skip to content

MemAlign-family read-soundness discharge (follow-on to #115, gated on MemAlignRom extraction) #242

Description

@codygunton

Summary

Follow-on to #115 (see its scope-amendment warning). #115 derives memory-bus read-soundness for
accesses served directly by the mutable Mem table. Accesses routed through the MemAlign family
(unaligned / sub-doubleword loads and stores) are classified and row-corresponded but their
read-soundness is not derived: they retain named structural residues. This issue tracks
discharging those residues so read-soundness covers all RV64IM memory accesses.

The named residues to consume (as of the #115 route-B line, tip 22c8ebcd)

  • MemAlignLoadProviderRomValueFacts (ZiskFv/AirsClean/FullEnsemble/Balance/MemBusRowBridges.lean)
    — MemAlignRom-mediated width = ind_width, value_1 = 0, low-value range bounds needed to
    convert a structural provider row into the legacy SubdoublewordLoadProviderWitness.
  • MemAlignCoreLookupFacts (ZiskFv/Compliance/SharedBundles.lean) — MemAlignByte /
    MemAlignReadByte core_every_row + RangeLookupWitness bundles (re-packaged from the legacy
    MemAlignWitness).
  • ActiveMainMemAlignSelectedProveBranchPins (MemBusRowBridges.lean) — prove-branch selector
    pins for the general-MemAlign provider branch.
  • The three per-load branch-exclusion residues in LoadBDirectMutableMemResidues
    (ZiskFv/Compliance/TraceLevelExport/BootSegmentMemorySeed.lean): no_marb / no_mab /
    no_memAlign — under Eliminate the RowTraceCoherence memory trace-coherence floor — follow-on to #76 #115's direct-Mem scope these exclude the MemAlign routes; this issue
    replaces exclusion with derivation.

Why this is genuinely blocked (two prerequisites)

  1. MemAlignRom extraction. The ROM/value facts above exist as residues precisely because
    MemAlignRom is not extracted as a first-class Lean table (see the T4 note in
    SharedBundles.lean). Discharge requires extending tools/pil-extract + named-column wrappers
  2. A through-MemAlign timeline argument. MemAlign provider rows do not appear in
    activeMemReplayRowsOfTable / memReplayRows at all (verified in the Eliminate the RowTraceCoherence memory trace-coherence floor — follow-on to #76 #115 route-B review,
    PR #115 post-review: narrow Mem replay and MemAlign residues #239). Read-soundness for a MemAlign-routed access must thread value agreement
    Main pull → MemAlignByte/ReadByte byte assembly → the Mem table's aligned 8-byte reads → the
    accepted replay. No form of this argument exists yet; it is new proof work, not a port.

Acceptance

  • The readSound_of_* seed endpoints cover traces containing MemAlign-routed accesses (the
    direct-scope classifier generalizes or gains a MemAlign constructor with derived obligations).
  • The residues listed above are consumed by derivations (or demonstrably reduced), with the
    trust/trusted-base.md MemAlign entries updated in the same PR.
  • No new ZiskFv.* project axioms; V1/V2/nix run .#test green.

Non-goals

Whole-channel BalancedChannels (#219); cross-segment memory (#103/#76); the Mem cross-row
Component.transition fidelity upgrade (separate #237 follow-on, gated on #226).

Metadata

Metadata

Assignees

No one assigned

    Labels

    mvpRequired for the two legible root theorems (non-vacuous + every premise derived or named trust)soundnessCircuit faithfully implements the Sail spec (equivalence, trust, defects, extraction fidelity)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions