Skip to content
Snippets Groups Projects
Commit 99bc5187 authored by Alex Cook's avatar Alex Cook
Browse files

updated readme

parent 873f7b34
Branches main
No related tags found
No related merge requests found
Pipeline #128970 passed with stage
in 10 seconds
placeholder
\ No newline at end of file
# Parity Analysis Tool
## Overview
This project uses the [Checker Framework](https://checkerframework.org/) data analysis API to conduct a parity dataflow analysis
on target methods within Java source files.
## Usage
This project uses the gradle build system. To build use the command:
(Note this command both boths and runs test cases)
```bash
./gradlew build
```
To run test cases independently:
```bash
./gradlew test
```
To run the analysis on a specific file and method:
(Note output is a .dot file)
```bash
./gradlew run --args="-i src/main/java/SimpleTest.java -c SimpleTest -m simpleMethod -o ./output"
```
- `-i`, `--inputFile` : The Java source file to analyze.
- `-c`, `--className` : The class containing the method.
- `-m`, `--methodName` : The method to analyze within the specified class.
- `-o`, `--outputDir` : The output directory for analysis results.
public class SimpleTest {
public void simpleMethod() {
int x = 2; // EVEN
int y = 3; // ODD
int z;
if (x > y) {
z = x*y + 1;
} else {
z = x/y + 1;
public void simpleMethod(int r) {
int x = 1;
while (x <= 10) {
x = x + 1;
}
z = z + 1;
}
}
......
public class DivisionTest {
public void divideNumbers() {
int z = 9;
int z = 8;
z = z / 2;
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment