stardog-union / pellet

Pellet is an OWL 2 reasoner in Java; open source (AGPL) and commercially licensed, commercial support available.
http://clarkparsia.com/pellet
Other
302 stars 153 forks source link

Reasoner is always satisfied #33

Open fedeMarra opened 8 years ago

fedeMarra commented 8 years ago

I use Pellet owlapi version 3 and i would like to check if OWLObjectPropertyExpression between two classes exists. For example I have three different classes IC, study and organization where there are these restrictions:

Set<OWLClassAxiom> tempAx = onto.getAxioms(a);
            for(OWLClassAxiom axiom : tempAx){
                for(OWLClassExpression  ex: axiom.getNestedClassExpressions()){
                    for(OWLObjectProperty o:ex.getObjectPropertiesInSignature()){
                        expression = df.getOWLObjectIntersectionOf(a, df.getOWLObjectAllValuesFrom(o, b));
                        expression = df.getOWLObjectSomeValuesFrom(a, df.getOWLObjectSomeValuesFrom(o, b));
                        if (reasoner.isSatisfiable(expression)) {
                            System.out.println("yes");

                            return true;
                        }
                        else return false;
                    }

Where 'a' in this case is IC class and 'b' is study or organization class. The reasoner in all cases returns always satisfied. Why? Is there another way to check the axioms for one class? Thanks for the answer.

LorenzBuehmann commented 7 years ago

Your code just checks whether the class expression a SOME (o SOME b) is satisfiable, nothing more.