JalangiLogger records facts about concrete executions of JavaScript programs.
The collection of facts is done as a Jalangi-analysis (see README), and the values are stored as JSON entries in a text file. In this readme, the text file of JSON entries is known as a "log file".
- collected facts are values of expressions, variables and properties at certain locations in programs
- facts are not qualified by contexts, they are purely syntactic
- collected values are rarely concrete values (due to efficiency and space concerns)
- collected values are abstracted wrt. the value lattice of TAJS
- user-allocated objects are abstracted by their allocation site
- many natively allocated objects are abstracted by their canonical name
Log files can be created by instantiating Logger and invoking the run method.
NB: since the javascript part of the project has external dependencies, the command cd javascript; npm install
needs to be run before log files can be created.
- The LogParser contains should be used for reading log files.
- The logger/src/dk/au/cs/casa/jer/entries contains Java files that describes what an entry in a log file can look like (see JavaDoc for further information).
Java version 1.8+ is required to run this implementation.
Example:
Set<IEntry> logEntries = new dk.au.cs.casa.jer.LogParser("myLog.log").getEntries();
The Java classes mentioned above can be bundled in a jar using gradle:
$ ./gradlew jar
$ ls -l build/libs/jalangilogger-*.jar
- Semantic limitations and bugs of Jalangi will influence the logs
- the most serious limitation is the improper treatment of the with-statement
- The exact choice of source locations used in the log files can be discussed, for now it is recommended to work around surprising special cases in the tools that use the log files
Pull requests bug reports on the issue tracker are welcome.