You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
COBOL unit reader (cobol_graveyard_finder): non-ASCII paragraph/section names and names starting END- are not units #4026
Found by the COBOL coverage tool (#4023) on the opensourcecobol4j fresh estate (#3806). A traced GnuCOBOL run enters paragraphs and sections that cobol_graveyard_finder's unit reader does not see. The reader is used by the refractor's dead-paragraph masking, cobol_dag_architect, cobol_microservice_slicer and the answer-key tooling, so those units are also missing from procedure_units / reachable_units: they are neither counted nor judged dead or alive.
1. Non-ASCII unit names are not units
_NAME = r"[A-Z0-9][A-Z0-9\-]*" is ASCII only, so a Japanese or full-width paragraph/section header is not a header:
The same _NAME sits in _PERFORM, _GO_TO, _ALTER and _CICS_LABEL, so a PERFORM S−初期化 is not followed either.
On the estate: 7 of 127 programs in cobol_utf8 and 6 of 112 in i18n_sjis declare non-ASCII units. Examples: 005-section-name (S−初期化, S−終了), 008-section-and-paragraph-name (P-初期化), 115-japanese-word-section-variable (東京ラベル, 神奈川−1ラベル, ...). No pinned mainframe corpus is affected, so the ledger should not move. Note U+3000 (the full-width space, #3956) must stay a separator, not a name character.
2. A paragraph whose name starts with END- is not a unit
_NOT_A_PARAGRAPH = END-[A-Z0-9\-]+|... rejects any END-... name as a scope terminator, but END-IPROC1. in Area A is a legal paragraph name. jp-compat 033-sort-status-break-with-no-sort-status-in-pgm:
IPROC1 SECTION.
BEGIN-IPROC1.
READ INPUT-FILE1 AT ENDGO TO END-IPROC1.
...
END-IPROC1.
unit_header(' END-IPROC1.') returns None. Only the reserved scope terminators (END-IF, END-PERFORM, ...) should be excluded.
Done when
Both shapes read as units (tests in the finder's suite). The coverage tool's unread list (tests/tools/cobol_coverage.py autotest) is empty on those cases. Logged in tests/cobol_mainframe/field_testing.json (#4023's PR).
Activity
#4023: COBOL paragraph / branch coverage per program (CICS crucible, …
Fix #4026: read non-ASCII and END-xxx paragraph/section names in the …
#4026: correct the GENAPP key (End-Program.), ledger the engine's miss (