Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect inference of equivalent properties: using inverse(R) and HermiT #8

Open
ykazakov opened this issue Dec 15, 2017 · 12 comments

Comments

@ykazakov
Copy link

Moved from the Protege issue protegeproject/protege#741:

If an object property is explicitly stated to be subproperty of an inverse, invalid inferences are made.

Here's a minimal example ontology.

Prefix: : <http://example.org/>
Ontology: <http://asdf>

ObjectProperty: hasBigPart
    SubPropertyOf: 
        hasPart,
         inverse (partOf)
ObjectProperty: hasPart
    InverseOf: 
        partOf
ObjectProperty: partOf
    Characteristics: 
        Transitive
    InverseOf: 
        hasPart

HermiT reports that hasPart is equivalent to hasBigPart, which is not true.

Tested with the latest HermiT 1.4.1.513 and OWL API 5.1.3 (from maven) using the following code:

public class TestHermitReasoner {

	public static void main(String[] args) throws OWLOntologyCreationException {

		String fileName = args[0]; // the path to the ontology
		OWLOntologyManager man = OWLManager.createOWLOntologyManager();
		OWLOntology ont = man
				.loadOntologyFromOntologyDocument(new File(fileName));

		OWLReasonerFactory factory = new org.semanticweb.HermiT.ReasonerFactory();
		OWLReasoner reasoner = factory.createReasoner(ont);
		System.out.println(reasoner.getEquivalentObjectProperties(
				man.getOWLDataFactory().getOWLObjectProperty(
						IRI.create("http://example.org/hasBigPart"))));
	}

}

After running this code, the following is printed:
Node( ObjectInverseOf(<http://example.org/partOf>) <http://example.org/hasBigPart> <http://example.org/hasPart> )

B.t.w., is this the repository from which the latest HermiT 1.4.1.513 was built or there is another one somewhere?

@phillord
Copy link
Owner

Alas, the main HermiT repository is not public, as far as I know. This is just a fork that I made so I could add maven support (something that they have since done natively).

The issue tracker was on google code -- now dead, as far as I know. Their google group is here:

https://groups.google.com/forum/#!forum/hermit-users

Maybe the main developers would be interested in moving to a public git repo now. Wouldn't hurt to ask.

@ignazio1977
Copy link

Is this the repository from which the latest HermiT 1.4.1.513 was built or there is another one somewhere?

Almost. 1.4.1.513, like the other releases made under the net.sourceforge.owlapi group, is released from my fork of this repo:

https://github.com/ignazio1977/hermit-reasoner/

@phillord
Copy link
Owner

@ignazio1977 Forgot about that fork -- I guess I should kill or disable this one? Thoughts?

@phillord phillord reopened this Dec 15, 2017
@ignazio1977
Copy link

Uhm. This repository is how I found out there were a few commits in the upstream repository in early 2016 - I'm not sure if there is any arrangement that allows this repo to get updates, if so then it would be useful for it to stay open. Otherwise, my current plan is to keep making releases on my fork, to allow Protege and other developers to have a HermiT version compatible with the latest OWLAPI, and do the occasional bug fix when I'm able to do so.

@ykazakov
Copy link
Author

@phillord Thanks to the pointer to the HermiT mailing list! I see that this problem has been already reported a few years ago:
https://code.google.com/archive/p/hermit-reasoner/issues/41

I filed a bug here because you are listed as one of the developers of the latest release of HermiT on maven ;-)
https://mvnrepository.com/artifact/net.sourceforge.owlapi/org.semanticweb.hermit/1.4.1.513
But now @ignazio1977 clarified about the fork.

I would actually prefer to have one "community" github clone of HermiT so that, at least, bug reports can be collected and the recent release can be compiled from sources. Why not to move it where all projects related to owlapi are hosted?
https://github.com/owlcs

@ignazio1977
Copy link

Why not to move it where all projects related to owlapi are hosted?
https://github.com/owlcs

No particular reason, it started as a temporary fork to release an OWLAPI 4 compatible version and then it just stuck around. Could well be moved to owlcs.

@phillord
Copy link
Owner

@ignazio1977 Yeah, I can pull from upstream, or at least I used to be able to. There is no mechanism other than "I remember to update". My own feeling is that we should permanently fork Hermit at this point

@ignazio1977
Copy link

Yes, I suppose so. We'll be missing possible bug fixes until a release is done, but as far as I can tell there is little development happening at the moment. When that changes, I'll take care to include the new code, or discontinue the fork - whichever makes most sense.

@phillord
Copy link
Owner

@ignazio1977 Makes sense to me. Adding changes manually would probably not be a huge amount of work.

@phillord
Copy link
Owner

@ignazio1977 Just checked and there have been some recent commits -- added now.

@ignazio1977
Copy link

Cheers, will update.

@ignazio1977
Copy link

Fixed in owlcs#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants