The software implements a Resolution-based rewriting algorithm from Guarded Tuple Generating Dependencies (GTGDs) to Datalog, along with some functions for running the resulting Datalog rules.
The main functionality of GSat is to compute the saturation of a set of GTGDs. To do this, download the JAR file available with the releases and use the command line:
java -jar guarded-saturation-1.0.0-jar-with-dependencies.jar <syntax> <TGD file>where <syntax> is the one of the syntax dlgp, owl and <TGD file> is a file containing the input GTGDs in the syntax <syntax>.
By default, the output saturation is printed in the console, it can be written to a file instead by setting write_output to true in the file config.properties.
Consider a DLGP file example.dlgp that contains the following two TGDs:
b(X, Y), c(Y) :- a(X).
d(X) :- b(X, Y), c(Y).
Calling:
java -jar guarded-saturation-1.0.0-jar-with-dependencies.jar dlgp example.dlgpreturns the saturation containing:
b(X, Y), c(Y) :- a(X).
d(X) :- a(X).
This project implements different saturation algorithms. You can set the algorithm to use by changing saturation_alg's value in the file config.properties to either:
gsat(default) corresponding toExbDRin the articleskolem_satcorresponding toSkolemDRhyper_satcorresponding toHyperDRsimple_satcorresponding toSimDRordered_skolem_satalso calledKAON3
Additionally, KAON2 can be used to get the saturation of the set of TGDs in an OWL file using the following command:
java -cp guarded-saturation-1.0.0-jar-with-dependencies.jar "uk.ac.ox.cs.gsat.ExecutorOWL" <OWL file> <timeout>where the <timeout> is expressed in seconds.
To build the software we require
Kaon2 is only relevant for some experiments, and is not part of the delivered product.
- Download from PDQ releases
- pdq-common-1.0.0.jar
- Install as in the official documentation
mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile="pdq-common-1.0.0.jar"
Install the JAR of KAON2 using:
mvn install:install-file -Dfile=./gsat-kaon2/src/main/resources/kaon2.jar -DgroupId=org.semanticweb.kaon2 -DartifactId=kaon2 -Dversion=2008-06-29 -Dpackaging=jar -DgeneratePom=true
If you are a developer and you want to run the tests, you need to:
- Download the "test-all.zip" file from GSat test datasets
- Extract it in the root of the project
Otherwise, you can simply run the download-test-datasets.sh script.
Build the project:
mvn verifyThat's it! If you look in the target subdirectory, you should find the build output.
In addition to what have been said in the usage section ChaseBench format can also be used for the input.
To run on a ChaseBench scenario, you need to specify the cb option and add:
<NAME OF THE SCENARIO>the name of the scenario as in the ChaseBench format- example:
doctors
- example:
<PATH OF THE BASE FOLDER>the directory that contains this scenario- example:
test/ChaseBench/scenarios/doctors
- example:
[<FACT/QUERY SIZE>](optional) the size of the scenario that you want to test- example:
100k
- example:
Check PDM violations and bugs in code:
mvn pmd:check
mvn spotbugs:checkUpdate Maven dependencies and Plugins:
mvn versions:display-dependency-updates
mvn versions:display-plugin-updatesGenerate Javadoc:
mvn javadoc:javadocExperiments are available in a submodule, which may be large. You can initialize the experiments folder using:
git submodule initHere you can download the files used in our experiments.
Information Systems Group — Department of Computer Science — University of Oxford
This project is licensed under the MIT License