To build and run this project correctly, you need a Java 8 environment, and we use Maven as the build system.
- Java 8
- OS: We build and test our program on Linux systems such as Ubuntu and macOS. The program should work fine on Windows, but we didn't test it.
You can clone our project from Github:
git clone https://github.com/sa-group-yzz/sql_analysis.git
We offer a variety of ways to build the application.
You can use the Docker image to run our program. The advantage of using docker is that you can directly run and test our program and do not need to configure the running environment. You need to install Docker. Then, you can run the docker image by using the following command:
docker run -it --rm zzctmac/sql_analysis:v1 /bin/bash
Note that the first time you run the above command, docker needs to download this image since this image does not exist on your local computer. The time cost will be 1 to 10 minutes (depending on your Internet speed).
⚠️ You can skip this step, we have provided a pre-compiled jar package in sql_analysis.
The SQLAnalysis is the SAND-NG module in our project, we already provide you a pre-compiled jar package in the sql_analysis git repository, but also if you want to build from the basement, you can build the SQLAnalysis.
First, you need to clone the SQLAnalysis project from Github:
git clone https://github.com/sa-group-yzz/SQLAnalysis.git
After that you can use Maven to build the SQLAnalysis package:
mvn -B package --file pom.xml
You can get the jar package in the target folder, the name of the jar package for the current edition SQLAnalysis is SQLAnalysis-1.1.jar
. Then you can copy this package into the sa-group-yzz project. The path is src/main/java/lib
.
./compile.sh
java -jar ./target/analysis-1.0-SNAPSHOT-jar-with-dependencies.jar -a ./assertions -t ./target/test-classes -c Case1
(Time: about 40s)
./run_test.sh
(Time: about 10min)