LemmaScript
LemmaScript copied to clipboard
verification toolchain for TypeScript (Tech Preview)
lsc check accepts added requires/ensures lines in .dfy, so a proof file can make obligations vacuous
> *This was generated by AI during triage.* ## Summary `lsc check` treats any line that appears in `foo.dfy` but not in `foo.dfy.gen` as an allowed proof addition. `additionsOnly` in...
> _This was generated by AI during triage._ ## Problem `lsc regen --backend=dafny` merges a new generation into the proof file with `git merge-file ` (`tools/src/dafny-commands.ts:200`). That call uses Git's...
> _This was generated by AI during triage._ ## Problem Array `every` and `map` callbacks that read their second argument (the element index) generate ill-typed Dafny. Valid TypeScript is rejected...
> _This was generated by AI during triage._ ## Problem With `//@ type x real`, `Math.abs(x)`, `Math.min(a, b)` and `Math.max(a, b)` still lower to the integer preamble helpers. `lsc gen`...
> _This was generated by AI during triage._ ## Problem In a function whose result is `//@ type \result real`, an integer literal used as the result is emitted as...
**Version:** lsc 0.6.8 (latest on npm); still present on `main` at `6b18f23`, `tools/src/dafny-emit.ts`, `emitExpr` case `"str"`. A string literal containing a tab or a carriage return is emitted into the...
> _This was generated by AI during triage._ ## Context `DESIGN_LS_IN_LS.md` §5.1 and §9 step 3 deferred generic datatype work on 2026-07-21. The note says erasure is uneven ("record decls...
> _This was generated by AI during triage._ ## Problem An annotation such as `x: Info["kind"]` reaches `parseTsType` as source text. That parser has no type checker, so it keeps...
> _This was generated by AI during triage._ ## Problem `s.lastIndexOf(sub)` is rejected by the Dafny backend: ``` ERROR: Dafny emission failed for 'lastDot' in last.ts: Unsupported Dafny method call:...
> _This was generated by AI during triage._ ## Problem A truthiness test on an optional number narrows it: `if (o) return o - x;` emits a `match` on `o`...