Skip to content

The oracle was in the corpus, and acceptance could not see any of it - #2870

Merged
gHashTag merged 1 commit into
masterfrom
w724
Aug 29, 2026
Merged

The oracle was in the corpus, and acceptance could not see any of it#2870
gHashTag merged 1 commit into
masterfrom
w724

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Two sections from #2868.

310 — the repository already wrote the correct form, by hand, next door. gen-verilog mapped >> to Verilog's logical >> on signed operands; simulated on the actual generated module, cordic_x_next(100, −64, shift=2) returned −16268 where the spec, C and Zig all say 116.

The decisive evidence was in the corpus, not the compiler: all 559 generated modules held two >>>, and both were inside string literals — this project's own hand-written golden CORDIC RTL, which writes y0 >>> 1 for the identical rotation. The project knew the right operator and the backend emitted it zero times. A hand-written reference in the repository is an oracle, and it costs one grep.

311 — acceptance could not have caught any of it. Four defects fixed in one pass; not one moved an acceptance number:

defect what it did
while (c) : (step) the step became the whole body
suffix dropped 1u64 << n shifted at u32 and panicked
>> on signed filled with zeros; CORDIC did not converge
truncated test reported OK in the backend that runs tests

Every one produced output the target compiler was happy with. A gate asking does it compile cannot see any defect whose whole nature is that it compiles. What saw them: a second backend to disagree with, a hand-written artefact to compare against, and simulating the emitted module instead of reading it.

Refs #2868

…ot see it

310: `gen-verilog` mapped `>>` to Verilog's logical `>>` on signed
operands, and the decisive evidence was not in the compiler. All 559
generated modules held two `>>>`, both inside string literals -- and
those literals are this project's own hand-written golden CORDIC RTL,
which writes `y0 >>> 1` for the identical rotation. The project knew the
right operator and the backend emitted it zero times. A hand-written
reference in the repository is an oracle the generator can be measured
against, and it costs one grep.

311: four defects fixed this pass and not one moved an acceptance
number -- the step becoming the loop body, the dropped width suffix, the
logical shift, the truncated test that reported OK. Every one produced
output the target compiler was happy with, so a gate asking "does it
compile" cannot see the whole interesting class. What saw them: a second
backend to disagree with, a hand-written artefact to compare against,
and simulating the emitted module instead of reading it.

Refs #2868
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 19:07:05 UTC

Summary

Status Count
Total Open PRs 9
PRs with Failing Checks 8
PRs with All Checks Green 1
READY 0
FAILING 8
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b109d745f014 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit ae59d9f into master Aug 29, 2026
22 of 23 checks passed
@gHashTag
gHashTag deleted the w724 branch August 29, 2026 19:07
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