Skip to content

reasoning: transitiveOver (transitive with "step" property) #351

Open
@VladimirAlexiev

Description

@VladimirAlexiev

#295 "Note about transitivity"
hints why TRANSITIVE(rdfs:subClassOf) is "better" than a recursive rule
IF (?x rdfs:subClassOf ?y) (?y rdfs:subClassOf ?z) THEN (?x rdfs:subClassOf ?z):
a profile "non-recursive + transitive properties" may be easier to implement than a general "recursive rules" profile.
This corresponds to the T-Box declaration

rdfs:subClassOf a owl:TransitiveProperty

I want to give another example: transitive with a "step" (explicitly asserted) property, eg:

  • skos:broader is the step, skos:broaderTransitive is the transitive closure
  • sesame:directType is the step, rdfs:subClassOf results in the transitive closure rdf:type
  • schema:location is the step, schema:containedInPlace results in a transitive closure.
    Eg "Graphwise :location Sofia. Sofia :containedInPlace Bulgaria => Graphwise :location Bulgaria"

GraphDB has long had rules using ptop:transitiveOver ("Proton top" or "Proton sys" is a dead ontology, but this predicate has survived).

It is defined with this rule:

?p transitiveOver ?q. ?x p ?y. ?y q ?z => ?x ?p ?z

It subsumes (is a generalization of) owl:TransitiveProperty:

?p a TransitiveProperty <=> ?p transitiveOver ?p

It is subsumed by (is specialization of) owl:propertyChainAxiom:

?p transitiveOver ?q <=> ?p propertyChainAxiom (?p ?q)

Using this instead of TransitiveProperty we can implement the above examples like this:

skos:broader rdfs:subPropertyOf skos:broaderTransitive. skos:broaderTransitive transitiveOver skos:broader.
sesame:directType rdfs:subPropertyOf rdf:type. rdf:type transitiveOver rdfs:subClassOf. rdfs:subClassOf transitiveOver rdfs:subClassOf.
schema:location transitiveOver schema:containedInPlace. schema:containedInPlace transitiveOver schema:containedInPlace.

It is interesting because it can be implemented more efficiently than owl:TransitiveProperty.
Consider a chain of N "step" triples between two nodes.

  • TransitiveProperty must consider every split of the chain in two parts, thus inferring the same closure N-1 times (O(N^2) complexity). Since it needs to infer a total of O(N^2) triples, the total complexity becomes O(N^4)
  • transitiveOver only needs to grow the chain on the right. the total complexity becomes O(N^3)

A rule that looks at TransitiveProperty only, loses the info which is the Step property,
and loses the distinction which triples are asserted and which are inferred.

It is thus penalized by an extra degree of complexity.
(I made a synthetic dataset for a training that proved that.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    InferencingFor SHACL 1.2 Inferencing spec.UCRUse Cases and Requirements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions