一句话:将 ECMA-262 可视化为交互式界面,并提供示例程序、调用路径与可恢复溯源调试来理解 JavaScript 规范。
ECMA-262 是 JavaScript 官方语言规范,以冗长且高度嵌套的说明描述语言语义,读者常因复杂边界情况而难以理解。JSSpecVis 提出一种交互式网页界面,将规范各部分与示例程序关联,并允许读者选择调用路径上下文,以直观展示边界情况。该工具还支持在规范上进行 JavaScript 程序的交互式执行,并引入名为 resume 与 provenance 的新调试功能,用于高级调试。借助这些功能,JSSpecVis 旨在为初学者提供直观学习环境,并提升专家效率。工具已开源,并提供演示视频;摘要未报告用户实验或定量评估。
ECMA-262 is the official language specification for JavaScript that defines the language semantics in detail. However, readers often struggle to understand the specification due to the intricate edge cases and lengthy, highly nested explanations. To address this issue, we present JSSpecVis, an interactive web interface visualizing the JavaScript language specification. For an intuitive understanding of edge cases, it provides example programs for each part of the specification with a call-path context selected by readers. In addition, it supports the interactive execution of JavaScript programs on the specification with a new debugging feature called resume and provenance for advanced debugging of JavaScript programs. Using these functionalities, JSSpecVis provides an intuitive learning environment for beginners and a powerful productivity for experts. Our tool is open at https://github.com/ku-plrg/js-spec-vis, and the tool demonstration is available at https://youtu.be/xqLPmVVlORQ.