simphony-osp icon indicating copy to clipboard operation
simphony-osp copied to clipboard

Multi-instantiation

Open pablo-de-andres opened this issue 4 years ago • 6 comments

In GitLab by @urbanmatthias on Nov 12, 2019, 11:50

Should we allow multi-instantiation? I.e. a cuds object is an instance of multiple classes.

In other words: A cuds object is in the intersection of the set of individuals that are represented by the classes.

For example:

  • cuds_object.is_a.append(NAMESPACE.CLASS(**kwargs))

I think it depends on the ontology, if this is helpful.

pablo-de-andres avatar Jun 22 '20 13:06 pablo-de-andres

In GitLab by @yoavnash on Nov 21, 2019, 10:50

Notes:

  • Easy to implement with OSP core v3.2.
  • Reasoners might deduce that an object is an instance of multiple classes, therefore we should support this.

@ahashibon what do you think?

pablo-de-andres avatar Jun 22 '20 13:06 pablo-de-andres

Example:

Assume the following statements are in the ontology:

An Adult is a Person that is older than 18 years. A Father is a Person that is male and has a child.

--> It is possible to be an adult and a father simultaneously.

Currently, the Cuds.oclass property only returns one ontology class. In this case it should be possible to return multiple. This is especially important now that we support a reasoner. It is expected that the reasoner will produce multiple RDF.type statements per individual.

API-wise I would suggest to deprecate the Cuds.oclass property and replace it with Cuds.oclasses.

What do you think?

urbanmatthias avatar Aug 19 '20 09:08 urbanmatthias

For me it looks fine. Do you know if Owlready also supports multi-instantiation?

yoavnash avatar Aug 19 '20 10:08 yoavnash

owlready supports it of course. They have a is_a property that is a list.

urbanmatthias avatar Aug 19 '20 11:08 urbanmatthias

At the moment it is possible to have multiple oclasses for one CUDS objects, e,g, when the user infers it.

See Cuds.oclasses. Unfortunatly still much of the cuds assumes there is only one oclass.

urbanmatthias avatar Mar 17 '21 09:03 urbanmatthias

Also there is no proper way to add oclasses etc.

urbanmatthias avatar Mar 17 '21 09:03 urbanmatthias