@@ -656,26 +656,42 @@ <h3>Document Conventions</h3>
656656 < tr >
657657 < th > Prefix</ th >
658658 < th > Namespace</ th >
659+ < th > Informal Name</ th >
659660 </ tr >
660661 < tr >
661662 < td > < code > rdf:</ code > </ td >
662663 < td > < code > http://www.w3.org/1999/02/22-rdf-syntax-ns#</ code > </ td >
664+ < td > RDF</ td >
663665 </ tr >
664666 < tr >
665667 < td > < code > rdfs:</ code > </ td >
666668 < 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 >
667680 </ tr >
668681 < tr >
669682 < td > < code > sh:</ code > </ td >
670683 < td > < code > http://www.w3.org/ns/shacl#</ code > </ td >
684+ < td > SHACL</ td >
671685 </ tr >
672686 < tr >
673687 < td > < code > xsd:</ code > </ td >
674688 < td > < code > http://www.w3.org/2001/XMLSchema#</ code > </ td >
689+ < td > XML Schema</ td >
675690 </ tr >
676691 < tr >
677692 < td > < code > ex:</ code > </ td >
678693 < td > < code > http://example.com/ns#</ code > </ td >
694+ < td > Example</ td >
679695 </ tr >
680696 </ table >
681697 < p >
@@ -917,39 +933,40 @@ <h2>Concrete Syntax forms for Shapes Rules</h2>
917933< pre class ="example-rules ">
918934PREFIX : <http://example/>
919935PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
936+ PREFIX shr <http://www.w3.org/ns/shacl-rules#>
920937PREFIX sh: <http://www.w3.org/ns/shacl#>
921938PREFIX sparql: <http://www.w3.org/ns/sparql#>
922939
923940:ruleSet-1
924- rdf:type sh :RuleSet;
925- sh :data (
941+ rdf:type srl :RuleSet;
942+ srl :data (
926943 <<( :x :p 1 )>>
927944 <<( :x :q 2 )>>
928945 );
929- sh :ruleSet (
946+ srl :ruleSet (
930947 [
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 ]
934951 )
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 ) ] ]
940957 );
941958 ]
942959 [
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 ]
946963 )
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 ) ]
953970 ) ]
954971 ]
955972 );
@@ -1144,6 +1161,85 @@ <h4>Evaluation of a Rule Set</h4>
11441161 </ section >
11451162 </ section >
11461163
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+
11471243 < section id ="shapes-rules-grammar ">
11481244 < h2 > Shapes Rules Language Grammar</ h2 >
11491245
0 commit comments