Giter VIP home page Giter VIP logo

wasp's Introduction

WebAssembly Symbolic Processor (WASP)

Apache 2.0 Platform GitHub last commit

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.
  • Bootstrap the OCaml compiler:
opam init -y
opam switch create wasp 4.14.0 4.14.0
eval $(opam env)
  • Then, install the library dependencies:
git clone --recurse-submodules https://github.com/wasp-platform/wasp.git
cd wasp
opam install . ./encoding/encoding.opam --deps-only
  • Build and test:
dune build
dune runtest
  • Install wasp on your PATH by running:
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:

# 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 Expressions

The 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. Hence, all other additional functionalities of the reference interpreter are available in WASP.

wasp's People

Contributors

filipeom avatar rageknify avatar kabux3 avatar dmaxter avatar

Stargazers

XiaoWu avatar  avatar Rafa avatar Maulvi Alfansuri avatar Ryota Sakai avatar Guannan Wei avatar Masahiro Kozuka avatar Abel Sen avatar Jaeho Choi avatar Ningyu He avatar Letterio Galletta avatar Coen De Roover avatar

Watchers

 avatar Afonso Ribeiro avatar Pedro Adão avatar  avatar  avatar

Forkers

abc767234318

wasp's Issues

There is no complete output after the concolic execution.

I made a few changes to 2o1u.wast for the btree dataset and executed the following command:

wasp -t 2o1u.wast

The program then stops after 900 seconds or so, with the following output:

-- Running ("(input \"2o1u.wast\")")...
-- Parsing...
-- Running...
-- Loading (2o1u.wast)...
-- Parsing...
-- Running...
-- Checking...
-- Initializing...
-- Invoking function "main"...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ITERATION NUMBER 001 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>>> Assume passed. Continuing execution...

I wonder if there is a timeout set within the wasp program.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.