engine.rulesets.owl2_rl_dt ========================== .. py:module:: engine.rulesets.owl2_rl_dt .. autoapi-nested-parse:: 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 in :data:`~rdflib_reasoning.engine.owl2_rl_datatypes.OWL2_RL_SUPPORTED_DATATYPES` (including ``rdfs:Literal``, ``rdf:PlainLiteral``, and ``rdf:XMLLiteral``, which OWL 2 RL lists as supported datatypes). Each rule asserts ``T(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 by ``dt-type1``), and guard with read-only builtins ``is_literal(?lt)`` and ``literal_in_datatype(?lt, ?dt)``. Conclude ``T(lt, rdf:type, dt)``. - ``dt-eq`` / ``dt-diff``: join two object-position literals from working memory (``?s1 ?p1 ?lt1`` and ``?s2 ?p2 ?lt2``), guard with ``is_literal`` and ``literal_same_value`` / ``literal_different_value``. ``dt-eq`` also requires ``different_terms(?lt1, ?lt2)`` so identical nodes do not emit reflexive ``owl:sameAs``. Conclude ``owl:sameAs`` or ``owl: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 ---------- .. autoapisummary:: engine.rulesets.owl2_rl_dt.OWL2_RL_DT_RULES Module Contents --------------- .. py:data:: OWL2_RL_DT_RULES :type: tuple[engine.rules.Rule, Ellipsis]