Commit fe3239b
fix(extractors): UTF-8 byte indexing + empty-captures guards
extract_mathlib4.jl: `length(m.match)` counts characters but `content[]`
indexes bytes; fall back to `ncodeunits(m.match)` so multi-byte Lean
sources (Unicode operators) don't hit StringIndexError mid-file.
extract_hol4.jl: DISCH_TAC-style regex have zero capture groups; guard
`hyp_match.captures[1]` with `isempty(hyp_match.captures)` to stop the
crash that killed the premise pass after writing all 127k proof_states.
Corpus impact: hol4 now emits ~140k premise records, mathlib4 no longer
flags every file.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 65e6a45 commit fe3239b
2 files changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
545 | 548 | | |
546 | 549 | | |
547 | 550 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| |||
0 commit comments