Two object properties with one having transistive characteristic.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Two object properties with one having transistive characteristic.

IWilliams
I have two classes:
Instruction

I would like to create two object properties for Instruction, so that:
1) nextInstruction (Instruction --> Instruction): this should be only for
the immediate instruction
2) dependsOnInstruction (Instruction --> Instruction): this should be only
for all the instructions that came before the current Instruction.

I want to dependsOnInstruction sub-property of nextInstruction, where
dependsOnInstruction has a transitive property.

*For example:*
Instruction1
Instruction2
Instruction3
Instruction4
Instruction5

But when I assert:

nextInstruction for Instruction1 is Instruction2 and no other instruction.

dependsOnInstruction for Instruction3 is Instruction2 and Instruction1.

I get inferred:
nextInstruction for Instruction1 to be Instruction2, Instruction3,
Instruction4, Instruction5.

I dont know why I am getting the inferred to be this, since I did have
nextInstrction to be transitive.








--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Two object properties with one having transistive characteristic.

Michael DeBellis-2
This is another example where it would be a lot easier to debug if you could just include your owl file. But I think the issue may be with this:

>I want to dependsOnInstruction sub-property of nextInstruction 

At first I thought the only issue was just that you had this backward and that it should be nextInstruction is a sub-property of dependsOnInstruction.  

If P2 is a sub-property of P1 then every pair of values in P2 is also in P1 but not vice versa. The example I always like to use is hasParent and hasMother. hasMother can be modeled as a sub-property of hasParent because if x hasMother m then x hasParent m but not vice versa (there would also be the sub-property of hasParent called hasFather). 

So if you say that dependsOnInstruction  is a sub-property of nextInstruction then you are saying every pair such as <Instruction1, Instruction2> that is in the relation (property) dependsOnInstruction  is also in the relation nextInstruction,

However, I think there may be another issue. I would think dependsOnInstruction would be all the instructions that need to come BEFORE the specific instruction. If that's the case you may have two issues, first mixing up which one is the sub-property and then using something that should be an inverse relation. 

So if your instruction series is I1 -> I2 ->I3  

I would think that I3 dependsOnInstruction  I2 and I1. So the way I would model that (if you look at my SWRL process modelling tutorial I think I did something like that and my example was inspired by my looking at one of the collection ontologies) is that you have two inverse properties: nextInstruction and previousInstruction. previousInstruction is the inverse property to nextInstruction. previousInstruction should be a sub-property to dependsOnInstruction and nextInstruction could be a sub-property of some other property such as perhaps subsequentInstruction (which will be the inverse of dependsOnInstruction). 

I'm not sure I'm getting that right it's so easy (especially if you are Dyslexic like I am) to get these things mixed up, it's why I almost find it easier to model them in Protege than to write down what the model should be but I think that is correct. As I said, I think I do something similar in my process modeling tutorial which can be found here: https://symbolicshacker.blogspot.com/2017/06/swrl-process-modeling-tutorial.html  

Hope that helps.

Michael



On Sat, Jun 22, 2019 at 9:10 AM IWilliams <[hidden email]> wrote:
I have two classes:
Instruction

I would like to create two object properties for Instruction, so that:
1) nextInstruction (Instruction --> Instruction): this should be only for
the immediate instruction
2) dependsOnInstruction (Instruction --> Instruction): this should be only
for all the instructions that came before the current Instruction.

I want to dependsOnInstruction sub-property of nextInstruction, where
dependsOnInstruction has a transitive property.

*For example:*
Instruction1
Instruction2
Instruction3
Instruction4
Instruction5

But when I assert:

nextInstruction for Instruction1 is Instruction2 and no other instruction.

dependsOnInstruction for Instruction3 is Instruction2 and Instruction1.

I get inferred:
nextInstruction for Instruction1 to be Instruction2, Instruction3,
Instruction4, Instruction5.

I dont know why I am getting the inferred to be this, since I did have
nextInstrction to be transitive.








--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Two object properties with one having transistive characteristic.

Dave McComb-2
In reply to this post by IWilliams
Subproperties look like subclasses in Object Oriented, where attributes inherit down, but I often find it best to think of things inheriting up.

you want to say that nextInstruction implies dependsOnInstruction, and not the other way around.

so if you make nextInstruction a sub property of dependsOnInstruction when you assert NI the DOI will be inferred.

If you then put transitive only on DOI you will get what you want.  The transitivity attribute does not flow down. It is only on the DOI

You are thinking, from OO, that  DOI specializes NI.  But that isn’t how it works.  You should think about what things get inferred.  

The assertion of a property implies (and therefore the reasoner will supply) that the super properties also hold.  

> On Jun 22, 2019, at 10:10 AM, IWilliams <[hidden email]> wrote:
>
> I have two classes:
> Instruction
>
> I would like to create two object properties for Instruction, so that:
> 1) nextInstruction (Instruction --> Instruction): this should be only for
> the immediate instruction
> 2) dependsOnInstruction (Instruction --> Instruction): this should be only
> for all the instructions that came before the current Instruction.
>
> I want to dependsOnInstruction sub-property of nextInstruction, where
> dependsOnInstruction has a transitive property.
>
> *For example:*
> Instruction1
> Instruction2
> Instruction3
> Instruction4
> Instruction5
>
> But when I assert:
>
> nextInstruction for Instruction1 is Instruction2 and no other instruction.
>
> dependsOnInstruction for Instruction3 is Instruction2 and Instruction1.
>
> I get inferred:
> nextInstruction for Instruction1 to be Instruction2, Instruction3,
> Instruction4, Instruction5.
>
> I dont know why I am getting the inferred to be this, since I did have
> nextInstrction to be transitive.
>
>
>
>
>
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Two object properties with one having transistive characteristic.

Dave McComb-2
In reply to this post by IWilliams
Subproperties look like subclasses in Object Oriented, where attributes inherit down, but I often find it best to think of things inheriting up.

you want to say that nextInstruction implies dependsOnInstruction, and not the other way around.

so if you make nextInstruction a sub property of dependsOnInstruction when you asser

> On Jun 22, 2019, at 10:10 AM, IWilliams <[hidden email]> wrote:
>
> I have two classes:
> Instruction
>
> I would like to create two object properties for Instruction, so that:
> 1) nextInstruction (Instruction --> Instruction): this should be only for
> the immediate instruction
> 2) dependsOnInstruction (Instruction --> Instruction): this should be only
> for all the instructions that came before the current Instruction.
>
> I want to dependsOnInstruction sub-property of nextInstruction, where
> dependsOnInstruction has a transitive property.
>
> *For example:*
> Instruction1
> Instruction2
> Instruction3
> Instruction4
> Instruction5
>
> But when I assert:
>
> nextInstruction for Instruction1 is Instruction2 and no other instruction.
>
> dependsOnInstruction for Instruction3 is Instruction2 and Instruction1.
>
> I get inferred:
> nextInstruction for Instruction1 to be Instruction2, Instruction3,
> Instruction4, Instruction5.
>
> I dont know why I am getting the inferred to be this, since I did have
> nextInstrction to be transitive.
>
>
>
>
>
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Two object properties with one having transistive characteristic.

IWilliams
In reply to this post by Michael DeBellis-2
Hi Michael,

You suggestion seems to do the job. Can you suggest any reading materials
that I can use to fully understand more about OWL/ontology?



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user