$ sudo apt update $ sudo apt install nodejs npm $ npm install email@example.com firstname.lastname@example.org $ git clone https://github.com/WSP-LAB/Montage $ cd Montage $ pip3 install -r requirements.txt
We provide dataset used in our experiments (Sec. 7.2-7.5) in this repository.
Please refer to this link for writing a configuration file.
Phase I parses each JS file into an AST and then divides the AST into fragments. As a result, Montage represents each JS code as a sequence of fragments on which a neural network language model is trained.
$ cd Montage/src $ python3 main.py --opt preprocess --config CONFIG_PATH
Phase II trains an LSTM model on the fragment sequences obtained from Phase I.
$ cd Montage/src $ python3 main.py --opt train --config CONFIG_PATH
We re-engineered Montage so that a single graphic card could be enough for
training the model. However, if you see an error message saying
RuntimeError: CUDA out of memory, you need to carefully adjust the configuration file such
that it fits the memory size of your graphic card.
Phase III produces new JS tests by leveraging the trained LSTM model and logs whether they elicit bugs from JS engines. Before running Phase III, you need to build a map for identifiers predefined in the harness files.
$ cd Montage/src $ python3 main.py --opt build_map --config CONFIG_PATH $ python3 main.py --opt fuzz --config CONFIG_PATH
To cite our paper: