diff --git a/shacl12-rules/index.html b/shacl12-rules/index.html index 716917ed..e3dc4a8b 100644 --- a/shacl12-rules/index.html +++ b/shacl12-rules/index.html @@ -657,26 +657,42 @@
rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#rdfs:http://www.w3.org/2000/01/rdf-schema#srl:http://www.w3.org/ns/shacl-rules#shnex:http://www.w3.org/ns/shnex#sh:http://www.w3.org/ns/shacl#xsd:http://www.w3.org/2001/XMLSchema#ex:http://example.com/ns#@@ -918,39 +934,40 @@
PREFIX : <http://example/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX shr <http://www.w3.org/ns/shacl-rules#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX sparql: <http://www.w3.org/ns/sparql#>
:ruleSet-1
- rdf:type sh:RuleSet;
- sh:data (
+ rdf:type srl:RuleSet;
+ srl:data (
<<( :x :p 1 )>>
<<( :x :q 2 )>>
);
- sh:ruleSet (
+ srl:ruleSet (
[
- rdf:type sh:Rule;
- sh:head (
- [ sh:subject [ sh:var "x" ] ; sh:predicate :bothPositive; sh:object true ]
+ rdf:type srl:Rule;
+ srl:head (
+ [ srl:subject [ srl:var "x" ] ; srl:predicate :bothPositive; srl:object true ]
)
- sh:body (
- [ sh:subject [ sh:var "x" ]; sh:predicate :p; sh:object [ sh:var "v1" ] ]
- [ sh:expr [ sparql:greaterThan ( [ sh:var "v1" ] 0 ) ] ]
- [ sh:subject [ sh:var "x" ] ; sh:predicate :q; sh:object [ sh:var "v2" ] ]
- [ sh:expr [ sparql:greaterThan ( [ sh:var "v2" ] 0 ) ] ]
+ srl:body (
+ [ srl:subject [ srl:var "x" ]; srl:predicate :p; srl:object [ srl:var "v1" ] ]
+ [ srl:expr [ sparql:greaterThan ( [ srl:var "v1" ] 0 ) ] ]
+ [ srl:subject [ srl:var "x" ] ; srl:predicate :q; srl:object [ srl:var "v2" ] ]
+ [ srl:expr [ sparql:greaterThan ( [ srl:var "v2" ] 0 ) ] ]
);
]
[
- rdf:type sh:Rule;
- sh:head (
- [ sh:subject [ sh:var "x" ] ; sh:predicate :oneIsZero ; sh:object true ]
+ rdf:type srl:Rule;
+ srl:head (
+ [ srl:subject [ srl:var "x" ] ; srl:predicate :oneIsZero ; srl:object true ]
)
- sh:body (
- [ sh:subject [ sh:var "x" ] ; sh:predicate :p ; sh:object [ sh:var "v1" ] ]
- [ sh:subject [ sh:var "x" ] ; sh:predicate :q ; sh:object [ sh:var "v2" ] ]
- [ sh:expr [ sparql:function-or (
- [ sparql:equals ( [ sh:var "v1" ] 0 ) ]
- [ sparql:equals ( [ sh:var "v2" ] 0 ) ]
+ srl:body (
+ [ srl:subject [ srl:var "x" ] ; srl:predicate :p ; srl:object [ srl:var "v1" ] ]
+ [ srl:subject [ srl:var "x" ] ; srl:predicate :q ; srl:object [ srl:var "v2" ] ]
+ [ srl:expr [ sparql:function-or (
+ [ sparql:equals ( [ srl:var "v1" ] 0 ) ]
+ [ sparql:equals ( [ srl:var "v2" ] 0 ) ]
) ]
]
);
@@ -972,10 +989,7 @@ RDF Rules Syntax
- Describe how the abstract model maps to triples??.
- way round - copes with extra triples.
- Output is the instance of the abtract model that generates the triples -
- but need to define "maximal".
+
Alternative: Describe how the abstract model maps to triples.
@@ -1145,6 +1159,98 @@ Evaluation of a Rule Set
+
+ Drafting Notes
+
+ Attaching Rules to Shapes
+
+ @@ Discussion
+
+ See SHACL AF `sh:rule`,
+ which describes triple rules,
+ with a special case of property value rules
+ and SPARQL Rules (AKA "CONSTRUCT rules").
+
+ Core issue 517 : classification shapes
+
+ How much compatibility?
+ At one level, nothing needs top done because they have separate evaluation
+ and it is only a matter of whether an engine supports them or not.
+ It might be helpful to say when they happen (before 1.2 Rules - seea also defaul values)
+ and can infer if they generate infered triple.
+
+
+ - Extends to `rdf:type srl:Rule`
+ - Uses `sh:this` and `$this`
+ (see Rule Parameterization)
+
+
+
+
+
+ Parameterization
+
+ @@ Discussion
+ Define a new rule that is another rule with some variables already set
+
+ - Where do the setting come from?
+ - Is is just one "row" or a data table?
+ - Logically, some `BIND` steps at the start of the rule body
+
+
+
+
+
+ More on evaluation
+
+ @@ Discussion
+ The main evaluatiuon description creates all inferred triple using
+ the datalog "naive" algorithm.
+ Do we need to talk about backward evaluation and stratification?
+
+
+
+
+
+ Negation as semi-positive datalog
+
+ @@ Discussion
+ Negation (e.g. via SPARQL `NOT EXISTS`/`EXISTS`) can allowed if
+ the pattern is executed only one the base data graph, not including the
+ inferred graph. i.e. inferred triples are not seen.
+ Or stratification - not seeing inferred tripels from the current stratum.
+
+ Priority for this feature?
+
+
+
+
+ Assignment restrictions
+
+ @@ Discussion
+
+ Assignment takes the rule lanuage outside datalog.
+ Can we define when it is "safe"? (e.g. triples involving the assignment
+ are not mentioned in the body of any other rule).
+
+ Do we need "order" in the syntax?
+
+
+
+ Work space named tuples
+
+ @@ Discussion
+
+ Currently, SHACL Rules is, in datatlog-speak, only unnamed 3-tuples.
+ To support "programming" in rules, should we allow transient (not part of the output,
+ only during rulset evaluation) named n-tuples?
+ e.g. name(termOrVar, ...), possibly with a unique marker e.g. `
+ giving `name(termOrVar, ...).
+
+
+
+
+
Shapes Rules Language Grammar