Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - reflexive relation entity #64

Open
1 task
NicolasRouquette opened this issue Feb 28, 2021 · 5 comments
Open
1 task

[BUG] - reflexive relation entity #64

NicolasRouquette opened this issue Feb 28, 2021 · 5 comments

Comments

@NicolasRouquette
Copy link
Member

NicolasRouquette commented Feb 28, 2021

Description

A clear and concise description of what the bug is.

Declaring an OML relation entity whose range is A to be reflexive has the counter-intuitive effect of forcing A to be equivalent to owl:Thing.

Steps to Reproduce

Steps to reproduce the behavior:

  • Consider this example:
  concept Part

  relation entity AttachedTo [
    from Part
    to Part
    forward attachedTo
    symmetric
    reflexive
    transitive
  ]

Per OWL2 Reflexive Object Properties, this results in an axiom:

ReflexiveObjectProperty( attachedTo )

which is syntactic sugar for:

SubClassOf( owl:Thing ObjectHasSelf( attachedTo ) )

That is, every instance owl:Thing must also be attached to itself.

Since OWL2 distinguishes the declaration of an object property from axioms specifying its domain and range, the syntactic sugar for a reflexive object property is the only reasonable meaning that can be attributed to such an axiom.

In OML, every relation must be declared with an explicit domain and range. In that context, it is reasonable to expect that a reflexive relation would have a meaning limited to its domain/range instead of the whole OWL2 universe according to the current OML2OWL mapping. That is, it would be reasonable to expect that an OML reflexive relation entity like the example above would effectively mean the following:

SubClassOf( Part ObjectHasSelf( attachedTo ) )

In other words, it is practically useful to distinguish two notions of reflexivity:

  1. Universal reflexivity per OWL2 Reflexive Object Properties
SubClassOf( owl:Thing ObjectHasSelf( attachedTo ) )
  1. Self reflexivity
SubClassOf( Part ObjectHasSelf( attachedTo ) )

Currently, OML only supports (1) and lacks the expressiveness to support (2).

There are several options available to fix this problem:

Option 1:

Change the OML2OWL mapping for a reflexive relation entity from the universal reflexivity (1) to self reflexivity (2).

Option 2:

Add support in OML for the OWL2 self restriction axiom.

For example:

  concept Part [
    restricts some relation attachedTo to self
  ]

which in OWL2 would be:

SubClassOf( Part ObjectSomeValuesFrom( attachedTo ObjectHasSelf( attachedTo )))

or:

  concept Part [
    restricts all relation attachedTo to self
  ]

which in OWL2 would be:

SubClassOf( Part ObjectAllValuesFrom( attachedTo ObjectHasSelf( attachedTo )))

Option 3:

Add a new keyword in OML, selfReflexive for the declaration of an OML Relation Entity to remind users about the difference between universal reflexivity (1) and selfReflexivity (2).

For example:

  relation entity AttachedTo [
    from Part
    to Part
    forward attachedTo
    symmetric
    selfReflexive
    transitive
  ]

which would mean either:

SubClassOf( Part ObjectHasSelf( attachedTo ) )

Option 4: use a rule

  rule attachedTo-reflexive [
    Part(x) 
    ->
    attachedTo(x,x)
  ] 

There are pros-cons to these options.

Principle: Preserving the meaning of the OWL2 terminology in OML.

According to this principle, option (1) is unacceptable because it would effectively change the meaning of reflexivity.
The other options are acceptable.

Simplicity

options 1 and 3 are the simplest; however 2 is not difficult either.

Usability

It is not immediately clear that Option 2 captures the intended semantics as option 3 and 4 do.

It is not immediately clear what difference option 3 and 4 have besides the obvious that option 3 is within OWL2-DL whereas option 4 requires SWRL.

Parsimony and unambiguous correspondence with OWL2

With this principle, option 1 is unacceptable because it does not solve the problem.

Option 2 is more expressive than options 3 and 4.

Consider:

  concept Part [
    restricts some relation attachedTo1 to self
  ]

and:

  concept Part [
    restricts all relation attachedTo2 to self
  ]

In the above, attachedTo1 is a self-reflexive relation on its range whereas attachedTo2 is effectively forced to be an identity relation.

Option 4 does not require any change to OML.

@NicolasRouquette
Copy link
Member Author

Steve and I agree that option 2 is preferable.

@StevenJenkinsJPL
Copy link

After further reflection I don't think the range restrictions are what we need here.

It is legal to construct a universal range restriction of the form SubClassOf(Part ObjectAllValuesFrom(attachedTo ObjectHasSelf(attachedTo))). ObjectHasSelf(attachedTo) is the class of all individuals attachedTo themselves. ObjectAllValuesFrom(attachedTo ObjectHasSelf(attachedTo)) is the class of all individuals attachedTo only individuals attachedTo themselves. I don't think that restricts the range beyond Part, which is already the range of attachedTo.

Similarly, it is legal to construct a universal range restriction of the form SubClassOf(Part ObjectSomeValuesFrom(attachedTo ObjectHasSelf(attachedTo))). This is definitely not what we mean. In principle, Part could be empty. This constraint requires Part to be non-empty, but that is not a consequence of reflexivity as we intend it.

The correct encoding is SubClassOf( Part ObjectHasSelf( attachedTo ) ). I don't think there's a natural extension of the restriction syntax of OML in this case, except perhaps restricts relation attachedTo to reflexive. Protégé, for example, does not provide an object restriction creator for this case as it does for existential and universal restrictions. You have to create a normal subclass axiom with superclass (using Manchester syntax) attachedTo Self.

I'm still somewhat uneasy with having the OML interpretation of reflexive in a relation entity definition differ from the OWL interpretation, but maybe that's not a big problem. I don't like the term self-reflexive because reflexivity is by definition a relation with self. reflexive over domain is a better description but somewhat awkward.

@NicolasRouquette
Copy link
Member Author

Thanks for the analysis.

Since the only sensible encoding is SubClassOf( Part ObjectHasSelf( attachedTo ) ), I propose option 2 replacing self-reflexive with domain-reflexive.

@melaasar
Copy link
Member

melaasar commented Aug 31, 2021

I like option 1 more because "reflexive" here is always used in the context of a relation entity, which always declares a domain/range. Therefore, OML "reflexive" here can be considered contextual. I don't see a use case where the intension would be to make the relation reflexive on owl:Thing, while clearly giving it a different domain/range (effectively declaring them equivalent to owl:Thing). However, the less useful interpretation is still expressable in OML by using owl:Thing as the domain/range of the relation in this case.

@NicolasRouquette
Copy link
Member Author

I could go with that; let's hear from Steve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants