SRA-SiliconValley/jalangi — pull request #40 by msridhar (2014-01-21 22:05:32+00:00)
Title: Add top-level API for Jalangi

This is initial work on making Jalangi invokable via an API. The initial API is in `jalangi.js`, and you can see a use in `node_test/unitTests.js`. Notes on changes:

* All uses of environment variables (`JALANGI_MODE`, etc.) have been removed. Instead, we have a `record.js` driver for recording under node, `replay.js` for replaying, and `symbolic.js` for doing direct symbolic analysis. We no longer generate instrumentation inside scripts to pull in `analysis.js`, etc.; record and replay must be done via the drivers or the API.
* `jalangi.js` achieves isolation from the effects of recorded / replayed scripts by running them in a sub-process.
* The core tests run faster, since we only record each test once, and then use the same trace to run with no analysis and with the track-values analysis. Eventually, we may want to just run with track-values; it's unclear to me that running with no analysis will expose further regressions.
* There are outstanding TODOs. In particular, we need to support recording node programs with command-line arguments, and we need to add a proper API whereby client analyses can return their result as an object instead of just printing it or dumping it to a file. But, I wanted to merge back these changes now that I have the regression tests passing, and then go from there.

*