eyeling 1.6.13 → 1.6.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/examples/output/age.n3 +0 -17
  2. package/examples/output/alignment-demo.n3 +0 -572
  3. package/examples/output/backward.n3 +0 -15
  4. package/examples/output/basic-monadic.n3 +0 -105
  5. package/examples/output/brussels-brew-club.n3 +0 -476
  6. package/examples/output/cat-koko.n3 +0 -108
  7. package/examples/output/cobalt-kepler-kitchen.n3 +0 -7064
  8. package/examples/output/complex.n3 +0 -46
  9. package/examples/output/control-system.n3 +0 -75
  10. package/examples/output/cranberry-calculus.n3 +0 -1313
  11. package/examples/output/crypto-builtins-tests.n3 +0 -60
  12. package/examples/output/deep-taxonomy-10.n3 +0 -602
  13. package/examples/output/deep-taxonomy-100.n3 +1 -5733
  14. package/examples/output/deep-taxonomy-1000.n3 +1 -57033
  15. package/examples/output/deep-taxonomy-10000.n3 +1 -570033
  16. package/examples/output/derived-backward-rule-2.n3 +0 -58
  17. package/examples/output/derived-backward-rule.n3 +0 -44
  18. package/examples/output/derived-rule.n3 +0 -42
  19. package/examples/output/dijkstra.n3 +0 -297
  20. package/examples/output/dog.n3 +0 -30
  21. package/examples/output/drone-corridor-planner.n3 +0 -799
  22. package/examples/output/easter.n3 +0 -3570
  23. package/examples/output/equals.n3 +0 -15
  24. package/examples/output/ev-roundtrip-planner.n3 +0 -392
  25. package/examples/output/existential-rule.n3 +0 -34
  26. package/examples/output/expression-eval.n3 +0 -20
  27. package/examples/output/family-cousins.n3 +0 -636
  28. package/examples/output/fibonacci.n3 +0 -36
  29. package/examples/output/french-cities.n3 +0 -484
  30. package/examples/output/good-cobbler.n3 +0 -22
  31. package/examples/output/gps.n3 +0 -62
  32. package/examples/output/gray-code-counter.n3 +0 -17
  33. package/examples/output/hanoi.n3 +0 -17
  34. package/examples/output/jade-eigen-loom.n3 +0 -4690
  35. package/examples/output/json-pointer.n3 +0 -529
  36. package/examples/output/json-reconcile-vat.n3 +0 -12882
  37. package/examples/output/light-eaters.n3 +0 -311
  38. package/examples/output/list-builtins-tests.n3 +0 -167
  39. package/examples/output/list-iterate.n3 +0 -124
  40. package/examples/output/lldm.n3 +0 -960
  41. package/examples/output/log-collect-all-in.n3 +0 -117
  42. package/examples/output/log-for-all-in.n3 +0 -27
  43. package/examples/output/log-not-includes.n3 +0 -59
  44. package/examples/output/log-skolem.n3 +0 -17
  45. package/examples/output/log-uri.n3 +0 -42
  46. package/examples/output/math-builtins-tests.n3 +0 -4434
  47. package/examples/output/minimal-skos-alignment.n3 +0 -39
  48. package/examples/output/monkey.n3 +0 -36
  49. package/examples/output/odrl-trust.n3 +0 -46
  50. package/examples/output/oslo-steps-library-scholarly.n3 +0 -1260
  51. package/examples/output/oslo-steps-workflow-composition.n3 +0 -180
  52. package/examples/output/peano.n3 +0 -23
  53. package/examples/output/pi.n3 +0 -17
  54. package/examples/output/pillar.n3 +0 -32
  55. package/examples/output/polygon.n3 +0 -17
  56. package/examples/output/rdf-list.n3 +0 -28
  57. package/examples/output/reordering.n3 +0 -26
  58. package/examples/output/ruby-runge-workshop.n3 +0 -613
  59. package/examples/output/rule-matching.n3 +0 -26
  60. package/examples/output/saffron-slopeworks.n3 +0 -1447
  61. package/examples/output/self-referential.n3 +0 -81
  62. package/examples/output/similar.n3 +0 -15
  63. package/examples/output/snaf.n3 +0 -23
  64. package/examples/output/socrates.n3 +0 -21
  65. package/examples/output/spectral-week.n3 +0 -350
  66. package/examples/output/string-builtins-tests.n3 +0 -240
  67. package/examples/output/topaz-markov-mill.n3 +0 -4178
  68. package/examples/output/traffic-skos-aggregate.n3 +0 -3151
  69. package/examples/output/turing.n3 +0 -36
  70. package/examples/output/ultramarine-simpson-forge.n3 +0 -3873
  71. package/examples/output/witch.n3 +0 -107
  72. package/examples/output/zebra.n3 +0 -111
  73. package/eyeling.js +97 -18
  74. package/package.json +1 -1
  75. package/test/examples.test.js +1 -1
@@ -1,542 +1,13 @@
1
1
  @prefix ex: <http://example.org/> .
2
2
 
3
- # ----------------------------------------------------------------------
4
- # Proof for derived triple:
5
- # ex:checks ex:firstUserNameOk true .
6
- # It holds because the following instance of the rule body is provable:
7
- # ex:doc ex:json "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON .
8
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/users/0/profile~1name") string:jsonPointer "Ada Lovelace" .
9
- # via the schematic forward rule:
10
- # {
11
- # ex:doc ex:json ?J .
12
- # (?J "/users/0/profile~1name") string:jsonPointer "Ada Lovelace" .
13
- # } => {
14
- # ex:checks ex:firstUserNameOk true .
15
- # } .
16
- # with substitution (on rule variables):
17
- # ?J = "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON
18
- # Therefore the derived triple above is entailed by the rules and facts.
19
- # ----------------------------------------------------------------------
20
-
21
3
  ex:checks ex:firstUserNameOk true .
22
-
23
- # ----------------------------------------------------------------------
24
- # Proof for derived triple:
25
- # <urn:example:user:u1> a ex:AllowedUser .
26
- # It holds because the following instance of the rule body is provable:
27
- # ex:doc ex:json "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON .
28
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/policy/allowedDomains") string:jsonPointer ("example.org" "example.com") .
29
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/users") string:jsonPointer ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
30
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) list:iterate (0 """{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON) .
31
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/id") string:jsonPointer "u1" .
32
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/email") string:jsonPointer "ada@example.org" .
33
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/profile~1name") string:jsonPointer "Ada Lovelace" .
34
- # ("ada@example.org" "@([^@]+)$") string:scrape "example.org" .
35
- # ("example.org" "example.com") list:member "example.org" .
36
- # ("urn:example:user:%s" "u1") string:format "urn:example:user:u1" .
37
- # <urn:example:user:u1> log:uri "urn:example:user:u1" .
38
- # via the schematic forward rule:
39
- # {
40
- # ex:doc ex:json ?J .
41
- # (?J "/policy/allowedDomains") string:jsonPointer ?Allowed .
42
- # (?J "/users") string:jsonPointer ?Users .
43
- # ?Users list:iterate (?Idx ?UserJson) .
44
- # (?UserJson "/id") string:jsonPointer ?Id .
45
- # (?UserJson "/email") string:jsonPointer ?Email .
46
- # (?UserJson "/profile~1name") string:jsonPointer ?Name .
47
- # (?Email "@([^@]+)$") string:scrape ?EmailDomain .
48
- # ?Allowed list:member ?EmailDomain .
49
- # ("urn:example:user:%s" ?Id) string:format ?UriStr .
50
- # ?User log:uri ?UriStr .
51
- # } => {
52
- # ?User a ex:AllowedUser .
53
- # ?User ex:name ?Name .
54
- # ?User ex:email ?Email .
55
- # ?User ex:emailDomain ?EmailDomain .
56
- # ?User ex:userIndex ?Idx .
57
- # } .
58
- # with substitution (on rule variables):
59
- # ?Allowed = ("example.org" "example.com")
60
- # ?Email = "ada@example.org"
61
- # ?EmailDomain = "example.org"
62
- # ?Id = "u1"
63
- # ?Idx = 0
64
- # ?J = "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON
65
- # ?Name = "Ada Lovelace"
66
- # ?UriStr = "urn:example:user:u1"
67
- # ?User = <urn:example:user:u1>
68
- # ?UserJson = """{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON
69
- # ?Users = ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON)
70
- # Therefore the derived triple above is entailed by the rules and facts.
71
- # ----------------------------------------------------------------------
72
-
73
4
  <urn:example:user:u1> a ex:AllowedUser .
74
-
75
- # ----------------------------------------------------------------------
76
- # Proof for derived triple:
77
- # <urn:example:user:u1> ex:name "Ada Lovelace" .
78
- # It holds because the following instance of the rule body is provable:
79
- # ex:doc ex:json "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON .
80
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/policy/allowedDomains") string:jsonPointer ("example.org" "example.com") .
81
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/users") string:jsonPointer ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
82
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) list:iterate (0 """{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON) .
83
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/id") string:jsonPointer "u1" .
84
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/email") string:jsonPointer "ada@example.org" .
85
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/profile~1name") string:jsonPointer "Ada Lovelace" .
86
- # ("ada@example.org" "@([^@]+)$") string:scrape "example.org" .
87
- # ("example.org" "example.com") list:member "example.org" .
88
- # ("urn:example:user:%s" "u1") string:format "urn:example:user:u1" .
89
- # <urn:example:user:u1> log:uri "urn:example:user:u1" .
90
- # via the schematic forward rule:
91
- # {
92
- # ex:doc ex:json ?J .
93
- # (?J "/policy/allowedDomains") string:jsonPointer ?Allowed .
94
- # (?J "/users") string:jsonPointer ?Users .
95
- # ?Users list:iterate (?Idx ?UserJson) .
96
- # (?UserJson "/id") string:jsonPointer ?Id .
97
- # (?UserJson "/email") string:jsonPointer ?Email .
98
- # (?UserJson "/profile~1name") string:jsonPointer ?Name .
99
- # (?Email "@([^@]+)$") string:scrape ?EmailDomain .
100
- # ?Allowed list:member ?EmailDomain .
101
- # ("urn:example:user:%s" ?Id) string:format ?UriStr .
102
- # ?User log:uri ?UriStr .
103
- # } => {
104
- # ?User a ex:AllowedUser .
105
- # ?User ex:name ?Name .
106
- # ?User ex:email ?Email .
107
- # ?User ex:emailDomain ?EmailDomain .
108
- # ?User ex:userIndex ?Idx .
109
- # } .
110
- # with substitution (on rule variables):
111
- # ?Allowed = ("example.org" "example.com")
112
- # ?Email = "ada@example.org"
113
- # ?EmailDomain = "example.org"
114
- # ?Id = "u1"
115
- # ?Idx = 0
116
- # ?J = "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON
117
- # ?Name = "Ada Lovelace"
118
- # ?UriStr = "urn:example:user:u1"
119
- # ?User = <urn:example:user:u1>
120
- # ?UserJson = """{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON
121
- # ?Users = ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON)
122
- # Therefore the derived triple above is entailed by the rules and facts.
123
- # ----------------------------------------------------------------------
124
-
125
5
  <urn:example:user:u1> ex:name "Ada Lovelace" .
126
-
127
- # ----------------------------------------------------------------------
128
- # Proof for derived triple:
129
- # <urn:example:user:u1> ex:email "ada@example.org" .
130
- # It holds because the following instance of the rule body is provable:
131
- # ex:doc ex:json "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON .
132
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/policy/allowedDomains") string:jsonPointer ("example.org" "example.com") .
133
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/users") string:jsonPointer ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
134
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) list:iterate (0 """{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON) .
135
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/id") string:jsonPointer "u1" .
136
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/email") string:jsonPointer "ada@example.org" .
137
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/profile~1name") string:jsonPointer "Ada Lovelace" .
138
- # ("ada@example.org" "@([^@]+)$") string:scrape "example.org" .
139
- # ("example.org" "example.com") list:member "example.org" .
140
- # ("urn:example:user:%s" "u1") string:format "urn:example:user:u1" .
141
- # <urn:example:user:u1> log:uri "urn:example:user:u1" .
142
- # via the schematic forward rule:
143
- # {
144
- # ex:doc ex:json ?J .
145
- # (?J "/policy/allowedDomains") string:jsonPointer ?Allowed .
146
- # (?J "/users") string:jsonPointer ?Users .
147
- # ?Users list:iterate (?Idx ?UserJson) .
148
- # (?UserJson "/id") string:jsonPointer ?Id .
149
- # (?UserJson "/email") string:jsonPointer ?Email .
150
- # (?UserJson "/profile~1name") string:jsonPointer ?Name .
151
- # (?Email "@([^@]+)$") string:scrape ?EmailDomain .
152
- # ?Allowed list:member ?EmailDomain .
153
- # ("urn:example:user:%s" ?Id) string:format ?UriStr .
154
- # ?User log:uri ?UriStr .
155
- # } => {
156
- # ?User a ex:AllowedUser .
157
- # ?User ex:name ?Name .
158
- # ?User ex:email ?Email .
159
- # ?User ex:emailDomain ?EmailDomain .
160
- # ?User ex:userIndex ?Idx .
161
- # } .
162
- # with substitution (on rule variables):
163
- # ?Allowed = ("example.org" "example.com")
164
- # ?Email = "ada@example.org"
165
- # ?EmailDomain = "example.org"
166
- # ?Id = "u1"
167
- # ?Idx = 0
168
- # ?J = "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON
169
- # ?Name = "Ada Lovelace"
170
- # ?UriStr = "urn:example:user:u1"
171
- # ?User = <urn:example:user:u1>
172
- # ?UserJson = """{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON
173
- # ?Users = ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON)
174
- # Therefore the derived triple above is entailed by the rules and facts.
175
- # ----------------------------------------------------------------------
176
-
177
6
  <urn:example:user:u1> ex:email "ada@example.org" .
178
-
179
- # ----------------------------------------------------------------------
180
- # Proof for derived triple:
181
- # <urn:example:user:u1> ex:emailDomain "example.org" .
182
- # It holds because the following instance of the rule body is provable:
183
- # ex:doc ex:json "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON .
184
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/policy/allowedDomains") string:jsonPointer ("example.org" "example.com") .
185
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/users") string:jsonPointer ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
186
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) list:iterate (0 """{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON) .
187
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/id") string:jsonPointer "u1" .
188
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/email") string:jsonPointer "ada@example.org" .
189
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/profile~1name") string:jsonPointer "Ada Lovelace" .
190
- # ("ada@example.org" "@([^@]+)$") string:scrape "example.org" .
191
- # ("example.org" "example.com") list:member "example.org" .
192
- # ("urn:example:user:%s" "u1") string:format "urn:example:user:u1" .
193
- # <urn:example:user:u1> log:uri "urn:example:user:u1" .
194
- # via the schematic forward rule:
195
- # {
196
- # ex:doc ex:json ?J .
197
- # (?J "/policy/allowedDomains") string:jsonPointer ?Allowed .
198
- # (?J "/users") string:jsonPointer ?Users .
199
- # ?Users list:iterate (?Idx ?UserJson) .
200
- # (?UserJson "/id") string:jsonPointer ?Id .
201
- # (?UserJson "/email") string:jsonPointer ?Email .
202
- # (?UserJson "/profile~1name") string:jsonPointer ?Name .
203
- # (?Email "@([^@]+)$") string:scrape ?EmailDomain .
204
- # ?Allowed list:member ?EmailDomain .
205
- # ("urn:example:user:%s" ?Id) string:format ?UriStr .
206
- # ?User log:uri ?UriStr .
207
- # } => {
208
- # ?User a ex:AllowedUser .
209
- # ?User ex:name ?Name .
210
- # ?User ex:email ?Email .
211
- # ?User ex:emailDomain ?EmailDomain .
212
- # ?User ex:userIndex ?Idx .
213
- # } .
214
- # with substitution (on rule variables):
215
- # ?Allowed = ("example.org" "example.com")
216
- # ?Email = "ada@example.org"
217
- # ?EmailDomain = "example.org"
218
- # ?Id = "u1"
219
- # ?Idx = 0
220
- # ?J = "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON
221
- # ?Name = "Ada Lovelace"
222
- # ?UriStr = "urn:example:user:u1"
223
- # ?User = <urn:example:user:u1>
224
- # ?UserJson = """{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON
225
- # ?Users = ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON)
226
- # Therefore the derived triple above is entailed by the rules and facts.
227
- # ----------------------------------------------------------------------
228
-
229
7
  <urn:example:user:u1> ex:emailDomain "example.org" .
230
-
231
- # ----------------------------------------------------------------------
232
- # Proof for derived triple:
233
- # <urn:example:user:u1> ex:userIndex 0 .
234
- # It holds because the following instance of the rule body is provable:
235
- # ex:doc ex:json "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON .
236
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/policy/allowedDomains") string:jsonPointer ("example.org" "example.com") .
237
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/users") string:jsonPointer ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
238
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) list:iterate (0 """{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON) .
239
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/id") string:jsonPointer "u1" .
240
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/email") string:jsonPointer "ada@example.org" .
241
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON "/profile~1name") string:jsonPointer "Ada Lovelace" .
242
- # ("ada@example.org" "@([^@]+)$") string:scrape "example.org" .
243
- # ("example.org" "example.com") list:member "example.org" .
244
- # ("urn:example:user:%s" "u1") string:format "urn:example:user:u1" .
245
- # <urn:example:user:u1> log:uri "urn:example:user:u1" .
246
- # via the schematic forward rule:
247
- # {
248
- # ex:doc ex:json ?J .
249
- # (?J "/policy/allowedDomains") string:jsonPointer ?Allowed .
250
- # (?J "/users") string:jsonPointer ?Users .
251
- # ?Users list:iterate (?Idx ?UserJson) .
252
- # (?UserJson "/id") string:jsonPointer ?Id .
253
- # (?UserJson "/email") string:jsonPointer ?Email .
254
- # (?UserJson "/profile~1name") string:jsonPointer ?Name .
255
- # (?Email "@([^@]+)$") string:scrape ?EmailDomain .
256
- # ?Allowed list:member ?EmailDomain .
257
- # ("urn:example:user:%s" ?Id) string:format ?UriStr .
258
- # ?User log:uri ?UriStr .
259
- # } => {
260
- # ?User a ex:AllowedUser .
261
- # ?User ex:name ?Name .
262
- # ?User ex:email ?Email .
263
- # ?User ex:emailDomain ?EmailDomain .
264
- # ?User ex:userIndex ?Idx .
265
- # } .
266
- # with substitution (on rule variables):
267
- # ?Allowed = ("example.org" "example.com")
268
- # ?Email = "ada@example.org"
269
- # ?EmailDomain = "example.org"
270
- # ?Id = "u1"
271
- # ?Idx = 0
272
- # ?J = "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON
273
- # ?Name = "Ada Lovelace"
274
- # ?UriStr = "urn:example:user:u1"
275
- # ?User = <urn:example:user:u1>
276
- # ?UserJson = """{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON
277
- # ?Users = ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON)
278
- # Therefore the derived triple above is entailed by the rules and facts.
279
- # ----------------------------------------------------------------------
280
-
281
8
  <urn:example:user:u1> ex:userIndex 0 .
282
-
283
- # ----------------------------------------------------------------------
284
- # Proof for derived triple:
285
- # <urn:example:user:u2> a ex:BlockedUser .
286
- # It holds because the following instance of the rule body is provable:
287
- # ex:doc ex:json "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON .
288
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/policy/allowedDomains") string:jsonPointer ("example.org" "example.com") .
289
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/users") string:jsonPointer ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
290
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) list:iterate (1 """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
291
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/id") string:jsonPointer "u2" .
292
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/email") string:jsonPointer "bob@evil.invalid" .
293
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/profile~1name") string:jsonPointer "Bob Mallory" .
294
- # ("bob@evil.invalid" "@([^@]+)$") string:scrape "evil.invalid" .
295
- # ("urn:example:user:%s" "u2") string:format "urn:example:user:u2" .
296
- # <urn:example:user:u2> log:uri "urn:example:user:u2" .
297
- # ("example.org" "example.com") list:notMember "evil.invalid" .
298
- # via the schematic forward rule:
299
- # {
300
- # ex:doc ex:json ?J .
301
- # (?J "/policy/allowedDomains") string:jsonPointer ?Allowed .
302
- # (?J "/users") string:jsonPointer ?Users .
303
- # ?Users list:iterate (?Idx ?UserJson) .
304
- # (?UserJson "/id") string:jsonPointer ?Id .
305
- # (?UserJson "/email") string:jsonPointer ?Email .
306
- # (?UserJson "/profile~1name") string:jsonPointer ?Name .
307
- # (?Email "@([^@]+)$") string:scrape ?EmailDomain .
308
- # ("urn:example:user:%s" ?Id) string:format ?UriStr .
309
- # ?User log:uri ?UriStr .
310
- # ?Allowed list:notMember ?EmailDomain .
311
- # } => {
312
- # ?User a ex:BlockedUser .
313
- # ?User ex:name ?Name .
314
- # ?User ex:email ?Email .
315
- # ?User ex:emailDomain ?EmailDomain .
316
- # ?User ex:userIndex ?Idx .
317
- # } .
318
- # with substitution (on rule variables):
319
- # ?Allowed = ("example.org" "example.com")
320
- # ?Email = "bob@evil.invalid"
321
- # ?EmailDomain = "evil.invalid"
322
- # ?Id = "u2"
323
- # ?Idx = 1
324
- # ?J = "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON
325
- # ?Name = "Bob Mallory"
326
- # ?UriStr = "urn:example:user:u2"
327
- # ?User = <urn:example:user:u2>
328
- # ?UserJson = """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON
329
- # ?Users = ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON)
330
- # Therefore the derived triple above is entailed by the rules and facts.
331
- # ----------------------------------------------------------------------
332
-
333
9
  <urn:example:user:u2> a ex:BlockedUser .
334
-
335
- # ----------------------------------------------------------------------
336
- # Proof for derived triple:
337
- # <urn:example:user:u2> ex:name "Bob Mallory" .
338
- # It holds because the following instance of the rule body is provable:
339
- # ex:doc ex:json "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON .
340
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/policy/allowedDomains") string:jsonPointer ("example.org" "example.com") .
341
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/users") string:jsonPointer ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
342
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) list:iterate (1 """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
343
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/id") string:jsonPointer "u2" .
344
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/email") string:jsonPointer "bob@evil.invalid" .
345
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/profile~1name") string:jsonPointer "Bob Mallory" .
346
- # ("bob@evil.invalid" "@([^@]+)$") string:scrape "evil.invalid" .
347
- # ("urn:example:user:%s" "u2") string:format "urn:example:user:u2" .
348
- # <urn:example:user:u2> log:uri "urn:example:user:u2" .
349
- # ("example.org" "example.com") list:notMember "evil.invalid" .
350
- # via the schematic forward rule:
351
- # {
352
- # ex:doc ex:json ?J .
353
- # (?J "/policy/allowedDomains") string:jsonPointer ?Allowed .
354
- # (?J "/users") string:jsonPointer ?Users .
355
- # ?Users list:iterate (?Idx ?UserJson) .
356
- # (?UserJson "/id") string:jsonPointer ?Id .
357
- # (?UserJson "/email") string:jsonPointer ?Email .
358
- # (?UserJson "/profile~1name") string:jsonPointer ?Name .
359
- # (?Email "@([^@]+)$") string:scrape ?EmailDomain .
360
- # ("urn:example:user:%s" ?Id) string:format ?UriStr .
361
- # ?User log:uri ?UriStr .
362
- # ?Allowed list:notMember ?EmailDomain .
363
- # } => {
364
- # ?User a ex:BlockedUser .
365
- # ?User ex:name ?Name .
366
- # ?User ex:email ?Email .
367
- # ?User ex:emailDomain ?EmailDomain .
368
- # ?User ex:userIndex ?Idx .
369
- # } .
370
- # with substitution (on rule variables):
371
- # ?Allowed = ("example.org" "example.com")
372
- # ?Email = "bob@evil.invalid"
373
- # ?EmailDomain = "evil.invalid"
374
- # ?Id = "u2"
375
- # ?Idx = 1
376
- # ?J = "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON
377
- # ?Name = "Bob Mallory"
378
- # ?UriStr = "urn:example:user:u2"
379
- # ?User = <urn:example:user:u2>
380
- # ?UserJson = """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON
381
- # ?Users = ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON)
382
- # Therefore the derived triple above is entailed by the rules and facts.
383
- # ----------------------------------------------------------------------
384
-
385
10
  <urn:example:user:u2> ex:name "Bob Mallory" .
386
-
387
- # ----------------------------------------------------------------------
388
- # Proof for derived triple:
389
- # <urn:example:user:u2> ex:email "bob@evil.invalid" .
390
- # It holds because the following instance of the rule body is provable:
391
- # ex:doc ex:json "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON .
392
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/policy/allowedDomains") string:jsonPointer ("example.org" "example.com") .
393
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/users") string:jsonPointer ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
394
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) list:iterate (1 """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
395
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/id") string:jsonPointer "u2" .
396
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/email") string:jsonPointer "bob@evil.invalid" .
397
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/profile~1name") string:jsonPointer "Bob Mallory" .
398
- # ("bob@evil.invalid" "@([^@]+)$") string:scrape "evil.invalid" .
399
- # ("urn:example:user:%s" "u2") string:format "urn:example:user:u2" .
400
- # <urn:example:user:u2> log:uri "urn:example:user:u2" .
401
- # ("example.org" "example.com") list:notMember "evil.invalid" .
402
- # via the schematic forward rule:
403
- # {
404
- # ex:doc ex:json ?J .
405
- # (?J "/policy/allowedDomains") string:jsonPointer ?Allowed .
406
- # (?J "/users") string:jsonPointer ?Users .
407
- # ?Users list:iterate (?Idx ?UserJson) .
408
- # (?UserJson "/id") string:jsonPointer ?Id .
409
- # (?UserJson "/email") string:jsonPointer ?Email .
410
- # (?UserJson "/profile~1name") string:jsonPointer ?Name .
411
- # (?Email "@([^@]+)$") string:scrape ?EmailDomain .
412
- # ("urn:example:user:%s" ?Id) string:format ?UriStr .
413
- # ?User log:uri ?UriStr .
414
- # ?Allowed list:notMember ?EmailDomain .
415
- # } => {
416
- # ?User a ex:BlockedUser .
417
- # ?User ex:name ?Name .
418
- # ?User ex:email ?Email .
419
- # ?User ex:emailDomain ?EmailDomain .
420
- # ?User ex:userIndex ?Idx .
421
- # } .
422
- # with substitution (on rule variables):
423
- # ?Allowed = ("example.org" "example.com")
424
- # ?Email = "bob@evil.invalid"
425
- # ?EmailDomain = "evil.invalid"
426
- # ?Id = "u2"
427
- # ?Idx = 1
428
- # ?J = "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON
429
- # ?Name = "Bob Mallory"
430
- # ?UriStr = "urn:example:user:u2"
431
- # ?User = <urn:example:user:u2>
432
- # ?UserJson = """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON
433
- # ?Users = ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON)
434
- # Therefore the derived triple above is entailed by the rules and facts.
435
- # ----------------------------------------------------------------------
436
-
437
11
  <urn:example:user:u2> ex:email "bob@evil.invalid" .
438
-
439
- # ----------------------------------------------------------------------
440
- # Proof for derived triple:
441
- # <urn:example:user:u2> ex:emailDomain "evil.invalid" .
442
- # It holds because the following instance of the rule body is provable:
443
- # ex:doc ex:json "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON .
444
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/policy/allowedDomains") string:jsonPointer ("example.org" "example.com") .
445
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/users") string:jsonPointer ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
446
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) list:iterate (1 """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
447
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/id") string:jsonPointer "u2" .
448
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/email") string:jsonPointer "bob@evil.invalid" .
449
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/profile~1name") string:jsonPointer "Bob Mallory" .
450
- # ("bob@evil.invalid" "@([^@]+)$") string:scrape "evil.invalid" .
451
- # ("urn:example:user:%s" "u2") string:format "urn:example:user:u2" .
452
- # <urn:example:user:u2> log:uri "urn:example:user:u2" .
453
- # ("example.org" "example.com") list:notMember "evil.invalid" .
454
- # via the schematic forward rule:
455
- # {
456
- # ex:doc ex:json ?J .
457
- # (?J "/policy/allowedDomains") string:jsonPointer ?Allowed .
458
- # (?J "/users") string:jsonPointer ?Users .
459
- # ?Users list:iterate (?Idx ?UserJson) .
460
- # (?UserJson "/id") string:jsonPointer ?Id .
461
- # (?UserJson "/email") string:jsonPointer ?Email .
462
- # (?UserJson "/profile~1name") string:jsonPointer ?Name .
463
- # (?Email "@([^@]+)$") string:scrape ?EmailDomain .
464
- # ("urn:example:user:%s" ?Id) string:format ?UriStr .
465
- # ?User log:uri ?UriStr .
466
- # ?Allowed list:notMember ?EmailDomain .
467
- # } => {
468
- # ?User a ex:BlockedUser .
469
- # ?User ex:name ?Name .
470
- # ?User ex:email ?Email .
471
- # ?User ex:emailDomain ?EmailDomain .
472
- # ?User ex:userIndex ?Idx .
473
- # } .
474
- # with substitution (on rule variables):
475
- # ?Allowed = ("example.org" "example.com")
476
- # ?Email = "bob@evil.invalid"
477
- # ?EmailDomain = "evil.invalid"
478
- # ?Id = "u2"
479
- # ?Idx = 1
480
- # ?J = "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON
481
- # ?Name = "Bob Mallory"
482
- # ?UriStr = "urn:example:user:u2"
483
- # ?User = <urn:example:user:u2>
484
- # ?UserJson = """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON
485
- # ?Users = ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON)
486
- # Therefore the derived triple above is entailed by the rules and facts.
487
- # ----------------------------------------------------------------------
488
-
489
12
  <urn:example:user:u2> ex:emailDomain "evil.invalid" .
490
-
491
- # ----------------------------------------------------------------------
492
- # Proof for derived triple:
493
- # <urn:example:user:u2> ex:userIndex 1 .
494
- # It holds because the following instance of the rule body is provable:
495
- # ex:doc ex:json "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON .
496
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/policy/allowedDomains") string:jsonPointer ("example.org" "example.com") .
497
- # ("{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON "/users") string:jsonPointer ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
498
- # ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) list:iterate (1 """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON) .
499
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/id") string:jsonPointer "u2" .
500
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/email") string:jsonPointer "bob@evil.invalid" .
501
- # ("""{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON "/profile~1name") string:jsonPointer "Bob Mallory" .
502
- # ("bob@evil.invalid" "@([^@]+)$") string:scrape "evil.invalid" .
503
- # ("urn:example:user:%s" "u2") string:format "urn:example:user:u2" .
504
- # <urn:example:user:u2> log:uri "urn:example:user:u2" .
505
- # ("example.org" "example.com") list:notMember "evil.invalid" .
506
- # via the schematic forward rule:
507
- # {
508
- # ex:doc ex:json ?J .
509
- # (?J "/policy/allowedDomains") string:jsonPointer ?Allowed .
510
- # (?J "/users") string:jsonPointer ?Users .
511
- # ?Users list:iterate (?Idx ?UserJson) .
512
- # (?UserJson "/id") string:jsonPointer ?Id .
513
- # (?UserJson "/email") string:jsonPointer ?Email .
514
- # (?UserJson "/profile~1name") string:jsonPointer ?Name .
515
- # (?Email "@([^@]+)$") string:scrape ?EmailDomain .
516
- # ("urn:example:user:%s" ?Id) string:format ?UriStr .
517
- # ?User log:uri ?UriStr .
518
- # ?Allowed list:notMember ?EmailDomain .
519
- # } => {
520
- # ?User a ex:BlockedUser .
521
- # ?User ex:name ?Name .
522
- # ?User ex:email ?Email .
523
- # ?User ex:emailDomain ?EmailDomain .
524
- # ?User ex:userIndex ?Idx .
525
- # } .
526
- # with substitution (on rule variables):
527
- # ?Allowed = ("example.org" "example.com")
528
- # ?Email = "bob@evil.invalid"
529
- # ?EmailDomain = "evil.invalid"
530
- # ?Id = "u2"
531
- # ?Idx = 1
532
- # ?J = "{\n \"users\": [\n { \"id\": \"u1\", \"email\": \"ada@example.org\", \"profile/name\": \"Ada Lovelace\" },\n { \"id\": \"u2\", \"email\": \"bob@evil.invalid\", \"profile/name\": \"Bob Mallory\" }\n ],\n \"policy\": { \"allowedDomains\": [\"example.org\", \"example.com\"] }\n}"^^rdf:JSON
533
- # ?Name = "Bob Mallory"
534
- # ?UriStr = "urn:example:user:u2"
535
- # ?User = <urn:example:user:u2>
536
- # ?UserJson = """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON
537
- # ?Users = ("""{"id":"u1","email":"ada@example.org","profile/name":"Ada Lovelace"}"""^^rdf:JSON """{"id":"u2","email":"bob@evil.invalid","profile/name":"Bob Mallory"}"""^^rdf:JSON)
538
- # Therefore the derived triple above is entailed by the rules and facts.
539
- # ----------------------------------------------------------------------
540
-
541
13
  <urn:example:user:u2> ex:userIndex 1 .
542
-