arrow
Return

Reconstructing Continuation-Passing Semantics for WebAssembly

delete2026-01-01
delete0
PRE
AI
G
Guannan Wei *
B
Bai, Alexander Y.
D
Dinghong Zhong
J
J.J. Zhang
DOI:10.1007/978-3-031-99751-8_9delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
WebAssembly is a popular low-level intermediate representation (IR) and compilation target. The official specification of WebAssembly provides a small-step reduction semantics. Unlike other common low-level IRs, WebAssembly provides structured control-flow constructs, whose reduction rules are complicated by additional administrative instructions in the reference semantics. This paper develops an alternative semantics in continuation-passing style (CPS), which can be implemented as a concise, compositional, and tail-recursive interpreter or CPS transformer. Using continuations from the meta-language eliminates the need for administrative instructions. We further demonstrate that the CPS semantics can be extended to support other forms of control abstractions, such as effect handlers.
Keywords:
WebAssembly
Continuation-passing style
Big-step semantics

Journal

T
TRENDS IN FUNCTIONAL PROGRAMMING, TFP 2025
IF:
0
Papers:
20
Citations:
0

Organization

I
Inria
Scholars:
3.5K
Papers: 2.5K
Citations: 343
U
Universite PSL
Scholars:
3.3W
Papers: 2.5W
Citations: 91