Skip to content

[0.5.0] Machine contracts for production targets with exact instruction semantics #119

Open

Description

@afflom

Plan item L4.1 of #106. Extends GNAF's machine contract (SPEC.md §17.15) from weighted calculus steps to the target.

Item. For the targets decided in #109: exact instruction semantics, including widths and saturation, and a cost per instruction. Exported roots carry #[target_feature] for their feature set (#109).

First step. Re-run the SIMD probe recorded in #109 on the pinned Rust 1.97.1 in CI.

Accepted when. Each modeled instruction's semantics is a kernel-checked definition with a differential test against the target (C9); the probe result is recorded in VERIFICATION.md.

Depends on. #109. Blocks. #120.


Generated by Claude Code

Activity

  1. added this to the LexLean v0.5 milestone on Oct 16, 2026
  2. humuhumu33 commented on Oct 22, 2026

    @humuhumu33
    Contributor

    I'm taking only the first step of this issue: re-running the SIMD probe recorded in #109 on the pinned Rust 1.97.1 in CI and recording the result in VERIFICATION.md. The rest (instruction semantics, costs, differentials) stays waiting on #109. The PR will be a draft against release/v0.5.

  3. humuhumu33 commented on Oct 22, 2026

    @humuhumu33
    Contributor

    The first step (the SIMD probe of #109 re-run on the pinned Rust 1.97.1, recorded in VERIFICATION.md and run by the honesty workflow) is draft PR #290 against release/v0.5. The per-target results are posted on #109 as evidence for that decision. The rest of this issue waits on #109.

  4. added a commit that references this issue on Oct 23, 2026
  5. added a commit that references this issue on Oct 23, 2026
  6. afflom commented on Nov 14, 2026

    @afflom
    MemberAuthor

    GN-10 is in draft PR #542. It holds Target's per-instruction price to the code the pinned rustc emits and to the lanes each instruction consumes. That check found i16x8_extmul_low_i8x16 was overcharged: it covers 8 lanes per instruction, not 16, and is now charged that way. The regenerate workflow is rewriting the locks and golden outputs (the std identity moves).


    Generated by Claude Code

  7. afflom commented on Nov 15, 2026

    @afflom
    MemberAuthor

    Decided (extrapolated from SPEC §17.13/§17.15, #106, D4): a feature set is not a target. language/production-1.2.toml gains a closed set feature with avx2/x86_64, neon/aarch64 and simd128/wasm32, each with its D4 triple. A package export names its features and gets one #[target_feature(enable = "...")] per feature, on the export wrapper only.
    Why: a feature changes neither allocation nor a width, so eligibility never reads it. Feature-qualified targets would multiply every root's targets and eligibility rows. D4 puts the attribute on the exported function, and the caller holds the CPU check. Which feature set a production root is exported with stays with #120's realization grammar, as §17.15 says. Implemented in draft #549 (RB-25; moves identity).


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions