Package: gavel-owl
An extension for Gavel introducing OWL and FOWL (OWL with FOL annotations) translations as well as related functionality regarding OWL and FOWL ontologies.InstallationThe latest released version can be installed with:pip install gavel-owlThe latest development version can be installed with:pip install git+https://github.com/gavel-tool/python-gavel-owl.git@devFor the development version, you need to install the jar-file manually. This is done by runningmvn installin thejavadirectory. Copy the resulting jar-file fromjava/target/java-1.0-SNAPSHOT.one-jar.jartosrc/gavel_owl/jars/api.jar(be sure to use the one-jar-file, not the regular jar-file).UsageThis plugin extends gavel by two new dialects,owlandfowl. This enables the various
features of gavel to be used with owl / fowl ontologies. These functionalities use the
java-based OWL-API. Therefore, you have to start the java backend in order to
use most owl-based functionalities. Thegavel-owlplugin provides a single
command to do that:python -m gavel start-serverAfter the server has been started successfully, you can translate an existing
owl ontology to first-order logic in tptp syntax using:python -m gavel translate owl tptp your-ontology.owlYou can also submit arguments to fist-order prover Vampire consisting of the translation of a given owl ontology as premises and conjectures formulated in tptp using:python -m gavel owl-prove your-premises.owl your-conjectures.tptpIn order to translate an owl ontology with first-order annotations into tptp syntax, you can use:python -m gavel translate fowl tptp your-ontology.owlThe running java backend can be terminated:python -m gavel stop-serverThere are several commands available that can be accessed via:python -m gavel COMMAND [ARGUMENTS]start-server: starts a subprocess that connects the Python program to its Java components. Other functions such as translate will only run if this connection has been established beforehand. The optional arguments -jp and -pp can be used for custom ports. Otherwise, the default ports will be used. -jp and -pp can be used for all other commands (except prove) analogously.translate: A Gavel function that translates the contents of a given file from one language, e.g. OWL, to another language, e.g. TPTP. If the option –save is used, the translation is stored in the given file, else it is gets displayed in the command line. The following options are avaiable for translate:--clif-properties(only for input dialectfowl) This option accepts arbitrary many IRIs or labels of OWL annotation properties. The values of annotation axioms using these properties will be interpreted as CLIF axioms. If this option is set with no arguments, the tool will not look for any CLIF axioms. If this option is not set, it will default tohttps://github.com/gavel-tool/python-gavel-owl/clif_annotationas an annotation property.--tptp-properties(only for input dialectfowl) This is analogous toclif-properties. Here, the default value ishttps://github.com/gavel-tool/python-gavel-owl/tptp_annotation.--shorten-names-nIf this flag is set, the short form of IRIs will be used.--readable-names(only for input dialectsfowlandowl) This flag replaces IRIs with labels (if available) or shortened IRIs.--no-annotations-aThis flag can be set to avoid rendering annotations in the output dialect. For the translation fromfowltotptp, these annotations contain the OWL axiom or FOL annotation the is the origin of the corresponding FOL axioms.--jp(only for input dialectsfowlandowl) Sets the Java port for the connection to FOWL’s Java server. This should be the same number used forstart-server. The default value is25333.--pp(only for input dialectsfowlandowl) Sets the Python port for the connection to FOWL’s Java server. This should be the same number used forstart-server. The default value is25334.--verbose-v(only for input dialectfowl) If this flag is set, additional information on the translation process will be put in the command line, such as the mapping between OWL entities and FOL names.--save-sThis option specifies the path for saving the translation result. Ifsaveis not set, the result will be put out to the command line.--save-dol(only for input dialectfowl) This argument can be used to set a path under which to store the DOL-file generated from the annotated ontology.--tptp-input(only for input dialectfowl) Use this argument in combination with one or multiple filenames to add TPTP files to the ontology. The axioms in these files are treated like TPTP annotations.check-consistency: uses the OWL reasoner Hermit to determine whether a given ontology is consistent or not.owl-prove: takes two arguments, an OWL file and a TPTP file. It uses Vampire to prove the conjectures provided in the TPTP file based on the translation of the OWL file. If the –steps flag is set, it will return the proof steps, otherwise it will only return the reasoner’s result.stop-server: Ends the Java connection established by start-server.prove: a function from Gavel that takes the name of a FOL prover and a TPTP file and returns the prover’s result for the given problem.prove-ontology-entailment: Checks if an OWL ontology can be entailed from another. It returns the result based on OWL reasoning and based on FOL reasoning using the fowl translation.For further options use:python -m gavel [COMMAND] --helpDevelopmentTo run all the tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.0.0 (2020-11-23)First release on PyPI.