├── .classpath ├── .project ├── .settings ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.core.prefs └── org.eclipse.m2e.core.prefs ├── README.txt ├── examples ├── ontologies │ ├── pizza.fss.owl │ └── pizza.owl └── org │ └── semanticweb │ └── HermiT │ └── examples │ ├── ChangeFormat.java │ ├── EntailmentChecking.java │ ├── Explanations.java │ ├── HermiTConfigurations.java │ ├── HermiTDebugger.java │ ├── HierarchyPrettyPrinting.java │ └── MaterialiseInferences.java ├── gpl-3.0.txt ├── known-test-failures.txt ├── lgpl-3.0.txt ├── lib ├── jautomata-core-2.0-alpha-1.jar └── jautomata.LICENSE ├── nightlybuild.sh ├── pom.xml ├── rmOldNightlyBuilds.sh ├── src ├── assembly │ ├── cli-assembly.xml │ ├── protege-assembly.xml │ └── source-assembly.xml ├── main │ ├── java │ │ └── org │ │ │ └── semanticweb │ │ │ └── HermiT │ │ │ ├── Configuration.java │ │ │ ├── EntailmentChecker.java │ │ │ ├── Prefixes.java │ │ │ ├── ProtegeReasonerFactory.java │ │ │ ├── Reasoner.java │ │ │ ├── blocking │ │ │ ├── AncestorBlocking.java │ │ │ ├── AnywhereBlocking.java │ │ │ ├── AnywhereValidatedBlocking.java │ │ │ ├── BlockingSignature.java │ │ │ ├── BlockingSignatureCache.java │ │ │ ├── BlockingStrategy.java │ │ │ ├── BlockingValidator.java │ │ │ ├── DirectBlockingChecker.java │ │ │ ├── PairWiseDirectBlockingChecker.java │ │ │ ├── SetFactory.java │ │ │ ├── SingleDirectBlockingChecker.java │ │ │ ├── ValidatedPairwiseDirectBlockingChecker.java │ │ │ └── ValidatedSingleDirectBlockingChecker.java │ │ │ ├── cli │ │ │ └── CommandLine.java │ │ │ ├── datalog │ │ │ ├── ConjunctiveQuery.java │ │ │ ├── DatalogEngine.java │ │ │ └── QueryResultCollector.java │ │ │ ├── datatypes │ │ │ ├── DatatypeChecker.java │ │ │ ├── DatatypeHandler.java │ │ │ ├── DatatypeRegistry.java │ │ │ ├── MalformedLiteralException.java │ │ │ ├── UnsupportedDatatypeException.java │ │ │ ├── UnsupportedFacetException.java │ │ │ ├── ValueSpaceSubset.java │ │ │ ├── anyuri │ │ │ │ ├── AnyURIDatatypeHandler.java │ │ │ │ └── AnyURIValueSpaceSubset.java │ │ │ ├── binarydata │ │ │ │ ├── Base64.java │ │ │ │ ├── BinaryData.java │ │ │ │ ├── BinaryDataDatatypeHandler.java │ │ │ │ ├── BinaryDataLengthInterval.java │ │ │ │ ├── BinaryDataType.java │ │ │ │ └── BinaryDataValueSpaceSubset.java │ │ │ ├── bool │ │ │ │ └── BooleanDatatypeHandler.java │ │ │ ├── datetime │ │ │ │ ├── BoundType.java │ │ │ │ ├── DateTime.java │ │ │ │ ├── DateTimeDatatypeHandler.java │ │ │ │ ├── DateTimeInterval.java │ │ │ │ ├── DateTimeValueSpaceSubset.java │ │ │ │ └── IntervalType.java │ │ │ ├── doublenum │ │ │ │ ├── DoubleDatatypeHandler.java │ │ │ │ ├── DoubleInterval.java │ │ │ │ ├── EmptyDoubleSubset.java │ │ │ │ ├── EntireDoubleSubset.java │ │ │ │ └── NoNaNDoubleSubset.java │ │ │ ├── floatnum │ │ │ │ ├── EmptyFloatSubset.java │ │ │ │ ├── EntireFloatSubset.java │ │ │ │ ├── FloatDatatypeHandler.java │ │ │ │ ├── FloatInterval.java │ │ │ │ └── NoNaNFloatSubset.java │ │ │ ├── owlreal │ │ │ │ ├── BigRational.java │ │ │ │ ├── BoundType.java │ │ │ │ ├── MinusInfinity.java │ │ │ │ ├── NumberInterval.java │ │ │ │ ├── NumberRange.java │ │ │ │ ├── Numbers.java │ │ │ │ ├── OWLRealDatatypeHandler.java │ │ │ │ ├── OWLRealValueSpaceSubset.java │ │ │ │ └── PlusInfinity.java │ │ │ ├── rdfplainliteral │ │ │ │ ├── RDFPlainLiteralDataValue.java │ │ │ │ ├── RDFPlainLiteralDatatypeHandler.java │ │ │ │ ├── RDFPlainLiteralLengthInterval.java │ │ │ │ ├── RDFPlainLiteralLengthValueSpaceSubset.java │ │ │ │ └── RDFPlainLiteralPatternValueSpaceSubset.java │ │ │ └── xmlliteral │ │ │ │ ├── XMLLiteral.java │ │ │ │ └── XMLLiteralDatatypeHandler.java │ │ │ ├── debugger │ │ │ ├── ConsoleTextArea.java │ │ │ ├── Debugger.java │ │ │ ├── DerivationHistory.java │ │ │ ├── DerivationViewer.java │ │ │ ├── Printing.java │ │ │ └── commands │ │ │ │ ├── AbstractCommand.java │ │ │ │ ├── ActiveNodesCommand.java │ │ │ │ ├── AgainCommand.java │ │ │ │ ├── BreakpointTimeCommand.java │ │ │ │ ├── ClearCommand.java │ │ │ │ ├── ContinueCommand.java │ │ │ │ ├── DebuggerCommand.java │ │ │ │ ├── DerivationTreeCommand.java │ │ │ │ ├── ExitCommand.java │ │ │ │ ├── ForeverCommand.java │ │ │ │ ├── HelpCommand.java │ │ │ │ ├── HistoryCommand.java │ │ │ │ ├── IsAncestorOfCommand.java │ │ │ │ ├── ModelStatsCommand.java │ │ │ │ ├── NodesForCommand.java │ │ │ │ ├── OriginStatsCommand.java │ │ │ │ ├── QueryCommand.java │ │ │ │ ├── ReuseNodeForCommand.java │ │ │ │ ├── ShowDLClausesCommand.java │ │ │ │ ├── ShowDescriptionGraphCommand.java │ │ │ │ ├── ShowExistsCommand.java │ │ │ │ ├── ShowModelCommand.java │ │ │ │ ├── ShowNodeCommand.java │ │ │ │ ├── ShowSubtreeCommand.java │ │ │ │ ├── SingleStepCommand.java │ │ │ │ ├── SubtreeViewer.java │ │ │ │ ├── UnprocessedDisjunctionsCommand.java │ │ │ │ └── WaitForCommand.java │ │ │ ├── existentials │ │ │ ├── AbstractExpansionStrategy.java │ │ │ ├── CreationOrderStrategy.java │ │ │ ├── ExistentialExpansionStrategy.java │ │ │ └── IndividualReuseStrategy.java │ │ │ ├── graph │ │ │ └── Graph.java │ │ │ ├── hierarchy │ │ │ ├── AtomicConceptElement.java │ │ │ ├── ClassificationProgressMonitor.java │ │ │ ├── DeterministicClassification.java │ │ │ ├── Hierarchy.java │ │ │ ├── HierarchyDumperFSS.java │ │ │ ├── HierarchyNode.java │ │ │ ├── HierarchyPrinterFSS.java │ │ │ ├── HierarchySearch.java │ │ │ ├── InstanceManager.java │ │ │ ├── QuasiOrderClassification.java │ │ │ ├── QuasiOrderClassificationForRoles.java │ │ │ └── RoleElementManager.java │ │ │ ├── model │ │ │ ├── AnnotatedEquality.java │ │ │ ├── AtLeast.java │ │ │ ├── AtLeastConcept.java │ │ │ ├── AtLeastDataRange.java │ │ │ ├── Atom.java │ │ │ ├── AtomicConcept.java │ │ │ ├── AtomicDataRange.java │ │ │ ├── AtomicNegationConcept.java │ │ │ ├── AtomicNegationDataRange.java │ │ │ ├── AtomicRole.java │ │ │ ├── Concept.java │ │ │ ├── Constant.java │ │ │ ├── ConstantEnumeration.java │ │ │ ├── DLClause.java │ │ │ ├── DLOntology.java │ │ │ ├── DLPredicate.java │ │ │ ├── DataRange.java │ │ │ ├── DatatypeRestriction.java │ │ │ ├── DescriptionGraph.java │ │ │ ├── Equality.java │ │ │ ├── ExistentialConcept.java │ │ │ ├── ExistsDescriptionGraph.java │ │ │ ├── Individual.java │ │ │ ├── Inequality.java │ │ │ ├── InternalDatatype.java │ │ │ ├── InterningManager.java │ │ │ ├── InverseRole.java │ │ │ ├── LiteralConcept.java │ │ │ ├── LiteralDataRange.java │ │ │ ├── NegatedAtomicRole.java │ │ │ ├── NodeIDLessEqualThan.java │ │ │ ├── NodeIDsAscendingOrEqual.java │ │ │ ├── Role.java │ │ │ ├── Term.java │ │ │ └── Variable.java │ │ │ ├── monitor │ │ │ ├── CountingMonitor.java │ │ │ ├── MemoryConsumptionMonitor.java │ │ │ ├── TableauMonitor.java │ │ │ ├── TableauMonitorAdapter.java │ │ │ ├── TableauMonitorFork.java │ │ │ ├── TableauMonitorForwarder.java │ │ │ ├── Timer.java │ │ │ └── TimerWithPause.java │ │ │ ├── structural │ │ │ ├── BuiltInPropertyManager.java │ │ │ ├── ExpressionManager.java │ │ │ ├── OWLAxioms.java │ │ │ ├── OWLAxiomsExpressivity.java │ │ │ ├── OWLClausification.java │ │ │ ├── OWLNormalization.java │ │ │ ├── ObjectPropertyInclusionManager.java │ │ │ └── ReducedABoxOnlyClausification.java │ │ │ └── tableau │ │ │ ├── BranchingPoint.java │ │ │ ├── ClashManager.java │ │ │ ├── DLClauseEvaluator.java │ │ │ ├── DatatypeManager.java │ │ │ ├── DependencySet.java │ │ │ ├── DependencySetFactory.java │ │ │ ├── DescriptionGraphManager.java │ │ │ ├── DisjunctionBranchingPoint.java │ │ │ ├── ExistentialExpansionManager.java │ │ │ ├── ExtensionManager.java │ │ │ ├── ExtensionTable.java │ │ │ ├── ExtensionTableWithFullIndex.java │ │ │ ├── ExtensionTableWithTupleIndexes.java │ │ │ ├── GroundDisjunction.java │ │ │ ├── GroundDisjunctionHeader.java │ │ │ ├── HyperresolutionManager.java │ │ │ ├── InterruptCurrentTaskException.java │ │ │ ├── InterruptFlag.java │ │ │ ├── MergingManager.java │ │ │ ├── Node.java │ │ │ ├── NodeType.java │ │ │ ├── NominalIntroductionManager.java │ │ │ ├── PermanentDependencySet.java │ │ │ ├── ReasoningTaskDescription.java │ │ │ ├── Tableau.java │ │ │ ├── TupleIndex.java │ │ │ ├── TupleTable.java │ │ │ ├── TupleTableFullIndex.java │ │ │ └── UnionDependencySet.java │ └── resources │ │ └── plugin.xml └── test │ ├── java │ └── org │ │ └── semanticweb │ │ └── HermiT │ │ ├── AbstractHermiTTest.java │ │ ├── AbstractOntologyTest.java │ │ ├── AllQuickTests.java │ │ ├── AllTests.java │ │ ├── graph │ │ ├── AllTests.java │ │ └── GraphTest.java │ │ ├── owl_wg_tests │ │ ├── AbstractTest.java │ │ ├── AllApprovedWGTests.java │ │ ├── AllExtracreditWGTests.java │ │ ├── AllNonRejectedNonExtracreditWGTests.java │ │ ├── AllProposedWGTests.java │ │ ├── AllWGTests.java │ │ ├── AllWGTestsWithStatus.java │ │ ├── AllWGTestsWithoutStatus.java │ │ ├── ConsistencyTest.java │ │ ├── EntailmentTest.java │ │ ├── FailingWGTestDebug.java │ │ ├── InvalidWGTestException.java │ │ ├── TstDescriptorForMaven.java │ │ ├── WGTestDescriptor.java │ │ └── WGTestRegistry.java │ │ ├── reasoner │ │ ├── AbstractReasonerTest.java │ │ ├── AllHeavyTests.java │ │ ├── AllQuickTests.java │ │ ├── AnyURITest.java │ │ ├── BinaryDataTest.java │ │ ├── ClassificationIndividualReuseTest.java │ │ ├── ClassificationTest.java │ │ ├── ComplexConceptTest.java │ │ ├── DatalogEngineTest.java │ │ ├── DatatypesTest.java │ │ ├── DateTimeTest.java │ │ ├── EntailmentTest.java │ │ ├── FloatDoubleTest.java │ │ ├── NumericsTest.java │ │ ├── OWLLinkTest.java │ │ ├── OWLReasonerTest.java │ │ ├── RDFPlainLiteralTest.java │ │ ├── RIATest.java │ │ ├── ReasonerCoreBlockingTest.java │ │ ├── ReasonerIndividualReuseTest.java │ │ ├── ReasonerTest.java │ │ ├── RulesTest.java │ │ ├── SimpleRolesTest.java │ │ └── XMLLiteralTest.java │ │ ├── structural │ │ ├── AbstractStructuralTest.java │ │ ├── AllTests.java │ │ ├── ClausificationDatatypesTest.java │ │ ├── ClausificationTest.java │ │ └── NormalizationTest.java │ │ └── tableau │ │ ├── AbstractReasonerInternalsTest.java │ │ ├── AllTests.java │ │ ├── BlockingValidatorTest.java │ │ ├── DLClauseEvaluationTest.java │ │ ├── DependencySetTest.java │ │ ├── GraphTest.java │ │ ├── MergeTest.java │ │ ├── NIRuleTest.java │ │ ├── TupleIndexTest.java │ │ └── TupleTableFullIndexTest.java │ ├── resources │ └── org │ │ └── semanticweb │ │ └── HermiT │ │ ├── owl_wg_tests │ │ └── ontologies │ │ │ ├── all.rdf │ │ │ ├── consistent001.rdf │ │ │ ├── consistent002.rdf │ │ │ ├── support011-A.rdf │ │ │ └── test-ontology.owl │ │ ├── reasoner │ │ └── res │ │ │ ├── FS2RDF-literals-ar-consistent.f.owl │ │ │ ├── OWLLink │ │ │ ├── 10a-conclusion.owl │ │ │ ├── 10a.owl │ │ │ ├── 10b-conclusion.owl │ │ │ ├── 10b.owl │ │ │ ├── 11-conclusion.owl │ │ │ ├── 11.owl │ │ │ ├── 12-conclusion.owl │ │ │ ├── 12.owl │ │ │ ├── 13-conclusion.owl │ │ │ ├── 13.owl │ │ │ ├── 14-conclusion.owl │ │ │ ├── 14.owl │ │ │ ├── 15-conclusion.owl │ │ │ ├── 15.owl │ │ │ ├── 16-conclusion.owl │ │ │ ├── 16.owl │ │ │ ├── 17-conclusion.owl │ │ │ ├── 17.owl │ │ │ ├── 18-conclusion.owl │ │ │ ├── 18.owl │ │ │ ├── 19.owl │ │ │ ├── 1a-conclusion.owl │ │ │ ├── 1a.owl │ │ │ ├── 1b-conclusion.owl │ │ │ ├── 1b.owl │ │ │ ├── 20-conclusion.owl │ │ │ ├── 20.owl │ │ │ ├── 21-conclusion.owl │ │ │ ├── 21.owl │ │ │ ├── 22-conclusion.owl │ │ │ ├── 22.owl │ │ │ ├── 23-conclusion.owl │ │ │ ├── 23.owl │ │ │ ├── 24-conclusion.owl │ │ │ ├── 24.owl │ │ │ ├── 25-conclusion.owl │ │ │ ├── 25.owl │ │ │ ├── 26-conclusion.owl │ │ │ ├── 26.owl │ │ │ ├── 27-conclusion.owl │ │ │ ├── 27.owl │ │ │ ├── 28-conclusion.owl │ │ │ ├── 28.owl │ │ │ ├── 29a-conclusion.owl │ │ │ ├── 29a.owl │ │ │ ├── 2a-conclusion.owl │ │ │ ├── 2a.owl │ │ │ ├── 2b-conclusion.owl │ │ │ ├── 2b.owl │ │ │ ├── 2c-conclusion.owl │ │ │ ├── 2c.owl │ │ │ ├── 3a-conclusion.owl │ │ │ ├── 3a.owl │ │ │ ├── 3b-conclusion.owl │ │ │ ├── 3b.owl │ │ │ ├── 4-conclusion.owl │ │ │ ├── 4.owl │ │ │ ├── 5-conclusion.owl │ │ │ ├── 5.owl │ │ │ ├── 6-conclusion.owl │ │ │ ├── 6.owl │ │ │ ├── 7-conclusion.owl │ │ │ ├── 7.owl │ │ │ ├── 8-conclusion.owl │ │ │ ├── 8.owl │ │ │ ├── 9-conclusion.owl │ │ │ ├── 9.owl │ │ │ ├── agent-inst.owl │ │ │ ├── agent.owl │ │ │ ├── situation-inst.owl │ │ │ ├── situation.owl │ │ │ ├── space.owl │ │ │ ├── test.owl │ │ │ ├── time.owl │ │ │ ├── updateHierarchy.txt │ │ │ └── updateHierarchyFlushed.txt │ │ │ ├── WebOnt-allValuesFrom-002-premise.rdf │ │ │ ├── classification-blocking-error.owl │ │ │ ├── datetime-1.txt │ │ │ ├── datetime-2.txt │ │ │ ├── datetime-3.txt │ │ │ ├── dependency-disjuntion-merging-bug.xml │ │ │ ├── dolce_all.xml │ │ │ ├── dolce_all.xml.txt │ │ │ ├── families.owl │ │ │ ├── galen-ians-full-undoctored.xml │ │ │ ├── galen-ians-full-undoctored.xml.txt │ │ │ ├── hierarchy-printing-1.txt │ │ │ ├── hierarchy-printing-2.txt │ │ │ ├── hierarchy-printing-3.txt │ │ │ ├── iso19112-D-different.owl.xml │ │ │ ├── only1.owl │ │ │ ├── owlwgtestparsingerror.rdf │ │ │ ├── pets-error.owl │ │ │ ├── pizza.xml │ │ │ ├── pizza.xml.txt │ │ │ ├── primer.owl │ │ │ ├── propreo.xml │ │ │ ├── propreo.xml.txt │ │ │ ├── wine-no-data-properties.xml │ │ │ ├── wine-no-data-properties.xml.txt │ │ │ ├── wine.xml │ │ │ └── wine.xml.txt │ │ └── structural │ │ └── res │ │ ├── asymmetry-control.txt │ │ ├── basic-control.txt │ │ ├── basic-input.xml │ │ ├── has-self-1-control.txt │ │ ├── has-self-1-input.owl │ │ ├── has-self-2-control.txt │ │ ├── has-self-2-input.owl │ │ ├── nominals-1-control.txt │ │ ├── nominals-1-input.xml │ │ ├── nominals-2-control.txt │ │ ├── nominals-2-input.xml │ │ ├── nominals-3-control.txt │ │ ├── nominals-3-input.xml │ │ ├── nominals-4-control.txt │ │ └── nominals-4-input.xml │ └── testreports │ ├── Test Results - AllTests.html │ └── Test Results - All_in_HermiT.html ├── stage-release.sh ├── tasks.txt └── update.properties /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | HermiT 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/test/java=UTF-8 4 | encoding/=UTF-8 5 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 3 | org.eclipse.jdt.core.compiler.compliance=1.5 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.5 6 | -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /examples/org/semanticweb/HermiT/examples/ChangeFormat.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.examples; 2 | 3 | import java.io.BufferedOutputStream; 4 | import java.io.File; 5 | import java.io.FileOutputStream; 6 | 7 | import org.semanticweb.owlapi.apibinding.OWLManager; 8 | import org.semanticweb.owlapi.formats.FunctionalSyntaxDocumentFormat; 9 | import org.semanticweb.owlapi.model.OWLOntology; 10 | import org.semanticweb.owlapi.model.OWLOntologyManager; 11 | 12 | public class ChangeFormat { 13 | 14 | public static void main(String[] args) throws Exception { 15 | // First, we create an OWLOntologyManager object. The manager will load and 16 | // save ontologies. 17 | OWLOntologyManager manager=OWLManager.createOWLOntologyManager(); 18 | // Now, we create the file from which the ontology will be loaded. 19 | // Here the ontology is stored in a file locally in the ontologies subfolder 20 | // of the examples folder. 21 | File inputOntologyFile = new File("examples/ontologies/pizza.owl"); 22 | // We use the OWL API to load the ontology. 23 | OWLOntology ontology=manager.loadOntologyFromOntologyDocument(inputOntologyFile); 24 | // Now the axioms should be saved in a different format, say functional style syntax. 25 | // We do this by (virtually) creating a file with a relative path from which we get 26 | // the absolute file. 27 | File newOntologyFile=new File("examples/ontologies/pizza.fss.owl"); 28 | newOntologyFile=newOntologyFile.getAbsoluteFile(); 29 | // Now we create a buffered stream since the ontology manager can then write to that stream. 30 | BufferedOutputStream outputStream=new BufferedOutputStream(new FileOutputStream(newOntologyFile)); 31 | // We use the same format as for the input ontology. 32 | manager.saveOntology(ontology, new FunctionalSyntaxDocumentFormat(), outputStream); 33 | // Now the ontology should be in the ontologies subfolder (you Java IDE, e.g., Eclipse, 34 | // might have to refresh its view of files in the file system) before the file is visible. 35 | System.out.println("The ontology in examples/ontologies/pizza.fss.owl should now contain all axioms from pizza.owl in functional style syntax (you might need to refresh the IDE file view). "); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /lib/jautomata-core-2.0-alpha-1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phillord/hermit-reasoner/37ec30aced32ac81ebecc5e33fad255ddefcb4c3/lib/jautomata-core-2.0-alpha-1.jar -------------------------------------------------------------------------------- /rmOldNightlyBuilds.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | cd /data/hermit/download/nightlybuilds/ 4 | 5 | DATE=$(date -d last-week +"%Y%m%d") 6 | 7 | files=$(find . \ 8 | -maxdepth 1 -type f \ 9 | -name HermiT-$DATE.zip ) 10 | 11 | if [ -n "$files" ]; then 12 | rm -Rf $files 2>&1 3>&1 4>&1 5>&1 6>&1 7>&1 8>&1 9>&1 >> /dev/null 13 | fi 14 | 15 | files=$(find . \ 16 | -maxdepth 1 -type f \ 17 | -name HermiT-JUnitResults-$DATE.html ) 18 | 19 | if [ -n "$files" ]; then 20 | rm -Rf $files 2>&1 3>&1 4>&1 5>&1 6>&1 7>&1 8>&1 9>&1 >> /dev/null 21 | fi 22 | -------------------------------------------------------------------------------- /src/assembly/cli-assembly.xml: -------------------------------------------------------------------------------- 1 | 5 | cli-assembly 6 | 7 | jar 8 | 9 | false 10 | 11 | 12 | 13 | false 14 | true 15 | runtime 16 | 17 | 18 | 19 | 20 | 21 | ${project.build.outputDirectory} 22 | 23 | 25 | **/Protege*.* 26 | 27 | 28 | 29 | 30 | 31 | ${project.basedir}/README.txt 32 | META-INF 33 | HermiT-README.txt 34 | 35 | 36 | ${project.basedir}/lgpl-3.0.txt 37 | META-INF 38 | HermiT-LGPL.LICENSE 39 | 40 | 41 | ${project.basedir}/gpl-3.0.txt 42 | META-INF 43 | HermiT-GPL.LICENSE 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/assembly/protege-assembly.xml: -------------------------------------------------------------------------------- 1 | 5 | protege-assembly 6 | 7 | jar 8 | 9 | false 10 | 11 | 12 | 13 | false 14 | true 15 | runtime 16 | 17 | true 18 | 19 | gnu.getopt:java-getopt 20 | net.sourceforge.owlapi:owlapi-distribution 21 | 22 | 23 | 24 | 25 | 26 | 27 | ${project.build.outputDirectory} 28 | 29 | 30 | org/semanticweb/HermiT/cli/** 31 | 32 | 33 | 34 | 35 | 36 | ${project.basedir}/README.txt 37 | META-INF 38 | HermiT-README.txt 39 | 40 | 41 | ${project.basedir}/lgpl-3.0.txt 42 | META-INF 43 | HermiT-LGPL.LICENSE 44 | 45 | 46 | ${project.basedir}/gpl-3.0.txt 47 | META-INF 48 | HermiT-GPL.LICENSE 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/assembly/source-assembly.xml: -------------------------------------------------------------------------------- 1 | 5 | src 6 | 7 | zip 8 | 9 | 10 | 11 | ${project.basedir} 12 | 13 | gpl-3.0.txt 14 | lgpl-3.0.txt 15 | pom.xml 16 | README.txt 17 | update.properties 18 | 19 | true 20 | 21 | 22 | ${project.basedir}/examples 23 | true 24 | 25 | 26 | ${project.basedir}/src 27 | true 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/blocking/BlockingSignature.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.blocking; 19 | 20 | import org.semanticweb.HermiT.tableau.Node; 21 | 22 | public abstract class BlockingSignature { 23 | protected BlockingSignature m_nextEntry; 24 | 25 | public BlockingSignature() { 26 | m_nextEntry=null; 27 | } 28 | public final BlockingSignature getNextEntry() { 29 | return m_nextEntry; 30 | } 31 | public void setNextEntry(BlockingSignature nextEntry) { 32 | m_nextEntry=nextEntry; 33 | } 34 | public abstract boolean blocksNode(Node node); 35 | public abstract int hashCode(); 36 | public abstract boolean equals(Object that); 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/blocking/DirectBlockingChecker.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.blocking; 19 | 20 | import org.semanticweb.HermiT.model.AtomicRole; 21 | import org.semanticweb.HermiT.model.Concept; 22 | import org.semanticweb.HermiT.model.DataRange; 23 | import org.semanticweb.HermiT.tableau.Node; 24 | import org.semanticweb.HermiT.tableau.Tableau; 25 | 26 | public interface DirectBlockingChecker { 27 | void initialize(Tableau tableau); 28 | void clear(); 29 | boolean isBlockedBy(Node blocker,Node blocked); 30 | int blockingHashCode(Node node); 31 | boolean canBeBlocker(Node node); 32 | /** 33 | * @param node 34 | * @return true if node is a tree node 35 | */ 36 | boolean canBeBlocked(Node node); 37 | boolean hasBlockingInfoChanged(Node node); 38 | void clearBlockingInfoChanged(Node node); 39 | boolean hasChangedSinceValidation(Node node); 40 | void setHasChangedSinceValidation(Node node, boolean hasChanged); 41 | void nodeInitialized(Node node); 42 | void nodeDestroyed(Node node); 43 | Node assertionAdded(Concept concept,Node node,boolean isCore); 44 | Node assertionRemoved(Concept concept,Node node,boolean isCore); 45 | Node assertionAdded(DataRange range,Node node,boolean isCore); 46 | Node assertionRemoved(DataRange range,Node node,boolean isCore); 47 | Node assertionAdded(AtomicRole atomicRole,Node nodeFrom,Node nodeTo,boolean isCore); 48 | Node assertionRemoved(AtomicRole atomicRole,Node nodeFrom,Node nodeTo,boolean isCore); 49 | Node nodesMerged(Node mergeFrom,Node mergeInto); 50 | Node nodesUnmerged(Node mergeFrom,Node mergeInto); 51 | BlockingSignature getBlockingSignatureFor(Node node); 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datalog/QueryResultCollector.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.datalog; 2 | 3 | import org.semanticweb.HermiT.model.Term; 4 | 5 | public interface QueryResultCollector { 6 | void processResult(ConjunctiveQuery conjunctiveQuery,Term[] result); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/DatatypeHandler.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes; 19 | 20 | import java.util.Set; 21 | 22 | import org.semanticweb.HermiT.model.DatatypeRestriction; 23 | 24 | /** 25 | * Implements the functions needed for a particular datatype. 26 | */ 27 | public interface DatatypeHandler { 28 | Set getManagedDatatypeURIs(); 29 | Object parseLiteral(String lexicalForm,String datatypeURI) throws MalformedLiteralException; 30 | void validateDatatypeRestriction(DatatypeRestriction datatypeRestriction) throws UnsupportedFacetException; 31 | ValueSpaceSubset createValueSpaceSubset(DatatypeRestriction datatypeRestriction); 32 | ValueSpaceSubset conjoinWithDR(ValueSpaceSubset valueSpaceSubset,DatatypeRestriction datatypeRestriction); 33 | ValueSpaceSubset conjoinWithDRNegation(ValueSpaceSubset valueSpaceSubset,DatatypeRestriction datatypeRestriction); 34 | boolean isSubsetOf(String subsetDatatypeURI,String supersetDatatypeURI); 35 | boolean isDisjointWith(String datatypeURI1,String datatypeURI2); 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/MalformedLiteralException.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes; 19 | 20 | @SuppressWarnings("serial") 21 | public class MalformedLiteralException extends RuntimeException { 22 | 23 | public MalformedLiteralException(String lexicalForm,String datatypeURI) { 24 | this(lexicalForm,datatypeURI,null); 25 | } 26 | public MalformedLiteralException(String lexicalForm,String datatypeURI,Throwable cause) { 27 | super("Literal \""+lexicalForm+"\"^^<"+datatypeURI+"> is malformed",cause); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/UnsupportedDatatypeException.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes; 19 | 20 | @SuppressWarnings("serial") 21 | public class UnsupportedDatatypeException extends RuntimeException { 22 | 23 | public UnsupportedDatatypeException(String message) { 24 | super(message); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/UnsupportedFacetException.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes; 19 | 20 | @SuppressWarnings("serial") 21 | public class UnsupportedFacetException extends RuntimeException { 22 | 23 | public UnsupportedFacetException(String message) { 24 | super(message); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/ValueSpaceSubset.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes; 19 | 20 | import java.util.Collection; 21 | 22 | public interface ValueSpaceSubset { 23 | boolean hasCardinalityAtLeast(int number); 24 | boolean containsDataValue(Object dataValue); 25 | void enumerateDataValues(Collection dataValues); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/binarydata/BinaryDataType.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes.binarydata; 19 | 20 | public enum BinaryDataType { 21 | BASE_64_BINARY,HEX_BINARY 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/datetime/BoundType.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes.datetime; 19 | 20 | public enum BoundType { 21 | INCLUSIVE,EXCLUSIVE; 22 | 23 | public BoundType getComplement() { 24 | return values()[1-ordinal()]; 25 | } 26 | public static BoundType getMoreRestrictive(BoundType boundType1,BoundType boundType2) { 27 | int maxOrdinal=Math.max(boundType1.ordinal(),boundType2.ordinal()); 28 | return values()[maxOrdinal]; 29 | } 30 | } -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/datetime/IntervalType.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes.datetime; 19 | 20 | public enum IntervalType { 21 | WITH_TIMEZONE,WITHOUT_TIMEZONE 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/doublenum/EmptyDoubleSubset.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes.doublenum; 19 | 20 | import java.util.Collection; 21 | 22 | import org.semanticweb.HermiT.datatypes.ValueSpaceSubset; 23 | 24 | public class EmptyDoubleSubset implements ValueSpaceSubset { 25 | 26 | public boolean hasCardinalityAtLeast(int number) { 27 | return number<=0; 28 | } 29 | public boolean containsDataValue(Object dataValue) { 30 | return false; 31 | } 32 | public void enumerateDataValues(Collection dataValues) { 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/doublenum/EntireDoubleSubset.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes.doublenum; 19 | 20 | import java.util.Collection; 21 | 22 | import org.semanticweb.HermiT.datatypes.ValueSpaceSubset; 23 | 24 | public class EntireDoubleSubset implements ValueSpaceSubset { 25 | 26 | public boolean hasCardinalityAtLeast(int number) { 27 | int leftover=DoubleInterval.subtractIntervalSizeFrom(Double.NEGATIVE_INFINITY,Double.POSITIVE_INFINITY,number); 28 | // The following check contains 1 because there is one NaN in the value space. 29 | return leftover<=1; 30 | } 31 | public boolean containsDataValue(Object dataValue) { 32 | if (dataValue instanceof Double) 33 | return true; 34 | return false; 35 | } 36 | public void enumerateDataValues(Collection dataValues) { 37 | dataValues.add(Double.NaN); 38 | double number=Double.NEGATIVE_INFINITY; 39 | while (!DoubleInterval.areIdentical(number,Double.POSITIVE_INFINITY)) { 40 | dataValues.add(number); 41 | number=DoubleInterval.nextDouble(number); 42 | } 43 | dataValues.add(Double.POSITIVE_INFINITY); 44 | } 45 | public String toString() { 46 | return "xsd:double"; 47 | } 48 | } -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/floatnum/EmptyFloatSubset.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes.floatnum; 19 | 20 | import java.util.Collection; 21 | 22 | import org.semanticweb.HermiT.datatypes.ValueSpaceSubset; 23 | 24 | public class EmptyFloatSubset implements ValueSpaceSubset { 25 | 26 | public boolean hasCardinalityAtLeast(int number) { 27 | return number<=0; 28 | } 29 | public boolean containsDataValue(Object dataValue) { 30 | return false; 31 | } 32 | public void enumerateDataValues(Collection dataValues) { 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/floatnum/EntireFloatSubset.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes.floatnum; 19 | 20 | import java.util.Collection; 21 | 22 | import org.semanticweb.HermiT.datatypes.ValueSpaceSubset; 23 | 24 | public class EntireFloatSubset implements ValueSpaceSubset { 25 | 26 | public boolean hasCardinalityAtLeast(int number) { 27 | int leftover=FloatInterval.subtractIntervalSizeFrom(Float.NEGATIVE_INFINITY,Float.POSITIVE_INFINITY,number); 28 | // The following check contains 1 because there is one NaN in the value space. 29 | return leftover<=1; 30 | } 31 | public boolean containsDataValue(Object dataValue) { 32 | if (dataValue instanceof Float) 33 | return true; 34 | return false; 35 | } 36 | public void enumerateDataValues(Collection dataValues) { 37 | dataValues.add(Float.NaN); 38 | float number=Float.NEGATIVE_INFINITY; 39 | while (!FloatInterval.areIdentical(number,Float.POSITIVE_INFINITY)) { 40 | dataValues.add(number); 41 | number=FloatInterval.nextFloat(number); 42 | } 43 | dataValues.add(Float.POSITIVE_INFINITY); 44 | } 45 | public String toString() { 46 | return "xsd:float"; 47 | } 48 | } -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/owlreal/BoundType.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes.owlreal; 19 | 20 | public enum BoundType { 21 | INCLUSIVE,EXCLUSIVE; 22 | 23 | public BoundType getComplement() { 24 | return values()[1-ordinal()]; 25 | } 26 | public static BoundType getMoreRestrictive(BoundType boundType1,BoundType boundType2) { 27 | int maxOrdinal=Math.max(boundType1.ordinal(),boundType2.ordinal()); 28 | return values()[maxOrdinal]; 29 | } 30 | } -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/owlreal/MinusInfinity.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes.owlreal; 19 | 20 | public final class MinusInfinity extends Number { 21 | private static final long serialVersionUID=-205551124673073593L; 22 | public static final MinusInfinity INSTANCE=new MinusInfinity(); 23 | 24 | private MinusInfinity() { 25 | } 26 | @Override 27 | public boolean equals(Object that) { 28 | return this==that; 29 | } 30 | @Override 31 | public int hashCode() { 32 | return System.identityHashCode(this); 33 | } 34 | public String toString() { 35 | return "-INF"; 36 | } 37 | public double doubleValue() { 38 | throw new UnsupportedOperationException(); 39 | } 40 | public float floatValue() { 41 | throw new UnsupportedOperationException(); 42 | } 43 | public int intValue() { 44 | throw new UnsupportedOperationException(); 45 | } 46 | public long longValue() { 47 | throw new UnsupportedOperationException(); 48 | } 49 | protected Object readResolve() { 50 | return INSTANCE; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/owlreal/NumberRange.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes.owlreal; 19 | 20 | import java.math.BigDecimal; 21 | import java.math.BigInteger; 22 | 23 | public enum NumberRange { 24 | NOTHING,INTEGER,DECIMAL,RATIONAL,REAL; 25 | 26 | public boolean isDense() { 27 | return ordinal()>=DECIMAL.ordinal(); 28 | } 29 | public static NumberRange intersection(NumberRange it1,NumberRange it2) { 30 | int minOrdinal=Math.min(it1.ordinal(),it2.ordinal()); 31 | return values()[minOrdinal]; 32 | } 33 | public static NumberRange union(NumberRange it1,NumberRange it2) { 34 | int maxOrdinal=Math.max(it1.ordinal(),it2.ordinal()); 35 | return values()[maxOrdinal]; 36 | } 37 | public static boolean isSubsetOf(NumberRange subset,NumberRange superset) { 38 | return subset.ordinal()<=superset.ordinal(); 39 | } 40 | public static NumberRange getMostSpecificRange(Number n) { 41 | if (n instanceof Integer || n instanceof Long || n instanceof BigInteger) 42 | return INTEGER; 43 | else if (n instanceof BigDecimal) 44 | return DECIMAL; 45 | else if (n instanceof BigRational) 46 | return RATIONAL; 47 | else 48 | throw new IllegalArgumentException(); 49 | } 50 | } -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/owlreal/PlusInfinity.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes.owlreal; 19 | 20 | public final class PlusInfinity extends Number { 21 | private static final long serialVersionUID=-205551124673073593L; 22 | public static final PlusInfinity INSTANCE=new PlusInfinity(); 23 | 24 | private PlusInfinity() { 25 | } 26 | @Override 27 | public boolean equals(Object that) { 28 | return this==that; 29 | } 30 | @Override 31 | public int hashCode() { 32 | return System.identityHashCode(this); 33 | } 34 | public String toString() { 35 | return "+INF"; 36 | } 37 | public double doubleValue() { 38 | throw new UnsupportedOperationException(); 39 | } 40 | public float floatValue() { 41 | throw new UnsupportedOperationException(); 42 | } 43 | public int intValue() { 44 | throw new UnsupportedOperationException(); 45 | } 46 | public long longValue() { 47 | throw new UnsupportedOperationException(); 48 | } 49 | protected Object readResolve() { 50 | return INSTANCE; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/rdfplainliteral/RDFPlainLiteralDataValue.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.datatypes.rdfplainliteral; 19 | 20 | /** 21 | * Implements a string with a language tag -- that is, a data value from the value space of rdf:PlainLiteral. 22 | */ 23 | public class RDFPlainLiteralDataValue { 24 | protected final String m_string; 25 | protected final String m_languageTag; 26 | 27 | public RDFPlainLiteralDataValue(String string,String languageTag) { 28 | m_string=string; 29 | m_languageTag=languageTag; 30 | } 31 | public String getString() { 32 | return m_string; 33 | } 34 | public String getLanguageTag() { 35 | return m_languageTag; 36 | } 37 | public int hashCode() { 38 | return m_string.hashCode()*3+m_languageTag.hashCode(); 39 | } 40 | public boolean equals(Object that) { 41 | if (this==that) 42 | return true; 43 | if (!(that instanceof RDFPlainLiteralDataValue)) 44 | return false; 45 | RDFPlainLiteralDataValue thatValue=(RDFPlainLiteralDataValue)that; 46 | return thatValue.m_string.equals(m_string) && thatValue.m_languageTag.equals(m_languageTag); 47 | } 48 | public String toString() { 49 | return '\"'+m_string+"\"@"+m_languageTag; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/datatypes/xmlliteral/XMLLiteral.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.datatypes.xmlliteral; 2 | 3 | import org.apache.axiom.c14n.impl.Canonicalizer20010315ExclWithComments; 4 | 5 | 6 | public class XMLLiteral { 7 | protected final String m_xml; 8 | 9 | public XMLLiteral(String xml) { 10 | m_xml=xml; 11 | } 12 | public String getXML() { 13 | return m_xml; 14 | } 15 | public boolean equals(Object that) { 16 | if (this==that) 17 | return true; 18 | if (!(that instanceof XMLLiteral)) 19 | return false; 20 | return ((XMLLiteral)that).m_xml.equals(m_xml); 21 | } 22 | public int hashCode() { 23 | return m_xml.hashCode(); 24 | } 25 | public String toString() { 26 | return m_xml; 27 | } 28 | public static XMLLiteral parse(String lexicalForm) throws Exception { 29 | String enclosedXML=""+lexicalForm+""; 30 | Canonicalizer20010315ExclWithComments canonicalizer=new Canonicalizer20010315ExclWithComments(); 31 | byte result[]=canonicalizer.engineCanonicalize(enclosedXML.getBytes("UTF-8")); 32 | String canonicalXML=new String(result,"UTF-8"); 33 | assert canonicalXML.startsWith(""); 34 | assert canonicalXML.endsWith(""); 35 | canonicalXML=canonicalXML.substring("".length(),canonicalXML.length()-"".length()); 36 | return new XMLLiteral(canonicalXML); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/debugger/commands/ActiveNodesCommand.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.debugger.commands; 19 | 20 | import java.io.CharArrayWriter; 21 | import java.io.PrintWriter; 22 | 23 | import org.semanticweb.HermiT.debugger.Debugger; 24 | import org.semanticweb.HermiT.tableau.Node; 25 | 26 | public class ActiveNodesCommand extends AbstractCommand { 27 | public ActiveNodesCommand(Debugger debugger) { 28 | super(debugger); 29 | } 30 | public String getCommandName() { 31 | return "activeNodes"; 32 | } 33 | public String[] getDescription() { 34 | return new String[] { "","shows all active nodes" }; 35 | } 36 | public void printHelp(PrintWriter writer) { 37 | writer.println("usage: activeNodes"); 38 | writer.println(" Prints list of all active (non-blocked) nodes in the current model."); 39 | } 40 | public void execute(String[] args) { 41 | int numberOfNodes=0; 42 | CharArrayWriter buffer=new CharArrayWriter(); 43 | PrintWriter writer=new PrintWriter(buffer); 44 | writer.println("==========================================="); 45 | writer.println(" ID"); 46 | writer.println("==========================================="); 47 | Node node=m_debugger.getTableau().getFirstTableauNode(); 48 | while (node!=null) { 49 | if (!node.isBlocked()) { 50 | numberOfNodes++; 51 | writer.print(" "); 52 | writer.println(node.getNodeID()); 53 | } 54 | node=node.getNextTableauNode(); 55 | } 56 | writer.flush(); 57 | showTextInWindow("Active nodes ("+numberOfNodes+"):"+buffer.toString(),"Active nodes"); 58 | selectConsoleWindow(); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/debugger/commands/AgainCommand.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.debugger.commands; 19 | 20 | import java.io.PrintWriter; 21 | 22 | import org.semanticweb.HermiT.debugger.Debugger; 23 | 24 | public class AgainCommand extends AbstractCommand { 25 | 26 | public AgainCommand(Debugger debugger) { 27 | super(debugger); 28 | } 29 | public String getCommandName() { 30 | return "a"; 31 | } 32 | public String[] getDescription() { 33 | return new String[] { "","executes the last command again" }; 34 | } 35 | public void printHelp(PrintWriter writer) { 36 | writer.println("usage: a"); 37 | writer.println(" Executes the last command again."); 38 | } 39 | public void execute(String[] args) { 40 | String commandLine=m_debugger.getLastCommand(); 41 | if (commandLine!=null) { 42 | m_debugger.getOutput().println("# "+commandLine); 43 | m_debugger.processCommandLine(commandLine); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/debugger/commands/BreakpointTimeCommand.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.debugger.commands; 19 | 20 | import java.io.PrintWriter; 21 | 22 | import org.semanticweb.HermiT.debugger.Debugger; 23 | 24 | public class BreakpointTimeCommand extends AbstractCommand { 25 | 26 | public BreakpointTimeCommand(Debugger debugger) { 27 | super(debugger); 28 | } 29 | public String getCommandName() { 30 | return "bpTime"; 31 | } 32 | public String[] getDescription() { 33 | return new String[] { "timeInSeconds","sets the break point time" }; 34 | } 35 | public void printHelp(PrintWriter writer) { 36 | writer.println("usage: bpTime timeInSeconds"); 37 | writer.println(" Sets the breakpoint time -- that is, after timeInSeconds,"); 38 | writer.println(" the debugger will return control to the user."); 39 | } 40 | public void execute(String[] args) { 41 | if (args.length<2) { 42 | m_debugger.getOutput().println("Time is missing."); 43 | return; 44 | } 45 | int breakpointTimeSeconds; 46 | try { 47 | breakpointTimeSeconds=Integer.parseInt(args[1]); 48 | } 49 | catch (NumberFormatException e) { 50 | m_debugger.getOutput().println("Invalid time."); 51 | return; 52 | } 53 | m_debugger.getOutput().println("Breakpoint time is "+breakpointTimeSeconds+" seconds."); 54 | m_debugger.setBreakpointTime(breakpointTimeSeconds*1000); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/debugger/commands/ClearCommand.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.debugger.commands; 19 | 20 | import java.io.PrintWriter; 21 | 22 | import org.semanticweb.HermiT.debugger.Debugger; 23 | 24 | public class ClearCommand extends AbstractCommand { 25 | 26 | public ClearCommand(Debugger debugger) { 27 | super(debugger); 28 | } 29 | public String getCommandName() { 30 | return "clear"; 31 | } 32 | public String[] getDescription() { 33 | return new String[] { "","clear the screen" }; 34 | } 35 | public void printHelp(PrintWriter writer) { 36 | writer.println("usage: clear"); 37 | writer.println(" Clear the command line screen. "); 38 | } 39 | public void execute(String[] args) { 40 | m_debugger.getConsoleTextArea().clear(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/debugger/commands/ContinueCommand.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.debugger.commands; 19 | 20 | import java.io.PrintWriter; 21 | 22 | import org.semanticweb.HermiT.debugger.Debugger; 23 | 24 | public class ContinueCommand extends AbstractCommand { 25 | 26 | public ContinueCommand(Debugger debugger) { 27 | super(debugger); 28 | } 29 | public String getCommandName() { 30 | return "c"; 31 | } 32 | public String[] getDescription() { 33 | return new String[] { "","continues with the current reasoning tasks" }; 34 | } 35 | public void printHelp(PrintWriter writer) { 36 | writer.println("usage: c"); 37 | writer.println(" Continues with the current reasoning tasks."); 38 | } 39 | public void execute(String[] args) { 40 | m_debugger.setInMainLoop(false); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/debugger/commands/DebuggerCommand.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.debugger.commands; 19 | 20 | import java.io.PrintWriter; 21 | 22 | public interface DebuggerCommand { 23 | String getCommandName(); 24 | String[] getDescription(); 25 | void printHelp(PrintWriter writer); 26 | void execute(String[] args); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/debugger/commands/ExitCommand.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.debugger.commands; 19 | 20 | import java.io.PrintWriter; 21 | 22 | import org.semanticweb.HermiT.debugger.Debugger; 23 | 24 | public class ExitCommand extends AbstractCommand { 25 | 26 | public ExitCommand(Debugger debugger) { 27 | super(debugger); 28 | } 29 | public String getCommandName() { 30 | return "exit"; 31 | } 32 | public String[] getDescription() { 33 | return new String[] { "","exits the curtrent process" }; 34 | } 35 | public void printHelp(PrintWriter writer) { 36 | writer.println("usage: exit"); 37 | writer.println(" Exits the current process."); 38 | } 39 | public void execute(String[] args) { 40 | System.exit(0); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/debugger/commands/ForeverCommand.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.debugger.commands; 19 | 20 | import java.io.PrintWriter; 21 | 22 | import org.semanticweb.HermiT.debugger.Debugger; 23 | 24 | public class ForeverCommand extends AbstractCommand { 25 | 26 | public ForeverCommand(Debugger debugger) { 27 | super(debugger); 28 | } 29 | public String getCommandName() { 30 | return "forever"; 31 | } 32 | public String[] getDescription() { 33 | return new String[] { "","run and do not wait for further input" }; 34 | } 35 | public void printHelp(PrintWriter writer) { 36 | writer.println("usage: forever"); 37 | writer.println(" Continues with the current reasoning task without"); 38 | writer.println(" waiting for further input by the user."); 39 | } 40 | public void execute(String[] args) { 41 | m_debugger.setInMainLoop(false); 42 | m_debugger.setForever(true); 43 | m_debugger.setSinglestep(false); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/debugger/commands/HistoryCommand.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.debugger.commands; 19 | 20 | import java.io.PrintWriter; 21 | 22 | import org.semanticweb.HermiT.debugger.Debugger; 23 | 24 | public class HistoryCommand extends AbstractCommand { 25 | 26 | public HistoryCommand(Debugger debugger) { 27 | super(debugger); 28 | } 29 | public String getCommandName() { 30 | return "history"; 31 | } 32 | public String[] getDescription() { 33 | return new String[] { "on|off","switch derivation history on/off" }; 34 | } 35 | public void printHelp(PrintWriter writer) { 36 | writer.println("usage: history on/off"); 37 | writer.println(" Switches the derivation history on or off."); 38 | } 39 | public void execute(String[] args) { 40 | if (args.length<2) { 41 | m_debugger.getOutput().println("The status is missing."); 42 | return; 43 | } 44 | String status=args[1].toLowerCase(); 45 | if ("on".equals(status)) { 46 | m_debugger.setForwardingOn(true); 47 | m_debugger.getOutput().println("Derivation history on."); 48 | } 49 | else if ("off".equals(status)) { 50 | m_debugger.setForwardingOn(false); 51 | m_debugger.getOutput().println("Derivation history off."); 52 | } 53 | else 54 | m_debugger.getOutput().println("Incorrect history status '"+status+"'."); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/debugger/commands/ShowNodeCommand.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.debugger.commands; 19 | 20 | import java.io.CharArrayWriter; 21 | import java.io.PrintWriter; 22 | 23 | import org.semanticweb.HermiT.debugger.Debugger; 24 | import org.semanticweb.HermiT.debugger.Printing; 25 | import org.semanticweb.HermiT.tableau.Node; 26 | 27 | public class ShowNodeCommand extends AbstractCommand { 28 | 29 | public ShowNodeCommand(Debugger debugger) { 30 | super(debugger); 31 | } 32 | public String getCommandName() { 33 | return "showNode"; 34 | } 35 | public String[] getDescription() { 36 | return new String[] { "nodeID","prints information about the given node" }; 37 | } 38 | public void printHelp(PrintWriter writer) { 39 | writer.println("usage: showNode nodeID"); 40 | writer.println(" Prints information about the node for the given node ID."); 41 | } 42 | public void execute(String[] args) { 43 | if (args.length<2) { 44 | m_debugger.getOutput().println("Node ID is missing."); 45 | return; 46 | } 47 | int nodeID; 48 | try { 49 | nodeID=Integer.parseInt(args[1]); 50 | } 51 | catch (NumberFormatException e) { 52 | m_debugger.getOutput().println("Invalid ID of the first node."); 53 | return; 54 | } 55 | Node node=m_debugger.getTableau().getNode(nodeID); 56 | if (node==null) { 57 | m_debugger.getOutput().println("Node with ID '"+nodeID+"' not found."); 58 | return; 59 | } 60 | CharArrayWriter buffer=new CharArrayWriter(); 61 | PrintWriter writer=new PrintWriter(buffer); 62 | Printing.printNodeData(m_debugger,node,writer); 63 | writer.flush(); 64 | showTextInWindow(buffer.toString(),"Node '"+node.getNodeID()+"'"); 65 | selectConsoleWindow(); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/debugger/commands/SingleStepCommand.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.debugger.commands; 19 | 20 | import java.io.PrintWriter; 21 | 22 | import org.semanticweb.HermiT.debugger.Debugger; 23 | 24 | public class SingleStepCommand extends AbstractCommand { 25 | 26 | public SingleStepCommand(Debugger debugger) { 27 | super(debugger); 28 | } 29 | public String getCommandName() { 30 | return "singleStep"; 31 | } 32 | public String[] getDescription() { 33 | return new String[] { "on|off","step-by-step mode on or off" }; 34 | } 35 | public void printHelp(PrintWriter writer) { 36 | writer.println("usage: singleStep on|off"); 37 | writer.println(" If on, the debugger will return control to the user after each step."); 38 | writer.println(" If off, the debugger will run until a breakpoint is reached."); 39 | } 40 | public void execute(String[] args) { 41 | if (args.length<2) { 42 | m_debugger.getOutput().println("The status is missing."); 43 | return; 44 | } 45 | String status=args[1].toLowerCase(); 46 | if ("on".equals(status)) { 47 | m_debugger.setSinglestep(true); 48 | m_debugger.getOutput().println("Single step mode on."); 49 | } 50 | else if ("off".equals(status)) { 51 | m_debugger.setSinglestep(false); 52 | m_debugger.getOutput().println("Single step mode off."); 53 | } 54 | else 55 | m_debugger.getOutput().println("Incorrect single step mode '"+status+"'."); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/existentials/CreationOrderStrategy.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.existentials; 19 | 20 | import java.io.Serializable; 21 | 22 | import org.semanticweb.HermiT.blocking.BlockingStrategy; 23 | import org.semanticweb.HermiT.model.AtLeast; 24 | import org.semanticweb.HermiT.tableau.Node; 25 | 26 | /** 27 | * Strategy for expanding all existentials on the oldest node in the tableau with unexpanded existentials. 28 | * This usually closely approximates a breadth-first expansion. (Existentials introduced onto parent nodes 29 | * as a result of constraints on their children can produce newer nodes of lower depth than older nodes, 30 | * which could result in slight non-breadth-first behavior.) 31 | */ 32 | public class CreationOrderStrategy extends AbstractExpansionStrategy implements Serializable { 33 | private static final long serialVersionUID=-64673639237063636L; 34 | 35 | public CreationOrderStrategy(BlockingStrategy strategy) { 36 | super(strategy,true); 37 | } 38 | public boolean isDeterministic() { 39 | return true; 40 | } 41 | protected void expandExistential(AtLeast atLeast,Node forNode) { 42 | m_existentialExpansionManager.expand(atLeast,forNode); 43 | m_existentialExpansionManager.markExistentialProcessed(atLeast,forNode); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/hierarchy/ClassificationProgressMonitor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package org.semanticweb.HermiT.hierarchy; 5 | 6 | import org.semanticweb.HermiT.model.AtomicConcept; 7 | 8 | public interface ClassificationProgressMonitor { 9 | void elementClassified(AtomicConcept element); 10 | } -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/AtLeast.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | 21 | 22 | /** 23 | * Represents at-least concepts, either for data ranges or concepts. 24 | */ 25 | public abstract class AtLeast extends ExistentialConcept implements DLPredicate { 26 | private static final long serialVersionUID = -5450065396132818872L; 27 | 28 | protected final int m_number; 29 | protected final Role m_onRole; 30 | 31 | protected AtLeast(int number,Role onRole) { 32 | m_number=number; 33 | m_onRole=onRole; 34 | } 35 | public int getNumber() { 36 | return m_number; 37 | } 38 | public Role getOnRole() { 39 | return m_onRole; 40 | } 41 | public int getArity() { 42 | return 1; 43 | } 44 | public boolean isAlwaysTrue() { 45 | return false; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/AtLeastConcept.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import org.semanticweb.HermiT.Prefixes; 21 | 22 | /** 23 | * Represents at-least concept. 24 | */ 25 | public class AtLeastConcept extends AtLeast { 26 | private static final long serialVersionUID=4326267535193393030L; 27 | 28 | protected final LiteralConcept m_toConcept; 29 | 30 | protected AtLeastConcept(int number,Role onRole,LiteralConcept toConcept) { 31 | super(number,onRole); 32 | m_toConcept=toConcept; 33 | } 34 | public LiteralConcept getToConcept() { 35 | return m_toConcept; 36 | } 37 | public boolean isAlwaysFalse() { 38 | return m_toConcept.isAlwaysFalse(); 39 | } 40 | public String toString(Prefixes prefixes) { 41 | return "atLeast("+m_number+' '+m_onRole.toString(prefixes)+' '+m_toConcept.toString(prefixes)+')'; 42 | } 43 | protected Object readResolve() { 44 | return s_interningManager.intern(this); 45 | } 46 | 47 | protected static InterningManager s_interningManager=new InterningManager() { 48 | protected boolean equal(AtLeastConcept object1,AtLeastConcept object2) { 49 | return object1.m_number==object2.m_number && object1.m_onRole==object2.m_onRole && object1.m_toConcept==object2.m_toConcept; 50 | } 51 | protected int getHashCode(AtLeastConcept object) { 52 | return (object.m_number*7+object.m_onRole.hashCode())*7+object.m_toConcept.hashCode(); 53 | } 54 | }; 55 | 56 | public static AtLeastConcept create(int number,Role onRole,LiteralConcept toConcept) { 57 | return s_interningManager.intern(new AtLeastConcept(number,onRole,toConcept)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/AtLeastDataRange.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import org.semanticweb.HermiT.Prefixes; 21 | 22 | /** 23 | * Represents at-least concept. 24 | */ 25 | public class AtLeastDataRange extends AtLeast { 26 | private static final long serialVersionUID=4326267535193393030L; 27 | 28 | protected final LiteralDataRange m_toDataRange; 29 | 30 | protected AtLeastDataRange(int number,Role onRole,LiteralDataRange toConcept) { 31 | super(number, onRole); 32 | m_toDataRange=toConcept; 33 | } 34 | public LiteralDataRange getToDataRange() { 35 | return m_toDataRange; 36 | } 37 | public boolean isAlwaysFalse() { 38 | return m_toDataRange.isAlwaysFalse(); 39 | } 40 | protected Object readResolve() { 41 | return s_interningManager.intern(this); 42 | } 43 | public String toString(Prefixes prefixes) { 44 | return "atLeast("+m_number+' '+m_onRole.toString(prefixes)+' '+m_toDataRange.toString(prefixes)+')'; 45 | } 46 | 47 | protected static InterningManager s_interningManager=new InterningManager() { 48 | protected boolean equal(AtLeastDataRange object1,AtLeastDataRange object2) { 49 | return object1.m_number==object2.m_number && object1.m_onRole==object2.m_onRole && object1.m_toDataRange==object2.m_toDataRange; 50 | } 51 | protected int getHashCode(AtLeastDataRange object) { 52 | return (object.m_number*7+object.m_onRole.hashCode())*7+object.m_toDataRange.hashCode(); 53 | } 54 | }; 55 | 56 | public static AtLeastDataRange create(int number,Role onRole,LiteralDataRange toDataRange) { 57 | return s_interningManager.intern(new AtLeastDataRange(number,onRole,toDataRange)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/AtomicDataRange.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | /** 21 | * Represents an atomic data range -- that is, an datatype, a datatype restriction, an internal datatype, or an enumeration of constants (oneOf) 22 | */ 23 | public abstract class AtomicDataRange extends LiteralDataRange { 24 | private static final long serialVersionUID = 8843660377807760406L; 25 | 26 | public abstract LiteralDataRange getNegation(); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/AtomicNegationConcept.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import org.semanticweb.HermiT.Prefixes; 21 | 22 | /** 23 | * Represents a negation of an atomic concept. 24 | */ 25 | public class AtomicNegationConcept extends LiteralConcept { 26 | private static final long serialVersionUID=-4635386233266966577L; 27 | 28 | protected final AtomicConcept m_negatedAtomicConcept; 29 | 30 | protected AtomicNegationConcept(AtomicConcept negatedAtomicConcept) { 31 | m_negatedAtomicConcept=negatedAtomicConcept; 32 | } 33 | public AtomicConcept getNegatedAtomicConcept() { 34 | return m_negatedAtomicConcept; 35 | } 36 | public LiteralConcept getNegation() { 37 | return m_negatedAtomicConcept; 38 | } 39 | public boolean isAlwaysTrue() { 40 | return m_negatedAtomicConcept.isAlwaysFalse(); 41 | } 42 | public boolean isAlwaysFalse() { 43 | return m_negatedAtomicConcept.isAlwaysTrue(); 44 | } 45 | public String toString(Prefixes prefixes) { 46 | return "not("+m_negatedAtomicConcept.toString(prefixes)+")"; 47 | } 48 | protected Object readResolve() { 49 | return s_interningManager.intern(this); 50 | } 51 | 52 | protected static InterningManager s_interningManager=new InterningManager() { 53 | protected boolean equal(AtomicNegationConcept object1,AtomicNegationConcept object2) { 54 | return object1.m_negatedAtomicConcept==object2.m_negatedAtomicConcept; 55 | } 56 | protected int getHashCode(AtomicNegationConcept object) { 57 | return -object.m_negatedAtomicConcept.hashCode(); 58 | } 59 | }; 60 | 61 | public static AtomicNegationConcept create(AtomicConcept negatedAtomicConcept) { 62 | return s_interningManager.intern(new AtomicNegationConcept(negatedAtomicConcept)); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/Concept.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import java.io.Serializable; 21 | 22 | import org.semanticweb.HermiT.Prefixes; 23 | 24 | /** 25 | * Represents a (complex) concept. 26 | */ 27 | public abstract class Concept implements Serializable { 28 | private static final long serialVersionUID=-8685976675539160944L; 29 | 30 | public abstract boolean isAlwaysTrue(); 31 | public abstract boolean isAlwaysFalse(); 32 | public abstract String toString(Prefixes prefixes); 33 | public String toString() { 34 | return toString(Prefixes.ImmutablePrefixes.getStandartPrefixes()); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/DLPredicate.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import org.semanticweb.HermiT.Prefixes; 21 | 22 | /** 23 | * Represents a DL predicate. 24 | */ 25 | public interface DLPredicate { 26 | int getArity(); 27 | String toString(Prefixes prefixes); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/DataRange.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | 19 | package org.semanticweb.HermiT.model; 20 | 21 | import java.io.Serializable; 22 | 23 | import org.semanticweb.HermiT.Prefixes; 24 | 25 | 26 | /** 27 | * Represents a data range in a DL clause. 28 | */ 29 | public abstract class DataRange implements Serializable { 30 | private static final long serialVersionUID=352467050584766830L; 31 | 32 | public abstract boolean isAlwaysTrue(); 33 | public abstract boolean isAlwaysFalse(); 34 | public int getArity() { 35 | return 1; 36 | } 37 | public abstract String toString(Prefixes prefixes); 38 | public String toString() { 39 | return toString(Prefixes.ImmutablePrefixes.getStandartPrefixes()); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/Equality.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import java.io.Serializable; 21 | 22 | import org.semanticweb.HermiT.Prefixes; 23 | 24 | /** 25 | * Represents the equality predicate. 26 | */ 27 | public class Equality implements DLPredicate,Serializable { 28 | private static final long serialVersionUID=8308051741088513244L; 29 | 30 | public static final Equality INSTANCE=new Equality(); 31 | 32 | protected Equality () { 33 | } 34 | public int getArity() { 35 | return 2; 36 | } 37 | public String toString(Prefixes prefixes) { 38 | return "=="; 39 | } 40 | public String toOrderedString(Prefixes prefixes) { 41 | return toString(prefixes); 42 | } 43 | public String toString() { 44 | return toString(Prefixes.ImmutablePrefixes.getStandartPrefixes()); 45 | } 46 | protected Object readResolve() { 47 | return INSTANCE; 48 | } 49 | public static Equality create() { 50 | return INSTANCE; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/ExistentialConcept.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | public abstract class ExistentialConcept extends Concept { 21 | private static final long serialVersionUID=-1578295401143709109L; 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/Inequality.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import java.io.Serializable; 21 | 22 | import org.semanticweb.HermiT.Prefixes; 23 | 24 | /** 25 | * Represents the inequality predicate. 26 | */ 27 | public class Inequality implements DLPredicate,Serializable { 28 | private static final long serialVersionUID=296924110684230279L; 29 | 30 | public static final Inequality INSTANCE=new Inequality(); 31 | 32 | protected Inequality () { 33 | } 34 | public int getArity() { 35 | return 2; 36 | } 37 | public String toString(Prefixes prefixes) { 38 | return "!="; 39 | } 40 | public String toString() { 41 | return toString(Prefixes.ImmutablePrefixes.getStandartPrefixes()); 42 | } 43 | protected Object readResolve() { 44 | return INSTANCE; 45 | } 46 | public static Inequality create() { 47 | return INSTANCE; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/InverseRole.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import org.semanticweb.HermiT.Prefixes; 21 | 22 | /** 23 | * Represents an inverse role. 24 | */ 25 | public class InverseRole extends Role { 26 | private static final long serialVersionUID=3351701933728011998L; 27 | 28 | protected final AtomicRole m_inverseOf; 29 | 30 | public InverseRole(AtomicRole inverseOf) { 31 | m_inverseOf=inverseOf; 32 | } 33 | public AtomicRole getInverseOf() { 34 | return m_inverseOf; 35 | } 36 | public Role getInverse() { 37 | return m_inverseOf; 38 | } 39 | public Atom getRoleAssertion(Term term0,Term term1) { 40 | return Atom.create(m_inverseOf,term1,term0); 41 | } 42 | public String toString(Prefixes prefixes) { 43 | return "inv("+m_inverseOf.toString(prefixes)+")"; 44 | } 45 | protected Object readResolve() { 46 | return s_interningManager.intern(this); 47 | } 48 | 49 | protected static InterningManager s_interningManager=new InterningManager() { 50 | protected boolean equal(InverseRole object1,InverseRole object2) { 51 | return object1.m_inverseOf==object2.m_inverseOf; 52 | } 53 | protected int getHashCode(InverseRole object) { 54 | return -object.m_inverseOf.hashCode(); 55 | } 56 | }; 57 | 58 | public static InverseRole create(AtomicRole inverseOf) { 59 | return s_interningManager.intern(new InverseRole(inverseOf)); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/LiteralConcept.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | /** 21 | * Represents a literal concept -- that is, an atomic concept, a negation of an atomic concept, or a data range. 22 | */ 23 | public abstract class LiteralConcept extends Concept { 24 | private static final long serialVersionUID=-2302452747339289424L; 25 | 26 | public abstract LiteralConcept getNegation(); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/LiteralDataRange.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | /** 21 | * Represents a literal concept -- that is, an atomic concept, a negation of an atomic concept, or a data range. 22 | */ 23 | public abstract class LiteralDataRange extends DataRange implements DLPredicate { 24 | private static final long serialVersionUID=-2302452747339289424L; 25 | 26 | public abstract LiteralDataRange getNegation(); 27 | public boolean isInternalDatatype() { 28 | return false; 29 | } 30 | public boolean isNegatedInternalDatatype() { 31 | return false; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/NegatedAtomicRole.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import org.semanticweb.HermiT.Prefixes; 21 | 22 | /** 23 | * Represents a negated atomic role 24 | */ 25 | public class NegatedAtomicRole { 26 | 27 | protected final AtomicRole m_negatedAtomicRole; 28 | 29 | public NegatedAtomicRole(AtomicRole negatedAtomicRole) { 30 | m_negatedAtomicRole=negatedAtomicRole; 31 | } 32 | public AtomicRole getNegatedAtomicRole() { 33 | return m_negatedAtomicRole; 34 | } 35 | public String toString() { 36 | return toString(Prefixes.ImmutablePrefixes.getStandartPrefixes()); 37 | } 38 | public String toString(Prefixes prefixes) { 39 | return "not("+m_negatedAtomicRole.toString(prefixes)+")"; 40 | } 41 | protected Object readResolve() { 42 | return s_interningManager.intern(this); 43 | } 44 | 45 | protected static InterningManager s_interningManager=new InterningManager() { 46 | protected boolean equal(NegatedAtomicRole object1,NegatedAtomicRole object2) { 47 | return object1.m_negatedAtomicRole==object2.m_negatedAtomicRole; 48 | } 49 | protected int getHashCode(NegatedAtomicRole object) { 50 | return -object.m_negatedAtomicRole.hashCode(); 51 | } 52 | }; 53 | 54 | public static NegatedAtomicRole create(AtomicRole negatedAtomicRole) { 55 | return s_interningManager.intern(new NegatedAtomicRole(negatedAtomicRole)); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/NodeIDLessEqualThan.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import java.io.Serializable; 21 | 22 | import org.semanticweb.HermiT.Prefixes; 23 | 24 | /** 25 | * Represents the built-in predicate that is used to enforce ordering on nodes in the translation of at-most concepts. 26 | */ 27 | public class NodeIDLessEqualThan implements DLPredicate,Serializable { 28 | private static final long serialVersionUID=5572346926189452451L; 29 | public static final NodeIDLessEqualThan INSTANCE=new NodeIDLessEqualThan(); 30 | 31 | protected NodeIDLessEqualThan () { 32 | } 33 | public int getArity() { 34 | return 2; 35 | } 36 | public String toString(Prefixes prefixes) { 37 | return "<="; 38 | } 39 | public String toString() { 40 | return toString(Prefixes.ImmutablePrefixes.getStandartPrefixes()); 41 | } 42 | protected Object readResolve() { 43 | return INSTANCE; 44 | } 45 | public static NodeIDLessEqualThan create() { 46 | return INSTANCE; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/NodeIDsAscendingOrEqual.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import java.io.Serializable; 21 | 22 | import org.semanticweb.HermiT.Prefixes; 23 | 24 | /** 25 | * Represents a predicate that whether the IDs of the argument nodes are all strictly ascending or all equal. 26 | */ 27 | public class NodeIDsAscendingOrEqual implements DLPredicate,Serializable { 28 | private static final long serialVersionUID=7197886700065386931L; 29 | 30 | protected final int m_arity; 31 | 32 | protected NodeIDsAscendingOrEqual(int arity) { 33 | m_arity=arity; 34 | } 35 | public int getArity() { 36 | return m_arity; 37 | } 38 | protected Object readResolve() { 39 | return s_interningManager.intern(this); 40 | } 41 | public String toString(Prefixes prefixes) { 42 | return "NodeIDsAscendingOrEqual"; 43 | } 44 | protected static InterningManager s_interningManager=new InterningManager() { 45 | protected boolean equal(NodeIDsAscendingOrEqual object1,NodeIDsAscendingOrEqual object2) { 46 | return object1.m_arity==object2.m_arity; 47 | } 48 | protected int getHashCode(NodeIDsAscendingOrEqual object) { 49 | return object.m_arity; 50 | } 51 | }; 52 | 53 | public static NodeIDsAscendingOrEqual create(int arity) { 54 | return s_interningManager.intern(new NodeIDsAscendingOrEqual(arity)); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/Role.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import java.io.Serializable; 21 | 22 | import org.semanticweb.HermiT.Prefixes; 23 | 24 | /** 25 | * Represents a role. 26 | */ 27 | public abstract class Role implements Serializable { 28 | private static final long serialVersionUID=-6487260817445541931L; 29 | 30 | public abstract Role getInverse(); 31 | public abstract Atom getRoleAssertion(Term term0,Term term1); 32 | public abstract String toString(Prefixes prefixes); 33 | public String toString() { 34 | return toString(Prefixes.ImmutablePrefixes.getStandartPrefixes()); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/Term.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import java.io.Serializable; 21 | 22 | import org.semanticweb.HermiT.Prefixes; 23 | 24 | /** 25 | * Represents a term in a DL clause. 26 | */ 27 | public abstract class Term implements Serializable { 28 | private static final long serialVersionUID=-8524194708579485033L; 29 | 30 | public abstract String toString(Prefixes prefixes); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/model/Variable.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.model; 19 | 20 | import org.semanticweb.HermiT.Prefixes; 21 | 22 | /** 23 | * Represents a variable. 24 | */ 25 | public class Variable extends Term { 26 | private static final long serialVersionUID=-1943457771102512887L; 27 | 28 | protected final String m_name; 29 | 30 | protected Variable(String name) { 31 | m_name=name; 32 | } 33 | public String getName() { 34 | return m_name; 35 | } 36 | public String toString() { 37 | return toString(Prefixes.ImmutablePrefixes.getStandartPrefixes()); 38 | } 39 | public String toString(Prefixes prefixes) { 40 | return m_name; 41 | } 42 | protected Object readResolve() { 43 | return s_interningManager.intern(this); 44 | } 45 | 46 | protected static InterningManager s_interningManager=new InterningManager() { 47 | protected boolean equal(Variable object1,Variable object2) { 48 | return object1.m_name.equals(object2.m_name); 49 | } 50 | protected int getHashCode(Variable object) { 51 | return object.m_name.hashCode(); 52 | } 53 | }; 54 | 55 | public static Variable create(String name) { 56 | return s_interningManager.intern(new Variable(name)); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/monitor/TimerWithPause.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.monitor; 19 | 20 | import java.io.BufferedReader; 21 | import java.io.IOException; 22 | import java.io.InputStreamReader; 23 | 24 | public class TimerWithPause extends Timer { 25 | private static final long serialVersionUID=-9176603965017225734L; 26 | 27 | protected BufferedReader m_in; 28 | 29 | public TimerWithPause() { 30 | m_in=new BufferedReader(new InputStreamReader(System.in)); 31 | } 32 | protected void doStatistics() { 33 | super.doStatistics(); 34 | System.out.print("Press something to continue.. "); 35 | System.out.flush(); 36 | try { 37 | m_in.readLine(); 38 | } 39 | catch (IOException ignored) { 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/tableau/BranchingPoint.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.tableau; 19 | 20 | import java.io.Serializable; 21 | 22 | /** 23 | * Represents a branching point for the tableau given to the constructor. 24 | */ 25 | public class BranchingPoint implements Serializable { 26 | private static final long serialVersionUID=7306881534568051692L; 27 | 28 | protected final int m_level; 29 | protected final Node m_lastTableauNode; 30 | protected final Node m_lastMergedOrPrunedNode; 31 | protected final GroundDisjunction m_firstGroundDisjunction; 32 | protected final GroundDisjunction m_firstUnprocessedGroundDisjunction; 33 | 34 | public BranchingPoint(Tableau tableau) { 35 | m_level=tableau.m_currentBranchingPoint+1; 36 | m_lastTableauNode=tableau.m_lastTableauNode; 37 | m_lastMergedOrPrunedNode=tableau.m_lastMergedOrPrunedNode; 38 | m_firstGroundDisjunction=tableau.m_firstGroundDisjunction; 39 | m_firstUnprocessedGroundDisjunction=tableau.m_firstUnprocessedGroundDisjunction; 40 | } 41 | public int getLevel() { 42 | return m_level; 43 | } 44 | public void startNextChoice(Tableau tableau,DependencySet clashDepdendencySet) { 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/tableau/DependencySet.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.tableau; 19 | 20 | public interface DependencySet { 21 | boolean containsBranchingPoint(int branchingPoint); 22 | boolean isEmpty(); 23 | int getMaximumBranchingPoint(); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/tableau/InterruptCurrentTaskException.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.tableau; 19 | 20 | @SuppressWarnings("serial") 21 | public class InterruptCurrentTaskException extends RuntimeException { 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/semanticweb/HermiT/tableau/NodeType.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.tableau; 19 | 20 | public enum NodeType { 21 | NAMED_NODE(0,false,true),NI_NODE(1,false,true),ROOT_CONSTANT_NODE(1,false,false),TREE_NODE(2,true,true),GRAPH_NODE(2,true,true),CONCRETE_NODE(2,false,false); 22 | 23 | protected final int m_mergePrecedence; 24 | protected final boolean m_isNITarget; 25 | protected final boolean m_isAbstract; 26 | 27 | NodeType(int mergePrecedence, boolean isNITarget, boolean isAbstract) { 28 | m_mergePrecedence=mergePrecedence; 29 | m_isNITarget=isNITarget; 30 | m_isAbstract=isAbstract; 31 | } 32 | public int getMergePrecedence() { 33 | return m_mergePrecedence; 34 | } 35 | public boolean isNITarget() { 36 | return m_isNITarget; 37 | } 38 | public boolean isAbstract() { 39 | return m_isAbstract; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/resources/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/AllQuickTests.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestCase; 5 | import junit.framework.TestSuite; 6 | 7 | public class AllQuickTests extends TestCase { 8 | 9 | public static Test suite() throws Exception { 10 | TestSuite suite = new TestSuite("All HermiT tests"); 11 | // $JUnit-BEGIN$ 12 | 13 | // not running because the tests fail so often due to different concept definitions introduced for complex concepts depending on the parse order 14 | // Tests the normalization and clausification, when loading via the OWLAPI. 15 | //suite.addTest(org.semanticweb.HermiT.structural.AllTests.suite()); 16 | 17 | // Tests Hermit as a blackbox, i.e., by only using the official interface. 18 | suite.addTest(org.semanticweb.HermiT.reasoner.AllQuickTests.suite()); 19 | // Tests for the internals of the reasoner. 20 | suite.addTest(org.semanticweb.HermiT.tableau.AllTests.suite()); 21 | // Tests the graph library. 22 | suite.addTest(org.semanticweb.HermiT.graph.AllTests.suite()); 23 | // Rungs the WG tests. 24 | suite.addTest(org.semanticweb.HermiT.owl_wg_tests.AllNonRejectedNonExtracreditWGTests.suite()); 25 | // $JUnit-END$ 26 | return suite; 27 | } 28 | 29 | public static void main(String... args) throws Throwable { 30 | junit.textui.TestRunner.run(suite()); 31 | System.exit(0); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/AllTests.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestCase; 5 | import junit.framework.TestSuite; 6 | 7 | public class AllTests extends TestCase { 8 | 9 | public static Test suite() throws Exception { 10 | TestSuite suite = new TestSuite("All HermiT tests"); 11 | // $JUnit-BEGIN$ 12 | // Performs all quick tests. 13 | suite.addTest(org.semanticweb.HermiT.AllQuickTests.suite()); 14 | // Performs the heavy reasoner tests. 15 | suite.addTest(org.semanticweb.HermiT.reasoner.AllHeavyTests.suite()); 16 | // $JUnit-END$ 17 | return suite; 18 | } 19 | public static void main(String... args) throws Throwable { 20 | junit.textui.TestRunner.run(suite()); 21 | System.exit(0); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/graph/AllTests.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.graph; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestSuite; 5 | 6 | public class AllTests { 7 | 8 | public static Test suite() { 9 | TestSuite suite=new TestSuite("Unit tests for the graph library"); 10 | // $JUnit-BEGIN$ 11 | suite.addTestSuite(GraphTest.class); 12 | // $JUnit-END$ 13 | return suite; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/owl_wg_tests/AllApprovedWGTests.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.owl_wg_tests; 19 | 20 | import junit.framework.Test; 21 | import junit.framework.TestSuite; 22 | 23 | public class AllApprovedWGTests { 24 | public static Test suite() throws Exception { 25 | WGTestRegistry wgTestRegistry=new WGTestRegistry(); 26 | TestSuite suite=new TestSuite("OWL WG Approved Tests"); 27 | for (WGTestDescriptor wgTestDescriptor : wgTestRegistry.getTestDescriptors()) 28 | if (wgTestDescriptor.isDLTest() && wgTestDescriptor.status==WGTestDescriptor.Status.APPROVED) 29 | wgTestDescriptor.addTestsToSuite(suite); 30 | return suite; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/owl_wg_tests/AllExtracreditWGTests.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | // An update for the tests (all.rdf) should regularly be downloaded to the 19 | // ontologies folder from http://wiki.webont.org/exports/ 20 | package org.semanticweb.HermiT.owl_wg_tests; 21 | 22 | import junit.framework.Test; 23 | import junit.framework.TestSuite; 24 | 25 | public class AllExtracreditWGTests { 26 | public static Test suite() throws Exception { 27 | WGTestRegistry wgTestRegistry=new WGTestRegistry(); 28 | TestSuite suite=new TestSuite("OWL WG Extracredit Tests"); 29 | for (WGTestDescriptor wgTestDescriptor : wgTestRegistry.getTestDescriptors()) 30 | if (wgTestDescriptor.isDLTest() && wgTestDescriptor.status==WGTestDescriptor.Status.EXTRACREDIT) 31 | wgTestDescriptor.addTestsToSuite(suite); 32 | return suite; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/owl_wg_tests/AllNonRejectedNonExtracreditWGTests.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | // An update for the tests (all.rdf) should regularly be downloaded to the 19 | // ontologies folder from http://wiki.webont.org/exports/ 20 | package org.semanticweb.HermiT.owl_wg_tests; 21 | 22 | import junit.framework.Test; 23 | import junit.framework.TestSuite; 24 | 25 | public class AllNonRejectedNonExtracreditWGTests { 26 | public static Test suite() throws Exception { 27 | WGTestRegistry wgTestRegistry=new WGTestRegistry(); 28 | TestSuite suite=new TestSuite("OWL WG Non-Rejected Non-Extracredit Tests"); 29 | for (WGTestDescriptor wgTestDescriptor : wgTestRegistry.getTestDescriptors()) 30 | if (wgTestDescriptor.isDLTest()&&(wgTestDescriptor.status==WGTestDescriptor.Status.APPROVED || wgTestDescriptor.status==WGTestDescriptor.Status.PROPOSED)) 31 | if (wgTestDescriptor.identifier.startsWith("WebOnt-description-logic-209") || wgTestDescriptor.identifier.startsWith("WebOnt-description-logic-208")) 32 | wgTestDescriptor.addTestsToSuite(suite,false); 33 | else 34 | wgTestDescriptor.addTestsToSuite(suite); 35 | return suite; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/owl_wg_tests/AllProposedWGTests.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.owl_wg_tests; 19 | 20 | import junit.framework.Test; 21 | import junit.framework.TestSuite; 22 | 23 | public class AllProposedWGTests { 24 | public static Test suite() throws Exception { 25 | WGTestRegistry wgTestRegistry=new WGTestRegistry(); 26 | TestSuite suite=new TestSuite("OWL WG Proposed Tests"); 27 | for (WGTestDescriptor wgTestDescriptor : wgTestRegistry.getTestDescriptors()) 28 | if (wgTestDescriptor.isDLTest() && wgTestDescriptor.status==WGTestDescriptor.Status.PROPOSED) 29 | wgTestDescriptor.addTestsToSuite(suite); 30 | return suite; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/owl_wg_tests/AllWGTests.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.owl_wg_tests; 19 | 20 | import junit.framework.Test; 21 | import junit.framework.TestSuite; 22 | 23 | public class AllWGTests { 24 | public static Test suite() throws Exception { 25 | WGTestRegistry wgTestRegistry=new WGTestRegistry(); 26 | TestSuite suite=new TestSuite("OWL WG All DL Direct Semantics Tests"); 27 | for (WGTestDescriptor wgTestDescriptor : wgTestRegistry.getTestDescriptors()) 28 | if (wgTestDescriptor.isDLTest()) wgTestDescriptor.addTestsToSuite(suite); 29 | return suite; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/owl_wg_tests/AllWGTestsWithStatus.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.owl_wg_tests; 19 | 20 | import junit.framework.Test; 21 | import junit.framework.TestSuite; 22 | 23 | public class AllWGTestsWithStatus { 24 | public static Test suite() throws Exception { 25 | WGTestRegistry wgTestRegistry=new WGTestRegistry(); 26 | TestSuite suite=new TestSuite("OWL WG Tests with Status"); 27 | for (WGTestDescriptor wgTestDescriptor : wgTestRegistry.getTestDescriptors()) 28 | if (wgTestDescriptor.isDLTest() && wgTestDescriptor.status!=null) 29 | wgTestDescriptor.addTestsToSuite(suite); 30 | return suite; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/owl_wg_tests/AllWGTestsWithoutStatus.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.owl_wg_tests; 19 | 20 | import junit.framework.Test; 21 | import junit.framework.TestSuite; 22 | 23 | public class AllWGTestsWithoutStatus { 24 | public static Test suite() throws Exception { 25 | WGTestRegistry wgTestRegistry=new WGTestRegistry(); 26 | TestSuite suite=new TestSuite("OWL WG Tests without Status"); 27 | for (WGTestDescriptor wgTestDescriptor : wgTestRegistry.getTestDescriptors()) 28 | if (wgTestDescriptor.isDLTest() && wgTestDescriptor.status==null) 29 | wgTestDescriptor.addTestsToSuite(suite); 30 | return suite; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/owl_wg_tests/ConsistencyTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.owl_wg_tests; 19 | 20 | import java.io.File; 21 | 22 | import java.util.Collection; 23 | import org.junit.runners.Parameterized; 24 | import org.junit.runners.Parameterized.Parameters; 25 | import org.junit.runner.RunWith; 26 | import org.junit.Test; 27 | import org.junit.Before; 28 | import org.junit.After; 29 | 30 | 31 | @RunWith(Parameterized.class) 32 | public class ConsistencyTest extends AbstractTest { 33 | protected final boolean m_positive; 34 | 35 | public ConsistencyTest(WGTestDescriptor wgTestDescriptor,boolean positive,File dumpTestDataDirectory,boolean useDisjunctionLearning) { 36 | super(wgTestDescriptor.identifier+(positive ? "-consistency" : "-inconsistency"),wgTestDescriptor,dumpTestDataDirectory,useDisjunctionLearning); 37 | m_positive=positive; 38 | } 39 | protected void doTest() { 40 | assertEquals(m_positive,m_reasoner.isConsistent()); 41 | } 42 | 43 | 44 | @Test 45 | public void test() throws Throwable{ 46 | runTest(); 47 | } 48 | 49 | @Before 50 | public void before() throws Exception{ 51 | setUp(); 52 | } 53 | 54 | @After 55 | public void after() throws Exception{ 56 | tearDown(); 57 | } 58 | @Parameters 59 | public static Collection params() throws Exception{ 60 | return TstDescriptorForMaven.getConsistencyTestParams(); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/owl_wg_tests/FailingWGTestDebug.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | // An update for the tests (all.rdf) should regularly be downloaded to the 19 | // ontologies folder from http://wiki.webont.org/exports/ 20 | package org.semanticweb.HermiT.owl_wg_tests; 21 | 22 | import junit.framework.Test; 23 | import junit.framework.TestSuite; 24 | 25 | public class FailingWGTestDebug { 26 | public static Test suite() throws Exception { 27 | WGTestRegistry wgTestRegistry=new WGTestRegistry(); 28 | TestSuite suite=new TestSuite("OWL WG Debugging Tests"); 29 | for (WGTestDescriptor wgTestDescriptor : wgTestRegistry.getTestDescriptors()) 30 | //if (wgTestDescriptor.isDLTest() && (wgTestDescriptor.status==WGTestDescriptor.Status.APPROVED || wgTestDescriptor.status==WGTestDescriptor.Status.PROPOSED || wgTestDescriptor.status==null)) { 31 | if (wgTestDescriptor.identifier.startsWith("New-Feature-Keys-004") 32 | ) { 33 | wgTestDescriptor.addTestsToSuite(suite); 34 | } 35 | //} 36 | return suite; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/owl_wg_tests/InvalidWGTestException.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2009 by the Oxford University Computing Laboratory 2 | 3 | This file is part of HermiT. 4 | 5 | HermiT is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | HermiT is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with HermiT. If not, see . 17 | */ 18 | package org.semanticweb.HermiT.owl_wg_tests; 19 | 20 | @SuppressWarnings("serial") 21 | public class InvalidWGTestException extends Exception { 22 | 23 | public InvalidWGTestException(String message) { 24 | super(message); 25 | } 26 | public InvalidWGTestException(String message,Throwable cause) { 27 | super(message,cause); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/reasoner/AllHeavyTests.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.reasoner; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestCase; 5 | import junit.framework.TestSuite; 6 | 7 | public class AllHeavyTests extends TestCase { 8 | 9 | public static Test suite() { 10 | TestSuite suite = new TestSuite("Unit tests for HermiT as a blackbox -- the heavy subset."); 11 | // $JUnit-BEGIN$ 12 | suite.addTestSuite(ClassificationTest.class); 13 | suite.addTestSuite(ClassificationIndividualReuseTest.class); 14 | suite.addTestSuite(OWLLinkTest.class); 15 | // $JUnit-END$ 16 | return suite; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/reasoner/AllQuickTests.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.reasoner; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestCase; 5 | import junit.framework.TestSuite; 6 | 7 | public class AllQuickTests extends TestCase { 8 | 9 | public static Test suite() { 10 | TestSuite suite = new TestSuite("Unit tests for HermiT as a blackbox -- the quick subset."); 11 | // $JUnit-BEGIN$ 12 | suite.addTestSuite(DatatypesTest.class); 13 | suite.addTestSuite(NumericsTest.class); 14 | suite.addTestSuite(RDFPlainLiteralTest.class); 15 | suite.addTestSuite(AnyURITest.class); 16 | suite.addTestSuite(FloatDoubleTest.class); 17 | suite.addTestSuite(DateTimeTest.class); 18 | suite.addTestSuite(BinaryDataTest.class); 19 | suite.addTestSuite(XMLLiteralTest.class); 20 | suite.addTestSuite(ReasonerTest.class); 21 | suite.addTestSuite(ReasonerIndividualReuseTest.class); 22 | suite.addTestSuite(ReasonerCoreBlockingTest.class); 23 | suite.addTestSuite(ComplexConceptTest.class); 24 | suite.addTestSuite(EntailmentTest.class); 25 | suite.addTestSuite(RIATest.class); 26 | suite.addTestSuite(SimpleRolesTest.class); 27 | suite.addTestSuite(RulesTest.class); 28 | suite.addTestSuite(OWLReasonerTest.class); 29 | suite.addTestSuite(DatalogEngineTest.class); 30 | // $JUnit-END$ 31 | return suite; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/reasoner/ClassificationIndividualReuseTest.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.reasoner; 2 | 3 | import org.semanticweb.HermiT.Configuration; 4 | 5 | public class ClassificationIndividualReuseTest extends ClassificationTest { 6 | 7 | public ClassificationIndividualReuseTest(String name) { 8 | super(name); 9 | } 10 | public void testGalenIansFullUndoctored() throws Exception { 11 | // omitted for now until we get this under control 12 | } 13 | public void testDolce() throws Exception { 14 | loadReasonerFromResource("res/dolce_all.xml"); 15 | assertHierarchies("res/dolce_all.xml.txt"); 16 | } 17 | protected Configuration getConfiguration() { 18 | Configuration configuration=super.getConfiguration(); 19 | configuration.existentialStrategyType=Configuration.ExistentialStrategyType.INDIVIDUAL_REUSE; 20 | return configuration; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/reasoner/ClassificationTest.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.reasoner; 2 | 3 | public class ClassificationTest extends AbstractReasonerTest { 4 | 5 | public ClassificationTest(String name) { 6 | super(name); 7 | } 8 | public void testWine() throws Exception { 9 | loadReasonerFromResource("res/wine.xml"); 10 | assertHierarchies("res/wine.xml.txt"); 11 | } 12 | public void testGalenIansFullUndoctored() throws Exception { 13 | loadReasonerFromResource("res/galen-ians-full-undoctored.xml"); 14 | assertHierarchies("res/galen-ians-full-undoctored.xml.txt"); 15 | } 16 | public void testPizza() throws Exception { 17 | loadReasonerFromResource("res/pizza.xml"); 18 | assertHierarchies("res/pizza.xml.txt"); 19 | } 20 | public void testPropreo() throws Exception { 21 | loadReasonerFromResource("res/propreo.xml"); 22 | assertHierarchies("res/propreo.xml.txt"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/reasoner/ReasonerIndividualReuseTest.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.reasoner; 2 | 3 | import org.semanticweb.HermiT.Configuration; 4 | 5 | public class ReasonerIndividualReuseTest extends ReasonerTest { 6 | 7 | public ReasonerIndividualReuseTest(String name) { 8 | super(name); 9 | } 10 | protected Configuration getConfiguration() { 11 | Configuration configuration=super.getConfiguration(); 12 | configuration.existentialStrategyType=Configuration.ExistentialStrategyType.INDIVIDUAL_REUSE; 13 | return configuration; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/reasoner/SimpleRolesTest.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.reasoner; 2 | 3 | public class SimpleRolesTest extends AbstractReasonerTest { 4 | 5 | public SimpleRolesTest(String name) { 6 | super(name); 7 | } 8 | 9 | public void testSimpleRoles1() throws Exception{ 10 | String axioms = "TransitiveObjectProperty(:R) " + 11 | "SubObjectPropertyOf(:R :P) " + 12 | "SubClassOf(:C ObjectMinCardinality(2 :P))"; 13 | assertSimple(axioms,false); 14 | } 15 | public void testSimpleRoles2() throws Exception{ 16 | String axioms = "SubObjectPropertyOf(ObjectPropertyChain(:R :Q) :R) " + 17 | "SubObjectPropertyOf(:R :P) " + 18 | "SubClassOf(:C ObjectMaxCardinality(2 :P))"; 19 | assertSimple(axioms,false); 20 | } 21 | public void testSimpleRoles3() throws Exception{ 22 | String axioms = "SubObjectPropertyOf(ObjectPropertyChain(:R :Q) :R) " + 23 | "SubObjectPropertyOf(:R :S) " + 24 | "InverseObjectProperties(:S :S-) " + 25 | "SubClassOf(:C ObjectMaxCardinality(2 :S-))"; 26 | assertSimple(axioms,false); 27 | } 28 | public void testSimpleRoles4() throws Exception{ 29 | String axioms = "TransitiveObjectProperty(:R-) " + 30 | "SubObjectPropertyOf(:R :P) " + 31 | "SubObjectPropertyOf(:P :S) " + 32 | "InverseObjectProperties(:R :R-) " + 33 | "InverseObjectProperties(:S :S-) " + 34 | "SubClassOf(:C ObjectMaxCardinality(2 :S-))"; 35 | assertSimple(axioms,false); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/reasoner/XMLLiteralTest.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.reasoner; 2 | 3 | public class XMLLiteralTest extends AbstractReasonerTest { 4 | 5 | public XMLLiteralTest(String name) { 6 | super(name); 7 | } 8 | public void testCanonicalization_1() throws Exception { 9 | assertDRSatisfiable(false, 10 | OO(XMLL("abc")), 11 | NOT(OO(XMLL("abc"))) 12 | ); 13 | } 14 | public void testCanonicalization_2() throws Exception { 15 | assertDRSatisfiable(true, 16 | OO(XMLL("abcd")), 17 | NOT(OO(XMLL("abc"))) 18 | ); 19 | } 20 | public void testRange_1() throws Exception { 21 | assertDRSatisfiable(true,100, 22 | DR("rdf:XMLLiteral") 23 | ); 24 | } 25 | public void testRange_2() throws Exception { 26 | assertDRSatisfiable(false, 27 | DR("rdf:XMLLiteral"), 28 | NOT(DR("rdf:XMLLiteral")) 29 | ); 30 | } 31 | public void testRange_3() throws Exception { 32 | assertDRSatisfiable(false, 33 | DR("rdf:XMLLiteral"), 34 | DR("xsd:boolean") 35 | ); 36 | } 37 | public void testMembership_1() throws Exception { 38 | assertDRSatisfiable(true, 39 | DR("rdf:XMLLiteral"), 40 | OO(XMLL("bla")) 41 | ); 42 | } 43 | public void testMembership_2() throws Exception { 44 | assertDRSatisfiable(false, 45 | NOT(DR("rdf:XMLLiteral")), 46 | OO(XMLL("bla")) 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/structural/AllTests.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.structural; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestCase; 5 | import junit.framework.TestSuite; 6 | 7 | public class AllTests extends TestCase { 8 | 9 | public static Test suite() { 10 | TestSuite suite = new TestSuite( 11 | "Test for the normalization and clasification code used with the OWLAPI. "); 12 | // $JUnit-BEGIN$ 13 | suite.addTestSuite(NormalizationTest.class); 14 | suite.addTestSuite(ClausificationTest.class); 15 | suite.addTestSuite(ClausificationDatatypesTest.class); 16 | // $JUnit-END$ 17 | return suite; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/semanticweb/HermiT/tableau/AllTests.java: -------------------------------------------------------------------------------- 1 | package org.semanticweb.HermiT.tableau; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestSuite; 5 | 6 | public class AllTests { 7 | 8 | public static Test suite() { 9 | TestSuite suite = new TestSuite("Test for the HermiT internals (tableau)"); 10 | //$JUnit-BEGIN$ 11 | suite.addTestSuite(TupleIndexTest.class); 12 | suite.addTestSuite(TupleTableFullIndexTest.class); 13 | suite.addTestSuite(DLClauseEvaluationTest.class); 14 | suite.addTestSuite(DependencySetTest.class); 15 | suite.addTestSuite(NIRuleTest.class); 16 | suite.addTestSuite(MergeTest.class); 17 | suite.addTestSuite(GraphTest.class); 18 | //$JUnit-END$ 19 | return suite; 20 | } 21 | 22 | public static void main(String... args) throws Throwable { 23 | junit.textui.TestRunner.run(suite()); 24 | System.exit(0); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/owl_wg_tests/ontologies/support011-A.rdf: -------------------------------------------------------------------------------- 1 | 13 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/10a-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/10b-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/11-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/11.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | ]> 6 | 7 | 15 | 16 | 17 | 20.03.2006, version 0.1 18 | empty union/intersection/oneof test (OWL DL), Thorsten Liebig 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 38 | 39 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/12-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/13-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/14-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/15-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/16-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/16.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | ]> 6 | 7 | 15 | 16 | 17 | 22.12.2004, version 0.1 18 | nominal/UNA test (OWL DL), Thorsten Liebig 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 1 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/17-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/17.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | ]> 6 | 7 | 15 | 16 | 17 | 22.12.2004, version 0.1 18 | nominal/UNA test (OWL DL), Thorsten Liebig 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/18-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/18.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | ]> 6 | 7 | 15 | 16 | 17 | 22.12.2004, version 0.1 18 | TBox inconsistency test (OWL Lite), Thorsten Liebig 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 38 | 39 | 40 | 41 | 42 | 50 | 51 | 52 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/19.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | ]> 6 | 7 | 14 | 15 | 16 | 28.03.2006, version 0.1 17 | complex properties are not allowed to be used within 18 | at-most cardinality restrictions (OWL Lite), Thorsten Liebig 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 1 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 53 | 54 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/1a-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/1b-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/20-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/20.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | ]> 6 | 7 | 15 | 16 | 17 | 3.3.2004, version 0.1 18 | infinite model test, OWL Lite, Thorsten Liebig 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 1 51 | 52 | 53 | 54 | 55 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/21-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/22-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/22.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | ]> 6 | 7 | 15 | 16 | 17 | 30.3.2006, version 0.9 18 | unsatisfiable datatype restriction, OWL Lite, 19 | Thorsten Liebig 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/23-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 29 | 30 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/23.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | ]> 6 | 7 | 15 | 16 | 17 | 28.3.2006, version 0.9 18 | Partitioning test, OWL DL, Thorsten Liebig 19 | 20 | 21 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/24-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/25-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/26-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/27-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/28-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/29a-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/2a-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/2b-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/2c-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/3a-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/3b-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/4-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/4.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | ]> 6 | 7 | 15 | 16 | 17 | 17.12.2004, version 0.1 18 | satisfiablility test (OWL Lite), Thorsten Liebig 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 1 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 1 50 | 51 | 52 | 53 | 54 | 55 | 56 | 61 | 62 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/5-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/5.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | ]> 6 | 7 | 15 | 16 | 17 | 17.12.2004, version 0.1 18 | unsatisfiablility test (OWL Lite), Thorsten Liebig 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 1 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/6-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/7-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/7.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | ]> 6 | 7 | 15 | 16 | 17 | 17.12.2004, version 0.1 18 | nominal test (OWL DL), Thorsten Liebig 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | 47 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 68 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/8-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 8 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/9-conclusion.owl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | ]> 10 | 11 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/updateHierarchy.txt: -------------------------------------------------------------------------------- 1 | Prefix(:=) 2 | 3 | Ontology( 4 | 5 | SubClassOf( :C owl:Thing ) Declaration( Class( :C ) ) 6 | SubClassOf( :B :C ) Declaration( Class( :B ) ) 7 | SubClassOf( :A :B ) Declaration( Class( :A ) ) 8 | 9 | ) -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/OWLLink/updateHierarchyFlushed.txt: -------------------------------------------------------------------------------- 1 | Prefix(:=) 2 | 3 | Ontology( 4 | 5 | SubClassOf( :C owl:Thing ) Declaration( Class( :C ) ) 6 | SubClassOf( :B :C ) Declaration( Class( :B ) ) 7 | SubClassOf( :F owl:Thing ) Declaration( Class( :F ) ) 8 | SubClassOf( :E :F ) Declaration( Class( :E ) ) 9 | SubClassOf( :D :E ) Declaration( Class( :D ) ) 10 | 11 | ) -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/WebOnt-allValuesFrom-002-premise.rdf: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/families.owl: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/hierarchy-printing-2.txt: -------------------------------------------------------------------------------- 1 | Prefix(:=) 2 | Prefix(a1:=) 3 | Prefix(a2:=) 4 | 5 | Ontology( 6 | 7 | SubClassOf( :B owl:Thing ) Declaration( Class( :B ) ) 8 | SubClassOf( :A :B ) EquivalentClasses( :A :Class ) Declaration( Class( :A ) ) Declaration( Class( :Class ) ) Declaration( Class( ) ) 9 | SubClassOf( :D :A ) Declaration( Class( :D ) ) 10 | SubClassOf( :F :D ) Declaration( Class( :F ) ) 11 | SubClassOf( a2:J :D ) Declaration( Class( a2:J ) ) 12 | SubClassOf( :C :B ) EquivalentClasses( :C a1:otherC ) Declaration( Class( :C ) ) Declaration( Class( a1:otherC ) ) 13 | SubClassOf( :D :C ) 14 | SubClassOf( :E owl:Thing ) Declaration( Class( :E ) ) 15 | SubClassOf( :F :E ) 16 | SubClassOf( :H :E ) Declaration( Class( :H ) ) 17 | 18 | SubObjectPropertyOf( :op6 owl:topObjectProperty ) Declaration( ObjectProperty( :op6 ) ) 19 | SubObjectPropertyOf( :op2 :op6 ) Declaration( ObjectProperty( :op2 ) ) 20 | SubObjectPropertyOf( :op1 :op2 ) Declaration( ObjectProperty( :op1 ) ) 21 | SubObjectPropertyOf( :op4 :op2 ) Declaration( ObjectProperty( :op4 ) ) 22 | SubObjectPropertyOf( :op3i :op6 ) EquivalentObjectProperties( :op3i ObjectInverseOf( :op3 ) ) Declaration( ObjectProperty( :op3i ) ) 23 | SubObjectPropertyOf( :op1 :op3i ) 24 | SubObjectPropertyOf( ObjectInverseOf( :op6 ) owl:topObjectProperty ) 25 | SubObjectPropertyOf( :op3 ObjectInverseOf( :op6 ) ) EquivalentObjectProperties( :op3 ObjectInverseOf( :op3i ) ) Declaration( ObjectProperty( :op3 ) ) 26 | SubObjectPropertyOf( ObjectInverseOf( :op1 ) :op3 ) 27 | SubObjectPropertyOf( ObjectInverseOf( :op2 ) ObjectInverseOf( :op6 ) ) 28 | SubObjectPropertyOf( ObjectInverseOf( :op1 ) ObjectInverseOf( :op2 ) ) 29 | SubObjectPropertyOf( ObjectInverseOf( :op4 ) ObjectInverseOf( :op2 ) ) 30 | 31 | SubDataPropertyOf( :dp1 owl:topDataProperty ) Declaration( DataProperty( :dp1 ) ) 32 | SubDataPropertyOf( :dp2 :dp1 ) Declaration( DataProperty( :dp2 ) ) 33 | SubDataPropertyOf( :dp4 :dp2 ) Declaration( DataProperty( :dp4 ) ) 34 | SubDataPropertyOf( :dp6 :dp2 ) Declaration( DataProperty( :dp6 ) ) 35 | SubDataPropertyOf( :dp3 :dp1 ) EquivalentDataProperties( :dp3 :dp5 ) Declaration( DataProperty( :dp3 ) ) Declaration( DataProperty( :dp5 ) ) 36 | SubDataPropertyOf( :dp4 :dp3 ) 37 | 38 | ) 39 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/hierarchy-printing-3.txt: -------------------------------------------------------------------------------- 1 | Prefix(:=) 2 | 3 | Ontology( 4 | 5 | EquivalentClasses( owl:Nothing owl:Thing :A :B ) Declaration( Class( :A ) ) Declaration( Class( :B ) ) 6 | 7 | EquivalentObjectProperties( owl:bottomObjectProperty owl:topObjectProperty ) 8 | 9 | EquivalentDataProperties( owl:bottomDataProperty owl:topDataProperty ) 10 | 11 | ) 12 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/iso19112-D-different.owl.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/only1.owl: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/reasoner/res/owlwgtestparsingerror.rdf: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 5 16 | 17 | 18 | 19 | 5 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/structural/res/asymmetry-control.txt: -------------------------------------------------------------------------------- 1 | :- :as(X,Y), :as(Y,X) 2 | :as(X,Y) :- :r(X,Y) 3 | :as(:b,:a) 4 | :r(:a,:b) -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/structural/res/basic-control.txt: -------------------------------------------------------------------------------- 1 | :d(X) :- :r(X,Y), def:0(Y) 2 | def:0(X) :- all:0_1(X) 3 | all:0_1(X) :- :s(X,Y), all:0_0(Y) 4 | all:0_0(X) :- :s(X,Y), all:0_0(Y) 5 | all:0_0(X) :- :c(X) -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/structural/res/has-self-1-control.txt: -------------------------------------------------------------------------------- 1 | def:1(X) :- :r(X,Y) 2 | :r(X,X) :- def:0(X) 3 | def:0(:a) 4 | not def:1(:a) -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/structural/res/has-self-1-input.owl: -------------------------------------------------------------------------------- 1 | Prefix(:=) 2 | Prefix(rdfs:=) 3 | Prefix(owl2xml:=) 4 | Prefix(test:=) 5 | Prefix(owl:=) 6 | Prefix(xsd:=) 7 | Prefix(rdf:=) 8 | 9 | Ontology( 10 | Declaration(NamedIndividual(:a)) 11 | Declaration(ObjectProperty(:r)) 12 | ClassAssertion(ObjectAllValuesFrom(:r owl:Nothing) :a) 13 | ClassAssertion(ObjectHasSelf(:r) :a) 14 | ) -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/structural/res/has-self-2-control.txt: -------------------------------------------------------------------------------- 1 | atLeast(1 :r :C2)(X) :- :B1(X) 2 | atLeast(1 :r :B1)(X) :- :C1(X) 3 | def:1(Y) :- :r(X,Y), def:0(X) 4 | :r(X,X) :- def:1(X) 5 | atLeast(1 :r :B2)(X) :- :C2(X) 6 | atLeast(1 :r :C1)(X) :- :B2(X) 7 | def:0(:a) 8 | :C1(:a) -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/structural/res/has-self-2-input.owl: -------------------------------------------------------------------------------- 1 | Prefix(:=) 2 | Prefix(rdfs:=) 3 | Prefix(owl2xml:=) 4 | Prefix(test:=) 5 | Prefix(owl:=) 6 | Prefix(xsd:=) 7 | Prefix(rdf:=) 8 | 9 | Ontology( 10 | Declaration(NamedIndividual(:a)) 11 | Declaration(ObjectProperty(:r)) 12 | Declaration(Class(:B1)) 13 | Declaration(Class(:B2)) 14 | Declaration(Class(:C1)) 15 | Declaration(Class(:C2)) 16 | 17 | SubClassOf(:B1 ObjectSomeValuesFrom(:r :C2)) 18 | SubClassOf(:C2 ObjectSomeValuesFrom(:r :B2)) 19 | SubClassOf(:B2 ObjectSomeValuesFrom(:r :C1)) 20 | SubClassOf(:C1 ObjectSomeValuesFrom(:r :B1)) 21 | 22 | ClassAssertion(:C1 :a) 23 | ClassAssertion(ObjectAllValuesFrom(:r ObjectHasSelf(:r)) :a) 24 | ) -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/structural/res/nominals-1-control.txt: -------------------------------------------------------------------------------- 1 | nom:i1(:i1) 2 | nom:i2(:i2) 3 | :r(X,Y) v :r(X,Y1) :- :c(X), nom:i1(Y), nom:i2(Y1) 4 | atLeast(1 :s not(def:0))(X) :- :d(X) 5 | def:0(:i1) 6 | def:0(:i2) 7 | -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/structural/res/nominals-2-control.txt: -------------------------------------------------------------------------------- 1 | :- :h(X), :r(X,Y), def:0(Y) 2 | :- :g(X), :r(X,Y), nom:i1(Y) 3 | :r(X,Y) v :r(X,Y1) :- :c(X), nom:i1(Y), nom:i2(Y1) 4 | Y == Y1 v Y == Y2 :- :f(X), :r(X,Y), nom:i1(Y1), nom:i2(Y2) 5 | :e(X) v [Y1 == Y2]@atMost(2 :r :d)(X) v [Y1 == Y3]@atMost(2 :r :d)(X) v [Y2 == Y3]@atMost(2 :r :d)(X) :- Y1 <= Y2, Y2 <= Y3, :d(X), :d(Y1), :d(Y2), :d(Y3), :r(X,Y1), :r(X,Y2), :r(X,Y3), NodeIDsAscendingOrEqual(Y1,Y2,Y3) 6 | nom:i2(:i2) 7 | def:0(:i2) 8 | def:0(:i1) 9 | nom:i1(:i1) -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/structural/res/nominals-3-control.txt: -------------------------------------------------------------------------------- 1 | :r(Y,X) v :r(Y1,X) :- :c(X), nom:i1(Y), nom:i2(Y1) 2 | :e(X) v [Y1 == Y2]@atMost(2 :r :d)(X) v [Y1 == Y3]@atMost(2 :r :d)(X) v [Y2 == Y3]@atMost(2 :r :d)(X) :- Y1 <= Y2, Y2 <= Y3, :d(X), :d(Y1), :d(Y2), :d(Y3), :r(X,Y1), :r(X,Y2), :r(X,Y3), NodeIDsAscendingOrEqual(Y1,Y2,Y3) 3 | nom:i2(:i2) 4 | nom:i1(:i1) -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/structural/res/nominals-4-control.txt: -------------------------------------------------------------------------------- 1 | :hasSugar(X,Y) :- :Chianti(X), nom:Dry(Y) 2 | nom:Dry(:Dry) -------------------------------------------------------------------------------- /src/test/resources/org/semanticweb/HermiT/structural/res/nominals-4-input.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | ]> 6 | 7 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /stage-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | VN=1.3.8.5-SNAPSHOT 4 | 5 | mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \ 6 | -DrepositoryId=sonatype-nexus-staging -DuseAgent=true \ 7 | -DpomFile=pom.xml -Dfile=target/org.semanticweb.hermit-$VN.jar 8 | 9 | mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \ 10 | -DrepositoryId=sonatype-nexus-staging -Dclassifier=javadoc \ 11 | -DuseAgent=true \ 12 | -DpomFile=pom.xml -Dfile=target/org.semanticweb.hermit-$VN-javadoc.jar 13 | 14 | mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \ 15 | -DrepositoryId=sonatype-nexus-staging -Dclassifier=sources \ 16 | -DuseAgent=true \ 17 | -DpomFile=pom.xml -Dfile=target/org.semanticweb.hermit-$VN-sources.jar 18 | -------------------------------------------------------------------------------- /tasks.txt: -------------------------------------------------------------------------------- 1 | - Optimise the rule set/rule application so that HermiT can deal with 2 | large ontologies such as SNOMED. Move existential into universial: 3 | rule engine should not loop over all assignemnts for y if y does not occur 4 | in the head e.g., as in r(x, y) and B(y) -> A(x) 5 | task assigned to: Giorgos 6 | 7 | - cache Aboxes saturated up to non-determinism 8 | task assigned to: 9 | 10 | - We need to check acyclicity of datatype definitions. 11 | task assigned to: Birte 12 | 13 | - incremental classification (axioms addition/removal) 14 | 15 | - optimise number restrictions (e.g., better clause representation) 16 | 17 | - check what HermiT does on Robert's family ontology 18 | 19 | - check why HermiT is so slow in expanding the tableau once we have a lot of choice points 20 | -------------------------------------------------------------------------------- /update.properties: -------------------------------------------------------------------------------- 1 | id=org.semanticweb.HermiT 2 | version=${build.version} 3 | download=${build.url}download/${build.version}/org.semanticweb.HermiT.jar 4 | name=HermiT Reasoner 5 | readme=${build.url}download/${build.version}/readme.txt 6 | license=http://www.gnu.org/licenses/lgpl.html 7 | author=Boris Motik, Birte Glimm, Rob Shearer, Giorgos Stoilos, and Ian Horrocks at the Department of Computer Science of the University of Oxford --------------------------------------------------------------------------------