Skip to content

tri discard classify: what the parser stopped on, grouped - #2775

Merged
gHashTag merged 1 commit into
masterfrom
w699-discard-classify
Aug 29, 2026
Merged

tri discard classify: what the parser stopped on, grouped#2775
gHashTag merged 1 commit into
masterfrom
w699-discard-classify

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Refs #2774

A ranked list says where the tokens are. It does not say whether the top six entries are six problems or one.

class                       specs    tokens
forall/==> (quantified)        38     20991
var/const statement            18      7020
assert                         17      1853
other                          14       587
TOTAL                          87     30451

They were one. Sixty-nine percent of the remaining discard is a construct the grammar does not contain:

invariant ternary_inference_identity_inv:
    forall input : InferenceInput
    input.activations.len() == 4 ==>
    ternary_inference_identity(input).outputs == input.activations

Thirty-eight specs, mostly under specs/igla/race/. Filed as #2774 rather than implemented — what a universally quantified invariant means at codegen commits four backends, and ==> lowered to !a || b makes a false antecedent a pass, which is the vacuous shape no-vacuous-invariant exists to catch, arriving through the front door.

Two things worth pinning, both tested

Order matters. CLASSES is tested first-match-wins: a quantified invariant whose body also declares a var must land in the quantified bucket. Reordering the list silently re-attributes thousands of tokens.

==> never appears in a drop trace. The lexer splits it, so the trace reads

dropped: input . activations . len == 4 == >

A matcher for the source spelling would have found zero of the thirty-eight and I would have concluded the construct was rare. Match what the trace says, not what the source says — there is a lexer between them and it is the thing under investigation.

A spec that yields no trace is counted separately and not as other: no trace was read, so no cause is claimed.

Cross-checked

The numbers above were first produced by a throwaway Python script, then reproduced exactly by this command. Two independent implementations agreeing is the only reason I am quoting them.

🤖 Generated with Claude Code

A ranked list says WHERE the tokens are. It does not say whether the top six
entries are six problems or one. They were one:

    class                       specs    tokens
    forall/==> (quantified)        38     20991
    var/const statement            18      7020
    assert                         17      1853
    other                          14       587
    TOTAL                          87     30451

Sixty-nine percent of what is left is a construct the grammar does not contain --
quantified invariants, `forall x : T ... ==> ...`, in 38 specs mostly under
specs/igla/race/. That is a language decision, not a parser rung: what a
universally quantified invariant means at codegen commits four backends, and
`==>` lowered to `!a || b` makes a false antecedent a pass, which is the vacuous
shape `no-vacuous-invariant` exists to catch arriving through the front door.
Filed as #2774 rather than implemented.

Two things worth pinning, and both are tested:

  * CLASSES is ordered and first match wins. A quantified invariant whose body
    also declares a `var` must land in the quantified bucket; reordering the list
    silently re-attributes thousands of tokens.
  * `==>` NEVER APPEARS IN A DROP TRACE. The lexer splits it, so the trace reads
    `== 4 == >`. A matcher for the source spelling finds zero of the 38, and the
    conclusion would have been that the construct is rare.

A spec that yields no trace is counted separately and NOT as `other`: no trace
was read, so no cause is claimed.

Skill 159-161: rank to find the biggest, classify before deciding what KIND of
work it is; match what the trace says rather than what the source says, because
the lexer sits between them and is the thing under investigation; and a number
written before it was measured is still a wrong number.

Refs #2774

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@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 01:41:07 UTC

Summary

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=3e563db2d411 != 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 5e80b5d into master Aug 29, 2026
33 checks passed
@gHashTag
gHashTag deleted the w699-discard-classify branch August 29, 2026 01:51
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