org.semanticweb.HermiT.tableau.ReasoningTaskDescription Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.semanticweb.hermit Show documentation
Show all versions of org.semanticweb.hermit Show documentation
HermiT is reasoner for ontologies written using the Web Ontology Language (OWL). Given an OWL file, HermiT can determine whether or not the ontology is consistent, identify subsumption relationships between classes, and much more.
This is the maven build of HermiT and is designed for people who wish to use HermiT from within the OWL API. It is now versioned in the main HermiT version repository, although not officially supported by the HermiT developers.
The version number of this package is a composite of the HermiT version and a value representing the OWLAPI release it is compatible with. Note that the group id for the upstream HermiT is com.hermit-reasoner, while this fork is released under net.sourceforge.owlapi.
This fork exists to allow HermiT users to use newer OWLAPI versions than the ones supported by the original HermiT codebase.
This package includes the Jautomata library (http://jautomata.sourceforge.net/), and builds with it directly. This library appears to be no longer under active development, and so a "fork" seems appropriate. No development is intended or anticipated on this code base.
The newest version!
package org.semanticweb.HermiT.tableau;
import org.semanticweb.HermiT.Prefixes;
import org.semanticweb.HermiT.model.Concept;
import org.semanticweb.HermiT.model.DLPredicate;
import org.semanticweb.HermiT.model.Role;
import org.semanticweb.HermiT.model.Term;
/**Reasoning task description.*/
public class ReasoningTaskDescription {
private enum StandardTestType {
CONCEPT_SATISFIABILITY("satisfiability of concept '{0}'"),
CONSISTENCY("ABox satisfiability"),
CONCEPT_SUBSUMPTION("concept subsumption '{0}' => '{1}'"),
OBJECT_ROLE_SATISFIABILITY("satisfiability of object role '{0}'"),
DATA_ROLE_SATISFIABILITY("satisfiability of data role '{0}'"),
OBJECT_ROLE_SUBSUMPTION("object role subsumption '{0}' => '{1}'"),
DATA_ROLE_SUBSUMPTION("data role subsumption '{0}' => '{1}'"),
INSTANCE_OF("class instance '{0}'('{1}')"),
OBJECT_ROLE_INSTANCE_OF("object role instance '{0}'('{1}', '{2}')"),
DATA_ROLE_INSTANCE_OF("data role instance '{0}'('{1}', '{2}')"),
ENTAILMENT("entailment of '{0}'"),
DOMAIN("check if {0} is domain of {1}"),
RANGE("check if {0} is range of {1}");
public final String messagePattern;
StandardTestType(String messagePattern) {
this.messagePattern=messagePattern;
}
}
protected final boolean m_flipSatisfiabilityResult;
protected final String m_messagePattern;
protected final Object[] m_arguments;
/**
* @param flipSatisfiabilityResult flipSatisfiabilityResult
* @param testType testType
* @param arguments arguments
*/
public ReasoningTaskDescription(boolean flipSatisfiabilityResult,StandardTestType testType,Object... arguments) {
this(flipSatisfiabilityResult,testType.messagePattern,arguments);
}
/**
* @param flipSatisfiabilityResult flipSatisfiabilityResult
* @param message message
* @param arguments arguments
*/
public ReasoningTaskDescription(boolean flipSatisfiabilityResult,String message,Object... arguments) {
m_flipSatisfiabilityResult=flipSatisfiabilityResult;
m_messagePattern=message;
m_arguments=arguments;
}
/**
* @return sat result
*/
public boolean flipSatisfiabilityResult() {
return m_flipSatisfiabilityResult;
}
/**
* @param prefixes prefixes
* @return task description
*/
public String getTaskDescription(Prefixes prefixes) {
String result=m_messagePattern;
for (int argumentIndex=0;argumentIndex