JSTAR: JavaScript Specification Type Analyzer using Refinement
Jihyeok Park, Seungmin An, Wonho Shin, Yusung Sim, Sukyoung Ryu
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 IR<inf>ES</inf>, 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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext fc3aa4bf-6dd1-4473-9870-d3ef1a6e9f1fCited by top-tier papers5
- Bringing the WebAssembly Standard up to Speed with SpecTecDongjun Youn, Wonho Shin, Jaehyun Lee, Sukyoung Ryu et al.PLDI 2024 · 30 citations
- Automatically deriving JavaScript static analyzers from specifications using Meta-level static analysisJihyeok Park, Seungmin An, Sukyoung RyuFSE 2022 · 10 citations
- Feature-Sensitive Coverage for Conformance Testing of Programming Language ImplementationsJihyeok Park, Dongjun Youn, Kanguk Lee, Sukyoung RyuPLDI 2023 · 3 citations
- Detecting Inconsistencies in Arm CCA's Formally Verified SpecificationChangho Choi, Xiang Cheng, Bokdeuk Jeong, Taesoo KimASPLOS 2026
- P4-SpecTec: Integrating a Language Mechanization Framework into the Real-World P4 SpecificationJaehyun Lee, Seokhun Jeong, Sehyuk Ahn, Haechan Kwon et al.OOPSLA 2026
Builds on4
- Automated conformance testing for JavaScript engines via deep compiler fuzzingGuixin Ye, Zhanyong Tang, Shin Hwei Tan, Songfang Huang et al.PLDI 2021 · 75 citations
- JEST: N+1 -version Differential Testing of Both JavaScript Engines and SpecificationJihyeok Park, Seungmin An, Dongjun Youn, Gyeongwon Kim et al.ICSE 2021 · 24 citations
- JISET: JavaScript IR-based Semantics Extraction ToolchainJihyeok Park, Jihee Park, Seungmin An, Sukyoung RyuASE 2020 · 20 citations
- BaseSpec: Comparative Analysis of Baseband Software and Cellular Specifications for L3 ProtocolsEunsoo Kim, Dongkwan Kim, CheolJun Park, Insu Yun et al.NDSS 2021
Related papers
- CodeAlchemist: Semantics-Aware Code Generation to Find Vulnerabilities in JavaScript EnginesHyungSeok Han, DongHyeon Oh, Sang Kil ChaNDSS 2019 · 178 citations
- IRIDIUM: A Framework for Statically Optimizing JavaScript ProgramsMeetesh Kalpesh Mehta, Anirudh Garg, Aneeket Yadav, Manas ThakurOOPSLA 2026
- FUZZILLI: Fuzzing for JavaScript JIT Compiler VulnerabilitiesSamuel Groß, Simon Koch, Lukas Bernhard, Thorsten Holz et al.NDSS 2023
- SoFi: Reflection-Augmented Fuzzing for JavaScript EnginesXiaoyu He, Xiaofei Xie, Yuekang Li, Jianwen Sun et al.CCS 2021 · 34 citations
- An Empirical Study of Bugs in WebAssembly CompilersAlan Romano, Xinyue Liu, Yonghwi Kwon, Weihang WangASE 2021 · 43 citations
