This discussion is archived
5 Replies Latest reply: Nov 4, 2013 2:00 AM by damien.claveau RSS

Pellet Reasoning in Closed World Assumption

damien.claveau Newbie
Currently Being Moderated

Hi Zhe,

 

 

We are currently trying to make the PelletDB reasonner do infer some entailments in a CWA context.

 

 

Here is a test ontology that describes two invidviduals in a class "Polygon".
They are asserted to have "only 3" or "only 5" [hasSide] relationships with some instances of Lines.
All the instances of lines are asserted owl:AllDifferent.

 

 

That way, the world is closed, and the Pellet reasonner plugin in Protege succeed to infer that
  poly3 is a Triangle (equivalent to a [exactly 3 hasSide on Line] restriction)
  poly5 is a Pentagon (equivalent to a [exactly 5 hasSide on Line] restriction)

 

But unfortunately, the integrated reasonner of our 11.2.0.3 DB doesn't seem to infer these facts.
Here is the sample turtle ontology, followed by the create_entailment we execute.

Any advice would be very helpful.

Thank you.

 

----------------------------------------------------------------------------------------------------------------------------------------------------------

 

# baseURI: http:/tests/Polygons_AllDifferent.owl

@prefix :        <http:/tests/Polygons_AllDifferent.owl#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .

@prefix xml:     <http://www.w3.org/XML/1998/namespace> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .

:Line
      rdf:type owl:Class .

:Polygon
      rdf:type owl:Class .

:Pentagon
      rdf:type owl:Class ;
      owl:equivalentClass
              [ rdf:type owl:Restriction ;
                owl:onClass :Line ;
                owl:onProperty :hasSide ;
                owl:qualifiedCardinality
                        "5"^^xsd:nonNegativeInteger
              ] .

:Triangle
      rdf:type owl:Class ;
      owl:equivalentClass
              [ rdf:type owl:Restriction ;
                owl:onClass :Line ;
                owl:onProperty :hasSide ;
                owl:qualifiedCardinality
                        "3"^^xsd:nonNegativeInteger
              ] .

:hasSide
      rdf:type owl:ObjectProperty .

:line1
      rdf:type owl:NamedIndividual , :Line .

:line2
      rdf:type owl:NamedIndividual , :Line .

:line3
      rdf:type owl:NamedIndividual , :Line .

:line4
      rdf:type owl:NamedIndividual , :Line .

:line5
      rdf:type owl:NamedIndividual , :Line .

:line6
      rdf:type owl:NamedIndividual , :Line .

:poly3
      rdf:type owl:NamedIndividual , :Polygon ;
      rdf:type
              [ rdf:type owl:Restriction ;
                owl:allValuesFrom
                        [ rdf:type owl:Class ;
                          owl:oneOf (:line3 :line2 :line1)
                        ] ;
                owl:onProperty :hasSide
              ] ;
      :hasSide :line1 , :line2 , :line3 .

:poly5
      rdf:type owl:NamedIndividual , :Polygon ;
      rdf:type
              [ rdf:type owl:Restriction ;
                owl:allValuesFrom
                        [ rdf:type owl:Class ;
                          owl:oneOf (:line5 :line4 :line3 :line2 :line1)
                        ] ;
                owl:onProperty :hasSide
              ] ;
      :hasSide :line1 , :line2 , :line3 , :line4 , :line5 .

<http:/tests/Polygons_AllDifferent.owl>
      rdf:type owl:Ontology ;
      spin:imports <http://topbraid.org/spin/owlrl-all> , <http://topbraid.org/spin/rdfsplus> .

[]    rdf:type owl:AllDifferent ;
      owl:distinctMembers (:line1 :line2 :line3 :line4 :line5 :line6) .

 

 

 

 

begin

sem_apis.CREATE_ENTAILMENT(

  'POLYGON_IDX',

  SEM_Models   ('POLYGON'),

  SEM_Rulebases('RDFS','OWLPRIME','OWL2RL','OWLSIF' ),

  sem_apis.REACH_CLOSURE,

  NULL,

  NULL

  );

end;

 

 

SELECT o

  FROM TABLE (

          SEM_MATCH (

             ' {<http:/tests/Polygons_AllDifferent.owl#poly3> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o }',

             SEM_Models ('POLYGON'),

             SEM_Rulebases('RDFS','OWLPRIME','OWL2RL','OWLSIF'),

             null, null, null, null));

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points