Original-compiler corpus validation, 20 November 2026¶
Later update: PRINT fidelity and BCD storage are now implemented, and the corpus includes CHM inversion. The results below describe the earlier commit. See the follow-up validation.
The first original FORTRAN II run and independent corpus are complete. The implementation and reproduction procedure are in tests/oracle/README.md. No C runtime behaviour or existing regression expectations were changed.
Evidence¶
Two fresh builds produced the same 4K and 8K system-tape SHA-256 values. The second build used a new cache, pinned source checkouts and verified SDK/SHARE downloads. Tool DLL hashes differed with build paths, as recorded.
Eight original-compiler programs ran under Sim704 and native i704. After review, all eight were recaptured with the final capture script. Every nonblank printed line agrees between emulators, including columns and field spacing. Native i704 inserts extra blank lines in some cases.
Control flow, subprogram linking and binary tape I/O were also recaptured using the second build. Their raw outputs agree byte for byte with the first build’s outputs in each emulator.
The upstream primer produced
2.99085in both emulators. Only its output, console logs, native command script and provenance are committed; its historical source and compilation listing remain outside this repository.The revised assembler path produced a fresh 503,200-byte object deck and reproduced it after deliberately planting stale output files.
make test: 436 passed, 0 failed. Kernel smoke test passed. VS Code: 22 passed. The FORTRAN collection’s Sphinx build passed with-W.make test-oracle: 15 harness checks pass; 15 dialect comparisons report the known missing first PRINT column and no other mismatches.make test-oracle-strictfails all 15, as intended until the missing PRINT column is fixed.Git staging preserves every captured byte, including CR, FF and padding. A clean index export runs the offline target without historical assets.
The comparison is limited to these programs and decimal output. It does not establish full conformance, bitwise memory agreement, original FORTRAN I diagnostics, or a FORTRAN 0 oracle. The CHM inversion is still pending.
Independent review¶
Grok 4.7 and Fable 5.2 completed independent reviews of the eight-case corpus and harness. Direct rebuild and capture verification supplemented those reviews.
Fable’s findings were reconciled as follows:
Known-difference policy now lives in
corpus.json, independently of the historical manifest. Exact matches report a stale declaration; removing the declaration requires no recapture. An undeclared difference still fails.Every build stage validates source pins, tracked changes, extra C# files, SHARE checksum and SDK version. Assembly removes stale output first and requires fresh output. Pre-existing target tapes are rejected; final tape hashes must equal the independently repeated build.
The documentation explicitly distinguishes interpreted
MKFORT2.cmdscripts from the Python transcription ofMKUASAP.cmdandUASAP.cmd, including the upstream loader patches.Primer evidence contains no historical source. The final capture manifest’s script hash matches
tools/oracle.py. The MIT licence file exists.Empty corpora fail. Runtime timeouts and non-ASCII output count as failures. Comment cards no longer affect END detection. Ambiguous Windows-style paths and unsupported batch operators are rejected.
Native execution verifies both the breakpoint and examined IC against the observed STOP address. The identical fixed/binary-tape console messages are the same short STOP trace at octal 00111; the separately captured object hashes, compilation listings and printed outputs differ.
Object-run tapes already use
Mt1_run.tapthroughMt10_run.tap, distinct from compiler scratch tapes. This concern needed no code change. The original-case directories are fresh, and native tapes also start fresh.Both emulators retain the same leading PRINT column. The witness now checks nonblank lines exactly, strengthening the initial token comparison.
The missing PRINT column was resolved in the subsequent fidelity milestone. Current priorities are in the roadmap.