Scott Scoble
|
8b520284cb
|
TS generator: fix #12 (5 expression patterns) + #11 (opaque record types)
#12: All 5 untranslated SpeckDL patterns now emit valid JS:
- notIn → !.has(), old() → drop, union → Set spread,
set diff → filter, append() → [...X, Y], length() → .length
- ==/!= operator replacement fixed (word-boundary regression)
- Postcondition object comparisons get @ts-expect-error TS2839
#11: Generator auto-detects opaque identifier types used in state
variables and action params, emits 'type X = any' before class.
- State properties use ! (non-null assertion) for strict mode
TigerBeetleLedger → tsc --noEmit = 0 errors. 37/37 tests pass.
|
2026-05-11 10:16:15 -07:00 |
|
|
|
6c6daaf90f
|
feat(compiler): Z3 SMT-LIB2 verification backend (speckl#21)
- New generator: compiler/src/generators/z3.ts (1,034 lines)
- Translates SpeckDL state → Z3 sort declarations
- Translates invariants → Z3 define-fun returning Bool
- Translates actions → Z3 transition predicates (enabled + step)
- BMC unrolling with --verify-depth=N (default: 10)
- CLI: --target=z3 or --target=all
- ToggleSwitch and TigerBeetleLedger generate valid SMT-LIB2
- KafkaKRaft spec generates valid SMT-LIB2 structure
- Complex forall/set expressions emit 'true' as placeholders (to be improved)
- All 41 existing tests still pass
This unblocks M1.2 (KRaft verification), M3.2 (Show HN), and M4.3 (OAuth verification).
|
2026-05-09 22:28:39 -07:00 |
|