Skip to content

TScert v1.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Dec 00:14
· 17 commits to main since this release

TScert verifies type and bounds safety for strict TypeScript against a formal semantics proved sound in Lean 4.

v1.1.0 adds proved typed-array buffer separation in Lean—so loops that populate multiple typed arrays in parallel keep their bounds and element invariants—and syncs the verified Pretext corpus with upstream behavior.

Highlights

  • Typed-array buffer separation (proved in Lean, #462): previously, writing to any typed array invalidated element facts on every other typed array in scope. TScert now tracks backing ArrayBuffer identity in its Lean semantics and proves that freshly allocated typed arrays (new Uint8Array(n), new Uint16Array(n), new Int32Array(n), new Float64Array(n)) have distinct backing buffers, while .subarray(...) views stay aliased. Writes to one fresh typed array now preserve invariants on the others—allowing Pretext's prepareRichInline to merge two passes into a single loop.
  • Pretext parity sync (#461): aligned layout.ts and rich-inline.ts with upstream object-property and floating-point addition order (0/21,745 diffs against Pretext's offline harness).

Verified codebases at v1.1.0

  • TScert's own front end (tools/, ~47,000 lines of TypeScript, proved mode): all 46,638 lines across 52 modules (1,155 top-level functions; 25,656 of 25,656 verifiable statements) pass per-function verification (ff653a638). The remaining 504 lines (4 files; 19 of 1,174 functions) are small, hand-audited wrappers around Node and TypeScript compiler APIs.
  • Pretext (~9,700 lines of TypeScript across 12 modules, experimental paper-rules mode): all 12 library modules of this text-layout library pass with every array read (a[i]) left bare—proved in bounds statically, without runtime bounds checks. Paper-rules mode is an experimental checker for code with callbacks and module-private state whose new rules are proved sound in a standalone Lean model and not yet folded into TScert's main soundness proof, so its verdicts are reported separately.

Install

npm install --save-dev @cristianoc/tscert
npx tscert src/example.ts --project .

Changes: #461, #462 · Full Changelog: v1.0.0...v1.1.0