This tool shows the values of variables in the execution.
Each variable contains the values at most "k" times. (You can set "k" when you execute logger named selogger)
You can read the detail Implementation here .
Our tool comprises three components: trace recorder, post-processor, and interactive view.
Interactive view demo is available at http://sel-nod3v.ics.es.osaka-u.ac.jp and instructions are described in the viewer section of wiki page.
Try our sample and viewer following wiki page.
Clone our repository.
$ git clone https://github.com/k-shimari/nod4j.git
After cloning, prepare nod4j.jar
and selogger-0.2.3.jar
in this project root.
nod4j.jar
is available on releases page.selogger-0.2.3.jar
is already included in this project root.If you want to build them by yourself, follow the next section.
To build nod4j.jar
, a post-processor component, run Maven and you can find it in target/
directory.
$ mvn package
To build selogger-0.2.3.jar
, a recorder component, follow the selogger) page.
Run the following command to collect information about the execution of your program.
$ (prepare something to run your program)
$ java -jar -javaagent:/path/to/selogger-0.2.3.jar=output=/path/to/<EXECUTION_TRACE_OUT> <YOUR_APP.jar>
/path/to/<EXECUTION_TRACE_OUT>
is the directory that you want to output the execution trace.
After running your program for a while, you can get the execution trace in /path/to/<EXECUTION_TRACE_OUT>
.
If you are using a build tool like maven to run the target program, pass the same option to java. (A sample in the project wiki contains an example of running with maven.)
Change directory back to the cloned project root and run nod4j.jar
to convert the execution trace in the format of JSON.
$ cd /path/to/nod4j
$ java -jar nod4j.jar /path/to/<YOUR_PROJECT_DIRECTORY> /path/to/<EXECUTION_TRACE_OUT> <PROJECT_ROOT>/src/main/frontend/src/assets/project/<YOUR_PROJECT_NAME>
/path/to/<YOUR_PROJECT_DIRECTORY>
is your project directory which contains the source code./path/to/<EXECUTION_TRACE_OUT>
is the directory contains the execution trace where you specified in the previous step.<PROJECT_ROOT>/src/main/frontend/src/assets/project/<YOUR_PROJECT_NAME>
is the output destination for this command.
You can find fileinfo.json
and varinfo.json
at <PROJECT_ROOT>/src/main/frontend/src/assets/project/<YOUR_PROJECT_NAME>
.
fileinfo.json
contains the information of source code.
varinfo.json
contains the information of values of variable.
Run the following commands to install the packages.
$ cd src/main/frontend
$ npm install
Run the following commands to build the project and start the server. If the execution trace in the assets directory has changed, re-run from here.
$ npm run build
$ npm run server
INSTRUCTION FILTER
and delete filters by clicking buttons.Clicking ALL LOGS
button, you can see all raw execution trace.
ID
is a unique ID for each source code location.Line
means the line number of the variable and Variable
means the variable name.Seqnum
is the sequence number of the instruction and Data
is the value of variable.ALL LOGS
button in view.