Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/formalsec/wasp
WASP moved to: https://github.com/OCamlPro/owi
https://github.com/formalsec/wasp
c program-analysis symbolic-execution testing webassembly
Last synced: 2 months ago
JSON representation
WASP moved to: https://github.com/OCamlPro/owi
- Host: GitHub
- URL: https://github.com/formalsec/wasp
- Owner: formalsec
- License: mit
- Created: 2022-05-15T08:44:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-28T07:47:59.000Z (5 months ago)
- Last Synced: 2024-08-28T20:29:46.265Z (5 months ago)
- Topics: c, program-analysis, symbolic-execution, testing, webassembly
- Language: OCaml
- Homepage:
- Size: 152 MB
- Stars: 12
- Watchers: 5
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebAssembly Symbolic Processor (WASP)
[![Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
![Platform](https://img.shields.io/badge/platform-linux%20%7C%20macos-lightgrey)
[![GitHub last commit](https://img.shields.io/github/last-commit/wasp-platform/wasp)](https://github.com/wasp-platform/wasp/commit/main~0)The WebAssembly Symbolic Processor (WASP), is a symbolic execution engine for
testing Wasm modules, which works directly on Wasm code and was built on top
of a standard-compliant Wasm reference implementation.## Build from source
- Install [opam](https://opam.ocaml.org/doc/Install.html).
- Bootstrap the OCaml compiler:```sh
opam init -y
opam switch create wasp 4.14.0 4.14.0
eval $(opam env)
```* Then, install the library dependencies:
```sh
git clone --recurse-submodules https://github.com/wasp-platform/wasp.git
cd wasp
opam install . ./encoding/encoding.opam --deps-only
```* Build and test:
```sh
dune build
dune runtest
make -C share/libc
dune install
```## Running WASP
You can call the executable with
```
wasp [option | file ...]
```#### `wasp: undefined symbol Z3_fixedpoint_pop`
If you encounter this or other Z3 symbol related errors
add the following line to your shell configuration file:```sh
# change /default/ if you installed z3 on another version of OCaml
export LD_LIBRARY_PATH="${HOME}/.opam/default/lib/z3/:${LD_LIBRARY_PATH}"
```On macOS the environment variable should be `DYLD_LIBRARY_PATH`.
#### Converting Modules or Scripts
The option `-o` allows to output module definitions to
files. Depending on its extension, it'll write out
the module definition in either S-expression or binary
format. This option allows to convert between the
two in both directions. For example:```
wasp -d module.wast -o module.wasm
wasp -d module.wasm -o module.wast
```
#### Command Line ExpressionsThe option `-e` allows to provide arbitrary script commands
directly on the command line. For example:```
wasp module.wasm -e '(invoke "foo")'
```#### Additional Details
WASP extends the [WebAssembly Reference Interpreter](https://github.com/WebAssembly/spec/tree/master/interpreter). Hence, all other additional functionalities of the reference interpreter are available in WASP.