JPL-IMCE / gov.nasa.jpl.imce.oml

Ontology Modeling Language (OML) Workbench
14 stars 1 forks source link

Change specialization pattern for reified relationships #238

Closed NicolasRouquette closed 6 years ago

NicolasRouquette commented 6 years ago

Simplify ReifiedRelationshipSpecializationAxiom

Currently (version 0.9.2)

Currently, a ReifiedRelationship R1 with source U1 and target V1 is written as follows:

  reifiedRelationship R1 {
    unreified r1
    source = U1
    target = V1
  }

To specialize the above, it is currently necessary to define a new ReifiedRelationship, e.g.:

  reifiedRelationship R2 {
    unreified r2
    source = U2
    target = V2
  }

and then assert:

  R2 extendsRelationship R1

Problem

Each occurrence of the reified relationship pattern produces a lot of axioms in OWL2-DL + SWRL.

The following OWL:

  reifiedRelationship R1 {
    unreified r1
    source = U1
    target = V1
  }

corresponds to the following in OWL2-DL + SWRL:

R1 rdf:type owl:Class .

r1 rdf:type owl:ObjectProperty ;
    rdfs:domain U1 ;
    rdfs:range V1 .

hasR1Source rdf:type owl:ObjectProperty ;
                       rdfs:domain R1 ;
                       rdfs:range U1 .

hasR1Target rdf:type owl:ObjectProperty ;
                      rdfs:domain R1 ;
                      rdfs:range V1 .

owl:inverseOf( hasR1Source ) o hasR1Target implies r1

The intent of the specialization can be effectively captured with fewer axioms in OWL2-DL + SWRL.

New pattern: ReifiedRelationshipSpecialization

The example above would be specified in OML as follows.

Assuming that R1 is defined somewhere:

  reifiedRelationship R1 {
    unreified r1
    source = U1
    target = V1
  }

Then defining R2 as a specialization of R1 will involve the two OML statements:

  reifiedRelationship R2 extends R1 {
    source = U2
    target = V2
  }

  someEntities U2 . r1 in V2

where the OWL2-DL + SWRL mapping of:

 reifiedRelationship R2 extends R1 {
    source = U2
    target = V2
  }

will be:

R2 rdf:type owl:Class ;
      rdfs:subClassOf R1 .

R2 rdfs:subClassOf [
    rdf:type owl:Restriction ;
    owl:onProperty hasR1Source ;
    owl:allValuesFrom U2 .
]

R2 rdfs:subClassOf [
    rdf:type owl:Restriction ;
    owl:onProperty hasR1Target ;
    owl:allValuesFrom V2 .
]

Q: Could the two statements be combined in one?

Instead of:

  reifiedRelationship R2 extends R1 {
    source = U2
    target = V2
  }

  someEntities U2 . r1 in V2

The mapping of the 1st statement to OWL2-DL + SWRL could also include the 2nd statement. That is, the following in OWL:

  reifiedRelationship R2 extends R1 {
    source = U2
    target = V2
  }

could be mapped to the following in OWL2-DL + SWRL:

R2 rdf:type owl:Class ;
      rdfs:subClassOf R1 .

R2 rdfs:subClassOf [
    rdf:type owl:Restriction ;
    owl:onProperty hasR1Source ;
    owl:allValuesFrom U2 .
]

R2 rdfs:subClassOf [
    rdf:type owl:Restriction ;
    owl:onProperty hasR1Target ;
    owl:allValuesFrom V2 .
]

U2 rdfs:subClassOf [
    rdf:type owl:Restriction ;
    owl:onProperty r1 ;
    owl:someValuesFrom V2 .
]

The answer is no; mainly because it would make the axioms in OWl2-DL + SWRL ambiguous to parse back into OML.

For example, if there were multiple restrictions on R1, it would be ambiguous to tell which of these restrictions would correspond to the reified relationship specialization pattern in OML.

Missing pattern for specialization of StructuredDataProperty.

Note that StructuredDataProperty is currently missing the unreified counterpart of ReifiedRelationship.

The data counterpart of reified relationship specialization described above; e.g.:

structuredDataProperty X1 {
  unreified x1
  domain U1
  range T1
}

structuredDataProperty X2 extends X1 {
  domain U2
  range T2
}

Where the corresponding OWL2-DL + SWRL mapping is:

X1 rdf:type owl:Class .

x1 rdf:type owl:ObjectProperty ;
    rdfs:domain U1 ;
    rdfs:range T1 .

hasX1Source rdf:type owl:ObjectProperty ;
                       rdfs:domain X1 ;
                       rdfs:range T1 .

hasX1Target rdf:type owl:ObjectProperty ;
                      rdfs:domain X1 ;
                      rdfs:range T1 .

X2 rdf:type owl:Class ;
     rdfs:subClassOf X1 .

X2 rdfs:subClassOf [
    rdf:type owl:Restriction ;
    owl:onProperty hasX1Source ;
    owl:allValuesFrom U2 .
]

X2 rdfs:subClassOf [
    rdf:type owl:Restriction ;
    owl:onProperty hasR1Target ;
    owl:allValuesFrom T2 .
]
StevenJenkinsJPL commented 6 years ago

I think it would be helpful to clarify in the example that in the canonical use case R1 is already defined in some imported terminology. The encoding of an occurrence of R1 from U2 to V2 requires only the declaration of R2 as an extension and the someEntities restriction.

NicolasRouquette commented 6 years ago

Thanks; I updated the description (see "New pattern: ReifiedRelationshipSpecialization"). Also, I realize that a legitimate question is whether we need these two statements; see: "Q: Could the two statements be combined in one?".

StevenJenkinsJPL commented 6 years ago

I think there are two distinct patterns: one is (B, q, C) where B and C are explicit classes. All that requires is the someEntities clause. The other case is (A, r, (B, q, C)). This is the only case for which we require the specialization of q (and another someEntities clause).