This tool analyzes Java applications to identify dependencies on environmental factors such as program arguments, system properties, and environment variables. It is particularly useful for assessing the suitability of applications for Coordinated Restore at Checkpoint (CRaC).
- Java Development Kit (JDK) 17 or higher
- Maven
Clone the repository and build the project using Maven:
git clone https://github.com/azul-research/crac-value-tracking.git
cd crac-value-tracking
mvn clean packageRun the analysis tool with the following arguments:
- Path to the .jar file to analyze
- Fully qualified name of the main class
- Output file name for the backward analysis JSON report
- Output file name for the forward analysis JSON report
Example:
java -cp target/crac-value-tracking.jar \
org.example.UnsafeCodeAnalysis \
path/to/application.jar \
com.example.Main \
backward.json \
forward.jsonResult will be saved to files backward.json and forward.json
The tool produces two JSON files:
- backward.json: Information about static fields and their environmental dependencies.
- forward.json: Details on local variables and their reliance on external inputs. These reports help in understanding how the application interacts with its environment, which is crucial for CRaC compatibility.
Before running test, jar-generation.sh should be executed
To add new test:
- add new test case to cases
- increment
testNumberin CRaCValueTrackerTest.java - execute jar-generation.sh
- run CRaCValueTrackerTest.java
Author: Daria Suvorova (Azul Cyprus Summer 2024 internship)
Mentor: Anton Kozlov
BSD 2-Clause "Simplified" License