Skip to content

tools: rank what is actually wrong with the generated C - #3466

Merged
gHashTag merged 1 commit into
masterfrom
c/undeclared-split
Sep 8, 2026
Merged

tools: rank what is actually wrong with the generated C#3466
gHashTag merged 1 commit into
masterfrom
c/undeclared-split

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Refs #3464

Three passes followed one error class from 1729 down to 522 while a family
ten times its size sat uncounted — because the first question of each pass
was "what is left of what I was doing" rather than "what is biggest now".

This asks the second one, and found in a single run what three passes had not:

642  unexpected type name 'Trit': expected expression
412  use of undeclared identifier 'POS'
319  use of undeclared identifier 'NEG'
───
1373   one family, never looked at, against 522 in the class I was shrinking

Two things it insists on, both learned the hard way

--undeclared splits 2057 errors by cause

count cause examples
A 487 (23%) declared as fn in some spec, not reaching this file len(142), mean(40)
B 149 (7%) the name of a module or spec file, called as a function adder_tree(58), ternary_gemm(50)
C 1421 (69%) a name nothing in the tree declares cast_i8(210), compose(76)

Three causes, three different repairs — and the totals had them in one bucket.

A reader, not a gate

Deliberately not wired into CI: it rebuilds the whole corpus, and nothing
it prints is a pass/fail claim. Run it at the start of a pass to decide what
the pass is about.

Self-check is the usual pair — a planted error must be counted, a clean file
must count zero — because a report of "0" and a report that could not run look
identical.

One thing I got wrong on the way

I printed a list "excluding len and expect" and then read it as if it were
bucket A, concluding cast_i8 was declared somewhere — while a grep two
commands earlier had said zero files. The contradiction was on the same
screen. cast_i8 is in bucket C, as the grep said.

Refs #3464

Three passes followed one error class from 1729 down to 522 while a family ten
times its size sat uncounted, because the first question of each pass was
"what is left of what I was doing" rather than "what is biggest now".

This asks the second one, and found in a single run what three passes had not:

    642  unexpected type name 'Trit': expected expression
    412  use of undeclared identifier 'POS'
    319  use of undeclared identifier 'NEG'
    ---
    1373 one family, never looked at, against 522 in the class I was shrinking

TWO THINGS IT INSISTS ON, both learned the hard way. `-ferror-limit=0`, because
clang stops at twenty per file and 141 corpus files reach it, so every total
measured without it is a floor -- 3849 reported where the real count was 15188
(#3448). And the compiler's identity printed beside the numbers, because the
same command gives 20 on Apple clang and 50 on gcc for the same input (#3450).

`--undeclared` splits the 2057 undeclared-function errors by CAUSE, which the
totals cannot do:

    487 (23%)  A  declared as `fn` in some spec, not reaching this file
                  len(142), mean(40), decode(26)
    149 ( 7%)  B  the name of a MODULE or spec FILE, called as a function
                  adder_tree(58), ternary_gemm(50), pipeline(40)
   1421 (69%)  C  a name nothing in the tree declares
                  cast_i8(210), compose(76), booth_mul_i32(64)

Three causes, three different repairs, and the counts had them in one bucket.

A READER, not a gate, and deliberately not wired into CI: it rebuilds the whole
corpus, and nothing it prints is a pass/fail claim. Run it at the START of a
pass to decide what the pass is about. Its self-check is the usual pair -- a
planted error must be counted and a clean file must count zero -- because a
report of "0" and a report that could not run look identical.

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

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-08 07:00:28 UTC

Summary

Status Count
Total Open PRs 16
PRs with Failing Checks 13
PRs with All Checks Green 3
READY 2
FAILING 13
PENDING 0
NO CHECKS YET 0

These columns do not partition: 2 + 13 + 0 + 0 = 15, and there are 16 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=ef36d26b7f0e != 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).

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

@gHashTag
gHashTag merged commit 7afa611 into master Sep 8, 2026
25 of 28 checks passed
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