Warning - This repository is no longer maintained. Instead, please use ESMeta, a rebranded version of JISET.
JISET is a JavaScript IR-based Semantics Extraction Toolchain. It is the first tool that automatically synthesizes parsers and AST-IR translators directly from a given language specification, ECMAScript.
Details of the JISET framework are available in our papers:
- [ASE 2020] JISET: JavaScript IR-based Semantics Extraction Toolchain
- [ICSE 2021] JEST: N+1-version Differential Testing of Both JavaScript Engines
- [ASE 2021] JSTAR: JavaScript Specification Type Analyzer using Refinement
We explain how to install JISET with necessary environment settings from
scratch. Before installation, please download JDK 8 and
sbt.
$ git clone https://github.com/kaist-plrg/jiset.gitInsert the following commands to ~/.bashrc (or ~/.zshrc):
# for JISET
export JISET_HOME="<path to JISET>" # IMPORTANT!!!
export PATH="$JISET_HOME/bin:$PATH" # for executables `jiset` and etc.
source $JISET_HOME/jiset-auto-completion # for auto completionThe <path to JISET> should be the absolute path of the JISET repository.
$ cd jiset && git submodule init && git submodule update && sbt assemblyExtract and generate a model from ECMAScript 2021 (ES12 / es2021):
$ jiset gen-model -extract:version=es2021
# ========================================
# extract phase
# ----------------------------------------
# version: es2021
# parsing spec.html... (10,476 ms)
# ========================================
# gen-model phase
# ----------------------------------------
# generating models... (240 ms)Create the following JavaScript file sample.js:
// sample.js
var x = 1 + 2;
print(x);Parse sample.js:
$ jiset parse sample.js
# ========================================
# parse phase
# ----------------------------------------
# var x = 1 + 2 ; print ( x ) ;Evaluate sample.js:
$ jiset eval sample.js -silent
# 3.0Show the details and final results of the evaluation of sample.js:
$ jiset eval sample.js -debugYou can run the artifact with the following command:
$ jiset <sub-command> <option>*with the following sub-commands:
helpshows the help message.extractextracts an ECMAScript model fromecma262/spec.html.gen-modelgenerates ECMAScript models.compile-replperforms REPL for printing the compile result of a particular step.gen-testgenerates tests with the current implementation as the oracle.parseparses a JavaScript file using the generated parser.loadloads a JavaScript AST to the initial IR states.evalevaluates a JavaScript file using the generated interpreter.filter-metaextracts and filters out metadata of test262 tests.parse-irparses an IR file.load-irloads an IR AST to the initial IR states.eval-irevaluates an IR file.repl-irperforms REPL for IR instructions.build-cfgbuilds control flow graphs (CFGs).
and global options:
-silentdoes not show final results.-debugturns on the debug mode.-interactiveturns on the interactive mode.-no-bugfixuses the semantics including specification bugs.-timedisplays the duration time.
ECMAScript Debugger extends the interpreter of JISET to help you understand how a JavaScript Program runs in ECMAScript. Currently, it is in an alpha stage and supports only basic features such as:
- Step-by-step execution of ECMAScript
- Breakpoints by abstract algorithm names in ECMAScript
- Visualization of states like a call stack, an environment, and a heap of ECMAScript
- Line-by-line execution of JavaScript
A short introduction video is available.
You can try ECMAScript Debugger with the following instructions in the $JISET_HOME directory:
First, you should check out to the editor branch to use ECMAScript Debugger.
$ git checkout editor && git submodule update && sbt assemblyNext, you should start a server.
$ jiset webFinally, start a debugger client.
$ cd web && npm install && npm startWe have the following future plans:
- Add more debugger features:
- Show a JavaScript state by refining an ECMAScript state.
- Record timestamps during execution for resume & suspend steps (especially for Generator).
- ...
- Show relevant test262 tests for each algorithm step in the specification viewer.
- Show the type of each variable using the type analysis result of JSTAR.
- Live-edit of "spec.html" in the specification viewer.

