| 1 |
package conformancetests; |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
import static org.junit.Assert.*; |
| 9 |
import static org.semanticweb.owlapi.apibinding.OWLFunctionalSyntaxFactory.*; |
| 10 |
|
| 11 |
import java.util.Arrays; |
| 12 |
import java.util.HashSet; |
| 13 |
import java.util.Set; |
| 14 |
|
| 15 |
import org.junit.Ignore; |
| 16 |
import org.junit.Test; |
| 17 |
import org.semanticweb.owlapi.apibinding.OWLManager; |
| 18 |
import org.semanticweb.owlapi.io.StringDocumentSource; |
| 19 |
import org.semanticweb.owlapi.model.IRI; |
| 20 |
import org.semanticweb.owlapi.model.OWLAxiom; |
| 21 |
import org.semanticweb.owlapi.model.OWLClass; |
| 22 |
import org.semanticweb.owlapi.model.OWLClassExpression; |
| 23 |
import org.semanticweb.owlapi.model.OWLDataFactory; |
| 24 |
import org.semanticweb.owlapi.model.OWLDataOneOf; |
| 25 |
import org.semanticweb.owlapi.model.OWLDataProperty; |
| 26 |
import org.semanticweb.owlapi.model.OWLDataPropertyAssertionAxiom; |
| 27 |
import org.semanticweb.owlapi.model.OWLDataRange; |
| 28 |
import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom; |
| 29 |
import org.semanticweb.owlapi.model.OWLDatatype; |
| 30 |
import org.semanticweb.owlapi.model.OWLException; |
| 31 |
import org.semanticweb.owlapi.model.OWLFacetRestriction; |
| 32 |
import org.semanticweb.owlapi.model.OWLLiteral; |
| 33 |
import org.semanticweb.owlapi.model.OWLNamedIndividual; |
| 34 |
import org.semanticweb.owlapi.model.OWLObjectProperty; |
| 35 |
import org.semanticweb.owlapi.model.OWLObjectUnionOf; |
| 36 |
import org.semanticweb.owlapi.model.OWLOntology; |
| 37 |
import org.semanticweb.owlapi.model.OWLOntologyCreationException; |
| 38 |
import org.semanticweb.owlapi.model.OWLOntologyManager; |
| 39 |
import org.semanticweb.owlapi.reasoner.InferenceType; |
| 40 |
import org.semanticweb.owlapi.reasoner.OWLReasoner; |
| 41 |
import org.semanticweb.owlapi.reasoner.OWLReasonerFactory; |
| 42 |
import org.semanticweb.owlapi.vocab.OWL2Datatype; |
| 43 |
import org.semanticweb.owlapi.vocab.OWLFacet; |
| 44 |
import org.semanticweb.owlapi.vocab.XSDVocabulary; |
| 45 |
|
| 46 |
import testbase.TestBase; |
| 47 |
|
| 48 |
@SuppressWarnings("javadoc") |
| 49 |
public class FixedTestCase extends TestBase { |
| 50 |
|
| 51 |
@Test |
| 52 |
public void testConsistent_owl_real_range_with_DataOneOf() { |
| 53 |
String premise = "Prefix(:=<http://example.org/>)\n" |
| 54 |
+ "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 55 |
+ "Prefix(owl:=<http://www.w3.org/2002/07/owl#>)\n" |
| 56 |
+ "Ontology(\n" |
| 57 |
+ " Declaration(NamedIndividual(:a))\n" |
| 58 |
+ " Declaration(DataProperty(:dp))\n" |
| 59 |
+ " Declaration(Class(:A))\n" |
| 60 |
+ " SubClassOf(:A DataAllValuesFrom(:dp owl:real)) \n" |
| 61 |
+ " SubClassOf(:A DataSomeValuesFrom(:dp DataOneOf(\"-INF\"^^xsd:float \"-0\"^^xsd:integer))\n)\n ClassAssertion(:A :a)\n)"; |
| 62 |
String conclusion = ""; |
| 63 |
String id = "Consistent_owl_real_range_with_DataOneOf"; |
| 64 |
TestClasses tc = TestClasses.valueOf("CONSISTENCY"); |
| 65 |
String d = "The individual a must have either negative Infinity or 0 (-0 as integer is 0) as dp fillers and all dp successors must be from owl:real, which excludes negative infinity, but allows 0."; |
| 66 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 67 |
r.setReasonerFactory(factory()); |
| 68 |
r.run(); |
| 69 |
} |
| 70 |
|
| 71 |
@Test |
| 72 |
public void testWebOnt_oneOf_004() { |
| 73 |
String premise = "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 74 |
+ "Prefix(owl:=<http://www.w3.org/2002/07/owl#>)\nPrefix(xml:=<http://www.w3.org/XML/1998/namespace>)\nPrefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)\nPrefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)\n" |
| 75 |
+ "Ontology(\nDeclaration(DataProperty(<urn:t:p#p>))\n" |
| 76 |
+ "DataPropertyRange(<urn:t:p#p> DataOneOf(\"1\"^^xsd:integer \"2\"^^xsd:integer \"3\"^^xsd:integer \"4\"^^xsd:integer))\n" |
| 77 |
+ "DataPropertyRange(<urn:t:p#p> DataOneOf(\"4\"^^xsd:integer \"5\"^^xsd:integer \"6\"^^xsd:integer))\n" |
| 78 |
+ "ClassAssertion(owl:Thing <urn:t:p#i>)\n" |
| 79 |
+ "ClassAssertion(DataMinCardinality(1 <urn:t:p#p>) <urn:t:p#i>)\n" |
| 80 |
|
| 81 |
+ ')'; |
| 82 |
String conclusion = "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 83 |
+ "Prefix(owl:=<http://www.w3.org/2002/07/owl#>)\nPrefix(xml:=<http://www.w3.org/XML/1998/namespace>)\nPrefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)\nPrefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)\n" |
| 84 |
+ "Ontology(\nDeclaration(DataProperty(<urn:t:p#p>))\n" |
| 85 |
+ "ClassAssertion(owl:Thing <urn:t:p#i>)\n" |
| 86 |
+ "DataPropertyAssertion(<urn:t:p#p> <urn:t:p#i> \"4\"^^xsd:integer))"; |
| 87 |
String id = "WebOnt_oneOf_004"; |
| 88 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 89 |
String d = "This test illustrates the use of dataRange in OWL DL. This test combines some of the ugliest features of XML, RDF and OWL."; |
| 90 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 91 |
r.setReasonerFactory(factory()); |
| 92 |
r.run(); |
| 93 |
} |
| 94 |
|
| 95 |
@Test |
| 96 |
public void testWebOnt_oneOf_004_1() throws OWLOntologyCreationException { |
| 97 |
String premise = "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 98 |
+ "Prefix(owl:=<http://www.w3.org/2002/07/owl#>)\nPrefix(xml:=<http://www.w3.org/XML/1998/namespace>)\nPrefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)\nPrefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)\n" |
| 99 |
+ "Ontology(\nDeclaration(DataProperty(<urn:t:p#p>))\n" |
| 100 |
+ "DataPropertyRange(<urn:t:p#p> DataOneOf(\"1\"^^xsd:integer \"2\"^^xsd:integer \"3\"^^xsd:integer \"4\"^^xsd:integer))\n" |
| 101 |
+ "DataPropertyRange(<urn:t:p#p> DataOneOf(\"4\"^^xsd:integer \"5\"^^xsd:integer \"6\"^^xsd:integer))\n" |
| 102 |
+ "ClassAssertion(owl:Thing <urn:t:p#i>)\n" |
| 103 |
+ "ClassAssertion(DataMinCardinality(1 <urn:t:p#p>) <urn:t:p#i>)\n" |
| 104 |
|
| 105 |
|
| 106 |
+ ')'; |
| 107 |
OWLOntology o = OWLManager.createOWLOntologyManager() |
| 108 |
.loadOntologyFromOntologyDocument( |
| 109 |
new StringDocumentSource(premise)); |
| 110 |
OWLReasoner r = factory().createReasoner(o); |
| 111 |
r.precomputeInferences(InferenceType.CLASS_HIERARCHY); |
| 112 |
assertTrue(r.isConsistent()); |
| 113 |
OWLDataFactory df = o.getOWLOntologyManager().getOWLDataFactory(); |
| 114 |
OWLDataProperty p = df.getOWLDataProperty(IRI.create("urn:t:p#p")); |
| 115 |
OWLNamedIndividual i = df |
| 116 |
.getOWLNamedIndividual(IRI.create("urn:t:p#i")); |
| 117 |
OWLLiteral l = df.getOWLLiteral("4", |
| 118 |
df.getOWLDatatype(OWL2Datatype.XSD_INTEGER.getIRI())); |
| 119 |
assertTrue(r.isEntailed(df.getOWLDataPropertyAssertionAxiom(p, i, l))); |
| 120 |
} |
| 121 |
|
| 122 |
@Test |
| 123 |
public void testBugFix() throws OWLOntologyCreationException { |
| 124 |
OWLOntologyManager m = OWLManager.createOWLOntologyManager(); |
| 125 |
OWLOntology o = m.createOntology(); |
| 126 |
OWLDataProperty p = DataProperty(IRI.create("urn:t:t#p")); |
| 127 |
OWLNamedIndividual i = NamedIndividual(IRI.create("urn:t:t#i")); |
| 128 |
m.addAxiom(o, Declaration(p)); |
| 129 |
m.addAxiom(o, Declaration(i)); |
| 130 |
OWLDataOneOf owlDataOneOf = DataOneOf(Literal(1), Literal(2), |
| 131 |
Literal(3), Literal(4)); |
| 132 |
OWLDataOneOf owlDataOneOf2 = DataOneOf(Literal(4), Literal(5), |
| 133 |
Literal(6)); |
| 134 |
m.addAxiom(o, DataPropertyRange(p, owlDataOneOf)); |
| 135 |
m.addAxiom(o, DataPropertyRange(p, owlDataOneOf2)); |
| 136 |
m.addAxiom(o, |
| 137 |
ClassAssertion(DataMinCardinality(1, p, TopDatatype()), i)); |
| 138 |
OWLReasoner r = factory().createReasoner(o); |
| 139 |
OWLDataPropertyAssertionAxiom ass = DataPropertyAssertion(p, i, |
| 140 |
Literal(4)); |
| 141 |
assertTrue(r.isConsistent()); |
| 142 |
boolean entailed = r.isEntailed(ass); |
| 143 |
assertTrue(entailed); |
| 144 |
} |
| 145 |
|
| 146 |
@Test |
| 147 |
@Changed(reason = "original test had unreliable iris, e.g., http://example.com/2a") |
| 148 |
public |
| 149 |
void testConsistent_but_all_unsat() throws Exception { |
| 150 |
OWLOntologyManager m = OWLManager.createOWLOntologyManager(); |
| 151 |
IRI ontoIRI = IRI("urn:SpecialGetOntology:Consistentbutallunsat"); |
| 152 |
OWLOntology o = m.createOntology(ontoIRI); |
| 153 |
String ns = "http://example.com/"; |
| 154 |
OWLNamedIndividual i1 = NamedIndividual(IRI(ns + "i1")); |
| 155 |
OWLNamedIndividual i2 = NamedIndividual(IRI(ns + "i2")); |
| 156 |
OWLNamedIndividual i3 = NamedIndividual(IRI(ns + "i3")); |
| 157 |
OWLClass a = Class(IRI(ns + 'a')); |
| 158 |
OWLClass b = Class(IRI(ns + 'b')); |
| 159 |
OWLClass c = Class(IRI(ns + 'c')); |
| 160 |
OWLClass d = Class(IRI(ns + 'd')); |
| 161 |
OWLClass e = Class(IRI(ns + 'e')); |
| 162 |
OWLObjectProperty q = ObjectProperty(IRI(ns + 'q')); |
| 163 |
OWLObjectProperty p = ObjectProperty(IRI(ns + 'p')); |
| 164 |
OWLObjectProperty s = ObjectProperty(IRI(ns + 's')); |
| 165 |
OWLObjectProperty t = ObjectProperty(IRI(ns + 't')); |
| 166 |
OWLObjectProperty v = ObjectProperty(IRI(ns + 'v')); |
| 167 |
OWLObjectProperty w = ObjectProperty(IRI(ns + 'w')); |
| 168 |
OWLObjectProperty z = ObjectProperty(IRI(ns + 'z')); |
| 169 |
OWLObjectProperty r = ObjectProperty(IRI(ns + 'r')); |
| 170 |
OWLObjectUnionOf domain = ObjectUnionOf(ObjectOneOf(i1), |
| 171 |
ObjectOneOf(i2), ObjectOneOf(i3)); |
| 172 |
m.addAxiom(o, Declaration(e)); |
| 173 |
m.addAxiom(o, SubClassOf(e, ObjectSomeValuesFrom(p, a))); |
| 174 |
m.addAxiom(o, SubClassOf(e, ObjectSomeValuesFrom(q, d))); |
| 175 |
m.addAxiom(o, DisjointClasses(e, a)); |
| 176 |
m.addAxiom(o, DisjointClasses(e, b)); |
| 177 |
m.addAxiom(o, DisjointClasses(e, d)); |
| 178 |
m.addAxiom(o, DisjointClasses(e, c)); |
| 179 |
m.addAxiom(o, Declaration(a)); |
| 180 |
m.addAxiom(o, SubClassOf(a, domain)); |
| 181 |
m.addAxiom(o, SubClassOf(a, ObjectSomeValuesFrom(s, e))); |
| 182 |
m.addAxiom(o, SubClassOf(a, ObjectSomeValuesFrom(t, b))); |
| 183 |
m.addAxiom(o, DisjointClasses(a, e)); |
| 184 |
m.addAxiom(o, DisjointClasses(a, b)); |
| 185 |
m.addAxiom(o, DisjointClasses(a, c)); |
| 186 |
m.addAxiom(o, Declaration(b)); |
| 187 |
m.addAxiom(o, SubClassOf(b, ObjectSomeValuesFrom(v, a))); |
| 188 |
m.addAxiom(o, SubClassOf(b, ObjectSomeValuesFrom(w, c))); |
| 189 |
m.addAxiom(o, DisjointClasses(b, e)); |
| 190 |
m.addAxiom(o, DisjointClasses(b, a)); |
| 191 |
m.addAxiom(o, DisjointClasses(b, c)); |
| 192 |
m.addAxiom(o, Declaration(d)); |
| 193 |
m.addAxiom(o, EquivalentClasses(d, ObjectUnionOf(c, b))); |
| 194 |
m.addAxiom(o, SubClassOf(d, ObjectSomeValuesFrom(z, e))); |
| 195 |
m.addAxiom(o, DisjointClasses(d, e)); |
| 196 |
m.addAxiom(o, Declaration(c)); |
| 197 |
m.addAxiom(o, SubClassOf(c, ObjectSomeValuesFrom(r, b))); |
| 198 |
m.addAxiom(o, DisjointClasses(c, e)); |
| 199 |
m.addAxiom(o, DisjointClasses(c, a)); |
| 200 |
m.addAxiom(o, DisjointClasses(c, b)); |
| 201 |
m.addAxiom(o, Declaration(p)); |
| 202 |
m.addAxiom(o, InverseObjectProperties(s, p)); |
| 203 |
m.addAxiom(o, FunctionalObjectProperty(p)); |
| 204 |
m.addAxiom(o, InverseFunctionalObjectProperty(p)); |
| 205 |
m.addAxiom(o, Declaration(q)); |
| 206 |
m.addAxiom(o, InverseObjectProperties(z, q)); |
| 207 |
m.addAxiom(o, FunctionalObjectProperty(q)); |
| 208 |
m.addAxiom(o, InverseFunctionalObjectProperty(q)); |
| 209 |
m.addAxiom(o, Declaration(s)); |
| 210 |
m.addAxiom(o, InverseObjectProperties(s, p)); |
| 211 |
m.addAxiom(o, FunctionalObjectProperty(s)); |
| 212 |
m.addAxiom(o, InverseFunctionalObjectProperty(s)); |
| 213 |
m.addAxiom(o, Declaration(t)); |
| 214 |
m.addAxiom(o, InverseObjectProperties(v, t)); |
| 215 |
m.addAxiom(o, FunctionalObjectProperty(t)); |
| 216 |
m.addAxiom(o, InverseFunctionalObjectProperty(t)); |
| 217 |
m.addAxiom(o, Declaration(v)); |
| 218 |
m.addAxiom(o, InverseObjectProperties(v, t)); |
| 219 |
m.addAxiom(o, FunctionalObjectProperty(v)); |
| 220 |
m.addAxiom(o, InverseFunctionalObjectProperty(v)); |
| 221 |
m.addAxiom(o, Declaration(w)); |
| 222 |
m.addAxiom(o, InverseObjectProperties(r, w)); |
| 223 |
m.addAxiom(o, FunctionalObjectProperty(w)); |
| 224 |
m.addAxiom(o, InverseFunctionalObjectProperty(w)); |
| 225 |
m.addAxiom(o, Declaration(z)); |
| 226 |
m.addAxiom(o, InverseObjectProperties(z, q)); |
| 227 |
m.addAxiom(o, FunctionalObjectProperty(z)); |
| 228 |
m.addAxiom(o, InverseFunctionalObjectProperty(z)); |
| 229 |
m.addAxiom(o, Declaration(r)); |
| 230 |
m.addAxiom(o, InverseObjectProperties(r, w)); |
| 231 |
m.addAxiom(o, FunctionalObjectProperty(r)); |
| 232 |
m.addAxiom(o, InverseFunctionalObjectProperty(r)); |
| 233 |
OWLReasoner reasoner = factory().createReasoner(o); |
| 234 |
reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY); |
| 235 |
assertTrue(reasoner.isEntailed(SubClassOf(a, OWLNothing()))); |
| 236 |
assertTrue(reasoner.isEntailed(SubClassOf(b, OWLNothing()))); |
| 237 |
assertTrue(reasoner.isEntailed(SubClassOf(c, OWLNothing()))); |
| 238 |
assertTrue(reasoner.isEntailed(SubClassOf(e, OWLNothing()))); |
| 239 |
assertTrue(reasoner.isEntailed(SubClassOf(d, OWLNothing()))); |
| 240 |
} |
| 241 |
|
| 242 |
@Test |
| 243 |
public void testPlus_and_Minus_Zero_Integer() { |
| 244 |
String premise = "Prefix(:=<http://example.org/>)\n" |
| 245 |
+ "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 246 |
+ "Ontology(\n" |
| 247 |
+ " Declaration(NamedIndividual(:a))\n" |
| 248 |
+ " Declaration(DataProperty(:dp))\nDeclaration(Class(:A))\n" |
| 249 |
+ " SubClassOf(:A DataAllValuesFrom(:dp DataOneOf(\"0\"^^xsd:integer))\n ) \n" |
| 250 |
+ " ClassAssertion(:A :a)\n ClassAssertion( DataSomeValuesFrom(:dp DataOneOf(\"-0\"^^xsd:integer)) :a\n )\n)"; |
| 251 |
String conclusion = ""; |
| 252 |
String id = "Plus_and_Minus_Zero_Integer"; |
| 253 |
TestClasses tc = TestClasses.valueOf("CONSISTENCY"); |
| 254 |
String d = "For integers 0 and -0 are the same value, so the ontology is consistent."; |
| 255 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 256 |
|
| 257 |
r.setReasonerFactory(factory()); |
| 258 |
r.run(); |
| 259 |
} |
| 260 |
|
| 261 |
@Test |
| 262 |
public void testPlus_and_Minus_Zero_Integer_FORTEST() { |
| 263 |
String premise = "Prefix(:=<http://example.org/>)\n" |
| 264 |
+ "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 265 |
+ "Ontology(\n" |
| 266 |
+ " Declaration(NamedIndividual(:a))\n" |
| 267 |
+ " Declaration(DataProperty(:dp))\nDeclaration(Class(:A))\n" |
| 268 |
+ " SubClassOf(:A DataAllValuesFrom(:dp DataOneOf(\"0\"^^xsd:integer))\n ) \n" |
| 269 |
+ " ClassAssertion(:A :a)\n ClassAssertion( DataSomeValuesFrom(:dp DataOneOf(\"0\"^^xsd:integer)) :a\n )\n)"; |
| 270 |
String conclusion = ""; |
| 271 |
String id = "Plus_and_Minus_Zero_Integer"; |
| 272 |
TestClasses tc = TestClasses.valueOf("CONSISTENCY"); |
| 273 |
String d = "For integers 0 and -0 are the same value, so the ontology is consistent."; |
| 274 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 275 |
|
| 276 |
r.setReasonerFactory(factory()); |
| 277 |
r.run(); |
| 278 |
} |
| 279 |
|
| 280 |
@Test |
| 281 |
public void testEqual() throws OWLOntologyCreationException { |
| 282 |
OWLOntologyManager m = OWLManager.createOWLOntologyManager(); |
| 283 |
OWLOntology o = m.createOntology(); |
| 284 |
OWLNamedIndividual x = NamedIndividual(IRI("urn:test:x")); |
| 285 |
OWLNamedIndividual y = NamedIndividual(IRI("urn:test:y")); |
| 286 |
OWLDataProperty p = DataProperty(IRI("urn:test:p")); |
| 287 |
OWLLiteral date = Literal("2008-07-08T20:44:11.656+01:00", |
| 288 |
OWL2Datatype.XSD_DATE_TIME); |
| 289 |
m.addAxiom(o, DataPropertyAssertion(p, x, date)); |
| 290 |
m.addAxiom(o, DataPropertyAssertion(p, y, date)); |
| 291 |
m.addAxiom(o, FunctionalDataProperty(p)); |
| 292 |
m.addAxiom(o, SameIndividual(x, y)); |
| 293 |
OWLReasoner r = factory().createReasoner(o); |
| 294 |
assertTrue( |
| 295 |
"Ontology was supposed to be consistent!\n" |
| 296 |
+ o.getLogicalAxioms(), r.isConsistent()); |
| 297 |
} |
| 298 |
|
| 299 |
@Test |
| 300 |
public void testReasoner6() throws OWLOntologyCreationException { |
| 301 |
OWLOntologyManager mngr = OWLManager.createOWLOntologyManager(); |
| 302 |
OWLOntology ont = mngr.createOntology(); |
| 303 |
OWLReasonerFactory fac = factory(); |
| 304 |
OWLReasoner r = fac.createReasoner(ont); |
| 305 |
assertEquals(1, r.getBottomDataPropertyNode().getEntities().size()); |
| 306 |
} |
| 307 |
|
| 308 |
@Test |
| 309 |
public void testContradicting_datatype_Restrictions() { |
| 310 |
String premise = "Prefix(:=<http://example.org/>)\nPrefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 311 |
+ "Ontology(\n" |
| 312 |
+ " Declaration(NamedIndividual(:a))\n" |
| 313 |
+ " Declaration(DataProperty(:dp))\n" |
| 314 |
+ " Declaration(Class(:A))\n" |
| 315 |
+ " SubClassOf(:A DataAllValuesFrom(:dp DataOneOf(\"3\"^^xsd:integer \"4\"^^xsd:integer))) \n" |
| 316 |
+ " SubClassOf(:A DataAllValuesFrom(:dp DataOneOf(\"2\"^^xsd:integer \"3\"^^xsd:integer)))\n" |
| 317 |
+ " SubClassOf(:A DataSomeValuesFrom(:dp DatatypeRestriction(xsd:integer xsd:minInclusive \"4\"^^xsd:integer)))\n" |
| 318 |
+ " ClassAssertion(:A :a))"; |
| 319 |
String conclusion = ""; |
| 320 |
String id = "Contradicting_datatype_Restrictions"; |
| 321 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 322 |
String d = "The individual a is in A and thus must have a dp filler that is an integer >= 4. Furthermore the dp fillers must be in the set {3, 4} and in the set {2, 3}. Although 3 is in both sets, 3 is not >= 4, which causes the inconsistency."; |
| 323 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 324 |
r.setReasonerFactory(factory()); |
| 325 |
r.run(); |
| 326 |
} |
| 327 |
|
| 328 |
@Test |
| 329 |
@Ignore("FaCT++ datatype problems") |
| 330 |
@Changed(reason = "old test appears to use the wrong value") |
| 331 |
public void testDatatype_Float_Discrete_001() |
| 332 |
throws OWLOntologyCreationException { |
| 333 |
OWLDataProperty dp = DataProperty(IRI("http://example.org/ontology/dp")); |
| 334 |
OWLDatatype f = Datatype(OWL2Datatype.XSD_FLOAT.getIRI()); |
| 335 |
OWLAxiom ax1 = Declaration(dp); |
| 336 |
OWLLiteral f0 = Literal(0F); |
| 337 |
OWLLiteral f1 = Literal(Float.MIN_NORMAL); |
| 338 |
OWLFacetRestriction min = FacetRestriction(OWLFacet.MIN_EXCLUSIVE, f0); |
| 339 |
OWLFacetRestriction max = FacetRestriction(OWLFacet.MAX_EXCLUSIVE, f1); |
| 340 |
OWLDataSomeValuesFrom superClass = DataSomeValuesFrom(dp, |
| 341 |
DatatypeRestriction(f, min, max)); |
| 342 |
OWLClass c = Class(IRI("http://example.org/ontology/c")); |
| 343 |
OWLAxiom ax3 = SubClassOf(c, superClass); |
| 344 |
OWLAxiom ax2 = ClassAssertion(c, |
| 345 |
NamedIndividual(IRI("http://example.org/ontology/a"))); |
| 346 |
OWLOntology o = OWLManager.createOWLOntologyManager().createOntology( |
| 347 |
new HashSet<>(Arrays.asList(ax1, ax2, ax3))); |
| 348 |
OWLReasoner r = factory().createReasoner(o); |
| 349 |
assertFalse(r.isConsistent()); |
| 350 |
} |
| 351 |
|
| 352 |
@Test |
| 353 |
public void testdatatype_restriction_min_max_inconsistency() { |
| 354 |
String premise = "Prefix(:=<http://example.org/>)\n" |
| 355 |
+ "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 356 |
+ "Ontology(\n" |
| 357 |
+ " Declaration(NamedIndividual(:a))\n" |
| 358 |
+ " Declaration(DataProperty(:dp))\n" |
| 359 |
+ " Declaration(Class(:A))\n" |
| 360 |
+ " SubClassOf(:A DataSomeValuesFrom(:dp DatatypeRestriction(xsd:integer xsd:minInclusive \"18\"^^xsd:integer))) \n" |
| 361 |
+ " SubClassOf(:A DataAllValuesFrom(:dp DatatypeRestriction(xsd:integer xsd:maxInclusive \"10\"^^xsd:integer))\n)\n" |
| 362 |
+ " ClassAssertion(:A :a))"; |
| 363 |
String conclusion = ""; |
| 364 |
String id = "datatype_restriction_min_max_inconsistency"; |
| 365 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 366 |
String d = "The individual a is supposed to have an integer dp-successor >= 18, but all dp-successors must be <= 10, which is impossible."; |
| 367 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 368 |
|
| 369 |
r.setReasonerFactory(factory()); |
| 370 |
r.run(); |
| 371 |
} |
| 372 |
|
| 373 |
@Test |
| 374 |
public void testfunctionality_clash() { |
| 375 |
String premise = "Prefix(:=<http://example.org/>)\n" |
| 376 |
+ "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 377 |
+ "Ontology(\n" |
| 378 |
+ " Declaration(NamedIndividual(:a))\n" |
| 379 |
+ " Declaration(DataProperty(:hasAge))\n" |
| 380 |
+ " FunctionalDataProperty(:hasAge) \n" |
| 381 |
+ " ClassAssertion(DataHasValue(:hasAge \"18\"^^xsd:integer) :a) \n" |
| 382 |
+ " ClassAssertion(DataHasValue(:hasAge \"19\"^^xsd:integer) :a))"; |
| 383 |
String conclusion = ""; |
| 384 |
String id = "functionality_clash"; |
| 385 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 386 |
String d = "The property hasAge is functional, but the individual a has two distinct hasAge fillers."; |
| 387 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 388 |
r.setReasonerFactory(factory()); |
| 389 |
r.run(); |
| 390 |
} |
| 391 |
|
| 392 |
@Test |
| 393 |
public void testinconsistent_datatypes() { |
| 394 |
String premise = "Prefix(:=<http://example.org/>)\nPrefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\nOntology(\n" |
| 395 |
+ " Declaration(NamedIndividual(:a))\nDeclaration(DataProperty(:dp))\n" |
| 396 |
+ " Declaration(Class(:A))\n" |
| 397 |
+ " SubClassOf(:A DataAllValuesFrom(:dp xsd:string)) \n" |
| 398 |
+ " SubClassOf(:A DataSomeValuesFrom(:dp xsd:integer)) \n" |
| 399 |
+ " ClassAssertion(:A :a))"; |
| 400 |
String conclusion = ""; |
| 401 |
String id = "inconsistent_datatypes"; |
| 402 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 403 |
String d = "The individual a is in the extension of the class A and is thus required to have a dp-successor that is an integer and at the same time all dp-successors are required to be strings, which causes the inconsistency."; |
| 404 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 405 |
r.setReasonerFactory(factory()); |
| 406 |
r.run(); |
| 407 |
} |
| 408 |
|
| 409 |
@Test |
| 410 |
@Changed |
| 411 |
public void testrdfbased_sem_bool_intersection_inst_comp() { |
| 412 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 413 |
+ " <owl:Class rdf:about=\"http://www.example.org#x\"/>\n" |
| 414 |
+ " <owl:Class rdf:about=\"http://www.example.org#y\"/>\n" |
| 415 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 416 |
+ " <ex:x rdf:about=\"http://www.example.org#z\"><rdf:type rdf:resource=\"http://www.example.org#y\"/></ex:x>\n" |
| 417 |
+ " <rdf:Description rdf:about=\"http://www.example.org#c\">\n" |
| 418 |
+ "<owl:equivalentClass><owl:Class>" |
| 419 |
+ " <owl:intersectionOf rdf:parseType=\"Collection\"><rdf:Description rdf:about=\"http://www.example.org#x\"/><rdf:Description rdf:about=\"http://www.example.org#y\"/></owl:intersectionOf>\n" |
| 420 |
+ "</owl:Class></owl:equivalentClass>" |
| 421 |
+ " </rdf:Description>\n" + "</rdf:RDF>"; |
| 422 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 423 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 424 |
+ " <ex:c rdf:about=\"http://www.example.org#z\"/>\n" |
| 425 |
+ "</rdf:RDF>"; |
| 426 |
String id = "rdfbased_sem_bool_intersection_inst_comp"; |
| 427 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 428 |
String d = "An individual, which is an instance of every component class of an intersection, is an instance of the intersection class expression."; |
| 429 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 430 |
r.setReasonerFactory(factory()); |
| 431 |
r.run(); |
| 432 |
} |
| 433 |
|
| 434 |
@Test |
| 435 |
@Changed |
| 436 |
public void testrdfbased_sem_bool_intersection_term() { |
| 437 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 438 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 439 |
+ " <owl:Class rdf:about=\"http://www.example.org#x\"/>\n" |
| 440 |
+ " <owl:Class rdf:about=\"http://www.example.org#y\"/>\n" |
| 441 |
+ " <rdf:Description rdf:about=\"http://www.example.org#c\">\n" |
| 442 |
+ "<rdfs:subClassOf><owl:Class>" |
| 443 |
+ " <owl:intersectionOf rdf:parseType=\"Collection\"><rdf:Description rdf:about=\"http://www.example.org#x\"/><rdf:Description rdf:about=\"http://www.example.org#y\"/></owl:intersectionOf>\n" |
| 444 |
+ "</owl:Class></rdfs:subClassOf>" |
| 445 |
+ " </rdf:Description>\n" |
| 446 |
+ "</rdf:RDF>"; |
| 447 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 448 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 449 |
+ " <owl:Class rdf:about=\"http://www.example.org#x\"/>\n" |
| 450 |
+ " <owl:Class rdf:about=\"http://www.example.org#y\"/>\n" |
| 451 |
+ " <rdf:Description rdf:about=\"http://www.example.org#c\"><rdfs:subClassOf rdf:resource=\"http://www.example.org#x\"/><rdfs:subClassOf rdf:resource=\"http://www.example.org#y\"/></rdf:Description></rdf:RDF>"; |
| 452 |
String id = "rdfbased_sem_bool_intersection_term"; |
| 453 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 454 |
String d = "If a class is an intersection of other classes, then the original class is a subclass of each of the other classes."; |
| 455 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 456 |
r.setReasonerFactory(factory()); |
| 457 |
r.run(); |
| 458 |
} |
| 459 |
|
| 460 |
@Test |
| 461 |
@Changed |
| 462 |
public void testrdfbased_sem_bool_union_inst_comp() { |
| 463 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 464 |
+ " <owl:Class rdf:about=\"http://www.example.org#x\"/>\n" |
| 465 |
+ " <owl:Class rdf:about=\"http://www.example.org#y\"/>\n" |
| 466 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 467 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 468 |
+ " <ex:x rdf:about=\"http://www.example.org#z\"/>\n" |
| 469 |
+ " <rdf:Description rdf:about=\"http://www.example.org#c\">\n" |
| 470 |
+ "<owl:equivalentClass><owl:Class>" |
| 471 |
+ " <owl:unionOf rdf:parseType=\"Collection\"><rdf:Description rdf:about=\"http://www.example.org#x\"/><rdf:Description rdf:about=\"http://www.example.org#y\"/></owl:unionOf>\n" |
| 472 |
+ "</owl:Class></owl:equivalentClass>" |
| 473 |
+ " </rdf:Description>\n</rdf:RDF>"; |
| 474 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 475 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 476 |
+ " <ex:c rdf:about=\"http://www.example.org#z\"/>\n" |
| 477 |
+ "</rdf:RDF>"; |
| 478 |
String id = "rdfbased_sem_bool_union_inst_comp"; |
| 479 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 480 |
String d = "An individual, which is an instance of one of the component classes of a union, is an instance of the union class expression."; |
| 481 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 482 |
r.setReasonerFactory(factory()); |
| 483 |
r.run(); |
| 484 |
} |
| 485 |
|
| 486 |
@Test |
| 487 |
@Changed |
| 488 |
public void testrdfbased_sem_bool_union_term() { |
| 489 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 490 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 491 |
+ " <owl:Class rdf:about=\"http://www.example.org#x\"/>\n" |
| 492 |
+ " <owl:Class rdf:about=\"http://www.example.org#y\"/>\n" |
| 493 |
+ " <rdf:Description rdf:about=\"http://www.example.org#c\">\n" |
| 494 |
+ "<owl:equivalentClass><owl:Class>" |
| 495 |
+ " <owl:unionOf rdf:parseType=\"Collection\"><rdf:Description rdf:about=\"http://www.example.org#x\"/><rdf:Description rdf:about=\"http://www.example.org#y\"/></owl:unionOf>\n" |
| 496 |
+ "</owl:Class></owl:equivalentClass>" |
| 497 |
+ " </rdf:Description>\n" + "</rdf:RDF>"; |
| 498 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 499 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 500 |
+ " <owl:Class rdf:about=\"http://www.example.org#x\"/>\n" |
| 501 |
+ " <owl:Class rdf:about=\"http://www.example.org#y\"/>\n" |
| 502 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x\"><rdfs:subClassOf rdf:resource=\"http://www.example.org#c\"/></rdf:Description>\n" |
| 503 |
+ " <rdf:Description rdf:about=\"http://www.example.org#y\"><rdfs:subClassOf rdf:resource=\"http://www.example.org#c\"/></rdf:Description></rdf:RDF>"; |
| 504 |
String id = "rdfbased_sem_bool_union_term"; |
| 505 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 506 |
String d = "If a class is a union of other classes, then each of the other classes are subclasses of the original class."; |
| 507 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 508 |
r.setReasonerFactory(factory()); |
| 509 |
r.run(); |
| 510 |
} |
| 511 |
|
| 512 |
@Test |
| 513 |
@Changed |
| 514 |
public void testrdfbased_sem_char_functional_inst() { |
| 515 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 516 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 517 |
+ " <owl:FunctionalProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 518 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x\"><ex:p rdf:resource=\"http://www.example.org#y1\"/><ex:p rdf:resource=\"http://www.example.org#y2\"/></rdf:Description></rdf:RDF>"; |
| 519 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 520 |
+ " <rdf:Description rdf:about=\"http://www.example.org#y1\"><owl:sameAs rdf:resource=\"http://www.example.org#y2\"/></rdf:Description></rdf:RDF>"; |
| 521 |
String id = "rdfbased_sem_char_functional_inst"; |
| 522 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 523 |
String d = "For two triples with the same functional property as their predicates and with the same subject, the objects are the same."; |
| 524 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 525 |
r.setReasonerFactory(factory()); |
| 526 |
r.run(); |
| 527 |
} |
| 528 |
|
| 529 |
@Test |
| 530 |
@Changed |
| 531 |
public void testrdfbased_sem_enum_inst_included() { |
| 532 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 533 |
+ " <owl:Class rdf:about=\"http://www.example.org#e\"/>\n" |
| 534 |
+ " <rdf:Description rdf:about=\"http://www.example.org#e\"><owl:oneOf rdf:parseType=\"Collection\"><rdf:Description rdf:about=\"http://www.example.org#x\"/><rdf:Description rdf:about=\"http://www.example.org#y\"/></owl:oneOf></rdf:Description></rdf:RDF>"; |
| 535 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 536 |
+ " <owl:Class rdf:about=\"http://www.example.org#e\"/>\n" |
| 537 |
+ " <ex:e rdf:about=\"http://www.example.org#x\"/>\n" |
| 538 |
+ " <ex:e rdf:about=\"http://www.example.org#y\"/>\n" |
| 539 |
+ "</rdf:RDF>"; |
| 540 |
String id = "rdfbased_sem_enum_inst_included"; |
| 541 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 542 |
String d = "If a class defines an enumeration class expression from two individuals, than both individuals are instances of the class."; |
| 543 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 544 |
r.setReasonerFactory(factory()); |
| 545 |
r.run(); |
| 546 |
} |
| 547 |
|
| 548 |
@Test |
| 549 |
@Changed |
| 550 |
public void testrdfbased_sem_eqdis_different_irrflxv() { |
| 551 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 552 |
+ "<owl:Thing rdf:about=\"http://www.example.org#x\"/>\n" |
| 553 |
+ "<owl:Thing rdf:about=\"http://www.example.org#z\"/>\n" |
| 554 |
+ " <rdf:Description rdf:about=\"http://www.example.org#z\"><owl:sameAs rdf:resource=\"http://www.example.org#x\"/></rdf:Description>\n" |
| 555 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x\"><owl:differentFrom rdf:resource=\"http://www.example.org#z\"/></rdf:Description></rdf:RDF>"; |
| 556 |
String conclusion = ""; |
| 557 |
String id = "rdfbased_sem_eqdis_different_irrflxv"; |
| 558 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 559 |
String d = "Diversity of two individuals is irreflexive."; |
| 560 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 561 |
r.setReasonerFactory(factory()); |
| 562 |
r.run(); |
| 563 |
} |
| 564 |
|
| 565 |
@Test |
| 566 |
@Changed |
| 567 |
public void testrdfbased_sem_eqdis_disclass_irrflxv() { |
| 568 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 569 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 570 |
+ " <owl:Class rdf:about=\"http://www.example.org#fake\"/>\n" |
| 571 |
+ " <owl:Thing rdf:about=\"http://www.example.org#x\"/>\n" |
| 572 |
+ " <ex:c rdf:about=\"http://www.example.org#x\"/>\n" |
| 573 |
+ " <rdf:Description rdf:about=\"http://www.example.org#c\"><owl:disjointWith rdf:resource=\"http://www.example.org#fake\"/></rdf:Description>\n" |
| 574 |
+ " <rdf:Description rdf:about=\"http://www.example.org#fake\"><owl:equivalentClass rdf:resource=\"http://www.example.org#c\"/></rdf:Description></rdf:RDF>"; |
| 575 |
String conclusion = ""; |
| 576 |
String id = "rdfbased_sem_eqdis_disclass_irrflxv"; |
| 577 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 578 |
String d = "Disjointness of two non-empty classes is irreflexive."; |
| 579 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 580 |
r.setReasonerFactory(factory()); |
| 581 |
r.run(); |
| 582 |
} |
| 583 |
|
| 584 |
@Test |
| 585 |
@Changed |
| 586 |
public void testrdfbased_sem_eqdis_disprop_eqprop() { |
| 587 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 588 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p1\"/>\n" |
| 589 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p2\"/>\n" |
| 590 |
+ " <rdf:Description rdf:about=\"http://www.example.org#s2\"><ex:p2 rdf:resource=\"http://www.example.org#o2\"/></rdf:Description>\n" |
| 591 |
+ " <rdf:Description rdf:about=\"http://www.example.org#s1\"><ex:p1 rdf:resource=\"http://www.example.org#o1\"/></rdf:Description>\n" |
| 592 |
+ " <rdf:Description rdf:about=\"http://www.example.org#p1\"><owl:equivalentProperty rdf:resource=\"http://www.example.org#p2\"/><owl:propertyDisjointWith rdf:resource=\"http://www.example.org#p2\"/></rdf:Description></rdf:RDF>"; |
| 593 |
String conclusion = ""; |
| 594 |
String id = "rdfbased_sem_eqdis_disprop_eqprop"; |
| 595 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 596 |
String d = "Two non-empty properties cannot both be equivalent and disjoint."; |
| 597 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 598 |
r.setReasonerFactory(factory()); |
| 599 |
r.run(); |
| 600 |
} |
| 601 |
|
| 602 |
@Test |
| 603 |
@Changed |
| 604 |
public void testrdfbased_sem_eqdis_disprop_inst() { |
| 605 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 606 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p1\"/>\n" |
| 607 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p2\"/>\n" |
| 608 |
+ " <rdf:Description rdf:about=\"http://www.example.org#s\"><ex:p1 rdf:resource=\"http://www.example.org#o\"/><ex:p2 rdf:resource=\"http://www.example.org#o\"/></rdf:Description>\n" |
| 609 |
+ " <rdf:Description rdf:about=\"http://www.example.org#p1\"><owl:propertyDisjointWith rdf:resource=\"http://www.example.org#p2\"/></rdf:Description></rdf:RDF>"; |
| 610 |
String conclusion = ""; |
| 611 |
String id = "rdfbased_sem_eqdis_disprop_inst"; |
| 612 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 613 |
String d = "Triples with disjoint properties as their predicates have different subjects or different objects."; |
| 614 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 615 |
r.setReasonerFactory(factory()); |
| 616 |
r.run(); |
| 617 |
} |
| 618 |
|
| 619 |
@Test |
| 620 |
@Changed |
| 621 |
public void testrdfbased_sem_eqdis_disprop_irrflxv() { |
| 622 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 623 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 624 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#q\"/>\n" |
| 625 |
+ " <rdf:Description rdf:about=\"http://www.example.org#s\"><ex:p rdf:resource=\"http://www.example.org#o\"/></rdf:Description>\n" |
| 626 |
+ " <rdf:Description rdf:about=\"http://www.example.org#q\"><owl:equivalentProperty rdf:resource=\"http://www.example.org#p\"/></rdf:Description>\n" |
| 627 |
+ " <rdf:Description rdf:about=\"http://www.example.org#p\"><owl:propertyDisjointWith rdf:resource=\"http://www.example.org#q\"/></rdf:Description></rdf:RDF>"; |
| 628 |
String conclusion = ""; |
| 629 |
String id = "rdfbased_sem_eqdis_disprop_irrflxv"; |
| 630 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 631 |
String d = "Disjointness of two non-empty properties is irreflexive."; |
| 632 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 633 |
r.setReasonerFactory(factory()); |
| 634 |
r.run(); |
| 635 |
} |
| 636 |
|
| 637 |
@Test |
| 638 |
@Changed |
| 639 |
public void testrdfbased_sem_eqdis_eqclass_subclass_1() { |
| 640 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 641 |
+ " <owl:Class rdf:about=\"http://www.example.org#c1\"/>\n" |
| 642 |
+ " <owl:Class rdf:about=\"http://www.example.org#c2\"/>\n" |
| 643 |
+ " <rdf:Description rdf:about=\"http://www.example.org#c1\"><owl:equivalentClass rdf:resource=\"http://www.example.org#c2\"/></rdf:Description></rdf:RDF>"; |
| 644 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 645 |
+ " <owl:Class rdf:about=\"http://www.example.org#c1\"/>\n" |
| 646 |
+ " <owl:Class rdf:about=\"http://www.example.org#c2\"/>\n" |
| 647 |
+ " <rdf:Description rdf:about=\"http://www.example.org#c2\"><rdfs:subClassOf><rdf:Description rdf:about=\"http://www.example.org#c1\"><rdfs:subClassOf rdf:resource=\"http://www.example.org#c2\"/></rdf:Description></rdfs:subClassOf></rdf:Description></rdf:RDF>"; |
| 648 |
String id = "rdfbased_sem_eqdis_eqclass_subclass_1"; |
| 649 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 650 |
String d = "Two equivalent classes are sub classes of each other."; |
| 651 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 652 |
r.setReasonerFactory(factory()); |
| 653 |
r.run(); |
| 654 |
} |
| 655 |
|
| 656 |
@Test |
| 657 |
@Changed |
| 658 |
public void testrdfbased_sem_eqdis_sameas_subst() { |
| 659 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 660 |
+ "<owl:ObjectProperty rdf:about=\"http://www.example.org#p1\"/>\n" |
| 661 |
+ "<owl:ObjectProperty rdf:about=\"http://www.example.org#p2\"/>\n" |
| 662 |
+ " <rdf:Description rdf:about=\"http://www.example.org#s2\"><owl:sameAs><rdf:Description rdf:about=\"http://www.example.org#s1\"><ex:p1 rdf:resource=\"http://www.example.org#o1\"/></rdf:Description></owl:sameAs></rdf:Description>\n" |
| 663 |
+ " <rdf:Description rdf:about=\"http://www.example.org#o2\"><owl:sameAs rdf:resource=\"http://www.example.org#o1\"/></rdf:Description>\n" |
| 664 |
+ " <rdf:Description rdf:about=\"http://www.example.org#p2\"><owl:sameAs rdf:resource=\"http://www.example.org#p1\"/></rdf:Description>\n" |
| 665 |
+ " <rdf:Description rdf:about=\"http://www.example.org#p2\"><owl:equivalentProperty rdf:resource=\"http://www.example.org#p1\"/></rdf:Description>\n" |
| 666 |
+ "</rdf:RDF>"; |
| 667 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 668 |
+ "<owl:ObjectProperty rdf:about=\"http://www.example.org#p1\"/>\n" |
| 669 |
+ "<owl:ObjectProperty rdf:about=\"http://www.example.org#p2\"/>\n" |
| 670 |
+ " <rdf:Description rdf:about=\"http://www.example.org#s2\"><ex:p1 rdf:resource=\"http://www.example.org#o1\"/></rdf:Description>\n" |
| 671 |
+ " <rdf:Description rdf:about=\"http://www.example.org#s1\"><ex:p2 rdf:resource=\"http://www.example.org#o1\"/><ex:p1 rdf:resource=\"http://www.example.org#o2\"/></rdf:Description></rdf:RDF>"; |
| 672 |
String id = "rdfbased_sem_eqdis_sameas_subst"; |
| 673 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 674 |
String d = "Equality of two individuals allows for substituting the subject, predicate and object of an RDF triple by an equal individual."; |
| 675 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 676 |
r.setReasonerFactory(factory()); |
| 677 |
r.run(); |
| 678 |
} |
| 679 |
|
| 680 |
@Test |
| 681 |
@Changed |
| 682 |
public void testrdfbased_sem_eqdis_sameas_sym() { |
| 683 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 684 |
+ "<owl:Thing rdf:about=\"http://www.example.org#x\"/>\n" |
| 685 |
+ "<owl:Thing rdf:about=\"http://www.example.org#y\"/>\n" |
| 686 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x\"><owl:sameAs rdf:resource=\"http://www.example.org#y\"/></rdf:Description></rdf:RDF>"; |
| 687 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 688 |
+ "<owl:Thing rdf:about=\"http://www.example.org#x\"/>\n" |
| 689 |
+ "<owl:Thing rdf:about=\"http://www.example.org#y\"/>\n" |
| 690 |
+ " <rdf:Description rdf:about=\"http://www.example.org#y\"><owl:sameAs rdf:resource=\"http://www.example.org#x\"/></rdf:Description></rdf:RDF>"; |
| 691 |
String id = "rdfbased_sem_eqdis_sameas_sym"; |
| 692 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 693 |
String d = "Equality of two individuals is symmetrical."; |
| 694 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 695 |
r.setReasonerFactory(factory()); |
| 696 |
r.run(); |
| 697 |
} |
| 698 |
|
| 699 |
@Test |
| 700 |
public void testrdfbased_sem_eqdis_sameas_trans() { |
| 701 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 702 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x\"><owl:sameAs><rdf:Description rdf:about=\"http://www.example.org#y\"><owl:sameAs rdf:resource=\"http://www.example.org#z\"/></rdf:Description></owl:sameAs></rdf:Description></rdf:RDF>"; |
| 703 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 704 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x\"><owl:sameAs rdf:resource=\"http://www.example.org#z\"/></rdf:Description></rdf:RDF>"; |
| 705 |
String id = "rdfbased_sem_eqdis_sameas_trans"; |
| 706 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 707 |
String d = "Equality of two individuals is transitive."; |
| 708 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 709 |
r.setReasonerFactory(factory()); |
| 710 |
r.run(); |
| 711 |
} |
| 712 |
|
| 713 |
@Test |
| 714 |
@Changed(reason = "without declarations, some properties default to datatype properties and some to annotation properties") |
| 715 |
public |
| 716 |
void testrdfbased_sem_ndis_alldisjointproperties_fw() { |
| 717 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 718 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p1\"/>\n" |
| 719 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p2\"/>\n" |
| 720 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p3\"/>\n" |
| 721 |
+ " <owl:AllDisjointProperties rdf:about=\"http://www.example.org#z\"><owl:members rdf:parseType=\"Collection\"><rdf:Description rdf:about=\"http://www.example.org#p1\"/><rdf:Description rdf:about=\"http://www.example.org#p2\"/><rdf:Description rdf:about=\"http://www.example.org#p3\"/></owl:members></owl:AllDisjointProperties>\n" |
| 722 |
+ " <rdf:Description rdf:about=\"http://www.example.org#s\"><ex:p1 rdf:resource=\"http://www.example.org#o\"/><ex:p2 rdf:resource=\"http://www.example.org#o\"/></rdf:Description></rdf:RDF>"; |
| 723 |
String conclusion = ""; |
| 724 |
String id = "rdfbased_sem_ndis_alldisjointproperties_fw"; |
| 725 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 726 |
String d = "All the members of an owl:AllDisjointProperties construct are mutually disjoint properties."; |
| 727 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 728 |
r.setReasonerFactory(factory()); |
| 729 |
r.run(); |
| 730 |
} |
| 731 |
|
| 732 |
@Test |
| 733 |
@Changed |
| 734 |
public void testrdfbased_sem_npa_dat_fw() { |
| 735 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 736 |
+ " <owl:Class rdf:about=\"http://www.example.org#z\"/>\n" |
| 737 |
+ " <owl:Thing rdf:about=\"http://www.example.org#s\"/>\n" |
| 738 |
+ " <owl:DatatypeProperty rdf:about=\"http://www.example.org#p\"/><rdf:Description rdf:about=\"http://www.example.org#s\"><ex:p>data</ex:p></rdf:Description>\n" |
| 739 |
+ " <owl:NegativePropertyAssertion><owl:sourceIndividual rdf:resource=\"http://www.example.org#s\"/><owl:assertionProperty rdf:resource=\"http://www.example.org#p\"/><owl:targetValue>data</owl:targetValue></owl:NegativePropertyAssertion></rdf:RDF>"; |
| 740 |
String conclusion = ""; |
| 741 |
String id = "rdfbased_sem_npa_dat_fw"; |
| 742 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 743 |
String d = "A negative data property assertion DNPA(s p \"data\") must not occur together with the corresponding positive data property assertion s p \"data\"."; |
| 744 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 745 |
r.setReasonerFactory(factory()); |
| 746 |
r.run(); |
| 747 |
} |
| 748 |
|
| 749 |
@Test |
| 750 |
@Changed |
| 751 |
public void testrdfbased_sem_rdfs_domain_cond() { |
| 752 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 753 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 754 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 755 |
+ " <rdf:Description rdf:about=\"http://www.example.org#u\"><ex:p rdf:resource=\"http://www.example.org#v\"/></rdf:Description>\n" |
| 756 |
+ " <rdf:Description rdf:about=\"http://www.example.org#p\"><rdfs:domain rdf:resource=\"http://www.example.org#c\"/></rdf:Description></rdf:RDF>"; |
| 757 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 758 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 759 |
+ " <ex:c rdf:about=\"http://www.example.org#u\"/>\n" |
| 760 |
+ "</rdf:RDF>"; |
| 761 |
String id = "rdfbased_sem_rdfs_domain_cond"; |
| 762 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 763 |
String d = "The left hand side individual in a given triple is entailed to be an instance of the domain of the predicate."; |
| 764 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 765 |
r.setReasonerFactory(factory()); |
| 766 |
r.run(); |
| 767 |
} |
| 768 |
|
| 769 |
@Test |
| 770 |
@Changed |
| 771 |
public void testrdfbased_sem_rdfs_range_cond() { |
| 772 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 773 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 774 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 775 |
+ " <rdf:Description rdf:about=\"http://www.example.org#u\"><ex:p rdf:resource=\"http://www.example.org#v\"/></rdf:Description>\n" |
| 776 |
+ " <rdf:Description rdf:about=\"http://www.example.org#p\"><rdfs:range rdf:resource=\"http://www.example.org#c\"/></rdf:Description></rdf:RDF>"; |
| 777 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 778 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 779 |
+ " <ex:c rdf:about=\"http://www.example.org#v\"/>\n" |
| 780 |
+ "</rdf:RDF>"; |
| 781 |
String id = "rdfbased_sem_rdfs_range_cond"; |
| 782 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 783 |
String d = "The right hand side individual in a given triple is entailed to be an instance of the range of the predicate."; |
| 784 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 785 |
r.setReasonerFactory(factory()); |
| 786 |
r.run(); |
| 787 |
} |
| 788 |
|
| 789 |
@Test |
| 790 |
@Changed |
| 791 |
public void testrdfbased_sem_restrict_allvalues_cmp_class() { |
| 792 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 793 |
+ " <owl:Class rdf:about=\"http://www.example.org#c1\"/>\n" |
| 794 |
+ " <owl:Class rdf:about=\"http://www.example.org#c2\"/>\n" |
| 795 |
+ " <owl:Class rdf:about=\"http://www.example.org#x2\"/>\n" |
| 796 |
+ " <owl:Class rdf:about=\"http://www.example.org#x1\"/>\n" |
| 797 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 798 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x1\">\n" |
| 799 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 800 |
+ " <owl:allValuesFrom><rdf:Description rdf:about=\"http://www.example.org#c1\"><rdfs:subClassOf rdf:resource=\"http://www.example.org#c2\"/></rdf:Description></owl:allValuesFrom><owl:onProperty rdf:resource=\"http://www.example.org#p\"/>\n" |
| 801 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 802 |
+ " </rdf:Description>\n" |
| 803 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x2\">\n" |
| 804 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 805 |
+ " <owl:allValuesFrom rdf:resource=\"http://www.example.org#c2\"/><owl:onProperty rdf:resource=\"http://www.example.org#p\"/>\n" |
| 806 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 807 |
+ " </rdf:Description>\n" + "</rdf:RDF>"; |
| 808 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 809 |
+ " <owl:Class rdf:about=\"http://www.example.org#x1\"/>\n" |
| 810 |
+ " <owl:Class rdf:about=\"http://www.example.org#x2\"/>\n" |
| 811 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x1\"><rdfs:subClassOf rdf:resource=\"http://www.example.org#x2\"/></rdf:Description></rdf:RDF>"; |
| 812 |
String id = "rdfbased_sem_restrict_allvalues_cmp_class"; |
| 813 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 814 |
String d = "A universal restriction on some property and some class is a sub class of another universal restriction on the same property but on a super class."; |
| 815 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 816 |
r.setReasonerFactory(factory()); |
| 817 |
r.run(); |
| 818 |
} |
| 819 |
|
| 820 |
@Test |
| 821 |
@Changed |
| 822 |
public void testrdfbased_sem_restrict_allvalues_cmp_prop() { |
| 823 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 824 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p1\"/>\n" |
| 825 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p2\"/>\n" |
| 826 |
+ " <owl:Class rdf:about=\"http://www.example.org#x1\"/>\n" |
| 827 |
+ " <owl:Class rdf:about=\"http://www.example.org#x2\"/>\n" |
| 828 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 829 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x1\">\n" |
| 830 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 831 |
+ " <owl:allValuesFrom rdf:resource=\"http://www.example.org#c\"/><owl:onProperty><rdf:Description rdf:about=\"http://www.example.org#p1\"><rdfs:subPropertyOf rdf:resource=\"http://www.example.org#p2\"/></rdf:Description></owl:onProperty>\n" |
| 832 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 833 |
+ " </rdf:Description>\n" |
| 834 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x2\">\n" |
| 835 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 836 |
+ " <owl:allValuesFrom rdf:resource=\"http://www.example.org#c\"/><owl:onProperty rdf:resource=\"http://www.example.org#p2\"/>\n" |
| 837 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 838 |
+ " </rdf:Description>\n" + "</rdf:RDF>"; |
| 839 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 840 |
+ " <owl:Class rdf:about=\"http://www.example.org#x1\"/>\n" |
| 841 |
+ " <owl:Class rdf:about=\"http://www.example.org#x2\"/>\n" |
| 842 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x2\"><rdfs:subClassOf rdf:resource=\"http://www.example.org#x1\"/></rdf:Description></rdf:RDF>"; |
| 843 |
String id = "rdfbased_sem_restrict_allvalues_cmp_prop"; |
| 844 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 845 |
String d = "A universal restriction on some property and some class is a sub class of another universal restriction on the same class but on a sub property."; |
| 846 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 847 |
r.setReasonerFactory(factory()); |
| 848 |
r.run(); |
| 849 |
} |
| 850 |
|
| 851 |
@Test |
| 852 |
@Changed |
| 853 |
public void testrdfbased_sem_restrict_allvalues_inst_obj() { |
| 854 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 855 |
+ "<owl:Class rdf:about=\"http://www.example.org#z\"/>\n" |
| 856 |
+ "<owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 857 |
+ "<owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 858 |
+ " <ex:z rdf:about=\"http://www.example.org#w\"><ex:p rdf:resource=\"http://www.example.org#x\"/></ex:z>\n" |
| 859 |
+ " <rdf:Description rdf:about=\"http://www.example.org#z\">\n" |
| 860 |
+ "<rdfs:subClassOf><owl:Restriction>" |
| 861 |
+ " <owl:allValuesFrom rdf:resource=\"http://www.example.org#c\"/><owl:onProperty rdf:resource=\"http://www.example.org#p\"/>\n" |
| 862 |
+ "</owl:Restriction></rdfs:subClassOf>" |
| 863 |
+ " </rdf:Description>\n" + "</rdf:RDF>"; |
| 864 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 865 |
+ "<owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 866 |
+ " <ex:c rdf:about=\"http://www.example.org#x\"/>\n" |
| 867 |
+ "</rdf:RDF>"; |
| 868 |
String id = "rdfbased_sem_restrict_allvalues_inst_obj"; |
| 869 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 870 |
String d = "If an individual w is an instance of the universal restriction on property p and class c, then for any triple w p x follows that x is an instance of c."; |
| 871 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 872 |
r.setReasonerFactory(factory()); |
| 873 |
r.run(); |
| 874 |
} |
| 875 |
|
| 876 |
@Test |
| 877 |
@Changed |
| 878 |
public void testrdfbased_sem_restrict_hasvalue_cmp_prop() { |
| 879 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 880 |
+ " <owl:Class rdf:about=\"http://www.example.org#x1\"/>\n" |
| 881 |
+ " <owl:Class rdf:about=\"http://www.example.org#x2\"/>\n" |
| 882 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p1\"/>\n" |
| 883 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p2\"/>\n" |
| 884 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x1\">\n" |
| 885 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 886 |
+ " <owl:hasValue rdf:resource=\"http://www.example.org#v\"/><owl:onProperty><rdf:Description rdf:about=\"http://www.example.org#p1\"><rdfs:subPropertyOf rdf:resource=\"http://www.example.org#p2\"/></rdf:Description></owl:onProperty>\n" |
| 887 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 888 |
+ " </rdf:Description>\n" |
| 889 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x2\">\n" |
| 890 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 891 |
+ " <owl:hasValue rdf:resource=\"http://www.example.org#v\"/><owl:onProperty rdf:resource=\"http://www.example.org#p2\"/>\n" |
| 892 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 893 |
+ " </rdf:Description>\n" + "</rdf:RDF>"; |
| 894 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 895 |
+ " <owl:Class rdf:about=\"http://www.example.org#x1\"/>\n" |
| 896 |
+ " <owl:Class rdf:about=\"http://www.example.org#x2\"/>\n" |
| 897 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x1\"><rdfs:subClassOf rdf:resource=\"http://www.example.org#x2\"/></rdf:Description></rdf:RDF>"; |
| 898 |
String id = "rdfbased_sem_restrict_hasvalue_cmp_prop"; |
| 899 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 900 |
String d = "A has-value restriction on some property and some value is a sub class of another has-value restriction on the same value but on a super property."; |
| 901 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 902 |
r.setReasonerFactory(factory()); |
| 903 |
r.run(); |
| 904 |
} |
| 905 |
|
| 906 |
@Test |
| 907 |
@Changed |
| 908 |
public void testrdfbased_sem_restrict_hasvalue_inst_obj() { |
| 909 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 910 |
+ "<owl:Class rdf:about=\"http://www.example.org#z\"/>\n" |
| 911 |
|
| 912 |
+ "<owl:Thing rdf:about=\"http://www.example.org#u\"/>\n" |
| 913 |
+ "<owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 914 |
+ " <ex:z rdf:about=\"http://www.example.org#w\"/>\n" |
| 915 |
+ " <rdf:Description rdf:about=\"http://www.example.org#z\">\n" |
| 916 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 917 |
+ " <owl:hasValue rdf:resource=\"http://www.example.org#u\"/><owl:onProperty rdf:resource=\"http://www.example.org#p\"/>\n" |
| 918 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 919 |
+ " </rdf:Description>\n" + "</rdf:RDF>"; |
| 920 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 921 |
+ "<owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 922 |
+ " <rdf:Description rdf:about=\"http://www.example.org#w\"><ex:p rdf:resource=\"http://www.example.org#u\"/></rdf:Description></rdf:RDF>"; |
| 923 |
String id = "rdfbased_sem_restrict_hasvalue_inst_obj"; |
| 924 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 925 |
String d = "If an individual w is an instance of the has-value restriction on property p to value u, then the triple w p u can be entailed."; |
| 926 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 927 |
r.setReasonerFactory(factory()); |
| 928 |
r.run(); |
| 929 |
} |
| 930 |
|
| 931 |
@Test |
| 932 |
@Changed |
| 933 |
public void testrdfbased_sem_restrict_hasvalue_inst_subj() { |
| 934 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 935 |
+ " <owl:Class rdf:about=\"http://www.example.org#z\"/>\n" |
| 936 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 937 |
+ " <rdf:Description rdf:about=\"http://www.example.org#z\">\n" |
| 938 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 939 |
+ " <owl:hasValue rdf:resource=\"http://www.example.org#u\"/><owl:onProperty rdf:resource=\"http://www.example.org#p\"/>\n" |
| 940 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 941 |
+ " </rdf:Description>\n" |
| 942 |
+ " <rdf:Description rdf:about=\"http://www.example.org#w\"><ex:p rdf:resource=\"http://www.example.org#u\"/></rdf:Description></rdf:RDF>"; |
| 943 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 944 |
+ " <owl:Class rdf:about=\"http://www.example.org#z\"/>\n" |
| 945 |
+ " <ex:z rdf:about=\"http://www.example.org#w\"/>\n" |
| 946 |
+ "</rdf:RDF>"; |
| 947 |
String id = "rdfbased_sem_restrict_hasvalue_inst_subj"; |
| 948 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 949 |
String d = "For a triple w p u, the individual w is an instance of the has-value restriction on p to u."; |
| 950 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 951 |
r.setReasonerFactory(factory()); |
| 952 |
r.run(); |
| 953 |
} |
| 954 |
|
| 955 |
@Test |
| 956 |
@Changed |
| 957 |
public void testrdfbased_sem_restrict_maxcard_inst_obj_one() { |
| 958 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 959 |
+ " <owl:Class rdf:about=\"http://www.example.org#z\"/>\n" |
| 960 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 961 |
+ " <ex:z rdf:about=\"http://www.example.org#w\"><ex:p rdf:resource=\"http://www.example.org#x1\"/><ex:p rdf:resource=\"http://www.example.org#x2\"/></ex:z>\n" |
| 962 |
+ " <rdf:Description rdf:about=\"http://www.example.org#z\">\n" |
| 963 |
+ " <rdfs:subClassOf>\n" |
| 964 |
+ " <owl:Restriction>\n" |
| 965 |
+ " <owl:maxCardinality rdf:datatype=\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\">1</owl:maxCardinality><owl:onProperty rdf:resource=\"http://www.example.org#p\"/>\n" |
| 966 |
+ " </owl:Restriction>\n" |
| 967 |
+ " </rdfs:subClassOf>\n" |
| 968 |
+ " </rdf:Description>\n" + "</rdf:RDF>"; |
| 969 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 970 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x1\"><owl:sameAs rdf:resource=\"http://www.example.org#x2\"/></rdf:Description></rdf:RDF>"; |
| 971 |
String id = "rdfbased_sem_restrict_maxcard_inst_obj_one"; |
| 972 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 973 |
String d = "If an individual w is an instance of the max-1-cardinality restriction on property p, and if there are triples w p x1 and w p x2, then x1 equals x2."; |
| 974 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 975 |
r.setReasonerFactory(factory()); |
| 976 |
r.run(); |
| 977 |
} |
| 978 |
|
| 979 |
@Test |
| 980 |
@Changed |
| 981 |
public void testrdfbased_sem_restrict_maxcard_inst_obj_zero() { |
| 982 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 983 |
+ "<owl:Class rdf:about=\"http://www.example.org#z\"/>" |
| 984 |
+ "<owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>" |
| 985 |
+ " <ex:z rdf:about=\"http://www.example.org#w\"><ex:p rdf:resource=\"http://www.example.org#x\"/></ex:z>\n" |
| 986 |
+ " <rdf:Description rdf:about=\"http://www.example.org#z\">\n" |
| 987 |
+ "<rdfs:subClassOf><rdf:Description>" |
| 988 |
+ "<rdf:type rdf:resource=\"http://www.w3.org/2002/07/owl#Restriction\"/>" |
| 989 |
+ " <owl:maxCardinality rdf:datatype=\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\">0</owl:maxCardinality><owl:onProperty rdf:resource=\"http://www.example.org#p\"/></rdf:Description>\n</rdfs:subClassOf></rdf:Description></rdf:RDF>"; |
| 990 |
String conclusion = ""; |
| 991 |
String id = "rdfbased_sem_restrict_maxcard_inst_obj_zero"; |
| 992 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 993 |
String d = "If an individual w is an instance of the max-0-cardinality restriction on property p, then there cannot be any triple w p x."; |
| 994 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 995 |
r.setReasonerFactory(factory()); |
| 996 |
r.run(); |
| 997 |
} |
| 998 |
|
| 999 |
@Test |
| 1000 |
@Changed |
| 1001 |
public void testrdfbased_sem_restrict_maxqcr_inst_obj_one() { |
| 1002 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 1003 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 1004 |
+ " <owl:Class rdf:about=\"http://www.example.org#z\"/>\n" |
| 1005 |
+ " <owl:Thing rdf:about=\"http://www.example.org#x1\"/>\n" |
| 1006 |
+ " <owl:Thing rdf:about=\"http://www.example.org#x2\"/>\n" |
| 1007 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 1008 |
+ " <ex:z rdf:about=\"http://www.example.org#w\"><ex:p><ex:c rdf:about=\"http://www.example.org#x1\"/></ex:p><ex:p><ex:c rdf:about=\"http://www.example.org#x2\"/></ex:p></ex:z>\n" |
| 1009 |
+ " <rdf:Description rdf:about=\"http://www.example.org#z\">\n" |
| 1010 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 1011 |
+ " <owl:maxQualifiedCardinality rdf:datatype=\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\">1</owl:maxQualifiedCardinality><owl:onProperty rdf:resource=\"http://www.example.org#p\"/><owl:onClass rdf:resource=\"http://www.example.org#c\"/>\n" |
| 1012 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 1013 |
+ " </rdf:Description>\n" + "</rdf:RDF>"; |
| 1014 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 1015 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x1\"><owl:sameAs rdf:resource=\"http://www.example.org#x2\"/></rdf:Description></rdf:RDF>"; |
| 1016 |
String id = "rdfbased_sem_restrict_maxqcr_inst_obj_one"; |
| 1017 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 1018 |
String d = "If an individual w is an instance of the max-1-QCR on property p to class c, and if there are triples w p x1 and w p x2, with x1 and x2 being in c, then x1 equals x2."; |
| 1019 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 1020 |
r.setReasonerFactory(factory()); |
| 1021 |
r.run(); |
| 1022 |
} |
| 1023 |
|
| 1024 |
@Test |
| 1025 |
@Changed |
| 1026 |
public void testrdfbased_sem_restrict_maxqcr_inst_obj_zero() { |
| 1027 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 1028 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 1029 |
+ " <owl:Class rdf:about=\"http://www.example.org#z\"/>\n" |
| 1030 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 1031 |
+ " <ex:z rdf:about=\"http://www.example.org#w\"><ex:p><ex:c rdf:about=\"http://www.example.org#x\"/></ex:p></ex:z>\n" |
| 1032 |
+ " <rdf:Description rdf:about=\"http://www.example.org#z\">\n" |
| 1033 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 1034 |
+ " <owl:maxQualifiedCardinality rdf:datatype=\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\">0</owl:maxQualifiedCardinality><owl:onProperty rdf:resource=\"http://www.example.org#p\"/><owl:onClass rdf:resource=\"http://www.example.org#c\"/>\n" |
| 1035 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 1036 |
+ " </rdf:Description>\n" + "</rdf:RDF>"; |
| 1037 |
String conclusion = ""; |
| 1038 |
String id = "rdfbased_sem_restrict_maxqcr_inst_obj_zero"; |
| 1039 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 1040 |
String d = "If an individual w is an instance of the max-0-QCR on property p to class c, then there cannot be any triple w p x with x in c."; |
| 1041 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 1042 |
r.setReasonerFactory(factory()); |
| 1043 |
r.run(); |
| 1044 |
} |
| 1045 |
|
| 1046 |
@Test |
| 1047 |
@Changed |
| 1048 |
public void testrdfbased_sem_restrict_somevalues_cmp_class() { |
| 1049 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 1050 |
+ " <owl:Class rdf:about=\"http://www.example.org#c1\"/>\n" |
| 1051 |
+ " <owl:Class rdf:about=\"http://www.example.org#c2\"/>\n" |
| 1052 |
+ " <owl:Class rdf:about=\"http://www.example.org#x1\"/>\n" |
| 1053 |
+ " <owl:Class rdf:about=\"http://www.example.org#x2\"/>\n" |
| 1054 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 1055 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x1\">\n" |
| 1056 |
+ "<rdfs:subClassOf><owl:Restriction>" |
| 1057 |
+ " <owl:someValuesFrom><rdf:Description rdf:about=\"http://www.example.org#c1\"><rdfs:subClassOf rdf:resource=\"http://www.example.org#c2\"/></rdf:Description></owl:someValuesFrom><owl:onProperty rdf:resource=\"http://www.example.org#p\"/>\n" |
| 1058 |
+ "</owl:Restriction></rdfs:subClassOf>" |
| 1059 |
+ " </rdf:Description>\n" |
| 1060 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x2\">\n" |
| 1061 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 1062 |
+ " <owl:someValuesFrom rdf:resource=\"http://www.example.org#c2\"/><owl:onProperty rdf:resource=\"http://www.example.org#p\"/>\n" |
| 1063 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 1064 |
+ " </rdf:Description>\n" + "</rdf:RDF>"; |
| 1065 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 1066 |
+ " <owl:Class rdf:about=\"http://www.example.org#x1\"/>\n" |
| 1067 |
+ " <owl:Class rdf:about=\"http://www.example.org#x2\"/>\n" |
| 1068 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x1\"><rdfs:subClassOf rdf:resource=\"http://www.example.org#x2\"/></rdf:Description></rdf:RDF>"; |
| 1069 |
String id = "rdfbased_sem_restrict_somevalues_cmp_class"; |
| 1070 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 1071 |
String d = "An existential restriction on some property and some class is a sub class of another existential restriction on the same property but on a super class."; |
| 1072 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 1073 |
r.setReasonerFactory(factory()); |
| 1074 |
r.run(); |
| 1075 |
} |
| 1076 |
|
| 1077 |
@Test |
| 1078 |
@Changed |
| 1079 |
public void testrdfbased_sem_restrict_somevalues_cmp_prop() { |
| 1080 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 1081 |
+ " <owl:Class rdf:about=\"http://www.example.org#x1\"/>\n" |
| 1082 |
+ " <owl:Class rdf:about=\"http://www.example.org#x2\"/>\n" |
| 1083 |
+ " <owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 1084 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p1\"/>\n" |
| 1085 |
+ " <owl:ObjectProperty rdf:about=\"http://www.example.org#p2\"/>\n" |
| 1086 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x1\">\n" |
| 1087 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 1088 |
+ " <owl:someValuesFrom rdf:resource=\"http://www.example.org#c\"/><owl:onProperty><rdf:Description rdf:about=\"http://www.example.org#p1\"><rdfs:subPropertyOf rdf:resource=\"http://www.example.org#p2\"/></rdf:Description></owl:onProperty>\n" |
| 1089 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 1090 |
+ " </rdf:Description>\n" |
| 1091 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x2\">\n" |
| 1092 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 1093 |
+ " <owl:someValuesFrom rdf:resource=\"http://www.example.org#c\"/><owl:onProperty rdf:resource=\"http://www.example.org#p2\"/>\n" |
| 1094 |
+ "</owl:Restriction></owl:equivalentClass>" |
| 1095 |
+ " </rdf:Description>\n" + "</rdf:RDF>"; |
| 1096 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 1097 |
+ " <owl:Class rdf:about=\"http://www.example.org#x1\"/>\n" |
| 1098 |
+ " <owl:Class rdf:about=\"http://www.example.org#x2\"/>\n" |
| 1099 |
+ " <rdf:Description rdf:about=\"http://www.example.org#x1\"><rdfs:subClassOf rdf:resource=\"http://www.example.org#x2\"/></rdf:Description></rdf:RDF>"; |
| 1100 |
String id = "rdfbased_sem_restrict_somevalues_cmp_prop"; |
| 1101 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 1102 |
String d = "An existential restriction on some property and some class is a sub class of another existential restriction on the same class but on a super property."; |
| 1103 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 1104 |
r.setReasonerFactory(factory()); |
| 1105 |
r.run(); |
| 1106 |
} |
| 1107 |
|
| 1108 |
@Test |
| 1109 |
@Changed |
| 1110 |
public void testrdfbased_sem_restrict_somevalues_inst_subj() { |
| 1111 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 1112 |
+ " <owl:Thing rdf:about=\"http://www.example.org#x\"/>\n" |
| 1113 |
+ "<owl:Class rdf:about=\"http://www.example.org#c\"/>\n" |
| 1114 |
+ "<owl:Class rdf:about=\"http://www.example.org#z\"/>\n" |
| 1115 |
+ "<owl:ObjectProperty rdf:about=\"http://www.example.org#p\"/>\n" |
| 1116 |
+ " <rdf:Description rdf:about=\"http://www.example.org#z\">\n" |
| 1117 |
+ "<owl:equivalentClass><owl:Restriction>" |
| 1118 |
+ " <owl:someValuesFrom rdf:resource=\"http://www.example.org#c\"/><owl:onProperty rdf:resource=\"http://www.example.org#p\"/>\n" |
| 1119 |
+ "</owl:Restriction></owl:equivalentClass>\n" |
| 1120 |
+ " </rdf:Description>\n" |
| 1121 |
+ " <rdf:Description rdf:about=\"http://www.example.org#w\"><ex:p><ex:c rdf:about=\"http://www.example.org#x\"/></ex:p></rdf:Description></rdf:RDF>"; |
| 1122 |
String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:ex=\"http://www.example.org#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n" |
| 1123 |
+ " <owl:Thing rdf:about=\"http://www.example.org#w\"/>\n" |
| 1124 |
+ " <owl:Class rdf:about=\"http://www.example.org#z\"/>\n" |
| 1125 |
+ " <ex:z rdf:about=\"http://www.example.org#w\"/>\n" |
| 1126 |
+ "</rdf:RDF>"; |
| 1127 |
String id = "rdfbased_sem_restrict_somevalues_inst_subj"; |
| 1128 |
TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL"); |
| 1129 |
String d = "For a triple w p x, with x being an instance of a class c, the individual w is an instance of the existential restriction on p to c."; |
| 1130 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 1131 |
r.setReasonerFactory(factory()); |
| 1132 |
r.run(); |
| 1133 |
} |
| 1134 |
|
| 1135 |
@Test |
| 1136 |
public void teststring_integer_clash() { |
| 1137 |
String premise = "Prefix(:=<http://example.org/>)\n" |
| 1138 |
+ "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 1139 |
+ "Ontology(\n" |
| 1140 |
+ " Declaration(NamedIndividual(:a))\n" |
| 1141 |
+ " Declaration(DataProperty(:hasAge))\n" |
| 1142 |
+ " DataPropertyRange(:hasAge xsd:integer)\n" |
| 1143 |
+ " ClassAssertion(DataHasValue(:hasAge \"aString\"^^xsd:string) :a)\n" |
| 1144 |
+ ')'; |
| 1145 |
String conclusion = ""; |
| 1146 |
String id = "string_integer_clash"; |
| 1147 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 1148 |
String d = "The range of hasAge is integer, but a has an asserted string hasAge filler."; |
| 1149 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 1150 |
r.setReasonerFactory(factory()); |
| 1151 |
|
| 1152 |
r.run(); |
| 1153 |
} |
| 1154 |
|
| 1155 |
@Test |
| 1156 |
public void testWebOnt_description_logic_501() { |
| 1157 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\"\n" |
| 1158 |
+ " xml:base=\"http://www.w3.org/2002/03owlt/description-logic/consistent501\" >\n" |
| 1159 |
+ "<owl:Ontology/>\n" |
| 1160 |
+ "<owl:Class rdf:ID='TorF'> \n" |
| 1161 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:ID='T'><owl:differentFrom rdf:resource='#F'/></owl:Thing><owl:Thing rdf:ID='F'/></owl:oneOf>\n" |
| 1162 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus1'/><owl:Thing rdf:about='#minus1'/></owl:oneOf>\n" |
| 1163 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus2'/><owl:Thing rdf:about='#minus2'/></owl:oneOf>\n" |
| 1164 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus3'/><owl:Thing rdf:about='#minus3'/></owl:oneOf>\n" |
| 1165 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus4'/><owl:Thing rdf:about='#minus4'/></owl:oneOf>\n" |
| 1166 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus5'/><owl:Thing rdf:about='#minus5'/></owl:oneOf>\n" |
| 1167 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus6'/><owl:Thing rdf:about='#minus6'/></owl:oneOf>\n" |
| 1168 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus7'/><owl:Thing rdf:about='#minus7'/></owl:oneOf>\n" |
| 1169 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus8'/><owl:Thing rdf:about='#minus8'/></owl:oneOf>\n" |
| 1170 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus9'/><owl:Thing rdf:about='#minus9'/></owl:oneOf></owl:Class>\n" |
| 1171 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#minus9'/><rdf:Description rdf:about='#minus8'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1172 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#plus2'/><rdf:Description rdf:about='#minus8'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1173 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus4'/><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#minus5'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1174 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus2'/><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#minus1'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1175 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus1'/><rdf:Description rdf:about='#plus5'/><rdf:Description rdf:about='#plus8'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1176 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus8'/><rdf:Description rdf:about='#minus6'/><rdf:Description rdf:about='#minus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1177 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus3'/><rdf:Description rdf:about='#minus8'/><rdf:Description rdf:about='#plus7'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1178 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus3'/><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#plus8'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1179 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus4'/><rdf:Description rdf:about='#minus6'/><rdf:Description rdf:about='#plus8'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1180 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#plus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1181 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#minus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1182 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus5'/><rdf:Description rdf:about='#minus2'/><rdf:Description rdf:about='#plus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1183 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus5'/><rdf:Description rdf:about='#plus8'/><rdf:Description rdf:about='#plus2'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1184 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus2'/><rdf:Description rdf:about='#minus7'/><rdf:Description rdf:about='#minus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1185 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus6'/><rdf:Description rdf:about='#minus8'/><rdf:Description rdf:about='#minus5'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1186 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus2'/><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#minus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1187 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus9'/><rdf:Description rdf:about='#minus1'/><rdf:Description rdf:about='#minus2'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1188 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#minus6'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1189 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#plus9'/><rdf:Description rdf:about='#minus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1190 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus8'/><rdf:Description rdf:about='#minus9'/><rdf:Description rdf:about='#minus2'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1191 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus9'/><rdf:Description rdf:about='#minus8'/><rdf:Description rdf:about='#plus2'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1192 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus5'/><rdf:Description rdf:about='#plus8'/><rdf:Description rdf:about='#plus4'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1193 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus7'/><rdf:Description rdf:about='#plus2'/><rdf:Description rdf:about='#plus5'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1194 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus1'/><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#minus4'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1195 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#minus8'/><rdf:Description rdf:about='#plus4'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1196 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus3'/><rdf:Description rdf:about='#plus2'/><rdf:Description rdf:about='#minus6'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1197 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#minus2'/><rdf:Description rdf:about='#minus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1198 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#minus2'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1199 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus7'/><rdf:Description rdf:about='#plus8'/><rdf:Description rdf:about='#plus4'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1200 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#minus7'/><rdf:Description rdf:about='#minus5'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1201 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus5'/><rdf:Description rdf:about='#plus4'/><rdf:Description rdf:about='#minus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1202 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#minus1'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1203 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus1'/><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#minus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1204 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#plus2'/><rdf:Description rdf:about='#plus6'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1205 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus8'/><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#minus7'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1206 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus1'/><rdf:Description rdf:about='#plus9'/><rdf:Description rdf:about='#minus8'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1207 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus5'/><rdf:Description rdf:about='#minus9'/><rdf:Description rdf:about='#minus7'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1208 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus7'/><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#minus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1209 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#minus1'/><rdf:Description rdf:about='#minus2'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1210 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#plus4'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1211 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#minus7'/><rdf:Description rdf:about='#plus5'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1212 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus8'/><rdf:Description rdf:about='#minus6'/><rdf:Description rdf:about='#plus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1213 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus5'/><rdf:Description rdf:about='#minus2'/><rdf:Description rdf:about='#plus6'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1214 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus8'/><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#minus5'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1215 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus2'/><rdf:Description rdf:about='#minus4'/><rdf:Description rdf:about='#minus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1216 |
+ "</rdf:RDF>"; |
| 1217 |
String conclusion = ""; |
| 1218 |
String id = "WebOnt_description_logic_501"; |
| 1219 |
TestClasses tc = TestClasses.valueOf("CONSISTENCY"); |
| 1220 |
String d = "This is the classic 3 SAT problem."; |
| 1221 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 1222 |
r.setReasonerFactory(factory()); |
| 1223 |
r.run(); |
| 1224 |
} |
| 1225 |
|
| 1226 |
@Test |
| 1227 |
public void testWebOnt_description_logic_502() { |
| 1228 |
String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:first=\"http://www.w3.org/2002/03owlt/description-logic/inconsistent502#\"\n" |
| 1229 |
+ " xml:base=\"http://www.w3.org/2002/03owlt/description-logic/inconsistent502\" >\n" |
| 1230 |
+ "<owl:Ontology/>\n" |
| 1231 |
+ "<owl:Class rdf:ID='TorF'> \n" |
| 1232 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:ID='T'><owl:differentFrom rdf:resource='#F'/></owl:Thing><owl:Thing rdf:ID='F'/></owl:oneOf>\n" |
| 1233 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus1'/><owl:Thing rdf:about='#minus1'/></owl:oneOf>\n" |
| 1234 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus2'/><owl:Thing rdf:about='#minus2'/></owl:oneOf>\n" |
| 1235 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus3'/><owl:Thing rdf:about='#minus3'/></owl:oneOf>\n" |
| 1236 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus4'/><owl:Thing rdf:about='#minus4'/></owl:oneOf>\n" |
| 1237 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus5'/><owl:Thing rdf:about='#minus5'/></owl:oneOf>\n" |
| 1238 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus6'/><owl:Thing rdf:about='#minus6'/></owl:oneOf>\n" |
| 1239 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus7'/><owl:Thing rdf:about='#minus7'/></owl:oneOf>\n" |
| 1240 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus8'/><owl:Thing rdf:about='#minus8'/></owl:oneOf>\n" |
| 1241 |
+ " <owl:oneOf rdf:parseType='Collection'><owl:Thing rdf:about='#plus9'/><owl:Thing rdf:about='#minus9'/></owl:oneOf></owl:Class>\n" |
| 1242 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#plus2'/><rdf:Description rdf:about='#minus4'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1243 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus3'/><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#minus4'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1244 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus9'/><rdf:Description rdf:about='#minus4'/><rdf:Description rdf:about='#plus5'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1245 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus4'/><rdf:Description rdf:about='#minus6'/><rdf:Description rdf:about='#minus2'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1246 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus2'/><rdf:Description rdf:about='#minus3'/><rdf:Description rdf:about='#plus1'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1247 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus3'/><rdf:Description rdf:about='#plus8'/><rdf:Description rdf:about='#plus7'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1248 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus8'/><rdf:Description rdf:about='#minus2'/><rdf:Description rdf:about='#plus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1249 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus7'/><rdf:Description rdf:about='#minus6'/><rdf:Description rdf:about='#plus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1250 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#minus4'/><rdf:Description rdf:about='#minus6'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1251 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus8'/><rdf:Description rdf:about='#minus5'/><rdf:Description rdf:about='#minus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1252 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus4'/><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#plus6'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1253 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus2'/><rdf:Description rdf:about='#minus1'/><rdf:Description rdf:about='#plus4'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1254 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus3'/><rdf:Description rdf:about='#plus8'/><rdf:Description rdf:about='#plus2'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1255 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#minus2'/><rdf:Description rdf:about='#plus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1256 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#minus9'/><rdf:Description rdf:about='#minus2'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1257 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus2'/><rdf:Description rdf:about='#minus5'/><rdf:Description rdf:about='#minus7'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1258 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus5'/><rdf:Description rdf:about='#plus2'/><rdf:Description rdf:about='#plus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1259 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#minus2'/><rdf:Description rdf:about='#minus7'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1260 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus9'/><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#minus2'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1261 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#plus4'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1262 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus4'/><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#plus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1263 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus2'/><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#minus6'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1264 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus7'/><rdf:Description rdf:about='#minus4'/><rdf:Description rdf:about='#plus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1265 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus5'/><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#minus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1266 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus4'/><rdf:Description rdf:about='#plus9'/><rdf:Description rdf:about='#minus8'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1267 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus4'/><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#plus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1268 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus7'/><rdf:Description rdf:about='#plus9'/><rdf:Description rdf:about='#plus5'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1269 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus4'/><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#plus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1270 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus5'/><rdf:Description rdf:about='#plus8'/><rdf:Description rdf:about='#plus7'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1271 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus8'/><rdf:Description rdf:about='#minus7'/><rdf:Description rdf:about='#plus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1272 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus4'/><rdf:Description rdf:about='#minus8'/><rdf:Description rdf:about='#plus6'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1273 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus4'/><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#minus5'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1274 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus6'/><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#minus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1275 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus1'/><rdf:Description rdf:about='#plus9'/><rdf:Description rdf:about='#minus6'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1276 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus9'/><rdf:Description rdf:about='#minus8'/><rdf:Description rdf:about='#plus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1277 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#plus3'/><rdf:Description rdf:about='#minus4'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1278 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus8'/><rdf:Description rdf:about='#minus4'/><rdf:Description rdf:about='#plus6'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1279 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus3'/><rdf:Description rdf:about='#plus5'/><rdf:Description rdf:about='#minus8'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1280 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus9'/><rdf:Description rdf:about='#plus4'/><rdf:Description rdf:about='#plus3'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1281 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus8'/><rdf:Description rdf:about='#minus4'/><rdf:Description rdf:about='#plus2'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1282 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus5'/><rdf:Description rdf:about='#minus2'/><rdf:Description rdf:about='#minus9'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1283 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus7'/><rdf:Description rdf:about='#minus3'/><rdf:Description rdf:about='#minus4'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1284 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#minus9'/><rdf:Description rdf:about='#minus4'/><rdf:Description rdf:about='#minus8'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1285 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#minus4'/><rdf:Description rdf:about='#minus1'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1286 |
+ "<rdf:Description rdf:about='#T'><rdf:type><owl:Class><owl:oneOf rdf:parseType='Collection'><rdf:Description rdf:about='#plus6'/><rdf:Description rdf:about='#minus7'/><rdf:Description rdf:about='#minus8'/></owl:oneOf></owl:Class></rdf:type></rdf:Description>\n" |
| 1287 |
+ "</rdf:RDF>"; |
| 1288 |
String conclusion = ""; |
| 1289 |
String id = "WebOnt_description_logic_502"; |
| 1290 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 1291 |
String d = "This is the classic 3 SAT problem."; |
| 1292 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 1293 |
r.setReasonerFactory(factory()); |
| 1294 |
r.run(); |
| 1295 |
} |
| 1296 |
|
| 1297 |
@Test |
| 1298 |
public void testBetweenNumbers() throws OWLOntologyCreationException { |
| 1299 |
OWLOntologyManager m = OWLManager.createOWLOntologyManager(); |
| 1300 |
OWLOntology o = m.createOntology(); |
| 1301 |
OWLNamedIndividual x = NamedIndividual(IRI("urn:test:x")); |
| 1302 |
OWLClass c = Class(IRI("urn:test:c")); |
| 1303 |
OWLDataProperty p = DataProperty(IRI("urn:test:p")); |
| 1304 |
OWLDatatype type = Datatype(XSDVocabulary.INT.getIRI()); |
| 1305 |
OWLLiteral date1 = Literal("2007", type); |
| 1306 |
|
| 1307 |
OWLLiteral date2 = Literal("2009", type); |
| 1308 |
|
| 1309 |
OWLLiteral date3 = Literal("2008", type); |
| 1310 |
|
| 1311 |
OWLDataRange range = DatatypeRestriction(type, |
| 1312 |
FacetRestriction(OWLFacet.MIN_INCLUSIVE, date1), |
| 1313 |
FacetRestriction(OWLFacet.MAX_INCLUSIVE, date2)); |
| 1314 |
OWLClassExpression psome = DataSomeValuesFrom(p, range); |
| 1315 |
m.addAxiom(o, EquivalentClasses(c, psome)); |
| 1316 |
m.addAxiom(o, DataPropertyAssertion(p, x, date3)); |
| 1317 |
m.addAxiom(o, FunctionalDataProperty(p)); |
| 1318 |
OWLReasoner r = factory().createReasoner(o); |
| 1319 |
assertTrue(r.isEntailed(ClassAssertion(c, x))); |
| 1320 |
} |
| 1321 |
|
| 1322 |
@Test |
| 1323 |
@Ignore("FaCT++ datatype problems") |
| 1324 |
public void testContradicting_dateTime_restrictions_programmatic() |
| 1325 |
throws OWLOntologyCreationException { |
| 1326 |
Set<OWLAxiom> axioms = new HashSet<>(); |
| 1327 |
OWLClass A = Class(IRI("http://example.org/A")); |
| 1328 |
OWLNamedIndividual a = NamedIndividual(IRI("http://example.org/a")); |
| 1329 |
OWLDataProperty dp = DataProperty(IRI("http://example.org/dp")); |
| 1330 |
OWLDatatype type = Datatype(OWL2Datatype.XSD_DATE_TIME.getIRI()); |
| 1331 |
OWLLiteral lit1 = Literal("2007-10-08T20:44:11.656+01:00", type); |
| 1332 |
OWLLiteral lit2 = Literal("2008-10-08T20:44:11.656+01:00", type); |
| 1333 |
OWLLiteral lit3 = Literal("2008-07-08T20:44:11.656+01:00", type); |
| 1334 |
OWLFacetRestriction min = FacetRestriction(OWLFacet.MIN_INCLUSIVE, lit3); |
| 1335 |
OWLFacetRestriction max = FacetRestriction(OWLFacet.MAX_INCLUSIVE, lit2); |
| 1336 |
axioms.add(Declaration(A)); |
| 1337 |
axioms.add(SubClassOf(A, |
| 1338 |
DataAllValuesFrom(dp, DatatypeRestriction(type, max, min)))); |
| 1339 |
axioms.add(SubClassOf(A, DataHasValue(dp, lit1))); |
| 1340 |
axioms.add(Declaration(dp)); |
| 1341 |
axioms.add(Declaration(a)); |
| 1342 |
axioms.add(ClassAssertion(A, a)); |
| 1343 |
OWLOntology o = OWLManager.createOWLOntologyManager().createOntology( |
| 1344 |
axioms); |
| 1345 |
assertFalse(factory().createReasoner(o).isConsistent()); |
| 1346 |
} |
| 1347 |
|
| 1348 |
@Test |
| 1349 |
public void testContradicting_int_restrictions() |
| 1350 |
throws OWLOntologyCreationException { |
| 1351 |
Set<OWLAxiom> axioms = new HashSet<>(); |
| 1352 |
OWLClass A = Class(IRI("http://example.org/A")); |
| 1353 |
OWLNamedIndividual a = NamedIndividual(IRI("http://example.org/a")); |
| 1354 |
OWLDataProperty dp = DataProperty(IRI("http://example.org/dp")); |
| 1355 |
OWLDatatype type = Datatype(OWL2Datatype.XSD_INT.getIRI()); |
| 1356 |
OWLLiteral lit1 = Literal("2007", type); |
| 1357 |
OWLLiteral lit2 = Literal("2009", type); |
| 1358 |
OWLLiteral lit3 = Literal("2008", type); |
| 1359 |
OWLFacetRestriction min = FacetRestriction(OWLFacet.MIN_INCLUSIVE, lit3); |
| 1360 |
OWLFacetRestriction max = FacetRestriction(OWLFacet.MAX_INCLUSIVE, lit2); |
| 1361 |
axioms.add(Declaration(A)); |
| 1362 |
axioms.add(SubClassOf(A, |
| 1363 |
DataAllValuesFrom(dp, DatatypeRestriction(type, max, min)))); |
| 1364 |
axioms.add(SubClassOf(A, DataHasValue(dp, lit1))); |
| 1365 |
axioms.add(Declaration(dp)); |
| 1366 |
axioms.add(Declaration(a)); |
| 1367 |
axioms.add(ClassAssertion(A, a)); |
| 1368 |
OWLOntology o = OWLManager.createOWLOntologyManager().createOntology( |
| 1369 |
axioms); |
| 1370 |
assertFalse(factory().createReasoner(o).isConsistent()); |
| 1371 |
} |
| 1372 |
|
| 1373 |
@Test |
| 1374 |
@Ignore("FaCT++ datatype problems") |
| 1375 |
public void testContradicting_dateTime_restrictions() { |
| 1376 |
String premise = "Prefix(:=<http://example.org/>)\n" |
| 1377 |
+ "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 1378 |
+ "Ontology(\n" |
| 1379 |
+ " Declaration(NamedIndividual(:a))\n" |
| 1380 |
+ " Declaration(DataProperty(:dp))\n" |
| 1381 |
+ " Declaration(Class(:A))\n" |
| 1382 |
+ " SubClassOf(:A \n" |
| 1383 |
+ " DataHasValue(:dp \"2007-10-08T20:44:11.656+01:00\"^^xsd:dateTime)) \n" |
| 1384 |
+ " SubClassOf(:A \n" |
| 1385 |
+ " DataAllValuesFrom(:dp DatatypeRestriction(\n" |
| 1386 |
+ " xsd:dateTime \n" |
| 1387 |
+ " xsd:minInclusive \"2008-07-08T20:44:11.656+01:00\"^^xsd:dateTime \n" |
| 1388 |
+ " xsd:maxInclusive \"2008-10-08T20:44:11.656+01:00\"^^xsd:dateTime)\n" |
| 1389 |
+ " )\n" + " ) \n" + " ClassAssertion(:A :a)\n" + ')'; |
| 1390 |
String conclusion = ""; |
| 1391 |
String id = "Contradicting_dateTime_restrictions"; |
| 1392 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 1393 |
String d = "The individual a must have a dp filler that is a date from 2007, but the restrictions on dp allow only values from 2008, which makes the ontology inconsistent."; |
| 1394 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 1395 |
r.setReasonerFactory(factory()); |
| 1396 |
r.run(); |
| 1397 |
} |
| 1398 |
|
| 1399 |
@Test |
| 1400 |
public void testInconsistent_Data_Complement_with_the_Restrictions() { |
| 1401 |
String premise = "Prefix(:=<http://example.org/>)\n" |
| 1402 |
+ "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 1403 |
+ "Ontology(\n" + " Declaration(NamedIndividual(:a))\n" |
| 1404 |
+ " Declaration(DataProperty(:dp))\n" |
| 1405 |
+ " Declaration(Class(:A))\n" |
| 1406 |
+ " SubClassOf(:A DataAllValuesFrom(:dp \n" |
| 1407 |
+ " DataOneOf(\"3\"^^xsd:integer \"4\"^^xsd:integer))\n" |
| 1408 |
+ " ) \n" + " SubClassOf(:A DataAllValuesFrom(:dp \n" |
| 1409 |
+ " DataOneOf(\"2\"^^xsd:integer \"3\"^^xsd:integer))\n" |
| 1410 |
+ " )\n" + " ClassAssertion(:A :a)\n" |
| 1411 |
+ " ClassAssertion(DataSomeValuesFrom(:dp\n" |
| 1412 |
+ " DataComplementOf(DataOneOf(\"3\"^^xsd:integer))) :a)\n" |
| 1413 |
+ ')'; |
| 1414 |
String conclusion = ""; |
| 1415 |
String id = "Inconsistent_Data_Complement_with_the_Restrictions"; |
| 1416 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 1417 |
String d = "The individual a must have dp fillers that are in the sets {3, 4} and {2, 3}, but at the same time 3 is not allowed as a dp filler for a, which causes the inconsistency."; |
| 1418 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 1419 |
r.setReasonerFactory(factory()); |
| 1420 |
r.run(); |
| 1421 |
} |
| 1422 |
|
| 1423 |
@Test |
| 1424 |
@Ignore("FaCT++ datatype problems") |
| 1425 |
public void testPlus_and_Minus_Zero_are_Distinct() { |
| 1426 |
String premise = "Prefix(:=<http://example.org/>)\n" |
| 1427 |
+ "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 1428 |
+ "Ontology(\n" |
| 1429 |
+ " Declaration(NamedIndividual(:Meg))\n" |
| 1430 |
+ " Declaration(DataProperty(:numberOfChildren))\n" |
| 1431 |
+ " DataPropertyAssertion(:numberOfChildren :Meg \"+0.0\"^^xsd:float) \n" |
| 1432 |
+ " DataPropertyAssertion(:numberOfChildren :Meg \"-0.0\"^^xsd:float) \n" |
| 1433 |
+ " FunctionalDataProperty(:numberOfChildren)\n" + ')'; |
| 1434 |
String conclusion = ""; |
| 1435 |
String id = "Plus_and_Minus_Zero_are_Distinct"; |
| 1436 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 1437 |
String d = "For floats and double, +0.0 and -0.0 are distinct values, which contradicts the functionality for numberOfChildren."; |
| 1438 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 1439 |
r.setReasonerFactory(factory()); |
| 1440 |
r.run(); |
| 1441 |
} |
| 1442 |
|
| 1443 |
@Test |
| 1444 |
@Ignore("FaCT++ datatype problems") |
| 1445 |
public void testInconsistent_Byte_Filler() { |
| 1446 |
String premise = "Prefix(:=<http://example.org/>)\n" |
| 1447 |
+ "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n" |
| 1448 |
+ "Ontology(\n" |
| 1449 |
+ " Declaration(NamedIndividual(:a))\n" |
| 1450 |
+ " Declaration(DataProperty(:dp))\n" |
| 1451 |
+ " Declaration(Class(:A))\n" |
| 1452 |
+ " SubClassOf(:A DataAllValuesFrom(:dp xsd:byte)) \n" |
| 1453 |
+ " ClassAssertion(:A :a)\n" |
| 1454 |
+ " ClassAssertion(\n" |
| 1455 |
+ " DataSomeValuesFrom(:dp DataOneOf(\"6542145\"^^xsd:integer)) :a\n" |
| 1456 |
+ " )\n" + ')'; |
| 1457 |
String conclusion = ""; |
| 1458 |
String id = "Inconsistent_Byte_Filler"; |
| 1459 |
TestClasses tc = TestClasses.valueOf("INCONSISTENCY"); |
| 1460 |
String d = "The individual a must have the integer 6542145 as dp filler, but all fillers must also be bytes. Since 6542145 is not byte, the ontology is inconsistent."; |
| 1461 |
JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d); |
| 1462 |
r.setReasonerFactory(factory()); |
| 1463 |
r.run(); |
| 1464 |
} |
| 1465 |
|
| 1466 |
@Test |
| 1467 |
@Changed(reason = "changed to fix unreliable iris") |
| 1468 |
public void testone_two() throws OWLException { |
| 1469 |
OWLOntologyManager m = OWLManager.createOWLOntologyManager(); |
| 1470 |
IRI ontoIRI = IRI("urn:onetwo"); |
| 1471 |
OWLOntology o = m.createOntology(ontoIRI); |
| 1472 |
String ns = "http://example.com/"; |
| 1473 |
OWLClass twoa = Class(IRI(ns + "twoa")); |
| 1474 |
OWLObjectProperty atotwoaprime = ObjectProperty(IRI(ns + "atotwoaprime")); |
| 1475 |
OWLObjectProperty atob = ObjectProperty(IRI(ns + "atob")); |
| 1476 |
OWLClass bandc = Class(IRI(ns + "bandc")); |
| 1477 |
OWLClass b = Class(IRI(ns + 'b')); |
| 1478 |
OWLClass c = Class(IRI(ns + 'c')); |
| 1479 |
OWLClass a = Class(IRI(ns + 'a')); |
| 1480 |
OWLObjectProperty twoatobandc = ObjectProperty(IRI(ns + "twoatobandc")); |
| 1481 |
OWLNamedIndividual j = NamedIndividual(IRI(ns + 'j')); |
| 1482 |
OWLNamedIndividual i = NamedIndividual(IRI(ns + 'i')); |
| 1483 |
OWLNamedIndividual k = NamedIndividual(IRI(ns + 'k')); |
| 1484 |
OWLObjectProperty bandctotwoaprime = ObjectProperty(IRI(ns |
| 1485 |
+ "bandctotwoaprime")); |
| 1486 |
OWLObjectProperty btoaprime = ObjectProperty(IRI(ns + "btoaprime")); |
| 1487 |
OWLObjectProperty btoc = ObjectProperty(IRI(ns + "btoc")); |
| 1488 |
OWLObjectProperty ctobprime = ObjectProperty(IRI(ns + "ctobprime")); |
| 1489 |
OWLObjectProperty twoatoa = ObjectProperty(IRI(ns + "twoatoa")); |
| 1490 |
m.addAxiom(o, Declaration(a)); |
| 1491 |
m.addAxiom(o, EquivalentClasses(a, ObjectOneOf(j, i, k))); |
| 1492 |
m.addAxiom(o, SubClassOf(a, ObjectSomeValuesFrom(atob, b))); |
| 1493 |
m.addAxiom(o, SubClassOf(a, ObjectSomeValuesFrom(atotwoaprime, twoa))); |
| 1494 |
m.addAxiom(o, DisjointClasses(a, b)); |
| 1495 |
m.addAxiom(o, DisjointClasses(a, c)); |
| 1496 |
m.addAxiom(o, DisjointClasses(a, twoa)); |
| 1497 |
m.addAxiom(o, Declaration(b)); |
| 1498 |
m.addAxiom(o, SubClassOf(b, ObjectSomeValuesFrom(btoaprime, a))); |
| 1499 |
m.addAxiom(o, SubClassOf(b, ObjectSomeValuesFrom(btoc, c))); |
| 1500 |
m.addAxiom(o, DisjointClasses(b, a)); |
| 1501 |
m.addAxiom(o, DisjointClasses(b, c)); |
| 1502 |
m.addAxiom(o, DisjointClasses(b, twoa)); |
| 1503 |
m.addAxiom(o, Declaration(bandc)); |
| 1504 |
m.addAxiom(o, EquivalentClasses(bandc, ObjectUnionOf(c, b))); |
| 1505 |
m.addAxiom(o, |
| 1506 |
SubClassOf(bandc, ObjectSomeValuesFrom(bandctotwoaprime, twoa))); |
| 1507 |
m.addAxiom(o, DisjointClasses(bandc, twoa)); |
| 1508 |
m.addAxiom(o, Declaration(c)); |
| 1509 |
m.addAxiom(o, SubClassOf(c, ObjectSomeValuesFrom(ctobprime, b))); |
| 1510 |
m.addAxiom(o, DisjointClasses(c, a)); |
| 1511 |
m.addAxiom(o, DisjointClasses(c, b)); |
| 1512 |
m.addAxiom(o, DisjointClasses(c, twoa)); |
| 1513 |
m.addAxiom(o, Declaration(twoa)); |
| 1514 |
m.addAxiom(o, SubClassOf(twoa, ObjectSomeValuesFrom(twoatoa, a))); |
| 1515 |
m.addAxiom(o, |
| 1516 |
SubClassOf(twoa, ObjectSomeValuesFrom(twoatobandc, bandc))); |
| 1517 |
m.addAxiom(o, DisjointClasses(twoa, a)); |
| 1518 |
m.addAxiom(o, DisjointClasses(twoa, b)); |
| 1519 |
m.addAxiom(o, DisjointClasses(twoa, bandc)); |
| 1520 |
m.addAxiom(o, DisjointClasses(twoa, c)); |
| 1521 |
m.addAxiom(o, Declaration(atob)); |
| 1522 |
m.addAxiom(o, InverseObjectProperties(btoaprime, atob)); |
| 1523 |
m.addAxiom(o, FunctionalObjectProperty(atob)); |
| 1524 |
m.addAxiom(o, InverseFunctionalObjectProperty(atob)); |
| 1525 |
m.addAxiom(o, Declaration(atotwoaprime)); |
| 1526 |
m.addAxiom(o, InverseObjectProperties(atotwoaprime, twoatoa)); |
| 1527 |
m.addAxiom(o, FunctionalObjectProperty(atotwoaprime)); |
| 1528 |
m.addAxiom(o, InverseFunctionalObjectProperty(atotwoaprime)); |
| 1529 |
m.addAxiom(o, Declaration(bandctotwoaprime)); |
| 1530 |
m.addAxiom(o, InverseObjectProperties(bandctotwoaprime, twoatobandc)); |
| 1531 |
m.addAxiom(o, FunctionalObjectProperty(bandctotwoaprime)); |
| 1532 |
m.addAxiom(o, InverseFunctionalObjectProperty(bandctotwoaprime)); |
| 1533 |
m.addAxiom(o, Declaration(btoaprime)); |
| 1534 |
m.addAxiom(o, InverseObjectProperties(btoaprime, atob)); |
| 1535 |
m.addAxiom(o, FunctionalObjectProperty(btoaprime)); |
| 1536 |
m.addAxiom(o, InverseFunctionalObjectProperty(btoaprime)); |
| 1537 |
m.addAxiom(o, Declaration(btoc)); |
| 1538 |
m.addAxiom(o, InverseObjectProperties(ctobprime, btoc)); |
| 1539 |
m.addAxiom(o, FunctionalObjectProperty(btoc)); |
| 1540 |
m.addAxiom(o, InverseFunctionalObjectProperty(btoc)); |
| 1541 |
m.addAxiom(o, Declaration(ctobprime)); |
| 1542 |
m.addAxiom(o, InverseObjectProperties(ctobprime, btoc)); |
| 1543 |
m.addAxiom(o, FunctionalObjectProperty(ctobprime)); |
| 1544 |
m.addAxiom(o, InverseFunctionalObjectProperty(ctobprime)); |
| 1545 |
m.addAxiom(o, Declaration(twoatoa)); |
| 1546 |
m.addAxiom(o, InverseObjectProperties(atotwoaprime, twoatoa)); |
| 1547 |
m.addAxiom(o, FunctionalObjectProperty(twoatoa)); |
| 1548 |
m.addAxiom(o, InverseFunctionalObjectProperty(twoatoa)); |
| 1549 |
m.addAxiom(o, Declaration(twoatobandc)); |
| 1550 |
m.addAxiom(o, InverseObjectProperties(bandctotwoaprime, twoatobandc)); |
| 1551 |
m.addAxiom(o, FunctionalObjectProperty(twoatobandc)); |
| 1552 |
m.addAxiom(o, InverseFunctionalObjectProperty(twoatobandc)); |
| 1553 |
m.addAxiom(o, DifferentIndividuals(i, j, k)); |
| 1554 |
OWLReasoner reasoner = factory().createReasoner(o); |
| 1555 |
assertFalse( |
| 1556 |
"Start with 3 classes, a,b,c and relate them so instances have to be in a 1:1 relationship with each other.\n" |
| 1557 |
+ "The class b-and-c is the union of b and c. Therefore there have to be 2 instances of b-and-c for every instance of a.\n" |
| 1558 |
+ "Relate the class 2a to b-and-c so that *their* instances are in 1:1 relationship.\n" |
| 1559 |
+ "Now relate 2a to a so that *their* instances are in a 1:1 relationship. This should lead to a situation in which every instance\n" |
| 1560 |
+ "of 2a is 1:1 with an instance of a, and at the same time 2:1 with an instance of a.\n" |
| 1561 |
+ "Unless all the classes have an infinite number of members or are empty this doesn't work. This example has a is the enumerated class {i,j,k} (i,j,k all different individuals). So it should be inconsistent.", |
| 1562 |
reasoner.isConsistent()); |
| 1563 |
} |
| 1564 |
} |