Bringing the WebAssembly Standard up to Speed with SpecTec

Author:

Youn Dongjun1ORCID,Shin Wonho1ORCID,Lee Jaehyun1ORCID,Ryu Sukyoung1ORCID,Breitner Joachim2ORCID,Gardner Philippa3ORCID,Lindley Sam4ORCID,Pretnar Matija5ORCID,Rao Xiaojia3ORCID,Watt Conrad6ORCID,Rossberg Andreas7ORCID

Affiliation:

1. KAIST, Daejeon, South Korea

2. Independent, Freiburg, Germany

3. Imperial College London, London, United Kingdom

4. University of Edinburgh, Edinburgh, United Kingdom

5. University of Ljubljana, Ljubljana, Slovenia

6. University of Cambridge, Cambridge, United Kingdom

7. Independent, Munich, Germany

Abstract

WebAssembly (Wasm) is a portable low-level bytecode language and virtual machine that has seen increasing use in a variety of ecosystems. Its specification is unusually rigorous – including a full formal semantics for the language – and every new feature must be specified in this formal semantics, in prose, and in the official reference interpreter before it can be standardized. With the growing size of the language, this manual process with its redundancies has become laborious and error-prone, and in this work, we offer a solution. We present SpecTec, a domain-specific language (DSL) and toolchain that facilitates both the Wasm specification and the generation of artifacts necessary to standardize new features. SpecTec serves as a single source of truth — from a SpecTec definition of the Wasm semantics, we can generate a typeset specification, including formal definitions and prose pseudocode descriptions, and a meta-level interpreter. Further backends for test generation and interactive theorem proving are planned. We evaluate SpecTec’s ability to represent the latest Wasm 2.0 and show that the generated meta-level interpreter passes 100% of the applicable official test suite. We show that SpecTec is highly effective at discovering and preventing errors by detecting historical errors in the specification that have been corrected and ten errors in five proposals ready for inclusion in the next version of Wasm. Our ultimate aim is that SpecTec should be adopted by the Wasm standards community and used to specify future versions of the standard.

Funder

NRF

IITP MSIT

Samsung Electronics Co., Ltd

EHOP

Publisher

Association for Computing Machinery (ACM)

Reference95 articles.

1. 2022. ESMeta: An ECMAScript specification metalanguage used for automatically generating language-based tools. https://github.com/es-meta/esmeta

2. Heejin Ahn and WebAssembly Community Group. 2023. Exception Handling Proposal for WebAssembly. https://github.com/WebAssembly/exception-handling/

3. Andreas Rossberg. 2021. Fix variable name typos. https://github.com/WebAssembly/spec/commit/4353b29

4. Andreas Rossberg. 2022. Add missing case for declarative elem segments. https://github.com/WebAssembly/spec/commit/ff149b4

5. Andreas Rossberg. 2023. Fix reduction rule for label. https://github.com/WebAssembly/spec/commit/8f5c489

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3