tts Engine & VM (Contract v19)
tts compiles a deterministic, prototype-free TypeScript subset into a 41-opcode bytecode VM (strictly within a 45-opcode verification ceiling) with zero runtime syscalls or I/O.
Key Engine Capabilities (Engine Contract v19)
Section titled “Key Engine Capabilities (Engine Contract v19)”- Preemptive isolation on 1 OS thread: Each live actor executes inside its own power-of-two buddy-allocated virtual memory region capped by
--capand--alloc, with instruction-fuel preemption so hostile infinite loops cannot starve neighbors. - Linear-time ReDoS-proof
RegExp: Regex literals compile to bounded<= 256-state Thompson NFAs executed in a fuel-metered PikeVM (i/g/m/s, up to 9 captures,.test(),.match(),.replace(),.split()), making catastrophic backtracking impossible. - Zero-opcode
asyncCPS lowering:export async function handle(state, msg, caps)suspends acrossawait caps.http(...)/peer/timerboundaries withtry/catch/finally, labelledbreak/continue,do ... while, and Lean-provedcps_frame_isolation_sound. - Transactional state invariants:
export function invariant(state)executes atspawn, everyawaitsuspension, and terminal return—rolling back any violating turn cleanly while keeping committed state intact. - Rich strict TypeScript subset: Local
.tsmodule bundling,interface extends,typealiases,Map<string, V>&Set<string>, rest destructuring, inline array.map/.filter/.reduce/.flatMapcallbacks,encodeURIComponent/decodeURIComponent,btoa/atob, exactJSON.parse/stringify, and--compare-nodeparallel unit tests.