Inverse Properties

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

Inverse Properties

bernard.lhostis
Hello

In my project, I read an ontology (owl file)for Cyber Domain with two Class
        Product
        Vulnerability
There are two ObjectProperties
        hasVuln : Product → Vulnerability
        affect : Vulnerability → Product
                and
        hasVuln owl:inverseOf affect 

After I read base of vulnerabilities and create individuals with OwlReady2. In this examples, one product is affect by n  vulnerabilities.
1- If the program create only, for example affect , hasVuln  is not create
2- if the program create affect  and hasVuln : hasVuln is not save

3- if I delete in the ontology the fact that « hasVuln owl:inverseOf affect » and
         the program create affect  and hasVuln → the result is correct

I don't understand the behavior of Owlready2
Regards
Bernard L'Hostis

Reply | Threaded
Open this post in threaded view
|

Re: Inverse Properties

Jiba
Administrator
Hello,

Inverse properties do not duplicate the data : if you assert "A hasVuln B", Owlready will not automatically assert "B affect A". This is usually considered as trivial, e.g. Protégé also does like this.

However, when you query "B.affect" in Owlready, it will list A because Owlready takes inverse properties into account when retrieving property values.

Jiba