Wiki

Clone wiki

BUNDLE / BUNDLE 5.x.x

BUNDLE

BUNDLE, Bdds for Uncertain reasoNing on Description Logic thEories, is an algorithm for reasoning on probabilistic ontologies following the DISPONTE semantics, applying the distribution semantics to Description Logics. It can explain one or more inferences (queries) in a given ontology, including ontology inconsistency, and return a probability value in case of a probabilistic ontology.

Table of contents

  1. Usage and options
  2. Using Docker
  3. Using BUNDLE as a library

Usage and options

Usage: bundle [options] <file URI>...

The options --unsat, --all-unsat, --inconsistent, --subclass, --hierarchy, --instance and --property-value are mutually exclusive. By default --inconsistent option is assumed. In the following descriptions C, D, and i can be URIs or local names.

Argument description:

  • -allUnsat,--allUnsat Explain all unsatisfiable classes
  • -bf,--bddfact <buddy | cudd | j | java | jdd>
    Set the BDD Factory, possible values can be "buddy", "cudd", "j","java", "jdd", or a name of a class that has an init() method that returns a BDDFactory. Note: "cal" is not supported, use "buddy" for better performances. If the loading fails the "java" factory will be used. Default value: buddy.
  • -gui
    Run GUI. Not supported yet.
  • -h,--help
    Print the help message
  • -hierarchy,--hierarchy
    Print all explanations for the class hierarchy. Not supported yet.
  • -ignoreImports,--ignoreImports
    Ignore imported ontologies.
  • -inconsistent,--inconsistent
    Explain why the ontology is inconsistent
  • -instance,--instance <i,C>
    Explain why i is an instance of C
  • -m,--method <glass | black | owlexp>
    The method that will be used to generate explanations. Default value: owlexp
  • -max,--maxExplanations <positive_integer> The maximum number of generated explanations for each inference. The provided number must be a positive integer. Default value: 2147483647
  • -noProb,--noProb
    Disable the computation of the probability
  • -propertyValue,--propertyValue <s,p,o>
    Explain why s has value o for property p
  • -r,--reasoner <pellet | hermit | jfact | fact++ | trill | trillp | tornado>
    Inner reasoner to be used. Bundle currently supports: Pellet, Hermit, JFact and FaCT++. The valid arguments for this option are: "pellet", "hermit", "jfact", "fact++", "trill", "trillp" or "tornado". NOTE: to use the reasoners trill, trillp, and tornado you must first install SWI-Prolog (https://www.swi-prolog.org/) and the TRILL framework (http://ml.unife.it/trill-framework/) on your system. The reasoners trillp and tornado only return the probability of the query. Default value: pellet.
  • -subclass,--subclass <C,D>
    Explain why C is a subclass of D
  • -t,--time <arg>
    Maximum time allowed for the inference, 0 for unlimited time. Format: [Xh][Ym][Zs][Kms]. Default value: 0s.
  • -unsat,--unsat <C>
    Explain why the given class C is unsatisfiable
  • -v,--verbose
    Print detailed exceptions and messages about the progress.

Using Docker

A BUNDLE image was deployed in Docker Hub. To use the BUNDLE image all you have to do is pull the image with the command:

#!bash

sudo docker pull rzese/bundle:latest
and then you can start the container with the command:

#!bash
sudo docker run -it rzese/bundle bash
A bash shell of the container should open. Then you can use the command bundle to run our reasoner.

Using BUNDLE as a library

If your application needs to perform probabilistic logical inference, BUNDLE can also be used as a library. If you are using Maven, all you have to do is to add the following lines in your POM file:

#!XML
<dependencies>
...
    <dependency>
        <groupId>it.unife.ml</groupId>
        <artifactId>bundle</artifactId>
        <version>5.0.5</version>
    </dependency>
...
</dependencies>

Then you can obtain the probability of query in just a few lines:

#!java
// start configuring the reasoner defining the root ontology
BundleConfigurationBuilder configBuilder = new BundleConfigurationBuilder(manager.loadOntologyFromOntologyDocument(
        new File("examples/example-3_wp_owl.owl")));
// create the configuration for the reasoner. Here it is possible to set all the BUNDLE's parameters
BundleConfiguration config = configBuilder.verbose(true)
        .hstMethod(Constants.HSTMethod.BLACKBOX)
        .reasoner(Constants.ReasonerName.PELLET)
        .buildConfiguration();
// create the reasoner using the configuration defined before
Bundle reasoner = new Bundle(config);
// initalization
reasoner.init();
// compute the first query (query is of type org.semanticweb.owlapi.model.OWLAxiom)
ProbabilisticReasonerResult result1 = reasoner.computeQuery(query);
// compute another query
ProbabilisticReasonerResult result2 = reasoner.computeQuery(anotherQuery);
// it there are not other queries, dispose the reasoner
reasoner.dispose()

Updated