BankLang

BankLang 0.10.0

BankLang is a deterministic compiler from BankTS — a small banking language that borrows TypeScript's type syntax and has statements of its own for transactions, files, cursors and queues — to readable COBOL targeting IBM Enterprise COBOL 6.4.

It rejects classes of unsafe banking program at compile time rather than detecting them at run time. An unbalanced double-entry posting, a division with no stated rounding mode, a SQLCODE test that cannot tell an error from a missing row, and a sensitive field reaching an audit event are compile errors, not review comments.

No model participates in compilation. Every byte of generated COBOL comes from deterministic code, and the same input always produces byte-identical output. AI assisted the development of this compiler; it is not part of it.

Runtime validation currently uses GnuCOBOL 3.2.0. Native IBM Enterprise COBOL validation: NOT YET PERFORMED.

Those two lines are the whole of the honesty this release rests on. The compiler targets Enterprise COBOL 6.4 — the dialect rules, the reserved words, the numeric model and the JCL are written against IBM's manuals — but nothing here has been compiled by IBM's compiler or run on z/OS.


0.10.0 is the first published version. Earlier versions exist as changelog entries and commits; none was ever tagged or released, so there is nothing to upgrade from and no earlier artifact to compare against.

What this release is about

0.9.0 was the answer to an audit of the compiler's own output. 0.10.0 asks the harder question: what does real COBOL actually contain, and how much of it can BankTS represent?

That question is answered against corpora nobody wrote for this compiler — 5195 COBOL files from 168 open-source repositories, a semantic benchmark whose expected outputs are somebody else's, a reconstructed defect suite, and the NIST conformance material. The answers changed the language rather than decorating it:

A measurement that changes nothing is worth as much as one that changes something, and both are recorded.

Added

Changed

Fixed

The full list is in CHANGELOG.md.

What was validated

Every number below comes from evidence/release/0.10.0.json, which is generated from the evidence in evidence/horizontal/ and checked against it by pnpm release:snapshot --check.

Tests 3217 across 154 test files
Example projects 25, each built, verified and compiled
Emitted COBOL verbs executed by both engines 27 of 31
Differential blind spots 0
CobolCodeBench 19 / 46 (41.3%) of the whole corpus; 19 / 19 of the tasks BankTS can express
CobolCodeBench engine agreement 20 executed, 20 agreements, 0 divergences
X-COBOL v2 5195 files analysed, 0 analyser failures
OpenCBS 9 of 41 reconstructed defects demonstrated prevented at compile time
Targeted safety mutation 90.03% total, 92.67% of covered code

Four of the 31 emitted verbs — ENTRY, INITIATE, GENERATE, TERMINATE — are exempt from local execution and named as such: they are a generated zUnit test case's entry points and a Report Writer section, and neither has anywhere local to run. 27 of 31 is the honest denominator, not 31 of 31.

Twenty CobolCodeBench tasks were authored, not nineteen. The twentieth is task_func_55, classified benchmark-ambiguous and attempted anyway, and it fails: the oracle expects 016730 where the program writes 01673. It is excluded from 19 / 19 because it is excluded from the applicable set, not because it passed — 19 / 20 (95.0%) of everything authored is in the results.

9 of 41 on OpenCBS means nine defects have a BankTS program the compiler refuses. It does not mean BankLang prevents 22% of COBOL bugs. Of the other 32, one cannot be written in BankTS at all and 31 are not-demonstrated — which says this repository has not shown it, not that the compiler would miss it. No claim is made about them either way.

What was not validated

Known limitations

These are design decisions, not defects awaiting a fix:

Try it

The lowest-friction path needs nothing installed:

banklang.mwhassan.com/playground/ — the whole compiler runs in the browser. There is no compile or execution service and nothing you write is sent anywhere. (The page's own code is downloaded normally, including one chunk fetched the first time you press Run; it is not an offline application.)

Locally, from a clone — Node.js 24+ and pnpm 11.7.0:

git clone https://github.com/MWH997/banklang.git
cd banklang
pnpm install
pnpm bankc check examples/account-posting
pnpm bankc build examples/account-posting

There is no npm package. Every workspace package is private and none is published to a registry; the repository is the distribution.

Three files are attached to this release, each attested with Sigstore through GitHub's OIDC identity — gh attestation verify checks any of them against a transparency log:

File What it is
banklang-vscode-0.10.0.vsix The VS Code extension, compiler bundled inside
banklang-0.10.0.cdx.json CycloneDX bill of materials, 665 components, every platform
banklang-zos-conformance-0.10.0.tar.gz The z/OS bundle: 114 members, 25 programs, 26 cases

There is no separate checksum file. The z/OS bundle carries a SHA-256 for every member in its own manifest.json, and the attestations cover the archives.

Reproducing the evidence

pnpm test                       # 3217 tests
pnpm examples:verify            # every example builds, verifies and compiles
pnpm interpreter:coverage       # 27 of 31 emitted verbs, 0 blind spots
pnpm horizontal:fetch           # corpora at their pinned revisions, checksummed
pnpm horizontal:report          # regenerates the validation pages
pnpm release:snapshot --check   # the snapshot against the evidence

pnpm horizontal:fetch verifies every downloaded byte against validation/corpus-lock.json and fails on a mismatch rather than re-pinning. No corpus is redistributed by this repository: X-COBOL is derived-only under CC-BY-4.0, and the NIST material is never downloaded at all.


Read this page as Markdown on GitHub →