Interpreter coverage
What packages/cobol-backend emits, against what
packages/cobol-runtime can execute. A verb in the first and not the
second is a differential blind spot: the compiled side runs, the
interpreted side refuses, and the comparison that gives this project's
green its meaning does not happen.
Measured over the 158 programs the compiler produces from the examples and the benchmark tasks.
The denominator is locally executable emitted verbs, not all of them.
A verb whose only home is a zUnit test case or a Report Writer section has
nowhere local to run whatever the interpreter implements, and counting it
as a gap made the real one look half its size: of eight blind spots
reported before SORT and MERGE were built, four were those two and
their RELEASE and RETURN, and four were exempt. Each exemption carries
its reason below and is held to a named program by
tests/interpreter-coverage.test.ts.
| verbs emitted | 31 |
| of those, locally executable | 27 |
| of those, interpreted | 27 |
| differential blind spots | 0 |
| exempt, with a recorded reason | 4 |
Every locally executable verb the backend emits can be executed by both engines.
Every emitted verb
| Verb | Emitted | Locally executable | Interpreted |
|---|---|---|---|
MOVE |
2305 | yes | yes |
IF |
699 | yes | yes |
DISPLAY |
657 | yes | yes |
PERFORM |
201 | yes | yes |
COMPUTE |
197 | yes | yes |
CONTINUE |
165 | yes | yes |
EXIT |
146 | yes | yes |
CALL |
103 | yes | yes |
ADD |
83 | yes | yes |
CLOSE |
76 | yes | yes |
OPEN |
75 | yes | yes |
GOBACK |
55 | yes | yes |
WRITE |
55 | yes | yes |
READ |
46 | yes | yes |
SET |
23 | yes | yes |
EVALUATE |
18 | yes | yes |
STRING |
14 | yes | yes |
SUBTRACT |
10 | yes | yes |
ENTRY |
6 | no | n/a |
INITIALIZE |
6 | yes | yes |
INSPECT |
6 | yes | yes |
DIVIDE |
4 | yes | yes |
UNSTRING |
3 | yes | yes |
RELEASE |
2 | yes | yes |
SORT |
2 | yes | yes |
GENERATE |
1 | no | n/a |
INITIATE |
1 | no | n/a |
MERGE |
1 | yes | yes |
RETURN |
1 | yes | yes |
START |
1 | yes | yes |
TERMINATE |
1 | no | n/a |
Emitted, and outside local execution
| Verb | In | Why no local run reaches it |
|---|---|---|
ENTRY |
(generated)/TZUNITTE.cbl | an alternate entry point in a generated zUnit test case. It is called by IBM's zUnit runner, which is not on this machine, and never by a job step. |
GENERATE |
examples/report-with-controls | Report Writer, as INITIATE. |
INITIATE |
examples/report-with-controls | Report Writer, expanded by IBM's Report Writer precompiler. packages/cobol-runtime refuses a REPORT SECTION by name rather than implementing page fitting, control breaks and sum counters a second time. |
TERMINATE |
examples/report-with-controls | Report Writer, as INITIATE. |
Not executable locally, as whole statements
EXEC CICS, EXEC SQL — these need Db2, a CICS region or IMS. The reference modules under runtime/ stand in well enough to run a program, which falls well short of executing SQL. They are not counted as gaps because no interpreter change would close them.