oml
oml copied to clipboard
Syntax support for inverses
User Story
As an ontology author, I would like oml syntactic support for referring to an inverse of a relation entity or of a property that does not have a named inverse so that I can author vocabularies that require this expressiveness..
Detailed Description
Description providing additional details and context.
There are a few places where OML lacks syntax for referring to an inverse relation entity or property:
Specialization of an inverse relation entity.
This is currently not possible. For example, suppose that there is a relation R
with domain A
and range B
and forward property r
:
relation entity R [
from A
to B
forward r
]
In OWL functional syntax, the above means (ignoring the rule):
Declaration(Class :R))
Declaration(ObjectProperty :r))
ObjectPropertyDomain(:r, :A)
ObjectPropertyRange(:r, :B)
Elsewhere, one may need to define S
, a specialization of the inverse of R
for some domain C
that may be B
or a specialization and for some range D
that may be A
or a specialization.
It would be useful to define S
as follows with a new OML keyword inverse()
like the following:
relation entity S :> inverse(R) [
from C
to D
forward s
]
The syntax above would map in OML to the following in functional syntax:
Declaration(Class :S))
SubClassOf(:S, :R)
Declaration(ObjectProperty :s))
ObjectPropertyDomain(:s, :C)
ObjectPropertyRange(:s, :D)
SubObjectPropertyOf(:s ObjectInverseOf(:r))
It is currently not possible to do this.
Restriction of an inverse property
This is currently not possible. For example, suppose that there is a relation R
with domain A
and range B
and forward property r
without a named inverse:
relation entity R [
from A
to B
forward r
]
There is currently no syntax to specify a restriction on the inverse of r
.
Propose adding new syntax like the following based on a new OML keyword inverse()
like the following:
concept C :> A
concept D :> B [
restricts all relation inverse(r) to C
]
This syntax should be available for all OML restrictions of entity relation properties.
OML syntax extension
The proposed OML keyword inverse()
and syntax could be replaced with something else that achieves the expressive intent of this ticket.
Acceptance Criteria
- [ ] Given [Condition], then [Expected Result]
- [ ] Given [Condition], then [Expected Result]
- [ ] Given [Condition], then [Expected Result]
Sub-task List
- [ ] Task 1
- [ ] Task 2
- [ ] Task 3
re: Specialization of an inverse relation entity
Instead, you can do the following and it should have the same intended semantics:
relation entity S :> R [
from D
to C
reverse s
]
re: Restriction of an inverse property
Couldn't you simply add a name to the reverse property?
Well, to be clear, we need to look at the mapping of :>
for a relation entity.
I expect that S :> R
means:
-
S.forward :> R.forward
-
S.reverse :> R.reverse
This usually works with asserting D :> B
and C :> A
, if not, this may be inferred by the reasoner.
That is:
relation entity S :> R [
from D
to C
reverse s
]
and
relation entity S :> R [
from C
to D
forward s
]
mean completely different things.
When you declare:
relation entity S :> R [
from D
to C
reverse s
]
You get:
Declaration(Class :S))
SubClassOf(:S, :R)
Declaration(ObjectProperty :s))
ObjectPropertyDomain(:s, :C)
ObjectPropertyRange(:s, :D)
SubObjectPropertyOf(:s ObjectInverseOf(:r))
In your last comment, if you labeled the forward/reverse, you get the following (which is the same as above):
S.forward (inverse of s) :> R.forward (r)
S.reverse (s) :> R.reverse (inverse of r)
In your example, the reverse property of S
is a sub-object property of the reverse property of R
.
The point of the proposed syntax is to make the forward property of the specializing relation a sub-object property of the reverse property of the specialized relation.
Clarifying the original example:
concept A
concept B
relation entity R [
from A
to B
forward r
]
concept C :> B
concept D :> A
relation entity S :> inverse(R) [
from C
to D
forward s
]
That is:
Declaration(Class :A))
Declaration(Class :B))
Declaration(Class :R))
Declaration(ObjectProperty :r))
ObjectPropertyDomain(:r, :A)
ObjectPropertyRange(:r, :B)
Declaration(Class :C))
SubClassOf(:C, :B)
Declaration(Class :D))
SubClassOf(:D, :A)
Declaration(Class :S))
SubClassOf(:S, :R)
Declaration(ObjectProperty :s))
ObjectPropertyDomain(:s, :C)
ObjectPropertyRange(:s, :D)
SubObjectPropertyOf(:s ObjectInverseOf(:r))
Nic, those inferences are exactly what you get with:
relation entity S :> R [
from D
to C
reverse s
]
Where do you see the difference?
The difference is that the domain of S
must be C
, not D
; similarly the range must be D
, not C
.
Finally, the forward property of S
must be the inverse of the forward property of R
.
Since "s" is a reverse, its domain is the "to" of the relation (i.e., C), and its range is the "from" of the relation (i.e., D), which is what you want and said above.
and since "s" is a reverse, it becomes subproperty of the super relationentity's reverse. Since R's reverse is unnamed, we can refer to it as inverseOf (r), i.e.,
s :> inverseof (r)
which is what you want.
This would be a completely different situation.
Consider the original example split in two parts:
relation entity S [
from C
to D
forward s
]
Then later, we can add:
ref relation entity S :> inverse(R), R2, inverse(R3)
or:
ref relation entity S :> R, inverse(R2), R3
The point here is that the two specialization axioms are completely independent of the definition of S
and R
, R2
and R3
; however, it does make a difference whether we specialize the relation R
or inverse(R)
.
OK so the requirement here is to be able to declare the specialization between S and R without having to change S (since this is possible as I suggested).
yes