All Projects → bramvdbogaerde → z3-wasm

bramvdbogaerde / z3-wasm

Licence: other
Scripts and Javascript Glue code to use Z3 in the browser using WASM

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects
c
50402 projects - #5 most used programming language
HTML
75241 projects
Makefile
30231 projects
Nix
1067 projects

Projects that are alternatives of or similar to z3-wasm

easy z3
Using z3's never been easier (maybe)
Stars: ✭ 94 (+754.55%)
Mutual labels:  z3
z3-mode
An interactive development environment for SMT-LIB files and Z3
Stars: ✭ 20 (+81.82%)
Mutual labels:  z3
Manticore
Symbolic execution tool
Stars: ✭ 2,599 (+23527.27%)
Mutual labels:  z3
gauntlet
Finding bugs in P4 compilers using translation validation.
Stars: ✭ 23 (+109.09%)
Mutual labels:  z3
Casper
A compiler for automatically re-targeting sequential Java code to Apache Spark.
Stars: ✭ 45 (+309.09%)
Mutual labels:  z3
grilops
a GRId LOgic Puzzle Solver library
Stars: ✭ 29 (+163.64%)
Mutual labels:  z3
intrepid
Intrepyd Model Checker
Stars: ✭ 14 (+27.27%)
Mutual labels:  z3
z3 tutorial
Jupyter notebooks for tutorial on the Z3 SMT solver
Stars: ✭ 117 (+963.64%)
Mutual labels:  z3
mbeddr.formal
FASTEN: FormAl SpecificaTion ENvironment - a set of DSLs to experiment with rigorous systems and safety engineering.
Stars: ✭ 16 (+45.45%)
Mutual labels:  z3
vim-smt2
A VIM plugin that adds support for the SMT-LIB2 format (including Z3's extensions)
Stars: ✭ 35 (+218.18%)
Mutual labels:  z3
haskell-z3
Haskell bindings to Microsoft's Z3 API (unofficial).
Stars: ✭ 48 (+336.36%)
Mutual labels:  z3
TSNsched
Automated Schedule Generation for Time-Sensitive Networks (TSN).
Stars: ✭ 46 (+318.18%)
Mutual labels:  z3

Z3 WASM

This library is superceded by the official WebAssembly/TypeScript/Javascript bindings of Z3, see https://github.com/Z3Prover/z3/tree/master/src/api/js

Original README

This repository contains scripts that makes interaction with the Z3 solver from a browser using WASM easier.

  • build.sh contains commands to fetch and compile Z3 using emscripten.
  • api/ contains a C API which exposes the Z3 API to Javascript, and the api.js file contains some glue code that enables easier interaction with the C API.
  • example/ contains an example of how to use the api.c module using a dynamically linked native version of the Z3 library, this cannot be used from the browser.
  • index.html contains an example on how to load and use the Z3 Javascript glue code.

Both the location of the Z3 repository and the Z3 version can be controlled using environment variables. Z3_BASE_DIR controls the location of the cloned Z3 repository, while Z3_VERSION alters the version that is fetched from Github.

Binding Generator

The bindgen directory contains some Python scripts to automate generating Javascript bindings for the Z3 C Api.

Currently, all functions declared in z3/src/api/z3.h of the original Z3 source are used for the Javascript bindings, all Z3_* types are treated as opaque pointers (i.e., just numbers from Javascript's point of view) except for Z3_string which is treated as a string.

As of yet, the bindings remain untested, so it might be possible that an incorrect type is assigned to a particular parameter which might lead to undefined behaviour.

Related repositories

Clément Pit-Claudel has performed similar steps as I have taken here. However, its scripts are meant to be used on Ubuntu or Debian derivates, and do not work nicely on other distributions of Linux. Furthermore, its Z3 version is outdated, and numerous users have reported either compilation issues or issues while using the library.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].