diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 163 |
1 files changed, 133 insertions, 30 deletions
| @@ -1,47 +1,150 @@ | |||
| 1 | PAGOdA | 1 | <!-- TITLE --> |
| 2 | ====== | 2 | <p align="center"> |
| 3 | |||
| 4 | <h1 align="center">· ACQuA ·</h1> | ||
| 5 | |||
| 6 | <p align="center"> | ||
| 7 | A hybrid architecture for conjunctive query answering overover OWL 2 DL. | ||
| 8 | <br/> | ||
| 9 | <a href="#">Read the thesis</a> | ||
| 10 | · | ||
| 11 | <a href="#">Read the journal paper</a> | ||
| 12 | · | ||
| 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 | |||
| 36 | ACQuA is a hybrid query answering framework that combines black-box services to provide a CQ answering service for OWL. | ||
| 37 | Specifically, it combines scalable CQ answering services for tractable languages with a CQ answering service for a more expressive language approaching the full OWL 2. | ||
| 38 | If the query can be fully answered by one of the tractable services, then that service is used. | ||
| 39 | Otherwise 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. | ||
| 40 | If the bounds don’t coincide, then the “gap” answers are checked using the “full” service. | ||
| 41 | |||
| 42 | This 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 | |||
| 48 | RSAComb uses a recent version of [RDFox] under the hood to offload part of the computation. | ||
| 49 | |||
| 50 | In order to run ACQuA you need to have RDFox available in your system, along with *a valid license*. | ||
| 51 | RDFox is proprietary software and as such we are not able to distribute it along with our code. | ||
| 52 | This software has been developed and tested with **RDFox v5.5**. | ||
| 53 | |||
| 54 | ### Requirements | ||
| 3 | 55 | ||
| 4 | PAGOdA 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 | ||
| 7 | Project dependencies/requirements | 62 | We 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 | ================================= | 63 | In 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 | 65 | Alternatively, run the following commands (on a Linux x86 machine) from the root of the project to install RDFox locally. |
| 11 | - JavaSE 8 | 66 | Download links for other versions, operating systems, and architectures can be found [here][RDFox]. |
| 12 | - Maven | 67 | |
| 68 | ```{.bash} | ||
| 69 | mkdir -p lib && pushd lib | ||
| 70 | wget https://rdfox-distribution.s3.eu-west-2.amazonaws.com/release/v5.5/RDFox-linux-x86_64-5.5.zip | ||
| 71 | unzip RDFox-linux-x86_64-5.5.zip | ||
| 72 | ln -s RDFox-linux-x86_64-5.5/lib/JRDFox.jar | ||
| 73 | popd | ||
| 74 | ``` | ||
| 75 | |||
| 76 | ### Providing an RDFox license | ||
| 77 | |||
| 78 | The [documentation](https://docs.oxfordsemantic.tech/features-and-requirements.html#license-key), describes several ways to provide the license to RDFox. | ||
| 79 | |||
| 80 | One 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 | |||
| 85 | The project is managed using Maven. | ||
| 86 | You can compile the code using the following command | ||
| 87 | |||
| 88 | ```{#acqua-compile .sh} | ||
| 89 | mvn compile | ||
| 90 | ``` | ||
| 91 | |||
| 92 | To build a JAR file, package the project as follows | ||
| 93 | |||
| 94 | ```{#acqua-package .sh} | ||
| 95 | mvn package | ||
| 96 | ``` | ||
| 97 | |||
| 98 | To run ACQuA from the command line you can use the following command | ||
| 99 | |||
| 100 | ```{#acqua-run .sh} | ||
| 101 | java -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 | |||
| 104 | where `path/to/RSAComb.jar` and `path/to/JRDFox.jar` are the paths in your system for `RSAComb.jar` and `JRDFox.jar`, respectively. | ||
| 105 | For example to get a help message from the CLI use | ||
| 106 | |||
| 107 | ```{#acqua-help .sh} | ||
| 108 | java -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 | ||
| 111 | To run an example shipping with the distribution you can try | ||
| 14 | 112 | ||
| 15 | Building and packaging | 113 | ```{#acqua-test .sh} |
| 16 | ====================== | 114 | java -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 | ||
| 18 | This is a Maven project, hence Maven should be used for building and packaging. | 121 | ## References |
| 19 | * Compile `mvn compile` | ||
| 20 | * Create jars `mvn package`; | ||
| 21 | you 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 | ||
| 25 | Configuring the engine | 127 | ## Acknowledgements |
| 26 | ====================== | ||
| 27 | 128 | ||
| 28 | The engine provides a standard configuration, but it is most likely that is not suitable for your purposes. | 129 | - OWLAPI [[2]](#references) |
| 29 | You should provide your own configuration in a file called `pagoda.properties` including it in the classpath. | 130 | - [RDFox] |
| 30 | Such a file should resemble the file `src/resources/_default_pagoda.properties`. | 131 | - [PAGOdA] |
| 31 | 132 | ||
| 133 | ## Credits | ||
| 32 | 134 | ||
| 33 | Executing | 135 | - Federico Igne |
| 34 | ========= | 136 | - Stefano Germano |
| 137 | - Ian Horrocks (*Scientific Supervisor*) | ||
| 35 | 138 | ||
| 36 | Once you have the runnable jar, you can make the system answer queries through the command line interface. | 139 | From 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 | ||
| 38 | Run `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 | ||
| 40 | Run `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. | 143 | This project is licensed under the [Apache License 2.0](LICENSE). |
| 41 | 144 | ||
| 42 | Using it as a library | 145 | <!-- References --> |
| 43 | ===================== | ||
| 44 | 146 | ||
| 45 | The 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 |
| 46 | Thanks 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 |
| 47 | a runnable `Pagoda` object. | 149 | [PAGOdA]: http://www.cs.ox.ac.uk/isg/tools/PAGOdA |
| 150 | [HermiT]: http://www.hermit-reasoner.com/ | ||
