-
Notifications
You must be signed in to change notification settings - Fork 9
Developer Guide
Liang Gong edited this page May 1, 2015
·
1 revision
Note: The framework in this repository uses Jalangi2 analysis API from Jalangi2.
(Do not use APIs from the first version of Jalangi.)
To add a new analysis:
- Add a .js file that implements the analysis to
src/js/analyses/dlint
. At the end of the execution, each analysis passes DLintWarnings to the DLint object (see existing analyses). - Add the analysis to
config/dlint/analyses
. - Add tests for the analysis (see below).
See this Wiki page.
Each analysis should have two kinds of tests:
- Example programs that should trigger a warning. For node.js tests, add such programs to
tests/dlint
and name the file so that it starts withbuggy_TheAnalysisName
, For browser tests, add such programs totests/html/dlint
in a directory that starts withbuggy_TheAnalysisName
. - Example programs that should not trigger a warning. For node.js tests, add such programs to
tests/dlint
and name the file so that it starts withokay_TheAnalysisName
. For browser tests, add such programs totests/html/dlint
in a directory that starts withokay_TheAnalysisName
.
To run all node.js tests (verbose
and debug
are optional):
node tests/dlint/runAllTests.js [ verbose | debug ]
To add a new analysis:
- Add a .js file that implements the analysis to
src/js/analyses/jitprof
. At the end of the execution, each print the warnings (see existing analyses). - Add the analysis to
config/jitprof/analyses
.
See this Wiki page.
Doc maintained by Liang Gong