w3c / shacl

SHACL Community Group (Post-REC activitities)
27 stars 4 forks source link

SHACL rule example in Protege #21

Closed riannella closed 6 months ago

riannella commented 6 months ago

Hi, I tried to replicate the example in Section 8.1 to try out sh:rule in Protege and the SHACL plugin with the Pellet reasoner running.

Unfortunately, I could not replicate the results (that is, a new axiom is inferred for the ex:SquareRectangle)

I used the below ontology/data file and the first example shapes graph (in green) in Section 8.1

Any ideas??

Cheers - Renato

=========

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://www.example.org/#> .

ex:onto rdf:type owl:Ontology ;
                 rdfs:label "Test" .

ex:Rectangle rdf:type owl:Class ;
             rdfs:label "Rectangle" .

ex:height rdf:type owl:DatatypeProperty ;
                      rdfs:range xsd:integer .

ex:width rdf:type owl:DatatypeProperty ;
                      rdfs:range xsd:integer .

ex:InvalidRectangle
    a ex:Rectangle .

ex:NonSquareRectangle
    a ex:Rectangle ;
    ex:height 2 ;
    ex:width 3 .

ex:SquareRectangle
    a ex:Rectangle ;
    ex:height 4 ;
    ex:width 4 .

============

HolgerKnublauch commented 6 months ago

Did you talk to the developers of the SHACL plugin that they actually support these types of rules? Are they aware of your question here? I don't see a connection to Pellet which is an OWL reasoner.

riannella commented 6 months ago

Moved question here: https://github.com/fekaputra/shacl-plugin/issues/45