guarded-saturation
Resolution-based rewriting algorithm from Guarded Tuple Generating Dependencies (GTGDs) to Datalog
Science Score: 52.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
✓Institutional organization owner
Organization krr-oxford has institutional domain (www.cs.ox.ac.uk) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.5%) to scientific vocabulary
Repository
Resolution-based rewriting algorithm from Guarded Tuple Generating Dependencies (GTGDs) to Datalog
Basic Info
- Host: GitHub
- Owner: KRR-Oxford
- License: mit
- Language: Java
- Default Branch: master
- Homepage: https://KRR-Oxford.github.io/Guarded-saturation
- Size: 51.1 MB
Statistics
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 9
- Releases: 4
Metadata Files
README.md
Guarded-saturation
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.
Saturating
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:
bash
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.
Example
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:
bash
java -jar guarded-saturation-1.0.0-jar-with-dependencies.jar dlgp example.dlgp
returns the saturation containing:
b(X, Y), c(Y) :- a(X).
d(X) :- a(X).
The choice of the saturation algorithm
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:
bash
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.
Compilation (For developers)
Prerequisites
To build the software we require
Kaon2 is only relevant for some experiments, and is not part of the delivered product.
Installing PDQ in Maven
- 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"
Installing KAON 2
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
Installing
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:
sh
mvn verify
That's it! If you look in the target subdirectory, you should find the build output.
Running the saturation on Chase Bench
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:
Useful Maven commands for developers
Check PDM violations and bugs in code:
```sh mvn pmd:check
mvn spotbugs:check ```
Update Maven dependencies and Plugins:
```sh mvn versions:display-dependency-updates
mvn versions:display-plugin-updates ```
Generate Javadoc:
sh
mvn javadoc:javadoc
Experiments
Experiments are available in a submodule, which may be large. You can initialize the experiments folder using:
sh
git submodule init
Here you can download the files used in our experiments.
Credits
Information Systems Group — Department of Computer Science — University of Oxford
License
This project is licensed under the MIT License
Owner
- Name: KRR
- Login: KRR-Oxford
- Kind: organization
- Location: Oxford
- Website: http://www.cs.ox.ac.uk/isg/krr/
- Repositories: 8
- Profile: https://github.com/KRR-Oxford
Knowledge Representation and Reasoning Group - University of Oxford
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Benedikt" given-names: "Michael" orcid: "https://orcid.org/0000-0003-2964-0880" - family-names: "Buron" given-names: "Maxime" orcid: "https://orcid.org/0000-0002-8227-4771" - family-names: "Germano" given-names: "Stefano" orcid: "https://orcid.org/0000-0001-6993-0618" - family-names: "Kappelmann" given-names: "Kevin" orcid: "https://orcid.org/0000-0003-1421-6497" - family-names: "Motik" given-names: "Boris" orcid: "https://orcid.org/0000-0003-2506-4118" title: "Guarded Saturation: Rewriting the Infinite Chase for Guarded TGDs" version: 1.0.0 doi: 10.5281/zenodo.13742500 date-released: 2024-09-10 url: "https://github.com/KRR-Oxford/Guarded-saturation"
GitHub Events
Total
- Delete event: 30
- Issue comment event: 36
- Push event: 3
- Pull request event: 46
- Create event: 20
Last Year
- Delete event: 30
- Issue comment event: 36
- Push event: 3
- Pull request event: 46
- Create event: 20
Dependencies
- actions/checkout v3 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
- fr.lirmm.graphik:graal-io-dlgp 1.3.1
- fr.lirmm.graphik:graal-io-owl 1.3.1
- fr.lirmm.graphik:graal-io-rdf 1.3.1
- fr.lirmm.graphik:graal-io-sparql 1.3.1
- net.sourceforge.owlapi:owlapi-apibinding 4.0.1
- org.semanticweb.kaon2:kaon2 2008-06-29
- uk.ac.ox.cs.pdq:pdq-common 2.0.0
- org.junit.jupiter:junit-jupiter-engine 5.9.2 test