Reference. Iris-WasmFX: Modular Reasoning for Wasm Stack Switching
WasmFX is a proposed extension of Wasm, a low-level portable bytecode, with primitives for explicitly manipulating execution stacks as continuations. By exposing an interface of effect handlers, WasmFX enables non-local control flow features to be compiled in a modular way: one handcrafts a library that directly implements such features in WasmFX, and compilation then merely calls into the library. Alas, code involving non-local control flow is notoriously challenging, and so this proposal raises the questions of the soundness of the language extension, and of the correctness of such handcrafted libraries. In this paper, we first describe WasmFXCert, a mechanisation of WasmFX in Rocq, and prove the expected type soundness result. We then develop Iris-WasmFX, a program logic to reason about Wasm programs that use effect handlers, and illustrate its application to two key use cases of effect handlers: a coroutine library, and a generator. Together, these validate the design of WasmFX, and provide a modular framework for verifying future effect-based libraries.
Cite
Cites 42 works (1 here)
With notes (1)
Iris from the ground up: A modular foundation for higher-order concurrent separation logic jung_etal_iris_ground_up_2018
Iris is a framework for higher-order concurrent separation logic, which has been implemented in the Coq proof assistant and deployed very effectively in a wide variety of verification projects. Iris was designed with the express goal of simplifying and consolidating the foundations of modern separation logics, but it has evolved over time, and the design and semantic foundations of Iris itself have yet to be fully written down and explained together properly in one place. Here, we attempt to fill this gap, presenting a reasonably complete picture of the latest version of Iris (version 3.1), from first principles and in one coherent narrative.
External (41)
- Artefact for Iris-WasmFX: Modular Reasoning for Wasm Stack Switching (2026)
- Formal Semantics and Program Logics for a Fragment of OCaml (2025)
- Github discussion on WasmFX bug (2025)
- Experience Report: Stack Switching in Wasm SpecTec. presented at WAW: the WebAssembly Workshop (2025)
- Stack Switching WebAssembly proposal (2025)
- SpecTec has been adopted (2025)
- Osiris: Towards Formal Semantics and Reasoning for OCaml (2025)
- An Adjoint Separation Logic for the Wasm Call Stack. presentation at Discussions at Dagstuhl Seminar 25241: Utilising and Scaling the WebAssembly Semantics (2025)
- RichWasm: Bringing Safe, Fine-Grained, Shared-Memory Interoperability Down to WebAssembly (2024)
- Iris-MSWasm: Elucidating and Mechanising the Security Invariants of Memory-Safe WebAssembly (2024)
- Bringing the WebAssembly Standard up to Speed with SpecTec (2024)
- Introducing the WebAssembly JavaScript Promise Integration API (2024)
- VMSL: A Separation Logic for Mechanised Robust Safety of Virtual Machines Communicating above FF-A (2023)
- MSWasm: Soundly Enforcing Memory-Safe Execution of Unsafe Code (2023)
- Continuing WebAssembly with Effect Handlers (2023)
- Iris-Wasm: Robust and Modular Verification of WebAssembly Programs (2023)
- Osiris: an Iris-based program logic for OCaml (2023)
- WebAssembly (Release 2.0) (2023)
- Proof of Programs with Effect Handlers (2022)
- A Faithful Description of ECMAScript Algorithms (2022)
- Exception Handling Proposal for WebAssembly (2022)
- A separation logic for effect handlers (2021)
- Verifying an Effect-Handler-Based Define-By-Run Reverse-Mode AD Library (2021)
- Two Mechanisations of WebAssembly (2021)
- Typed Continuations: A Basis for Stack-switching in Wasm (2021)
- Issue #1359: Typed continuations to model stacks (2020)
- Stacks and Continuations for Wasm — Idea Sketch (2020)
- Mechanized relational verification of concurrent programs with continuations (2019)
- WebAssembly (Release 1.0) (2019)
- Pause and Resume WebAssembly with Binaryen’s Asyncify (2019)
- Bringing the web up to speed with WebAssembly (2017)
- Concurrent separation logic (2016)
- Handling Algebraic Effects (2013)
- A Tutorial Introduction to the ARM and POWER Relaxed Memory Models (2012)
- x86-TSO: a rigorous and usable programmer's model for x86 multiprocessors (2010)
- Handlers of Algebraic Effects (2009)
- Nested Hoare Triples and Frame Rules for Higher-Order Store (2009)
- The Unlambda Programming Language (2001)
- Language primitives and type discipline for structured communication-based programming (1998)
- The theory and practice of first-class prompts (1988)
- Letters to the editor: go to statement considered harmful (1968)