incubator-jena-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Dickinson (JIRA)" <>
Subject [jira] [Created] (JENA-61) Expected result not entailed
Date Wed, 27 Apr 2011 15:19:03 GMT
Expected result not entailed

                 Key: JENA-61
             Project: Jena
          Issue Type: Bug
          Components: Reasoners
            Reporter: Ian Dickinson
            Assignee: Dave Reynolds

>From a question on Stack Overflow [1]. The expected entailment `:r :my_property :a_value`
is not asserted in the inference model. As far as I can see, the OP is correct that this result
should be entailed.


Complete test case:
package example;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

import com.hp.hpl.jena.ontology.*;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.vocabulary.OWL;

public class InfTest
    OntModel baseM, infM;

    public void test1() {
        this.baseM = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
        // also fails with MICRO_RULE_INF
        this.infM = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_MINI_RULE_INF, this.baseM);

        OntResource r = baseM.createOntResource("");
        OntResource r1 = baseM.createOntResource("");
        OntProperty myProperty = baseM.createOntProperty("");
        OntResource v = baseM.createOntResource("");
        OntProperty mySameAs = baseM.createOntProperty("");
        baseM.add(mySameAs, OWL.equivalentProperty, OWL.sameAs);

        r1.addProperty(myProperty, v);
        r.addProperty(mySameAs, r1);


        //infM.writeAll( System.out, "Turtle", null );

        assertTrue(infM.contains(r, myProperty, v));



This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message