paperbot · PL 论文追踪

全部论文 待读 收藏

P2 JSTAR: JavaScript Specification Type Analyzer using Refinement

JSTAR:使用精化的 JavaScript 规范类型分析器
ASE 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)2021匹配度 4/10 · 该论文属于传统静态分析/抽象解释方向,其基于条件的精化(condition-based refinement)方法与用户对静态分析的技术兴趣有方法论上的交集,并具备工业落地(TC39 规范缺陷检测)与问题驱动的特点;但其分析对象是 ECMAScript 规范而非 ML 系统或 Agentic 程序,且不含 LLM、浮点程序分析或贝叶斯程序分析要素,与画像中的核心问题(PL↔AI 交叉、浮点、贝叶斯)不直接匹配。引用 7 inbox
Jihyeok Park, Seungmin An, Wonho Shin, Yusung Sim, Sukyoung Ryu
crossref: 2026-09-12

AI 速览

一句话:首个对 ECMAScript 规范做类型分析并检测规范缺陷的工具,借助基于条件的精化提升分析精度。

ECMAScript 规范频繁更新,其类型相关的错误只能由 TC39 人工评审,缺乏自动化检查手段。本文提出 JSTAR:它把规范中以结构化自然语言描述的抽象算法编译为无类型中间表示 IRES 中的函数,再结合 ECMAScript 规范类型对函数做类型分析;为提升精度,作者提出基于条件的精化,利用断言与分支条件剪除不可行的抽象状态。分析结果输入由四个检查器组成的缺陷检测器以发现规范缺陷。作者在 2018–2021 年官方仓库全部 864 个版本上评估,每版平均耗时 137.3 秒,检出 157 个类型相关规范缺陷,精度 59.2%(93 个为真实缺陷),其中 14 个为新发现且均获 TC39 确认。

问题
ECMAScript 规范更新频繁,其中类型相关的错误可能导致引擎实现出错,但当前规范更新只能由 TC39 人工评审,缺少自动化检查工具。
方法
将规范中结构化自然语言写的抽象算法编译到无类型中间表示 IRES,结合规范类型做类型分析,并用基于条件的精化利用断言与分支条件剪除不可行抽象状态,最后由四个检查器检测规范缺陷。
评估
在 2018–2021 年官方 ECMAScript 仓库全部 864 个版本上运行,平均每版耗时 137.3 秒,检出 157 个类型相关规范缺陷,精度 59.2%(93 个真实缺陷),其中 14 个为新发现并全部被 TC39 确认。
原文摘要(Abstract)

JavaScript is one of the mainstream programming languages for client-side programming, server-side programming, and even embedded systems. Various JavaScript engines developed and maintained in diverse fields must conform to the syntax and semantics described in ECMAScript, the standard specification of JavaScript. Since an incorrect description in ECMAScript can lead to wrong JavaScript engine implementations, checking the correctness of ECMAScript is critical and essential. However, all the specification updates are currently manually reviewed by the Ecma Technical Committee 39 (TC39) without any automated tools. Moreover, in late 2014, the committee announced the yearly release cadence and open development process of ECMAScript to quickly adapt to evolving development environments. Because of such frequent updates, checking the correctness of ECMAScript becomes more labor-intensive and error-prone.To alleviate the problem, we propose JSTAR, a JavaScript Specification Type Analyzer using Refinement. It is the first tool that performs type analysis on JavaScript specifications and detects specification bugs using a bug detector. For a given specification, JSTAR first compiles each abstract algorithm written in a structured natural language to a corresponding function in IRES, an untyped intermediate representation for ECMAScript. Then, it performs type analysis for compiled functions with specification types defined in ECMAScript. Based on the result of type analysis, JSTAR detects specification bugs using a bug detector consisting of four checkers. To increase the precision of the type analysis, we present condition-based refinement for type analysis, which prunes out infeasible abstract states using conditions of assertions and branches. We evaluated JSTAR with all 864 versions in the official ECMAScript repository for the recent three years from 2018 to 2021. JSTAR took 137.3 seconds on average to perform type analysis for each version, and detected 157 type-related specification bugs with 59.2% precision; 93 out of 157 bugs are true bugs. Among them, 14 bugs are newly detected by JSTAR, and the committee confirmed them all.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6539,
  title = {JSTAR: JavaScript Specification Type Analyzer using Refinement},
  author = {Jihyeok Park and Seungmin An and Wonho Shin and Yusung Sim and Sukyoung Ryu},
  booktitle = {ASE},
  year = {2021},
  doi = {10.1109/ase51524.2021.9678781}
}