Skip to content

Coverage: accept Isabelle symbol identifiers in term/name positions#11

Merged
christiankissig merged 1 commit into
masterfrom
inner-syntax-tail
Jun 3, 2026
Merged

Coverage: accept Isabelle symbol identifiers in term/name positions#11
christiankissig merged 1 commit into
masterfrom
inner-syntax-tail

Conversation

@christiankissig

Copy link
Copy Markdown
Owner

Summary

First increment against the inner-syntax / proof long tail. From a clustered analysis of 259 real failure fragments, the largest addressable sub-pattern (beyond furthest-position artifacts and EOF) was Isabelle symbol identifiers used in bare positions: \<one>, \<bbbP>, \<P>, \<rho>\<^sub>1, etc. The grammar only recognised a hardcoded Greek-letter list.

This adds a SYMBOL terminal — a non-structural \<name> (with optional \<^sub> subscript) whose negative lookahead excludes the \<open>/\<close>/\<comment> cartouche markers and \<^...> control symbols — and accepts it as an atom in term, name, and embedded. So e.g. interpretation g: foo \<bbbP> leq \<one> . and case (step \<P> \<rho>) now parse.

Testing

  • Full unit suite: 150 passed (147 → +3 new cases), no regressions. Cartouche/comment handling explicitly re-tested and unaffected.
  • Before/after on a 400-file corpus sample: 0 regressions (ok→fail), +2 files now parse.
  • ruff / isort clean.

Honest scope

This is the diffuse long tail: unlike the form-level PRs, individual fixes here yield small gains (≈+0.5% here) and there is no single high-value lever. The dominant remaining failure causes are furthest-position artifacts (the real failure is in a prior statement's content), unterminated/over-consuming constructs (EOF), and the broad space of inner-syntax/proof-method content — each needing its own incremental, well-regression-checked change. This PR is one such safe increment.

🤖 Generated with Claude Code

The grammar only recognised a hardcoded list of Greek letters inside
identifiers, so terms, names and variables written with other Isabelle
symbols — `\<one>`, `\<bbbP>`, `\<P>`, `\<rho>` (with optional `\<^sub>`
subscript) — were rejected in bare (unquoted) positions such as
interpretation arguments and `case` bindings.

Add a `SYMBOL` terminal for a non-structural `\<name>` (negative
lookahead excludes the `\<open>`/`\<close>`/`\<comment>` cartouche markers
and `\<^...>` control symbols) and accept it as an atom in `term`,
`name`, and `embedded`.

Before/after on a 400-file corpus sample: 0 regressions, +2 files now
parse. Cartouche/comment handling unaffected; full unit suite green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@christiankissig christiankissig merged commit fbd42e4 into master Jun 3, 2026
6 checks passed
christiankissig added a commit that referenced this pull request Jul 7, 2026
The grammar only recognised a hardcoded list of Greek letters inside
identifiers, so terms, names and variables written with other Isabelle
symbols — `\<one>`, `\<bbbP>`, `\<P>`, `\<rho>` (with optional `\<^sub>`
subscript) — were rejected in bare (unquoted) positions such as
interpretation arguments and `case` bindings.

Add a `SYMBOL` terminal for a non-structural `\<name>` (negative
lookahead excludes the `\<open>`/`\<close>`/`\<comment>` cartouche markers
and `\<^...>` control symbols) and accept it as an atom in `term`,
`name`, and `embedded`.

Before/after on a 400-file corpus sample: 0 regressions, +2 files now
parse. Cartouche/comment handling unaffected; full unit suite green.
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