java-ranger

Java Ranger is a path-merging extension of Symbolic PathFinder

View the Project on GitHub vaibhavbsharma/java-ranger

Understanding Java Ranger’s source code

This wiki is a supplemental resource to understanding Java Ranger’s source code. The primary resource to understanding all things Java Ranger is here: https://vaibhavbsharma.github.io/java-ranger/

Java Ranger (JR) avoids path explosion by summarizing fragment of code into a constraint that can be added on the path condition. The primary entry point to Java Ranger’s instantiation is the VeritestingListener. It writes the region’s outputs to local variables, fields, array entries, and the stack out. It also updates the path condition and advances SPF to the end of the region.

Most of Java Ranger’s transformations happen in FixedPointWrapper, which iterates through different transformations until a fixed point on the summary is reached. These transformations are implemented using the visitor pattern.

JR also implements the single-path cases (called SPFCases in the implementation) through StaticPCChoiceGenerator, which allows JR to explore unsummarized behaviors of the region.

JR has two instances of the region, a StaticRegion and a DynamicRegion. StaticRegion includes no runtime information and DynamicRegion is where instantiation-time information is found. Initially, JR creates the StaticRegion representing the fragment of the code that is about to be executed, this is done through the JITAnalysis. All Static Regions encounter are cached into VeritestingMain.veriRegions HashMap. . JR then applies different transformations on it using the FixedPointWrapper, to turn the static region into a dynamic one, and finally to turn the dynamic region into a constraint. Finally, JR decides which parts have not completely been summarized and creates a choice for them using StaticBranchChoiceGenerator.

For more information please refer to the Java documentation of JR found here: https://vaibhavbsharma.github.io/java-ranger/docs/index.html.