com.clarkparsia.owlapi.explanation
Class HSTExplanationGenerator

java.lang.Object
  extended by com.clarkparsia.owlapi.explanation.HSTExplanationGenerator
All Implemented Interfaces:
ExplanationGenerator, MultipleExplanationGenerator, SingleExplanationGenerator

public class HSTExplanationGenerator
extends java.lang.Object
implements MultipleExplanationGenerator

Description: An implementation of MultipleExplanationGenerator interface using Reiter's Hitting Set Tree (HST) algorithm as described in Aditya Kalyanpur's thesis. This class relies on a SingleExplanationGenerator that can compute a minimal set of axioms that cause the unsatisfiability. The core of the functionality is based on Matthew Horridge's implementation.

Copyright: Copyright (c) 2007

Company: Clark & Parsia, LLC.

Author:
Evren Sirin

Field Summary
static java.util.logging.Logger log
           
 
Constructor Summary
HSTExplanationGenerator(TransactionAwareSingleExpGen singleExplanationGenerator)
           
 
Method Summary
 java.util.Set<OWLAxiom> getExplanation(OWLClassExpression unsatClass)
          Returns a single explanation for the given unsatisfiable class.
 java.util.Set<java.util.Set<OWLAxiom>> getExplanations(OWLClassExpression unsatClass)
          Returns all the explanations for the given unsatisfiable class.
 java.util.Set<java.util.Set<OWLAxiom>> getExplanations(OWLClassExpression unsatClass, int maxExplanations)
          Return a specified number of explanations for the given unsatisfiable class.
 OWLOntology getOntology()
          Gets the ontologies according to which the explanations are generated
 OWLOntologyManager getOntologyManager()
          Get the ontology manager for this explanation generator.
 OWLReasoner getReasoner()
          Returns the reasoner associated with this generator.
 OWLReasonerFactory getReasonerFactory()
          Returns the reasoner factory used to create fresh reasoners.
 TransactionAwareSingleExpGen getSingleExplanationGenerator()
           
 void setProgressMonitor(ExplanationProgressMonitor progressMonitor)
          Sets the progress monitor for this multiple explanation generator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final java.util.logging.Logger log
Constructor Detail

HSTExplanationGenerator

public HSTExplanationGenerator(TransactionAwareSingleExpGen singleExplanationGenerator)
Method Detail

setProgressMonitor

public void setProgressMonitor(ExplanationProgressMonitor progressMonitor)
Description copied from interface: MultipleExplanationGenerator
Sets the progress monitor for this multiple explanation generator.

Specified by:
setProgressMonitor in interface MultipleExplanationGenerator
Parameters:
progressMonitor - The progress monitor.

getOntologyManager

public OWLOntologyManager getOntologyManager()
Description copied from interface: SingleExplanationGenerator
Get the ontology manager for this explanation generator.

Specified by:
getOntologyManager in interface SingleExplanationGenerator

getOntology

public OWLOntology getOntology()
Description copied from interface: SingleExplanationGenerator
Gets the ontologies according to which the explanations are generated

Specified by:
getOntology in interface SingleExplanationGenerator
Returns:
ont

getReasoner

public OWLReasoner getReasoner()
Description copied from interface: SingleExplanationGenerator
Returns the reasoner associated with this generator.

Specified by:
getReasoner in interface SingleExplanationGenerator

getReasonerFactory

public OWLReasonerFactory getReasonerFactory()
Description copied from interface: SingleExplanationGenerator
Returns the reasoner factory used to create fresh reasoners.

Specified by:
getReasonerFactory in interface SingleExplanationGenerator

getSingleExplanationGenerator

public TransactionAwareSingleExpGen getSingleExplanationGenerator()

getExplanation

public java.util.Set<OWLAxiom> getExplanation(OWLClassExpression unsatClass)
Description copied from interface: ExplanationGenerator
Returns a single explanation for the given unsatisfiable class.

Specified by:
getExplanation in interface ExplanationGenerator
Specified by:
getExplanation in interface SingleExplanationGenerator
Parameters:
unsatClass - The class that is unsatisfiable for which an explanation will be generated.
Returns:
A single explanation for the given unsatisfiable class, or empty set if the concept is satisfiable

getExplanations

public java.util.Set<java.util.Set<OWLAxiom>> getExplanations(OWLClassExpression unsatClass)
Description copied from interface: ExplanationGenerator
Returns all the explanations for the given unsatisfiable class.

Specified by:
getExplanations in interface ExplanationGenerator
Parameters:
unsatClass - The class that is unsatisfiable for which an explanation will be generated.
Returns:
All explanations for the given unsatisfiable class, or an empty set if the concept is satisfiable

getExplanations

public java.util.Set<java.util.Set<OWLAxiom>> getExplanations(OWLClassExpression unsatClass,
                                                              int maxExplanations)
Description copied from interface: ExplanationGenerator
Return a specified number of explanations for the given unsatisfiable class. A smaller number of explanations can be returned if there are not as many explanations for the given concept. The returned set will be empty if the given class is satisfiable,

Specified by:
getExplanations in interface ExplanationGenerator
Parameters:
unsatClass - The class that is unsatisfiable for which an explanation will be generated.
maxExplanations - Maximum number of explanations requested, or 0 to get all the explanations
Returns:
A specified number of explanations for the given unsatisfiable class, or an empty set if the concept is satisfiable