#wasm-parser #instructions #parser

no-std inf-wasmparser

A simple event-driven library for parsing Inferara non-deterministic WASM extension WebAssembly binary files

4 releases

new 0.0.8 Apr 15, 2025
0.0.7 Apr 14, 2025
0.0.6 Apr 3, 2025
0.0.5 Jan 30, 2025

#170 in WebAssembly

Download history 101/week @ 2025-01-25 39/week @ 2025-02-01 3/week @ 2025-02-08 1/week @ 2025-02-22 3/week @ 2025-03-01 111/week @ 2025-03-29 38/week @ 2025-04-05

149 downloads per month

Custom license

1.5MB
27K SLoC

inf-wasmparser

Inferara fork of Bytecode Alliance project

A Rust parser for the WebAssembly Binary Format. Extended with Inference non-deterministic instructions.

Crates.io version Download

Inference non-deterministic instructions

This repository extends the WebAssembly Binary Format with non-deterministic instructions. These instructions are used to specify algorithms in more general way to be able to compile the source code targeting proof assistants like Rocq or Lean.

More information about Inference can be found in the official Inference language spec and on the Inferara website.

Block instructions

Instruction WAT syntax Binary representation Description
Forall (forall ) 0xfc 0x3a In this block all possible program execution paths are considered
Exists (exists ) 0xfc 0x3b In this block the existance of a certain program execution path is considered
Assume (assume ) 0xfc 0x3c In this block the assumption about the program state in defined
Unique (unique ) 0xfc 0x3d In this block it is assumed the existance of only one certain program execution path

Variable instructions

Instruction WAT syntax Binary representation Description
i32.uzumaki (i32.uzumaki) 0xfc 0x31 i32 value type attribute guiding inference compiler to generate a proof that reason about all possible values the variable can hold
i64.uzumaki (i64.uzumaki) 0xfc 0x32 i64 value type attribute guiding inference compiler to generate a proof that reason about all possible values the variable can hold

Origin

This project is a fork of the wasmparser.

License

This project inherits the license from the original project, which is Apache-2.0_WITH_LLVM-exception.

Dependencies

~170–700KB
~14K SLoC