Formal semanticsmodels WebAssembly

WasmCert-Rocq

Also known as WasmCert-Coq, wasm_coq, WasmRef-Coq

A model of WebAssembly 2.0 (plus tail calls and subtyping) in Rocq, with a type soundness proof and a verified interpreter that is extracted to OCaml and run on the official tests.

Stage 1 · Validated Written in Rocq Open source · MIT v2.2.1 · 1 months ago

What it covers

Models
WebAssembly, WebAssembly 2.0, plus tail calls and subtyping
Fragment
Wasm 2.0 typing, execution and module instantiation, plus tail calls and the subtyping rules of the function-references and GC proposals. Integer and float operations come from CompCert's integer and float libraries (built on Flocq). SIMD instructions are opaque: their execution calls the official reference interpreter. The binary parser is unverified (experimental). Wasm 3.0 GC structs and arrays, exceptions, multiple memories and 64-bit memories are not listed as covered.
Written in
Rocq
Usable in
Rocq
Validation
The extracted interpreter (WasmRef-Coq) is proved sound with respect to the Rocq semantics. It runs the official conformance test suite (a WasmCert copy of it, included as a submodule) in CI, and the README says it is expected to pass all core tests. Tail calls are not tested this way.
Maintained by
Xiaojia Rao, Martin Bodin

Stage

Computed from the evidence below; see the criteria. MechanizedMechanized. Written in a form a computer can check, rather than on paper. means a computer can check the definition.

Stage 0 Mechanized Met
  • Met: Machine-checked or machine-readable definition evidence
  • Met: Fragment and version are stated The README states Wasm 2.0 plus subtyping and tail calls, and how SIMD is handled. evidence
Stage 1 Validated Met
  • Met: Can be executed or tested An interpreter extracted to OCaml runs .wasm and .wat files. evidence
  • Met: Published results against conformance tests or real implementations The conformance suite runs in CI (make run_wast). No published pass counts were found; the README says all core tests are expected to pass. evidence
Stage 2 Authoritative Next
  • Not met: Adopted by the language or ISA owner, or covers the full current version and tracks new ones Adopted by the owner: no; full coverage: no; tracks new versions: no. Not adopted by the WebAssembly Community Group. Covers Wasm 2.0 plus some later features. The current version, Wasm 3.0 (September 2025), adds GC, exceptions, multiple memories and 64-bit memories, which are not covered. No stated schedule for following new Wasm versions was found. evidence

Coverage

Which parts of WebAssembly the model defines.

WebAssembly-specific features

WebAssembly-specific features
FeatureSupportNotes
Structured control flow Blocks, loops, branches and the operand stack. SupportedSupported.Includes tail calls.
Source
Includes tail calls. source
Linear memory Loads, stores and memory growth. SupportedSupported.Wasm 2.0 memory instructions, including bulk memory.
Source
Wasm 2.0 memory instructions, including bulk memory. source
Tables and indirect calls Function tables and call_indirect. SupportedSupported.
Source
source
SIMD 128-bit vector instructions. PartialPartial.SIMD instructions are parsed as opaque opcodes and executed by calling the reference implementation. Their meaning is not defined in Rocq.
Source
SIMD instructions are parsed as opaque opcodes and executed by calling the reference implementation. Their meaning is not defined in Rocq. source
GC and reference types The garbage-collection and reference-types proposals. PartialPartial.Wasm 2.0 reference types plus the subtyping rules from the function-references and GC proposals. GC structs and arrays are not covered.
Source
Wasm 2.0 reference types plus the subtyping rules from the function-references and GC proposals. GC structs and arrays are not covered. source

Used by

Toolchains in this index whose proofs are about this model.

No toolchain in the index refers to it yet.

Sources

esc