eyeling 1.17.1 → 1.17.2

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.
@@ -10,11 +10,11 @@ Reason Why
10
10
  The plan resolved the person's address, turned it into a map point, checked the local weather, selected a suitable restaurant, and then created a reservation. Because the weather came back mild and stable (22 C and 1016 mbar), the chosen seating stayed outdoors.
11
11
 
12
12
  Check
13
- C1 address resolved.
14
- C2 location found.
15
- C3 weather loaded.
16
- C4 outdoor dining justified.
17
- C5 reservable restaurant selected.
18
- C6 requested date preserved.
19
- C7 outdoor preference preserved.
20
- C8 original goal pattern satisfied.
13
+ C1 OK - the preferences service resolved the person's address.
14
+ C2 OK - the location service turned the address into map coordinates.
15
+ C3 OK - the weather services supplied temperature and pressure for that location.
16
+ C4 OK - the weather interpretation justified outdoor seating.
17
+ C5 OK - the recommendation step selected a restaurant that can accept reservations.
18
+ C6 OK - the reservation preserved the requested dinner date.
19
+ C7 OK - the reservation preserved the outdoor seating preference.
20
+ C8 OK - the final goal pattern from the original RESTdesc query is satisfied.
package/examples/resto.n3 CHANGED
@@ -1,4 +1,4 @@
1
- # ===========================================================================
1
+ # ============================================================================
2
2
  # RESTdesc restaurant finder — ARC style service composition example.
3
3
  # Based on the RestoProof [1] idea of describing hypermedia APIs as N3 rules.
4
4
  #
@@ -10,7 +10,7 @@
10
10
  # preference.
11
11
  #
12
12
  # [1] https://github.com/RESTdesc/RestoProof
13
- # ===========================================================================
13
+ # ============================================================================
14
14
 
15
15
  @prefix : <http://example.org/resto#>.
16
16
  @prefix http: <http://www.w3.org/2011/http#>.
@@ -209,6 +209,67 @@
209
209
  ?Wanted log:notEqualTo ?Actual. }
210
210
  => false.
211
211
 
212
+ # Also fail loudly if any expected check is missing once a decision exists.
213
+ { :Decision :outcome ?Outcome.
214
+ :Check :c1 ?C1.
215
+ :Check :c2 ?C2.
216
+ :Check :c3 ?C3.
217
+ :Check :c4 ?C4.
218
+ :Check :c5 ?C5.
219
+ :Check :c6 ?C6.
220
+ :Check :c7 ?C7.
221
+ 1 log:notIncludes { :Check :c8 ?Any. }. }
222
+ => false.
223
+
224
+ { :Decision :outcome ?Outcome.
225
+ :Check :c1 ?C1.
226
+ :Check :c2 ?C2.
227
+ :Check :c3 ?C3.
228
+ :Check :c4 ?C4.
229
+ :Check :c5 ?C5.
230
+ :Check :c6 ?C6.
231
+ 1 log:notIncludes { :Check :c7 ?Any. }. }
232
+ => false.
233
+
234
+ { :Decision :outcome ?Outcome.
235
+ :Check :c1 ?C1.
236
+ :Check :c2 ?C2.
237
+ :Check :c3 ?C3.
238
+ :Check :c4 ?C4.
239
+ :Check :c5 ?C5.
240
+ 1 log:notIncludes { :Check :c6 ?Any. }. }
241
+ => false.
242
+
243
+ { :Decision :outcome ?Outcome.
244
+ :Check :c1 ?C1.
245
+ :Check :c2 ?C2.
246
+ :Check :c3 ?C3.
247
+ :Check :c4 ?C4.
248
+ 1 log:notIncludes { :Check :c5 ?Any. }. }
249
+ => false.
250
+
251
+ { :Decision :outcome ?Outcome.
252
+ :Check :c1 ?C1.
253
+ :Check :c2 ?C2.
254
+ :Check :c3 ?C3.
255
+ 1 log:notIncludes { :Check :c4 ?Any. }. }
256
+ => false.
257
+
258
+ { :Decision :outcome ?Outcome.
259
+ :Check :c1 ?C1.
260
+ :Check :c2 ?C2.
261
+ 1 log:notIncludes { :Check :c3 ?Any. }. }
262
+ => false.
263
+
264
+ { :Decision :outcome ?Outcome.
265
+ :Check :c1 ?C1.
266
+ 1 log:notIncludes { :Check :c2 ?Any. }. }
267
+ => false.
268
+
269
+ { :Decision :outcome ?Outcome.
270
+ 1 log:notIncludes { :Check :c1 ?Any. }. }
271
+ => false.
272
+
212
273
  # ----------
213
274
  # ARC report
214
275
  # ----------
@@ -217,6 +278,14 @@
217
278
  :restaurantName ?RestaurantName;
218
279
  :reservationDate ?Date;
219
280
  :seating ?Seating.
281
+ :Check :c1 ?C1.
282
+ :Check :c2 ?C2.
283
+ :Check :c3 ?C3.
284
+ :Check :c4 ?C4.
285
+ :Check :c5 ?C5.
286
+ :Check :c6 ?C6.
287
+ :Check :c7 ?C7.
288
+ :Check :c8 ?C8.
220
289
  (
221
290
  "RESTdesc — Restaurant finder\n\n"
222
291
  "Answer\n"
@@ -228,14 +297,14 @@
228
297
  "The plan resolved the person's address, turned it into a map point, checked the local weather, selected a suitable restaurant, and then created a reservation. "
229
298
  "Because the weather came back mild and stable (22 C and 1016 mbar), the chosen seating stayed outdoors.\n\n"
230
299
  "Check\n"
231
- "C1 address resolved.\n"
232
- "C2 location found.\n"
233
- "C3 weather loaded.\n"
234
- "C4 outdoor dining justified.\n"
235
- "C5 reservable restaurant selected.\n"
236
- "C6 requested date preserved.\n"
237
- "C7 outdoor preference preserved.\n"
238
- "C8 original goal pattern satisfied.\n"
300
+ "C1 " ?C1 "\n"
301
+ "C2 " ?C2 "\n"
302
+ "C3 " ?C3 "\n"
303
+ "C4 " ?C4 "\n"
304
+ "C5 " ?C5 "\n"
305
+ "C6 " ?C6 "\n"
306
+ "C7 " ?C7 "\n"
307
+ "C8 " ?C8 "\n"
239
308
  ) string:concatenation ?Block. }
240
309
  =>
241
310
  { :Report log:outputString ?Block. }.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyeling",
3
- "version": "1.17.1",
3
+ "version": "1.17.2",
4
4
  "description": "A minimal Notation3 (N3) reasoner in JavaScript.",
5
5
  "main": "./index.js",
6
6
  "keywords": [