| File | Component | Description |
|---|---|---|
| runner.ts | - | Invokes preprocess.ts, then starts the Jalangi analysis graph-constructor.ts on the preprocessed file |
| preprocess.ts | Preprocessor | Transforms original program by adding break markers |
| control-deps.ts | Control Depedency Helper | Statically find control dependencies induced by conditional branching |
| graph-constructor.ts | Graph Constructor | Jalangi Analysis: Builds Program Execution Graph (PEG) , invokes pruner when done |
| graph-helper.ts | Graph Constructor | Node factory, adding nodes and edges to graph under construction. Used by graph-constructor.ts |
| pruner.ts | Pruner | Given PEG and slicing criterion, find relevant locations and prune irrelevant ones by walking the AST of the transformed program. Then write out the sliced program. |
| datatypes.ts | - | Datatypes |
- node (tested with v12.22.9)
- npm (tested with 6.14.15)
- jalangi 0.2.6 located in directory jalangi2 under project root
foo@bar:~/slicing$ npm i
foo@bar:~/slicing$ cd jalangi2
foo@bar:~/slicing/jalangi2$ npm i
foo@bar:~/slicing/jalangi2$ cd ..
# Run all unit tests
foo@bar:~/slicing$ npm test
...
(41 passing)In scripts subfolder run:
foo@bar:~/slicing/scripts$ node testRunner.js --source ./milestone2_testCases.json
foo@bar:~/slicing/scripts$ node testRunner.js --source ./milestone3_testCases.jsonIn project root run:
foo@bar:~/slicing$ npm test