About Past Issues Editorial Board

KAIST
BREAKTHROUGHS

Research Webzine of the KAIST College of Engineering since 2014

Spring 2025 Vol. 24
Computing

JISET: Extracting JavaScript Interpreters from Language Specifications

July 27, 2023   hit 93

JISET: Extracting JavaScript Interpreters from Language Specifications

 

JISET, a JavaScript IR-based Semantics Extraction Toolchain, can automatically synthesize JavaScript interpreters directly from the JavaScript specification, ECMAScript. It detected nine errors in the latest ECMAScript, and three errors in the next ECMAScript.

 

Article | Special Issue

 

 

JavaScript is one of the most widely-used programming languages, and it is the top-ranked language used in active GitHub open-source repositories. However, because of its extremely dynamic features and complex semantics, developers often make mistakes that may lead to app crashes or private information leakage. To build correct JavaScript programs, the main source that developers rely on is ECMAScript, the JavaScript language specification. In addition to JavaScript programmers, JavaScript engine developers should consult with ECMAScript for the language semantics.

The problem is since ECMAScript is written in an ambiguous natural language, English, programmers and engine developers may misunderstand the semantics, and even the specification itself may contain human errors. More importantly, because ECMAScript has been released annually since 2015, engine developers should understand revisions in the specification and reimplement JavaScript interpreters every year.

To address this problem, Prof. Sukyoung Ryu’s team at the KAIST School of Computing has developed JISET, a JavaScript IR-based Semantics Extraction Toolchain. As the Main Figure illustrates, JISET first extracts the syntax and semantics of JavaScript from ECMAScript. From the extracted information, it automatically synthesizes JavaScript interpreters that evaluate JavaScript programs.

Using the generated interpreters, the research team found nine errors in the latest ECMAScript, four of which are newly discovered and are planned to be fixed in the next version. The team also found three errors in the next ECMAScript.

Prof. Ryu and her two PhD students, Jihyeok Park and Jihee Park, and one undergraduate student, Seungmin An, published this original research in the Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering (ASE) 2020. In future work, they plan to use JISET to generate diverse JavaScript code to detect more errors in ECMAScript and various JavaScript engines (https://conf.researchr.org/details/ase-2020/ase-2020-papers/77/JISET-JavaScript-IR-based-Semantics-Extraction-Toolchain).