engine.rulesets.owl2_rl_dt¶
OWL 2 RL datatype (dt-*) entailment rules.
These rules implement Table 8 of OWL 2 Profiles Section 4.3 (Semantics of
Datatypes): dt-type1, dt-type2, dt-eq, and dt-diff.
Encoding notes¶
The specification states schema-style quantification (“for each datatype”, “for each literal”). A RETE engine cannot enumerate the infinite literal space, so non-bootstrap rules are grounded on literals that already appear in working memory:
dt-type1: empty-body bootstrap, one silent rule per IRI inOWL2_RL_SUPPORTED_DATATYPES(includingrdfs:Literal,rdf:PlainLiteral, andrdf:XMLLiteral, which OWL 2 RL lists as supported datatypes). Each rule assertsT(dt, rdf:type, rdfs:Datatype).dt-type2: match any working-memory triple whose object is a literal (?s ?p ?lt), join datatype IRIs via?dt rdf:type rdfs:Datatype(populated bydt-type1), and guard with read-only builtinsis_literal(?lt)andliteral_in_datatype(?lt, ?dt). ConcludeT(lt, rdf:type, dt).dt-eq/dt-diff: join two object-position literals from working memory (?s1 ?p1 ?lt1and?s2 ?p2 ?lt2), guard withis_literalandliteral_same_value/literal_different_value.dt-eqalso requiresdifferent_terms(?lt1, ?lt2)so identical nodes do not emit reflexiveowl:sameAs. Concludeowl:sameAsorowl:differentFrom.
Literal-subject conclusions are generalized-RDF forms required by OWL 2 RL.
Callers that enforce RDF 1.1 triple well-formedness (the engine default
literal_subject_policy) will reject those conclusions; the rule encodings
remain faithful to the profile tables.
Attributes¶
Module Contents¶
- engine.rulesets.owl2_rl_dt.OWL2_RL_DT_RULES: tuple[engine.rules.Rule, Ellipsis]¶