z3js is a tiny utility library (v0.0.0) for transpiling a small subset of JavaScript expressions to SMT2 format for use with the Z3 solver. It includes a JavaScript parser, a SMT2 code generator, and a minimal S-expression parser for reading Z3 outputs. The library is experimental and limited to simple variable declarations, function definitions, and assertions. It requires an external Z3 solver binary and is intended for prototyping program synthesis and formal verification tools. No releases or update cadence is established; the project appears to be in early development. Key differentiators: focuses on a tight JS→SMT2 bridge, unlike full verification frameworks.
npm install z3jsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Transpile a small JS program with function and assertion to SMT2 and pipe to Z3 solver.
Pin to exact version and expect future breaking changes.
Install Z3 via 'brew install z3' or 'apt install z3' and ensure it's in PATH.
Refer to project examples for the supported syntax.
Use JSDoc or manually declare types if using TypeScript.
Run `npm install z3js` or use a local path like 'require('./path/to/z3js/src')'.Rewrite using only 'var', function declarations, and simple expressions.
Install Z3 via 'brew install z3' (macOS) or 'sudo apt install z3' (Ubuntu) or download from GitHub.