Repository navigation
Description
Why
GitGalaxy's scanner is AST-free and has a zero-dependency mode, and that stays. But "first, validate ourselves": we want to know, with numbers, how the engine's COBOL / CICS facts compare with independent parsers on real CICS estates. Several referees disagreeing in different ways is much stronger evidence than any single check.
Today we have two machine referees: the det translator's tree-sitter parse (#4273, the cross-check gate) and GnuCOBOL (the equivalence oracle). We also have the hand-verified answer keys (#4318) and the estate-crucible's generated key (#4317). Open-source COBOL parsers could add more referees, living in test / validation tooling only, never in the shipped scanner, so the zero-dependency promise is untouched.
Candidates (license-checked; see also the translator bake-off #4378)
| Tool | License | Activity (Oct 2026) | What it is | Likely role |
|---|---|---|---|---|
| Eclipse Che4z COBOL LSP | EPL-2.0 (weak copyleft; fine as an external, unmodified test tool) | very active, Broadcom-backed | Industrial IBM Enterprise COBOL parser: CICS, SQL, IDMS, DaCo, copybook preprocessing | units, calls, CICS / SQL referee |
| mapa | MIT | active, single author | ANTLR grammars for IBM Z COBOL, CICS APIs/SPIs and JCL, plus a call-tree tool (CALL, LINK, XCTL, SQL CALL, program inputs/outputs) | network-map referee (call tree, CICS, JCL) |
| Spantree tree-sitter-cobol-enterprise | MIT | new (Apr 2026) | Tree-sitter grammar for IBM Enterprise COBOL; EXEC CICS / SQL parsed into typed nodes; 65/66 CardDemo files parse | parser referee; translator front-end candidate |
| ProLeap | MIT | stale (last release 2018) | ANTLR4 AST + semantic graph (data and control flow); passes NIST COBOL-85; EXEC blocks kept as text | data-flow referee |
| Cobrix | Apache-2.0 | active | Copybook parser + EBCDIC reader: COMP-3, OCCURS DEPENDING ON, REDEFINES | record-layout / byte-offset referee |
| cobol-rekt | MIT | active | Reverse-engineering toolkit: flowcharts, control-flow analysis | reachability / dead-code referee |
| TypeCobol | CeCILL-C (LGPL-like) | active | Incremental IBM Enterprise COBOL 6 parser (C#) | dialect-coverage reference |
| Not permissive: SuperBOL (AGPL), GnuCOBOL (GPL; already our oracle, run as a separate process) | leave as is |
What to measure: "how does our COBOL parsing rate?"
For each referee, on the same corpus, score agreement with the engine per fact channel:
- Programs and units: PROGRAM-IDs (incl. nested and sibling programs), paragraphs and sections with extents, main-line entry code.
- Edges: PERFORM / PERFORM THRU / GO TO / GO TO DEPENDING ON, CALL (static vs dynamic), EXEC CICS LINK / XCTL / RETURN TRANSID / START.
- Copybooks: COPY / INCLUDE resolution, REPLACING, library (SYSLIB) resolution.
- Data: items, PIC / USAGE / OCCURS / REDEFINES / VALUE, offsets and sizes (Cobrix is the specialist here).
- CICS / SQL: commands, resources (files, queues, maps, transactions), SQL statements and tables.
- JCL: steps, programs, DD / DSN (mapa).
Also per referee: parse success rate, wall time per member, and what it can't see (dialect gaps, unparsed EXEC blocks).
Corpus: the keyed CICS estates (CardDemo, CBSA, GenApp, zECS, DSF; DBB for batch), the language-crucible's COBOL slice (~450 files incl. NIST CCVS85), and estate-crucible v0.3.0+.
Output: a published scorecard, one table per fact channel, with the engine and each referee scored against each other, against the answer keys and against the estate-crucible key. It can sit next to the tri-comparison chart (GitGalaxy vs tree-sitter vs ctags), which already does this for 40+ languages. Every disagreement gets adjudicated against the source, as in #4273: engine wrong, referee wrong, or definitional.
Open questions (brainstorm here)
- Which referees are worth the integration cost? JVM tools (Che4z, mapa, ProLeap, Cobrix via Scala) vs tree-sitter (Python bindings) vs .NET (TypeCobol).
- Majority vote across three or more parsers, or per-channel ownership (COBOL: engine-to-translator fact cross-check as a CI gate (and who owns each fact) #4273's "who owns each fact")?
- Run on demand / nightly only, or as a CI gate? JVM startup and corpus fetch cost in CI.
- Che4z is an LSP server: drive it over LSP, or call its parser module directly?
- How to treat referee dialect gaps (COBOL-85-rooted tools on IBM 6.x code) so they don't count as engine errors.
- Could a referee panel also run on a customer estate at scan time, as an opt-in "verified mode", while the default scanner stays zero-dependency?
- Licensing posture for each (EPL / CeCILL vs MIT / Apache) as test-time tools.
Related: #4273 (engine-to-translator cross-check gate), #4318 (answer keys with extents and edges), #4317 (estate-crucible), the translator bake-off #4378, and the tri-comparison chart.
🤖 Generated with Claude Code
Activity
squid-protocol commentedon Oct 5, 2026
First measured pass of the referee panel: tooling in draft PR #4384, which also has the full adjudication table and the draft issues.
Referee panel scorecard (#4377)
Corpora:
aws-mainframe-modernization-carddemo@59cc6c2fd7eb,cics-banking-sample-application-cbsa@417334533178,cics-genapp@f6f3f4b2580d,estate-crucible@0.3.0,zecs@6d6bcbbc89c9.Parse success and speed (the key-covered members each source reads: programs and / or keyed copybooks)
Per corpus, clean / partial / failed:
Each source vs the answer keys (ground truth), all corpora pooled
P = correct / reported, R = correct / true over (file, value) pairs;
R parsedcounts only the files the source parsed. n/a = the source does not produce that channel.Agreement with the engine (|A ∩ B| / |A ∪ B| on files both parsed)
How to read it
__global_context__row's design (COBOL engine: statements between PROCEDURE DIVISION and the first paragraph belong to no unit, so the program's main-line PERFORM/CALL edges are never recorded #4302).GO TO 8500-READTRNX-READin CardDemo CBSTM03A. This is deliberate (#3327 follow-up: COBOL GO TO is not a call (contract C4) -- needs a decision #3362,engine_drops_self_transferin Answer keys: score unit extents and intra-program PERFORM / GO TO edges, not just unit names and start lines #4318), but tree-sitter and the key both have the edge.TEST,3,WS-N) in estate ACCTRPT and CBSA BANKDATA (open: COBOL engine: inline PERFORM forms produce phantom callees (TEST,FOREVER,WS-NofWS-N TIMES,3,END-IFafterEXIT PERFORM) #4305).IDMS-CONTROL/PROTOCOL/SCHEMAsections as units (open: COBOL engine: IDMSIDMS-CONTROL SECTION/PROTOCOL.(ENVIRONMENT DIVISION) recorded as procedure units #4306).D-line extent.PROGRAM-ID. CBLDB22+ trailing blanks;PROGRAM-ID TEST16.) #4307 / COBOL: a full-width space (U+3000) separator hides data entries and pictures (opensourcecobol4j dialect) #3956 / COBOL engine: the last DATA DIVISION entry takes its USAGE from the PROCEDURE DIVISION (DISPLAY verb, 'BINARY' literal) -- wrong byte length #4329.CBL CICS(SP)compiler-option cards make the whole program unparseable (3 of 5 zECS programs).ENTRY 'DLITCBL' USING ...is misread, so its last operand becomes a phantom paragraph (3 CardDemo IMS programs).EXIT.instead of covering a procedure-divisionEXEC SQL INCLUDE. That one is definitional.POINTER, level-77 copybooks,EXEC SQL DECLARE(.dcl), lowercasepic x(40)("field size 0"), and some multi-value 88 lists.pic xXXXXX, read as 5 bytes instead of 6 (CBSA GETSCODE). Cobrix is wrong; the engine and the key are right.analysisCLI exits 1 with no output on any program containing aCALLstatement. A 5-line program reproduces it. This is why 22 of 44 CardDemo programs fail.--astwriter overflows the stack or runs out of memory on 2 large CICS programs.CBL CICS(SP), but recovers.EXEC CICS LINK PROGRAM(WS-ABEND-PGM)(an identifier with a VALUE) and misses most DB2 statements and some literalDELETE FILE('CUSTOMER'), so its call-target recall is 72%.ZF-FCT) as if it were a file (zECS).Adjudicated disagreements (at least 3 sampled per pattern, against the source)
CBL CICS(SP)programs (zECS ZECS000/001/003)PADFLPCB/PAUTBPCBfromENTRY ... USING(DBUNLDGS, PAUDBLOD, PAUDBUNL)EXEC SQL INCLUDE/COPYin PROCEDURE (COTRTLIC 9550, COTRTUPC 9800, COCRDSLC)賞与額→Z)PERFORM TEST/3/WS-N(ACCTRPT, BANKDATA A010)GO TO 8500-READTRNX-READ(CBSTM03A)VALUE +18/+0/-1; the key has null (lgacdb01 L83, ABNDPROC L40, CBPAUP0C L82)10 PIC X(20) VALUE ...asPIC(COPAUS1C L58-67); engine FILLERVALUE X'0D25'→X(ZECS001 L45, ZECS003 L49)COMM-OVERDR value 'TO'(last DATA DIVISION item, BNK1CAC L157 and 9 more)' LGACDB01')pic xXXXXX= 5 bytes (GETSCODE)LINK PROGRAM(WS-ABEND-PGM)(BNK1CCA, BNK1DAC, BNK1CRA)SELECT ... FROM ACCOUNT, DELACC, BANKDATA)ZF-FCTas a file name (ZECS000/001)Recommendation
CBL/PROCESScards,ENTRY, DBCS names. It is also the strongest Translator front-end bake-off: which COBOL parser should the det translator use? #4378 front-end candidate seen here.documentSymbol+ diagnostics) instead of the 2.5.1analysisCLI. The CLI's CALL crash and AST-serialisation failures cost it about a quarter of the members. Where it works, it is the most independent industrial referee (preprocessor + copybook resolution).🤖 Generated with Claude Code
test(cobol): referee panel -- independent COBOL/CICS parsers scored p…
fix: train -- #4329, #4391, #4392, #4393 (#4398)
squid-protocol commentedon Oct 5, 2026
Closing: the first measured pass is complete. The tooling merged in #4384 and the scorecard is above. Every finding against the engine (#4302, #4305, #4306, #4391, #4392) and against the answer keys (#4393) is fixed. Result: on the five CICS estates the engine read 242/242 members and scored 99–100% against the keys; where the referees parse, they agree with it at 96–100% on every structural channel. Remaining improvements (re-score on current main, referee-majority column, Che4z over LSP, nightly run) continue in #4438. Referees stay test-only.