@@ -656,26 +656,42 @@ <h3>Document Conventions</h3>
656
656
< tr >
657
657
< th > Prefix</ th >
658
658
< th > Namespace</ th >
659
+ < th > Informal Name</ th >
659
660
</ tr >
660
661
< tr >
661
662
< td > < code > rdf:</ code > </ td >
662
663
< td > < code > http://www.w3.org/1999/02/22-rdf-syntax-ns#</ code > </ td >
664
+ < td > RDF</ td >
663
665
</ tr >
664
666
< tr >
665
667
< td > < code > rdfs:</ code > </ td >
666
668
< td > < code > http://www.w3.org/2000/01/rdf-schema#</ code > </ td >
669
+ < td > RDFS</ td >
670
+ </ tr >
671
+ < tr >
672
+ < td > < code > srl:</ code > </ td >
673
+ < td > < code > http://www.w3.org/ns/shacl-rules#</ code > </ td >
674
+ < td > SHACL Rules</ td >
675
+ </ tr >
676
+ < tr >
677
+ < td > < code > shnex:</ code > </ td >
678
+ < td > < code > http://www.w3.org/ns/shnex#</ code > </ td >
679
+ < td > SHACL Node Expressions</ td >
667
680
</ tr >
668
681
< tr >
669
682
< td > < code > sh:</ code > </ td >
670
683
< td > < code > http://www.w3.org/ns/shacl#</ code > </ td >
684
+ < td > SHACL</ td >
671
685
</ tr >
672
686
< tr >
673
687
< td > < code > xsd:</ code > </ td >
674
688
< td > < code > http://www.w3.org/2001/XMLSchema#</ code > </ td >
689
+ < td > XML Schema</ td >
675
690
</ tr >
676
691
< tr >
677
692
< td > < code > ex:</ code > </ td >
678
693
< td > < code > http://example.com/ns#</ code > </ td >
694
+ < td > Example</ td >
679
695
</ tr >
680
696
</ table >
681
697
< p >
@@ -917,39 +933,40 @@ <h2>Concrete Syntax forms for Shapes Rules</h2>
917
933
< pre class ="example-rules ">
918
934
PREFIX : <http://example/>
919
935
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
936
+ PREFIX shr <http://www.w3.org/ns/shacl-rules#>
920
937
PREFIX sh: <http://www.w3.org/ns/shacl#>
921
938
PREFIX sparql: <http://www.w3.org/ns/sparql#>
922
939
923
940
:ruleSet-1
924
- rdf:type sh :RuleSet;
925
- sh :data (
941
+ rdf:type srl :RuleSet;
942
+ srl :data (
926
943
<<( :x :p 1 )>>
927
944
<<( :x :q 2 )>>
928
945
);
929
- sh :ruleSet (
946
+ srl :ruleSet (
930
947
[
931
- rdf:type sh :Rule;
932
- sh :head (
933
- [ sh :subject [ sh :var "x" ] ; sh :predicate :bothPositive; sh :object true ]
948
+ rdf:type srl :Rule;
949
+ srl :head (
950
+ [ srl :subject [ srl :var "x" ] ; srl :predicate :bothPositive; srl :object true ]
934
951
)
935
- sh :body (
936
- [ sh :subject [ sh :var "x" ]; sh :predicate :p; sh :object [ sh :var "v1" ] ]
937
- [ sh :expr [ sparql:greaterThan ( [ sh :var "v1" ] 0 ) ] ]
938
- [ sh :subject [ sh :var "x" ] ; sh :predicate :q; sh :object [ sh :var "v2" ] ]
939
- [ sh :expr [ sparql:greaterThan ( [ sh :var "v2" ] 0 ) ] ]
952
+ srl :body (
953
+ [ srl :subject [ srl :var "x" ]; srl :predicate :p; srl :object [ srl :var "v1" ] ]
954
+ [ srl :expr [ sparql:greaterThan ( [ srl :var "v1" ] 0 ) ] ]
955
+ [ srl :subject [ srl :var "x" ] ; srl :predicate :q; srl :object [ srl :var "v2" ] ]
956
+ [ srl :expr [ sparql:greaterThan ( [ srl :var "v2" ] 0 ) ] ]
940
957
);
941
958
]
942
959
[
943
- rdf:type sh :Rule;
944
- sh :head (
945
- [ sh :subject [ sh :var "x" ] ; sh :predicate :oneIsZero ; sh :object true ]
960
+ rdf:type srl :Rule;
961
+ srl :head (
962
+ [ srl :subject [ srl :var "x" ] ; srl :predicate :oneIsZero ; srl :object true ]
946
963
)
947
- sh :body (
948
- [ sh :subject [ sh :var "x" ] ; sh :predicate :p ; sh :object [ sh :var "v1" ] ]
949
- [ sh :subject [ sh :var "x" ] ; sh :predicate :q ; sh :object [ sh :var "v2" ] ]
950
- [ sh :expr [ sparql:function-or (
951
- [ sparql:equals ( [ sh :var "v1" ] 0 ) ]
952
- [ sparql:equals ( [ sh :var "v2" ] 0 ) ]
964
+ srl :body (
965
+ [ srl :subject [ srl :var "x" ] ; srl :predicate :p ; srl :object [ srl :var "v1" ] ]
966
+ [ srl :subject [ srl :var "x" ] ; srl :predicate :q ; srl :object [ srl :var "v2" ] ]
967
+ [ srl :expr [ sparql:function-or (
968
+ [ sparql:equals ( [ srl :var "v1" ] 0 ) ]
969
+ [ sparql:equals ( [ srl :var "v2" ] 0 ) ]
953
970
) ]
954
971
]
955
972
);
@@ -1144,6 +1161,85 @@ <h4>Evaluation of a Rule Set</h4>
1144
1161
</ section >
1145
1162
</ section >
1146
1163
1164
+ < section id ="drafting ">
1165
+ < h2 > Drafting Notes</ h2 >
1166
+ < section id ="attach-shape-rule ">
1167
+ < h2 > Attaching Rules to Shapes</ h2 >
1168
+ < div class ="ednote ">
1169
+ < p > @@ Discussion</ p >
1170
+ < p >
1171
+ See SHACL AF < a href ="https://www.w3.org/TR/shacl-af/#rules-syntax "> `sh:rule`</ a > ,
1172
+ which describes < a href ="https://w3c.github.io/shacl/shacl-af/index.html#TripleRule "> triple rules</ a > ,
1173
+ with a special case of < a href ="https://w3c.github.io/shacl/shacl-af/index.html#PropertyValueRule "> property value rules</ a >
1174
+ and < a href ="https://www.w3.org/TR/shacl-af/#SPARQLRule "> SPARQL Rules</ a > (AKA "CONSTRUCT rules").
1175
+ </ p >
1176
+ < p > < a href ="https://github.com/w3c/data-shapes/issues/517 "> Core issue 517 : classification shapes</ a > </ p >
1177
+ < p >
1178
+ How much compatibility?
1179
+ At one level, nothing needs top done because they have separate evaluation
1180
+ and it is only a matter of whether an engine supports them or not.
1181
+ It might be helpful to say when they happen (before 1.2 Rules - seea also defaul values)
1182
+ and can infer if they generate infered triple.
1183
+ </ p >
1184
+ < ul >
1185
+ < li > Extends to `rdf:type srl:Rule`</ li >
1186
+ < li > Uses `sh:this` and `$this`
1187
+ (see < a href ="rule-parameterization "> Rule Parameterization</ a > )</ li >
1188
+ </ ul >
1189
+ </ div >
1190
+ </ section >
1191
+
1192
+ < section id ="rule-parameterization ">
1193
+ < h2 > Parameterization</ h2 >
1194
+ < div class ="ednote ">
1195
+ < p > @@ Discussion</ p >
1196
+ < p > Define a new rule that is another rule with some variables already set</ p >
1197
+ < ul >
1198
+ < li > Where do the setting come from?</ li >
1199
+ < li > Is is just one "row" or a data table?</ li >
1200
+ < li > Logically, some `BIND` steps at the start of the rule body</ li >
1201
+ </ ul >
1202
+ </ div >
1203
+ </ section >
1204
+
1205
+ < section id ="evaluation2 ">
1206
+ < h2 > More on evaluation</ h2 >
1207
+ < div class ="ednote ">
1208
+ < p > @@ Discussion</ p >
1209
+ < p > The main evaluatiuon description creates all inferred triple using
1210
+ the datalog "naive" algorithm.</ p >
1211
+ < p > Do we need to talk about backward evaluation and stratification?</ p >
1212
+
1213
+ </ div >
1214
+ </ section >
1215
+
1216
+ < section id ="negation ">
1217
+ < h2 > Negation as semi-positive datalog</ h2 >
1218
+ < div class ="ednote ">
1219
+ < p > @@ Discussion</ p >
1220
+ < p > Negation (e.g. via SPARQL `NOT EXISTS`/`EXISTS`) can allowed if
1221
+ the pattern is executed only one the base data graph, not including the
1222
+ inferred graph. i.e. inferred triples are not seen.
1223
+ Or stratification - not seeing inferred tripels from the current stratum.
1224
+ </ p >
1225
+ < p > Priority for this feature?</ p >
1226
+ </ div >
1227
+ </ section >
1228
+
1229
+ < section id ="other ">
1230
+ < h2 > Assignment restrictions</ h3 >
1231
+ < div class ="ednote ">
1232
+ < p > @@ Discussion</ p >
1233
+ < p >
1234
+ Assignment takes the rule lanuage outside datalog.
1235
+ Can we define when it is "safe"? (e.g. triples involving the assignment
1236
+ are not mentioned in the body of any other rule).
1237
+ </ p >
1238
+ < p > Do we need "order" in the syntax?</ p >
1239
+ </ div >
1240
+ </ section >
1241
+ </ section >
1242
+
1147
1243
< section id ="shapes-rules-grammar ">
1148
1244
< h2 > Shapes Rules Language Grammar</ h2 >
1149
1245
0 commit comments