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:
lineSequentialexists because 309 of those 5195 files needed it.- Multi-record
INPUTis still refused, because the 143 occurrences turned out to be 51 distinct files — parser fixtures, conformance material and teaching programs, and not one application program. - Bounded split counting is still refused, because 126 of the 130
UNSTRING … TALLYINGstatements came from a single NIST conformance file vendored into several repositories.
A measurement that changes nothing is worth as much as one that changes something, and both are recorded.
Added
lineSequentialfiles — text files under the restrictions Enterprise COBOL puts on them.- A reference COBOL runtime. Every example is now executed by two engines
—
cobcand an independent interpreter written against the same emitted output — and a disagreement fails the build. This is what catches a defect that compiles: the bounds guard once clamped an out-of-range subscript instead of refusing it, and every static check passed. - Horizontal validation against four external corpora, with their licences, pinned revisions and per-file checksums.
bankc analyse— what COBOL you already have contains, as an inventory.- Six diagnostics:
BANK-FILE-016,BANK-FILE-017,BANK-CICS-005,BANK-SQL-008,BANK-TYPE-030,BANK-NAME-001. - An IBM validation bundle —
pnpm zos:kitwrites every artifact a z/OS run needs, with a result form and a claim gate.
Changed
bankc doctorreports the compiler version, whether GnuCOBOL is installed and which one, and that native IBM Enterprise COBOL is not detected.--watchapplies to the commands that read a project, and is refused by name on the rest.
Fixed
BANK-FILE-017counts every way a program reads the record an operation filled — a write, a rewrite, a release, a queue put and eight more.- A successful
SORTno longer reports failure under GnuCOBOL. - A mistyped project path says what was expected instead of an
ENOENT.
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
- No native IBM Enterprise COBOL execution. Nothing here has been compiled
by IBM's compiler, precompiled by DSNHPC, bound to a Db2 package, or started
in a CICS region. The bundle in
zos/exists so somebody with access can close that gap without reverse-engineering this repository's test harness. - No production ledger. This compiler has never run against real money.
- The full seven-lane mutation suite was not run for this release. The targeted safety lane was, twice, and every surviving mutant in it is individually classified in verification.
- CobolCodeBench's remaining 27 tasks are not failures: 19 have expected outputs that are not derivable from their own specifications, 7 depend on randomness, and 1 is a character-model gap governed by ADR-0006.
Known limitations
These are design decisions, not defects awaiting a fix:
- BankTS is deliberately narrow. It is not a general-purpose language and will not compile arbitrary TypeScript. The restriction is the product.
- No UTF-8 character model.
USAGE NATIONALis emitted at the Enterprise COBOL width; the character model itself is not implemented (ADR-0006). - Multi-record
INPUTis refused (BANK-FILE-015). The recommended alternative — one record, a type field, andREDEFINES— does not currently force the programmer to test the discriminator before using the overlay, and the documentation does not pretend otherwise. - Subsystem behaviour is checked structurally, not executed. SQL, CICS, IMS and MQ are validated against the target's rules and run against a reference runtime, never against the real subsystems.
- Building with
--outto a directory outside the project records that absolute path in the audit manifests. That is provenance about where artifacts were written, not nondeterminism: the same inputs, including the output path, produce byte-identical artifacts.
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.