aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md163
1 files changed, 133 insertions, 30 deletions
diff --git a/README.md b/README.md
index 663b6cb..851b9e3 100644
--- a/README.md
+++ b/README.md
@@ -1,47 +1,150 @@
1PAGOdA 1<!-- TITLE -->
2====== 2<p align="center">
3
4<h1 align="center">&middot; ACQuA &middot;</h1>
5
6<p align="center">
7A hybrid architecture for conjunctive query answering overover OWL 2 DL.
8<br/>
9<a href="#">Read the thesis</a>
10&middot;
11<a href="#">Read the journal paper</a>
12&middot;
13<a href="https://github.com/KRR-Oxford/ACQuA/issues">Report bug</a>
14<br/><br/>
15<a href="https://github.com/KRR-Oxford/ACQuA/releases/latest">
16 <img src="https://img.shields.io/github/release/KRR-Oxford/ACQuA.svg?style=for-the-badge" alt="Release badge">
17</a>
18<a href="https://github.com/KRR-Oxford/ACQuA/issues">
19 <img src="https://img.shields.io/github/issues/KRR-Oxford/ACQuA.svg?style=for-the-badge" alt="Issues badge">
20</a>
21<!-- <a href="https://github.com/KRR-Oxford/ACQuA/actions"> -->
22<!-- <img src="https://img.shields.io/github/workflow/status/KRR-Oxford/ACQuA/Scala%20CI/develop?label=TESTS&style=for-the-badge" alt="GitHub Actions badge"> -->
23<!-- </a> -->
24<a href="LICENSE">
25 <img src="https://img.shields.io/github/license/KRR-Oxford/ACQuA.svg?style=for-the-badge" alt="License badge">
26</a>
27<a href="https://doi.org/10.5281/zenodo.6564387">
28 <img src="https://img.shields.io/badge/DOI-10.5281/zenodo.6564387-blue?style=for-the-badge" alt="DOI badge">
29</a>
30</p>
31
32</p>
33
34## About
35
36ACQuA is a hybrid query answering framework that combines black-box services to provide a CQ answering service for OWL.
37Specifically, it combines scalable CQ answering services for tractable languages with a CQ answering service for a more expressive language approaching the full OWL 2.
38If the query can be fully answered by one of the tractable services, then that service is used.
39Otherwise the tractable services are used to compute lower and upper bound approximations, taking the union of the lower bounds and the intersection of the upper bounds.
40If the bounds don’t coincide, then the “gap” answers are checked using the “full” service.
41
42This reference implementation combines [RSAComb], [PAGOdA], and [HermiT], but these tools can be potentially subtituted or augmented with more capable ones to improve the overall performance of the system.
43
44> *Disclaimer:* ACQuA is still in its preliminary stage of development and might contain bugs.
45
46## Preliminaries
47
48RSAComb uses a recent version of [RDFox] under the hood to offload part of the computation.
49
50In order to run ACQuA you need to have RDFox available in your system, along with *a valid license*.
51RDFox is proprietary software and as such we are not able to distribute it along with our code.
52This software has been developed and tested with **RDFox v5.5**.
53
54### Requirements
3 55
4PAGOdA is a conjunctive query answering engine for OWL 2 ontologies. 56- Maven
57- [RSAComb] v1.1.0
58- RDFox v5.5
5 59
60### Installing RDFox
6 61
7Project dependencies/requirements 62We refer to the [official documentation](https://docs.oxfordsemantic.tech/getting-started.html#getting-started) for a step-by-step guide on how to setup RDFox on your personal machine.
8================================= 63In particular, you will need to know the path to the RDFox Java API (usually called `JRDFox.jar`) that comes with the distribution.
9 64
10- This software has been developed for Linux 65Alternatively, run the following commands (on a Linux x86 machine) from the root of the project to install RDFox locally.
11- JavaSE 8 66Download links for other versions, operating systems, and architectures can be found [here][RDFox].
12- Maven 67
68```{.bash}
69mkdir -p lib && pushd lib
70wget https://rdfox-distribution.s3.eu-west-2.amazonaws.com/release/v5.5/RDFox-linux-x86_64-5.5.zip
71unzip RDFox-linux-x86_64-5.5.zip
72ln -s RDFox-linux-x86_64-5.5/lib/JRDFox.jar
73popd
74```
75
76### Providing an RDFox license
77
78The [documentation](https://docs.oxfordsemantic.tech/features-and-requirements.html#license-key), describes several ways to provide the license to RDFox.
79
80One easy way is to put your license key in a file `RDFox.lic` in `$HOME/.RDFox/`, with adequate read permissions for the user executing the program.
81
82
83## Using the software
84
85The project is managed using Maven.
86You can compile the code using the following command
87
88```{#acqua-compile .sh}
89mvn compile
90```
91
92To build a JAR file, package the project as follows
93
94```{#acqua-package .sh}
95mvn package
96```
97
98To run ACQuA from the command line you can use the following command
99
100```{#acqua-run .sh}
101java -cp target/acqua-0.2.0-jar-with-dependencies.jar:<path/to/JRDFox.jar>:<path/to/RSAComb.jar> uk.ac.ox.cs.acqua.Acqua [OPTION ...]
102```
103
104where `path/to/RSAComb.jar` and `path/to/JRDFox.jar` are the paths in your system for `RSAComb.jar` and `JRDFox.jar`, respectively.
105For example to get a help message from the CLI use
106
107```{#acqua-help .sh}
108java -cp target/acqua-0.2.0-jar-with-dependencies.jar:<path/to/JRDFox.jar>:<path/to/RSAComb.jar> uk.ac.ox.cs.acqua.Acqua --help
109```
13 110
111To run an example shipping with the distribution you can try
14 112
15Building and packaging 113```{#acqua-test .sh}
16====================== 114java -cp target/acqua-0.2.0-jar-with-dependencies.jar:<path/to/JRDFox.jar>:<path/to/RSAComb.jar> \
115 uk.ac.ox.cs.acqua.Acqua \
116 -o tests/lubm/univ-bench.owl \
117 -d tests/lubm/data/lubm1.ttl \
118 -q tests/lubm/queries.sparql
119```
17 120
18This is a Maven project, hence Maven should be used for building and packaging. 121## References
19* Compile `mvn compile`
20* Create jars `mvn package`;
21you will get a jar without dependencies *target/pagoda-x.y.z.jar* and a runnable jar with dependencies *target/pagoda-x.y.z-jar-with-dependencies.jar*.
22* Execute tests `mvn test -DskipTests=false`;
23 122
123[1] Horridge, Matthew and Bechhofer, Sean.
124 *The OWL API: A Java API for OWL Ontologies*.
125 Semantic Web Journal 2(1), Special Issue on Semantic Web Tools and Systems, pp. 11-21, 2011.
24 126
25Configuring the engine 127## Acknowledgements
26======================
27 128
28The engine provides a standard configuration, but it is most likely that is not suitable for your purposes. 129- OWLAPI [[2]](#references)
29You should provide your own configuration in a file called `pagoda.properties` including it in the classpath. 130- [RDFox]
30Such a file should resemble the file `src/resources/_default_pagoda.properties`. 131- [PAGOdA]
31 132
133## Credits
32 134
33Executing 135- Federico Igne
34========= 136- Stefano Germano
137- Ian Horrocks (*Scientific Supervisor*)
35 138
36Once you have the runnable jar, you can make the system answer queries through the command line interface. 139From the [Knowledge Representation and Reasoning research group](https://www.cs.ox.ac.uk/isg/krr/) in the [Department of Computer Science](https://www.cs.ox.ac.uk/) of the [University of Oxford](https://www.ox.ac.uk/).
37 140
38Run `java -jar pagoda-x.y.z-jar-with-dependencies.jar` for getting a list of the mandatory arguments and optional parameters. 141## License
39 142
40Run `java -cp pagoda-x.y.z-jar-with-dependencies.jar:<your_path_to_properties>/pagoda.properties arg [arg]...` for executing the engine with a custom configuration. 143This project is licensed under the [Apache License 2.0](LICENSE).
41 144
42Using it as a library 145<!-- References -->
43=====================
44 146
45The API is offered by the class `QueryReasoner`, however we provide a more handy wrapper, that is the class `Pagoda`. 147[RSAComb]: https://github.com/KRR-Oxford/RSAComb
46Thanks to such a wrapper, you can build an instance of `Pagoda` by specifying different parameters and after that you will get 148[RDFox]: https://www.oxfordsemantic.tech/product
47a runnable `Pagoda` object. 149[PAGOdA]: http://www.cs.ox.ac.uk/isg/tools/PAGOdA
150[HermiT]: http://www.hermit-reasoner.com/