Stack overflow in simple piece of code

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

Stack overflow in simple piece of code

Conrad
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow in simple piece of code

Conrad
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow in simple piece of code

Jiba
Administrator
Hi,

On which ontology are you trying your code? Could you send it to me please?

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow in simple piece of code

Conrad
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow in simple piece of code

Jiba
Administrator
Could you create a small ontology with similar cycles that allows to reproduce the problem? Or strip down your ontology be removing confidential elements while keeping the problem?

It is almost impossible for me to solve the problem without being able to reproduce it.

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow in simple piece of code

Mr.Mystery
Sorry to interfere, but I have exactly the same problem. At the moment we are taking a course on ontologies at the university. The problem occurs when trying to infer classes. I attach a link to Github where you can download the ontology. The ontology was created in Protege 5.5 environment with subsequent verification through HermiT.

https://github.com/4e6anenk0/Semantic-Web/blob/master/owl_files/Fashion.owl

Hope this helps.
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow in simple piece of code

Jiba
Administrator
Hi,

You are welcome to interfere !

I am able to reproduce the problem with your ontology. I've analyzed it, and it is caused by entity "http://www.semanticweb.org/4e6an/ontologies/2020/11/fashion#Alexander_Wang_Co." that is both a class and a named individual. The behaviour of such entities is not clear: some persons consider them as the same entity (this is known as "punning") and some others consider them as two distinct entities (usually, reasoners do that).

Owlready does not allows having entities being both class, individual and/or property.

I'm going to try to add some error message (or ignore the problem with a warning).

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow in simple piece of code

Conrad
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow in simple piece of code

Conrad
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow in simple piece of code

Jiba
Administrator
Hi,

Normally, Owlready should now break the cycle to avoid stack overflow error.

For example, I can list the classes of the Fashion ontology, with the following warnings:

* Owlready2 * Warning: ignoring cyclic type of, involving storid 305

Fashion.Alexander_Wang_Co.

etc.

Are you still getting error? If so, I would be interested in an ontology to reproduce the problem.

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Stack overflow in simple piece of code

Conrad
CONTENTS DELETED
The author has deleted this message.