Back to browse
GitHub Repository

verification toolchain for TypeScript (Tech Preview)

54 starsTypeScript

LemmaScript, a verification toolchain for TypeScript via Dafny

by namin·Apr 21, 2026·5 points·0 comments

AI Analysis

●●●BangerBig BrainWizardryZero to One

TypeScript to Dafny verification with 123 lemmas proving invariants on real apps.

Strengths
  • Annotate TypeScript in-place with //@ specs and verify without rewriting code
  • Case studies prove real invariants on collaborative apps and expense splitters
  • Dual backend support for both Dafny and Lean 4 from same source
Weaknesses
  • Tech preview status means semantics and ergonomics still evolving
  • Formal verification audience is inherently small and specialized
Target Audience

Developers working on safety-critical TypeScript applications

Similar To

Dafny · Lean · F*

Post Description

I created LemmaScript to compile TypeScript to a verification backend (Dafny or Lean) and prove properties on the systematically derived model. I'll keep developing this, but I have a few case studies already, and it looks quite promising, with the caveat that each case study pushed the development of the core further. I can support both greenfield and brownfield projects, and in many cases, verification can be in-place: the TypeScript source is just annotated and verified independently but runs as is.

Similar Projects