Reference. Indexed Types for a Statically Safe WebAssembly

We present Wasm-precheck, a superset of WebAssembly (Wasm) that uses indexed types to express and check simple constraints over program values. This additional static reasoning enables safely removing dynamic safety checks from Wasm, such as memory bounds checks. We implement Wasm-precheck as an extension of the Wasmtime compiler and runtime, evaluate the run-time and compile-time performance of Wasm-precheck vs Wasm configurations with explicit dynamic checks, and find an average run-time performance gain of 1.71 x faster in the widely used PolyBenchC benchmark suite, for a small overhead in binary size ( 7.18 % larger) and type-checking time (1.4% slower). We also prove type and memory safety of Wasm-precheck, prove Wasm safely embeds into Wasm-precheck ensuring backwards compatibility, prove Wasm-precheck type-erases to Wasm, and discuss design and implementation trade-offs.

Cite

Cite as @geller-2024-indexed (helia, typst) · \cite{geller-2024-indexed} (LaTeX)
BibTeX
bibtex · 1 line
@article{geller-2024-indexed, title={Indexed Types for a Statically Safe WebAssembly}, volume={8}, ISSN={2475-1421}, url={http://dx.doi.org/10.1145/3632922}, DOI={10.1145/3632922}, number={POPL}, journal={Proceedings of the ACM on Programming Languages}, publisher={Association for Computing Machinery (ACM)}, author={Geller, Adam T. and Frank, Justine and Bowman, William J.}, year={2024}, month=Jan, pages={2395–2424} }
hayagriva YAML (typst)
yaml · 19 lines
geller-2024-indexed:
  type: article
  title: Indexed Types for a Statically Safe WebAssembly
  author:
  - Geller, Adam T.
  - Frank, Justine
  - Bowman, William J.
  date: 2024-01
  page-range: 2395-2424
  url: http://dx.doi.org/10.1145/3632922
  serial-number:
    doi: 10.1145/3632922
    issn: 2475-1421
  parent:
    type: periodical
    title: Proceedings of the ACM on Programming Languages
    publisher: Association for Computing Machinery (ACM)
    issue: POPL
    volume: 8
geller-2024-indexed reference entries/refs/geller-2024-indexed/geller-2024-indexed.hel