Wiki | Configuring | Checkers | Develop | Mailing List
This repository contains dynamic analyses for JavaScript code based on Jalangi2. It mainly consists of analyses ported from JITProf and DLint.
DLint is a tool for dynamically checking JavaScript coding practices.
Briefly speaking, JSHint, JSLint and ESLint uses static analysis (scan the code) to find bad coding practices, while DLint uses dynamic analysis (by analysing runtime behavior) to do the detection.
By analyzing runtime information, DLint is capable of capturing violations of coding practices missed by those static analysis tools.
For more details, a Wiki page is available.
Academic Resources: Preprint in ISSTA'15 | Presentation Slides | Technical Report | Bibtex
JITProf is a tool that tells you which part of your JavaScript code may be slow on JIT-engine. We call those slow code JIT-unfriendly code.
For more details, see this GitHub repository.
Academic Resources: Preprint in ESEC/FSE'15 | Presentation Slides | Technical Report | Bibtex
Visualizing JIT-unfriendly Code: For more details, see here.
Make sure that your computer meets these requirements.
To run analyses with Jalangi2 on real-world websites, you need to install:
- mitmproxy For more details, please read this document.
To install, type the following commands in your console:
git clone https://github.com/ksen007/jalangi2analyses.git
cd jalangi2analyses
npm install
All the following commands should be executed under directory jalangi2analyses/
.
node src/js/command/run.js dlint
This command sets a web proxy, open a web page with your browser (e.g., Chrome or Safari).
Click the Jalangi
button on your web page to view the analysis result.
To close the web proxy, simply rerun the above command (See Step-by-Step Guide).
node tests/dlint/runAllTests.js
node src/js/command/run.js jitprof
This command sets a web proxy, open a web page with your browser (e.g., Chrome or Safari).
Click the Jalangi
button on your web page to view the analysis result.
To close the web proxy, simply rerun the above command (See Step-by-Step Guide).
Note: To run JITProf and DLint on node.js, see this Wiki page.
To configure which analysis module to be used, see this Wiki page.
The directory structure and purpose is listed as follows:
jalangi2analyses
|
+ -- doc # documentation files and resources
|
+ -- tests # all test cases for DLint and JITProf
|
+ -- config
| |
| (1) + -- dlint # configuration file for DLint
| |
| (2) + -- JITProf # configuration file for JITProf
|
+ -- scripts # some bash scripts ussed in this project
|
+ -- src/js
|
+ -- command # command script used in the terminal (or console)
|
+ -- analyses
|
(3) + -- dlint # runtime checkers (Jalangi2 analyses) for DLint
|
(4) + -- jitprof # runtime checkers (jalangi2 analyses) for JITProf
|
+ -- utils # built-in analyses of DLint and JITProf
To add a new analysis for DLint, first add a few analysis file that overides the Jalangi2 callbacks in directory (3)
; then add add the file name of the new analysis to the configuration file in directory (1)
. Likewise, to add a new analysis for JITProf, first add a few analysis file that overides the Jalangi2 callbacks in directory (4)
; then add add the file name of the new analysis to the configuration file in directory (2)
.
DLint and JITProf is distributed under the Apache License.