COBOL units on DSF: ENVIRONMENT paragraphs, numeric names, forge headers (#3533) - #3548
Merged
Merged
Conversation
… forge headers (#3533) Engine (cobol func_start): - SPECIAL-NAMES, I-O-CONTROL and REPOSITORY join the ENVIRONMENT DIVISION header shield: they were read as procedure units (navikt/DSF FRMERK; and 18 SPECIAL-NAMES + 6 I-O-CONTROL phantom units across the crucible). - An all-digit procedure name (DSF R001BYDL `0000.` / `9999.`) is a unit -- at most 5 digits, so a 6/8-digit sequence field before a lone period (CardDemo `045100 .`) never is; a numeric VALUE continuation is dropped by the existing cobol_sentence_start filter. Forge: - `PROCEDURE DIVISION.` (any blanks) is the header: new split_procedure_division() in the graveyard finder, used by the scorer's forge view; the DAG architect, schema forge and microservice slicer normalise the spacing the same way. DSF PLUKKFR/PLUKKFRN had no units. - A header with its first statement on the same line (`B. DISPLAY ...`, DSF FO04D1X1) opens the unit, the statement its first body line. - A conditional phrase (READ ... AT END GO TO X., INVALID KEY, SIZE ERROR, OVERFLOW, EXCEPTION) is conditional unless its END- verb closes it -- the key's #3491 rule, now in the forge (else PLUKKFR's loop read dead). Ledger: all 30 dsf_cobol_unit_extraction entries resolved (cause pruned); R001BYDL's numeric units now surface the deliberate by-name divergence (0000 is the entry, 1000 only GO TOs itself) -> engine_dead_is_unreferenced_by_name. Refraction: DSF full unexplained 18 -> 0. Golden masters: only the 24 phantom ENVIRONMENT units removed. Tri-comparison: cobol's validated ctags-header class 4096 -> 4120 (ctags keeps reading those headers). Closes #3533 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Engine (cobol func_start):
header shield: they were read as procedure units (navikt/DSF FRMERK; and
18 SPECIAL-NAMES + 6 I-O-CONTROL phantom units across the crucible).
0000./9999.) is a unit --at most 5 digits, so a 6/8-digit sequence field before a lone period
(CardDemo
045100 .) never is; a numeric VALUE continuation is dropped bythe existing cobol_sentence_start filter.
Forge:
PROCEDURE DIVISION.(any blanks) is the header: newsplit_procedure_division() in the graveyard finder, used by the scorer's
forge view; the DAG architect, schema forge and microservice slicer
normalise the spacing the same way. DSF PLUKKFR/PLUKKFRN had no units.
B. DISPLAY ...,DSF FO04D1X1) opens the unit, the statement its first body line.
OVERFLOW, EXCEPTION) is conditional unless its END- verb closes it -- the
key's CICS coverage: PL/I parity -- CICS call sites, handlers / UOW, data moves #3491 rule, now in the forge (else PLUKKFR's loop read dead).
Ledger: all 30 dsf_cobol_unit_extraction entries resolved (cause pruned);
R001BYDL's numeric units now surface the deliberate by-name divergence (0000
is the entry, 1000 only GO TOs itself) -> engine_dead_is_unreferenced_by_name.
Refraction: DSF full unexplained 18 -> 0. Golden masters: only the 24
phantom ENVIRONMENT units removed. Tri-comparison: cobol's validated
ctags-header class 4096 -> 4120 (ctags keeps reading those headers).
Closes #3533
Verification
0000./9999.valid;SPECIAL-NAMES.,045100 .,01680012.invalid); forge test for spacing, inline header, AT END.🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g