tpmkms 9.8.0 → 9.9.0

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 (95) hide show
  1. package/common/actions.instance.json +10 -8
  2. package/common/actions.js +13 -11
  3. package/common/angle.instance.json +25 -17
  4. package/common/animals.instance.json +54 -28
  5. package/common/askfor.instance.json +89 -192
  6. package/common/askfor.js +49 -12
  7. package/common/asking.js +13 -5
  8. package/common/avatar.js +3 -3
  9. package/common/can.instance.json +32 -20
  10. package/common/can.js +2 -2
  11. package/common/colors.instance.json +44 -16
  12. package/common/colors.js +1 -1
  13. package/common/comparable.instance.json +25 -22
  14. package/common/compass.instance.json +9 -3
  15. package/common/concept.instance.json +14 -6
  16. package/common/concept.js +2 -0
  17. package/common/conjunction.js +17 -9
  18. package/common/control.js +10 -18
  19. package/common/countable.js +4 -3
  20. package/common/crew.instance.json +95 -27
  21. package/common/dateTimeSelectors.instance.json +4 -4
  22. package/common/dateTimeSelectors.js +4 -7
  23. package/common/dates.instance.json +52 -28
  24. package/common/dates.js +16 -11
  25. package/common/debug.instance.json +48 -0
  26. package/common/debug.js +50 -0
  27. package/common/debug.test.json +1 -0
  28. package/common/dialogues.js +126 -70
  29. package/common/dimension.instance.json +239 -495
  30. package/common/dimension.js +51 -9
  31. package/common/drone.instance.json +395 -84
  32. package/common/drone.js +43 -50
  33. package/common/drone_v1.instance.json +36 -12
  34. package/common/drone_v1.js +14 -9
  35. package/common/edible.instance.json +96 -32
  36. package/common/emotions.instance.json +15 -1
  37. package/common/evaluate.js +10 -13
  38. package/common/fastfood.instance.json +282 -100
  39. package/common/fastfood.js +30 -15
  40. package/common/formulas.instance.json +162 -24
  41. package/common/formulas.js +18 -9
  42. package/common/gdefaults.js +20 -96
  43. package/common/helpers/concept.js +2 -9
  44. package/common/helpers/conjunction.js +11 -1
  45. package/common/helpers/dialogues.js +48 -24
  46. package/common/helpers/gdefaults.js +15 -5
  47. package/common/helpers/properties.js +125 -326
  48. package/common/helpers.js +28 -58
  49. package/common/hierarchy.js +71 -41
  50. package/common/kirk.instance.json +3 -1
  51. package/common/latin.instance.json +10 -10
  52. package/common/latin.js +5 -5
  53. package/common/length.instance.json +247 -61
  54. package/common/math.instance.json +144 -5
  55. package/common/math.js +18 -5
  56. package/common/menus.instance.json +29 -11
  57. package/common/menus.js +8 -5
  58. package/common/meta.js +14 -13
  59. package/common/nameable.js +9 -5
  60. package/common/numbers.instance.json +5 -3
  61. package/common/numbers.js +28 -28
  62. package/common/ordering.instance.json +53 -4
  63. package/common/ordinals.js +25 -25
  64. package/common/people.instance.json +66 -12
  65. package/common/percentages.js +4 -2
  66. package/common/pipboy.instance.json +89 -44
  67. package/common/pipboy.js +21 -14
  68. package/common/pokemon.instance.json +39 -13
  69. package/common/pressure.instance.json +14 -6
  70. package/common/properties.instance.json +2370 -511
  71. package/common/properties.js +496 -78
  72. package/common/punctuation.js +1 -0
  73. package/common/rates.instance.json +2 -2
  74. package/common/rates.js +3 -3
  75. package/common/reminders.instance.json +16 -0
  76. package/common/reminders.js +24 -20
  77. package/common/reports.instance.json +11 -12
  78. package/common/reports.js +12 -12
  79. package/common/scorekeeper.js +20 -10
  80. package/common/sdefaults.js +30 -9
  81. package/common/spock.instance.json +3 -1
  82. package/common/stm.js +16 -21
  83. package/common/temperature.instance.json +19 -11
  84. package/common/testing.js +2 -2
  85. package/common/time.instance.json +104 -47
  86. package/common/time.js +9 -8
  87. package/common/ui.instance.json +4 -2
  88. package/common/ui.js +5 -5
  89. package/common/weight.instance.json +86 -21
  90. package/common/weight.js +5 -1
  91. package/common/words.js +113 -2
  92. package/common/wp.instance.json +125 -18
  93. package/common/wp.js +6 -2
  94. package/main.js +2 -0
  95. package/package.json +7 -3
package/common/concept.js CHANGED
@@ -25,6 +25,7 @@ const config = {
25
25
  {
26
26
  id: "modifies",
27
27
  enhanced_associations: false,
28
+ where: where(),
28
29
  isA: ['verb'],
29
30
  words: [{ word: 'modifies', number: 'one', flatten: false }, { word: 'modify', number: 'many', flatten: true }],
30
31
  // bridge: "{ ...next(operator), modifiers: before, concept: after[0], flatten: true }"
@@ -150,6 +151,7 @@ const template = {
150
151
  bridges: [
151
152
  {
152
153
  id: 'isOpenCompound',
154
+ where: where(),
153
155
  isA: ['verb'],
154
156
  bridge: `{
155
157
  ...operator,
@@ -10,18 +10,24 @@ const config = {
10
10
  "(x [list|and] y)",
11
11
  ],
12
12
  bridges: [
13
- // context.instance == variables.instance (unification)
14
13
  {
15
14
  id: "list",
16
15
  level: 0,
17
16
  enhanced_associations: false,
18
17
  selector: {
19
18
  match: "same",
20
- left: [ { pattern: '($type && context.instance == variables.instance && context.dead == variables.dead && !@<=$contexts[1].notConjunctableWith)' } ],
21
- right: [ { pattern: '($type && context.instance == variables.instance && context.dead == variables.dead && !@<=$contexts[-1].notConjunctableWith)' } ],
19
+ left: [ { pattern: '($type && context.isInstance == variables.isInstance && context.dead == variables.dead && !@<=$contexts[1].notConjunctableWith)' } ],
20
+ right: [ { pattern: '($type && context.isInstance == variables.isInstance && context.dead == variables.dead && !@<=$contexts[-1].notConjunctableWith)' } ],
22
21
  passthrough: true
23
22
  },
24
- bridge: "{ ...next(operator), flattenInPlaceRemove: ['types', 'listable', 'isList', 'value'], flattenInPlace: [['value']], listable: true, isList: true, value: append(before, after) }"
23
+ bridge: `{
24
+ ...next(operator),
25
+ flattenInPlaceRemove: ['types', 'listable', 'isList', 'value'],
26
+ flattenInPlace: [['value']],
27
+ listable: true,
28
+ isList: true,
29
+ value: append(before, after)
30
+ }`
25
31
  },
26
32
  {
27
33
  id: "list",
@@ -29,15 +35,17 @@ const config = {
29
35
  enhanced_associations: false,
30
36
  selector: {
31
37
  match: "same",
32
- left: [ { pattern: '($type && context.instance == variables.instance && context.dead == variables.dead && contexts[0] !@<= contexts[-1].notConjunctableWith)' } ],
38
+ left: [ { pattern: '($type && context.isInstance == variables.isInstance && context.dead == variables.dead && contexts[0] !@<= contexts[-1].notConjunctableWith)' } ],
33
39
  passthrough: true
34
40
  },
35
41
  bridge: "{ ...operator, value: append(before, operator.value) }",
42
+ where: where(),
36
43
  semantic: {
37
44
  match: ({context, namespaced}) => !namespaced.get('conjunction', context, 'atomic'),
38
- apply: async ({context, flatten, s}) => {
45
+ apply: async ({context, flatten, e}) => {
39
46
  for (const value of flatten(context)) {
40
- await s(value)
47
+ value.topLevel = context.topLevel;
48
+ await e(value, where())
41
49
  }
42
50
  }
43
51
  }
@@ -47,11 +55,11 @@ const config = {
47
55
  {
48
56
  where: where(),
49
57
  notes: 'evaluate elements of the list individually',
50
- match: ({context, callId}) => context.marker == 'list' && context.evaluate,
58
+ match: ({context, callId}) => context.marker == 'list' && !context.topLevel,
51
59
  apply: async ({context, toArray, toList, e, resolveEvaluate}) => {
52
60
  const list = []
53
61
  for (const element of toArray(context)) {
54
- list.push(await e(element))
62
+ list.push(await e(element, where()))
55
63
  }
56
64
  resolveEvaluate(context, toList(list))
57
65
  }
package/common/control.js CHANGED
@@ -1,34 +1,26 @@
1
- const { knowledgeModule, where } = require('./runtime').theprogrammablemind
1
+ const { knowledgeModule, where, debug } = require('./runtime').theprogrammablemind
2
2
  const tests = require('./control.test.json')
3
3
 
4
4
  function initializer({config}) {
5
5
  config.addArgs((args) => ({
6
- callOnce: (args, condition) => {
7
- if (condition(args)) {
6
+ callOnce: async (args, tag, condition) => {
7
+ if (args.context.control?.seen[tag]) {
8
+ return false
9
+ }
10
+ if (await condition(args)) {
8
11
  const { context } = args
9
12
 
10
13
  if (!context.control) {
11
14
  context.control = {
12
- seen: [],
13
- nextId: 2,
15
+ seen: {},
14
16
  }
15
- context.control_id = 1
16
- }
17
-
18
- if (!context.control_id) {
19
- context.control_id = context.control.nextId
20
- context.control.nextId += 1
21
17
  }
18
+ context.control.seen[tag] = true
22
19
 
23
- if (context.control.seen.includes(context.control_id)) {
24
- return false
25
- }
26
-
27
- context.control.seen.push(context.control_id)
28
20
  args._finally( () => {
29
- const index = context.control.seen.find((value) => context.control_id)
30
- context.control.seen.splice(index, 1)
21
+ delete context.control.seen[tag]
31
22
  })
23
+
32
24
  return true
33
25
  }
34
26
  return false
@@ -34,7 +34,7 @@ const config = {
34
34
  modifiers: append(['quantity'], after[0].modifiers),
35
35
  quantity: before[0],
36
36
  number: default(before[0].number, before[0].value),
37
- instance: true
37
+ isInstance: true
38
38
  }`
39
39
  },
40
40
  {
@@ -47,7 +47,7 @@ const config = {
47
47
  modifiers: append(['count'], after[0].modifiers),
48
48
  count: before[0],
49
49
  word: after.word,
50
- instance: true }`
50
+ isInstance: true }`
51
51
  },
52
52
  {
53
53
  id: "countingPieces",
@@ -58,7 +58,7 @@ const config = {
58
58
  interpolate: [ { property: 'pieces' }, { property: 'countingPiecesOperator' }],
59
59
  modifiers: append(['pieces'], after[0].modifiers),
60
60
  pieces: before[0],
61
- instance: true
61
+ isInstance: true
62
62
  }`
63
63
  },
64
64
  {
@@ -98,6 +98,7 @@ const config = {
98
98
  },
99
99
  {
100
100
  id: "all",
101
+ where: where(),
101
102
  generatorp: ({context}) => 'all',
102
103
  bridge: "{ ...next(operator), number: 'many', quantity: 'all' }"
103
104
  },
@@ -131,7 +131,6 @@
131
131
  "level": 1,
132
132
  "context_index": 1,
133
133
  "topLevel": true,
134
- "context_id": 2,
135
134
  "touchedBy": [
136
135
  "crew#call2"
137
136
  ]
@@ -277,6 +276,9 @@
277
276
  }
278
277
  ],
279
278
  "learned_contextual_priorities": [],
279
+ "explain_associations_details": [
280
+ null
281
+ ],
280
282
  "query": "crew modifies member",
281
283
  "key": {
282
284
  "query": "crew modifies member"
@@ -505,7 +507,6 @@
505
507
  "level": 2,
506
508
  "context_index": 1,
507
509
  "topLevel": true,
508
- "context_id": 2,
509
510
  "touchedBy": [
510
511
  "crew#call2"
511
512
  ]
@@ -861,6 +862,9 @@
861
862
  }
862
863
  ],
863
864
  "learned_contextual_priorities": [],
865
+ "explain_associations_details": [
866
+ null
867
+ ],
864
868
  "query": "kirk's name is jim",
865
869
  "key": {
866
870
  "query": "kirk's name is jim"
@@ -1089,7 +1093,6 @@
1089
1093
  "level": 2,
1090
1094
  "context_index": 1,
1091
1095
  "topLevel": true,
1092
- "context_id": 2,
1093
1096
  "touchedBy": [
1094
1097
  "crew#call2"
1095
1098
  ]
@@ -1445,6 +1448,9 @@
1445
1448
  }
1446
1449
  ],
1447
1450
  "learned_contextual_priorities": [],
1451
+ "explain_associations_details": [
1452
+ null
1453
+ ],
1448
1454
  "query": "kirk's rank is captain",
1449
1455
  "key": {
1450
1456
  "query": "kirk's rank is captain"
@@ -1677,7 +1683,6 @@
1677
1683
  "level": 2,
1678
1684
  "context_index": 1,
1679
1685
  "topLevel": true,
1680
- "context_id": 2,
1681
1686
  "touchedBy": [
1682
1687
  "crew#call2"
1683
1688
  ]
@@ -2033,6 +2038,9 @@
2033
2038
  }
2034
2039
  ],
2035
2040
  "learned_contextual_priorities": [],
2041
+ "explain_associations_details": [
2042
+ null
2043
+ ],
2036
2044
  "query": "kirk's eyes are blue",
2037
2045
  "key": {
2038
2046
  "query": "kirk's eyes are blue"
@@ -2197,7 +2205,6 @@
2197
2205
  "level": 2,
2198
2206
  "context_index": 1,
2199
2207
  "topLevel": true,
2200
- "context_id": 2,
2201
2208
  "touchedBy": [
2202
2209
  "crew#call2"
2203
2210
  ]
@@ -2423,6 +2430,9 @@
2423
2430
  }
2424
2431
  ],
2425
2432
  "learned_contextual_priorities": [],
2433
+ "explain_associations_details": [
2434
+ null
2435
+ ],
2426
2436
  "query": "kirk is a captain",
2427
2437
  "key": {
2428
2438
  "query": "kirk is a captain"
@@ -2623,7 +2633,6 @@
2623
2633
  "level": 2,
2624
2634
  "context_index": 1,
2625
2635
  "topLevel": true,
2626
- "context_id": 2,
2627
2636
  "touchedBy": [
2628
2637
  "crew#call2"
2629
2638
  ]
@@ -2869,6 +2878,9 @@
2869
2878
  }
2870
2879
  ],
2871
2880
  "learned_contextual_priorities": [],
2881
+ "explain_associations_details": [
2882
+ null
2883
+ ],
2872
2884
  "query": "kirk is a crew member",
2873
2885
  "key": {
2874
2886
  "query": "kirk is a crew member"
@@ -3099,7 +3111,6 @@
3099
3111
  "level": 2,
3100
3112
  "context_index": 1,
3101
3113
  "topLevel": true,
3102
- "context_id": 2,
3103
3114
  "touchedBy": [
3104
3115
  "crew#call2"
3105
3116
  ]
@@ -3455,6 +3466,9 @@
3455
3466
  }
3456
3467
  ],
3457
3468
  "learned_contextual_priorities": [],
3469
+ "explain_associations_details": [
3470
+ null
3471
+ ],
3458
3472
  "query": "spock's rank is second",
3459
3473
  "key": {
3460
3474
  "query": "spock's rank is second"
@@ -3684,7 +3698,6 @@
3684
3698
  "level": 2,
3685
3699
  "context_index": 1,
3686
3700
  "topLevel": true,
3687
- "context_id": 2,
3688
3701
  "touchedBy": [
3689
3702
  "crew#call2"
3690
3703
  ]
@@ -4040,6 +4053,9 @@
4040
4053
  }
4041
4054
  ],
4042
4055
  "learned_contextual_priorities": [],
4056
+ "explain_associations_details": [
4057
+ null
4058
+ ],
4043
4059
  "query": "spock's name is spock",
4044
4060
  "key": {
4045
4061
  "query": "spock's name is spock"
@@ -4269,7 +4285,6 @@
4269
4285
  "level": 2,
4270
4286
  "context_index": 1,
4271
4287
  "topLevel": true,
4272
- "context_id": 2,
4273
4288
  "touchedBy": [
4274
4289
  "crew#call2"
4275
4290
  ]
@@ -4625,6 +4640,9 @@
4625
4640
  }
4626
4641
  ],
4627
4642
  "learned_contextual_priorities": [],
4643
+ "explain_associations_details": [
4644
+ null
4645
+ ],
4628
4646
  "query": "spock's eyes are brown",
4629
4647
  "key": {
4630
4648
  "query": "spock's eyes are brown"
@@ -4789,7 +4807,6 @@
4789
4807
  "level": 2,
4790
4808
  "context_index": 1,
4791
4809
  "topLevel": true,
4792
- "context_id": 2,
4793
4810
  "touchedBy": [
4794
4811
  "crew#call2"
4795
4812
  ]
@@ -5015,6 +5032,9 @@
5015
5032
  }
5016
5033
  ],
5017
5034
  "learned_contextual_priorities": [],
5035
+ "explain_associations_details": [
5036
+ null
5037
+ ],
5018
5038
  "query": "spock is a doctor",
5019
5039
  "key": {
5020
5040
  "query": "spock is a doctor"
@@ -5215,7 +5235,6 @@
5215
5235
  "level": 2,
5216
5236
  "context_index": 1,
5217
5237
  "topLevel": true,
5218
- "context_id": 2,
5219
5238
  "touchedBy": [
5220
5239
  "crew#call2"
5221
5240
  ]
@@ -5461,6 +5480,9 @@
5461
5480
  }
5462
5481
  ],
5463
5482
  "learned_contextual_priorities": [],
5483
+ "explain_associations_details": [
5484
+ null
5485
+ ],
5464
5486
  "query": "spock is a crew member",
5465
5487
  "key": {
5466
5488
  "query": "spock is a crew member"
@@ -5692,7 +5714,6 @@
5692
5714
  "level": 2,
5693
5715
  "context_index": 1,
5694
5716
  "topLevel": true,
5695
- "context_id": 2,
5696
5717
  "touchedBy": [
5697
5718
  "crew#call2"
5698
5719
  ]
@@ -6048,6 +6069,9 @@
6048
6069
  }
6049
6070
  ],
6050
6071
  "learned_contextual_priorities": [],
6072
+ "explain_associations_details": [
6073
+ null
6074
+ ],
6051
6075
  "query": "mccoy's rank is doctor",
6052
6076
  "key": {
6053
6077
  "query": "mccoy's rank is doctor"
@@ -6277,7 +6301,6 @@
6277
6301
  "level": 2,
6278
6302
  "context_index": 1,
6279
6303
  "topLevel": true,
6280
- "context_id": 2,
6281
6304
  "touchedBy": [
6282
6305
  "crew#call2"
6283
6306
  ]
@@ -6633,6 +6656,9 @@
6633
6656
  }
6634
6657
  ],
6635
6658
  "learned_contextual_priorities": [],
6659
+ "explain_associations_details": [
6660
+ null
6661
+ ],
6636
6662
  "query": "mccoy's name is mccoy",
6637
6663
  "key": {
6638
6664
  "query": "mccoy's name is mccoy"
@@ -6862,7 +6888,6 @@
6862
6888
  "level": 2,
6863
6889
  "context_index": 1,
6864
6890
  "topLevel": true,
6865
- "context_id": 2,
6866
6891
  "touchedBy": [
6867
6892
  "crew#call2"
6868
6893
  ]
@@ -7218,6 +7243,9 @@
7218
7243
  }
7219
7244
  ],
7220
7245
  "learned_contextual_priorities": [],
7246
+ "explain_associations_details": [
7247
+ null
7248
+ ],
7221
7249
  "query": "mccoy's eyes are brown",
7222
7250
  "key": {
7223
7251
  "query": "mccoy's eyes are brown"
@@ -7418,7 +7446,6 @@
7418
7446
  "level": 2,
7419
7447
  "context_index": 1,
7420
7448
  "topLevel": true,
7421
- "context_id": 2,
7422
7449
  "touchedBy": [
7423
7450
  "crew#call2"
7424
7451
  ]
@@ -7664,6 +7691,9 @@
7664
7691
  }
7665
7692
  ],
7666
7693
  "learned_contextual_priorities": [],
7694
+ "explain_associations_details": [
7695
+ null
7696
+ ],
7667
7697
  "query": "mccoy is a crew member",
7668
7698
  "key": {
7669
7699
  "query": "mccoy is a crew member"
@@ -7827,7 +7857,6 @@
7827
7857
  "level": 2,
7828
7858
  "context_index": 1,
7829
7859
  "topLevel": true,
7830
- "context_id": 2,
7831
7860
  "touchedBy": [
7832
7861
  "crew#call2"
7833
7862
  ]
@@ -8053,6 +8082,9 @@
8053
8082
  }
8054
8083
  ],
8055
8084
  "learned_contextual_priorities": [],
8085
+ "explain_associations_details": [
8086
+ null
8087
+ ],
8056
8088
  "query": "mccoy is a doctor",
8057
8089
  "key": {
8058
8090
  "query": "mccoy is a doctor"
@@ -8421,7 +8453,7 @@
8421
8453
  "level": 0
8422
8454
  },
8423
8455
  {
8424
- "value": "phasers",
8456
+ "value": "phaser",
8425
8457
  "unknown": true,
8426
8458
  "text": "the phasers",
8427
8459
  "marker": "object",
@@ -8511,7 +8543,6 @@
8511
8543
  "level": 2,
8512
8544
  "context_index": 1,
8513
8545
  "topLevel": true,
8514
- "context_id": 2,
8515
8546
  "touchedBy": [
8516
8547
  "crew#call2"
8517
8548
  ]
@@ -9067,6 +9098,9 @@
9067
9098
  }
9068
9099
  ],
9069
9100
  "learned_contextual_priorities": [],
9101
+ "explain_associations_details": [
9102
+ null
9103
+ ],
9070
9104
  "query": "the status of the phasers is armed",
9071
9105
  "key": {
9072
9106
  "query": "the status of the phasers is armed"
@@ -9172,7 +9206,6 @@
9172
9206
  "level": 1,
9173
9207
  "context_index": 1,
9174
9208
  "topLevel": true,
9175
- "context_id": 2,
9176
9209
  "touchedBy": [
9177
9210
  "crew#call2"
9178
9211
  ]
@@ -9318,6 +9351,9 @@
9318
9351
  }
9319
9352
  ],
9320
9353
  "learned_contextual_priorities": [],
9354
+ "explain_associations_details": [
9355
+ null
9356
+ ],
9321
9357
  "query": "photon modifies torpedoes",
9322
9358
  "key": {
9323
9359
  "query": "photon modifies torpedoes"
@@ -9838,7 +9874,6 @@
9838
9874
  "level": 2,
9839
9875
  "context_index": 1,
9840
9876
  "topLevel": true,
9841
- "context_id": 2,
9842
9877
  "touchedBy": [
9843
9878
  "crew#call2"
9844
9879
  ]
@@ -10424,6 +10459,9 @@
10424
10459
  }
10425
10460
  ],
10426
10461
  "learned_contextual_priorities": [],
10462
+ "explain_associations_details": [
10463
+ null
10464
+ ],
10427
10465
  "query": "the status of the photon torpedoes is armed",
10428
10466
  "key": {
10429
10467
  "query": "the status of the photon torpedoes is armed"
@@ -10546,7 +10584,6 @@
10546
10584
  "level": 2,
10547
10585
  "context_index": 1,
10548
10586
  "topLevel": true,
10549
- "context_id": 2,
10550
10587
  "touchedBy": [
10551
10588
  "crew#call2"
10552
10589
  ]
@@ -10707,6 +10744,9 @@
10707
10744
  }
10708
10745
  ],
10709
10746
  "learned_contextual_priorities": [],
10747
+ "explain_associations_details": [
10748
+ null
10749
+ ],
10710
10750
  "query": "phasers are weapons",
10711
10751
  "key": {
10712
10752
  "query": "phasers are weapons"
@@ -10829,7 +10869,6 @@
10829
10869
  "level": 2,
10830
10870
  "context_index": 1,
10831
10871
  "topLevel": true,
10832
- "context_id": 2,
10833
10872
  "touchedBy": [
10834
10873
  "crew#call2"
10835
10874
  ]
@@ -10990,6 +11029,9 @@
10990
11029
  }
10991
11030
  ],
10992
11031
  "learned_contextual_priorities": [],
11032
+ "explain_associations_details": [
11033
+ null
11034
+ ],
10993
11035
  "query": "torpedoes are weapons",
10994
11036
  "key": {
10995
11037
  "query": "torpedoes are weapons"
@@ -11090,7 +11132,6 @@
11090
11132
  "level": 2,
11091
11133
  "context_index": 1,
11092
11134
  "topLevel": true,
11093
- "context_id": 2,
11094
11135
  "touchedBy": [
11095
11136
  "crew#call2"
11096
11137
  ]
@@ -11216,6 +11257,9 @@
11216
11257
  }
11217
11258
  ],
11218
11259
  "learned_contextual_priorities": [],
11260
+ "explain_associations_details": [
11261
+ null
11262
+ ],
11219
11263
  "query": "kirk is readonly",
11220
11264
  "key": {
11221
11265
  "query": "kirk is readonly"
@@ -11316,7 +11360,6 @@
11316
11360
  "level": 2,
11317
11361
  "context_index": 1,
11318
11362
  "topLevel": true,
11319
- "context_id": 2,
11320
11363
  "touchedBy": [
11321
11364
  "crew#call2"
11322
11365
  ]
@@ -11442,6 +11485,9 @@
11442
11485
  }
11443
11486
  ],
11444
11487
  "learned_contextual_priorities": [],
11488
+ "explain_associations_details": [
11489
+ null
11490
+ ],
11445
11491
  "query": "spock is readonly",
11446
11492
  "key": {
11447
11493
  "query": "spock is readonly"
@@ -11542,7 +11588,6 @@
11542
11588
  "level": 2,
11543
11589
  "context_index": 1,
11544
11590
  "topLevel": true,
11545
- "context_id": 2,
11546
11591
  "touchedBy": [
11547
11592
  "crew#call2"
11548
11593
  ]
@@ -11668,6 +11713,9 @@
11668
11713
  }
11669
11714
  ],
11670
11715
  "learned_contextual_priorities": [],
11716
+ "explain_associations_details": [
11717
+ null
11718
+ ],
11671
11719
  "query": "mccoy is readonly",
11672
11720
  "key": {
11673
11721
  "query": "mccoy is readonly"
@@ -12159,6 +12207,14 @@
12159
12207
  ],
12160
12208
  "level": 0
12161
12209
  },
12210
+ "relationBacked": false,
12211
+ "orderingArgs": {},
12212
+ "relationArgs": [
12213
+ {
12214
+ "tag": "weapon",
12215
+ "id": "weapon"
12216
+ }
12217
+ ],
12162
12218
  "operator": {
12163
12219
  "value": "arm",
12164
12220
  "isVerb": true,
@@ -12429,7 +12485,6 @@
12429
12485
  "level": 1,
12430
12486
  "context_index": 1,
12431
12487
  "topLevel": true,
12432
- "context_id": 2,
12433
12488
  "metaInfo": "The mapping from from the expression being defined \"arm the weapon\" to the definition phrase \"the status of the weapon is armed\" is [{\"from\":[\"weapon\"],\"to\":[\"one\",\"objects\",\"1\"]},{\"from\":[\"number\"],\"to\":[\"number\"]}]",
12434
12489
  "touchedBy": [
12435
12490
  "crew#call2"
@@ -13561,6 +13616,9 @@
13561
13616
  }
13562
13617
  ],
13563
13618
  "learned_contextual_priorities": [],
13619
+ "explain_associations_details": [
13620
+ null
13621
+ ],
13564
13622
  "query": "arm the weapon means the status of the weapon is armed",
13565
13623
  "key": {
13566
13624
  "query": "arm the weapon means the status of the weapon is armed"
@@ -14109,6 +14167,14 @@
14109
14167
  ],
14110
14168
  "level": 0
14111
14169
  },
14170
+ "relationBacked": false,
14171
+ "orderingArgs": {},
14172
+ "relationArgs": [
14173
+ {
14174
+ "tag": "weapon",
14175
+ "id": "weapon"
14176
+ }
14177
+ ],
14112
14178
  "operator": {
14113
14179
  "value": "disarm",
14114
14180
  "isVerb": true,
@@ -14395,7 +14461,6 @@
14395
14461
  "level": 1,
14396
14462
  "context_index": 1,
14397
14463
  "topLevel": true,
14398
- "context_id": 2,
14399
14464
  "metaInfo": "The mapping from from the expression being defined \"disarm the weapon\" to the definition phrase \"the status of the weapon is not armed\" is [{\"from\":[\"weapon\"],\"to\":[\"one\",\"objects\",\"1\"]},{\"from\":[\"number\"],\"to\":[\"number\"]}]",
14400
14465
  "touchedBy": [
14401
14466
  "crew#call2"
@@ -15692,6 +15757,9 @@
15692
15757
  }
15693
15758
  ],
15694
15759
  "learned_contextual_priorities": [],
15760
+ "explain_associations_details": [
15761
+ null
15762
+ ],
15695
15763
  "query": "disarm the weapon means the status of the weapon is not armed",
15696
15764
  "key": {
15697
15765
  "query": "disarm the weapon means the status of the weapon is not armed"
@@ -67,15 +67,15 @@
67
67
  ],
68
68
  "semantics": [
69
69
  {
70
- "match": "({context, isA}) => context.evaluate && onOrIs('dayAfterDate', context)",
71
- "apply": "async ({context, isProcess, isTest, kms, isA, e}) => {\n try {\n const now = kms.time.api.now()\n const date = afterOrIs('dayAfterDate', context)\n const afterISO = (await e(date.after)).evalue\n const day_ordinal = date.day.day_ordinal\n const ordinal = date.day.ordinal.value\n context.evalue = dateTimeSelectors_helpers.getNthWeekdayAfterDate(afterISO, day_ordinal, ordinal)\n } catch ( e ) {\n context.evalue = `Implement instatiate for this type of date, ${context.marker}. See the dateTimeSelectors KM ${where()}. ${e}`\n }\n }"
70
+ "match": "({context, isA}) => onOrIs('dayAfterDate', context)",
71
+ "apply": "async ({context, isProcess, isTest, kms, isA, e}) => {\n try {\n const now = kms.time.api.now()\n const date = afterOrIs('dayAfterDate', context)\n const afterISO = (await e(date.after, where())).evalue\n const day_ordinal = date.day.day_ordinal\n const ordinal = date.day.ordinal.value\n context.evalue = dateTimeSelectors_helpers.getNthWeekdayAfterDate(afterISO, day_ordinal, ordinal)\n } catch ( e ) {\n context.evalue = `Implement instatiate for this type of date, ${context.marker}. See the dateTimeSelectors KM ${where()}. ${e}`\n }\n }"
72
72
  },
73
73
  {
74
- "match": "({context, isA}) => context.evaluate && onOrIs('dayOfMonth', context)",
74
+ "match": "({context, isA}) => onOrIs('dayOfMonth', context)",
75
75
  "apply": "({context, isProcess, isTest, kms, isA}) => {\n try {\n const now = kms.time.api.now()\n const date = onOrIs('dayOfMonth', context)\n context.evalue = dateTimeSelectors_helpers.getNthDayOfMonth(removeDatesSuffix(date.day.value), date.day.ordinal.value || 1, removeDatesSuffix(date.month.value), now)\n } catch ( e ) {\n context.evalue = `Implement instatiate for this type of date, ${context.marker}. See the dateTimeSelectors KM ${where()}. ${e}`\n }\n }"
76
76
  },
77
77
  {
78
- "match": "({context, isA}) => {\n if (!context.evaluate) {\n return false\n }\n if (isA(context.marker, 'onDateValue_dates')) {\n return true\n }\n if (isA(context.marker, 'dateTimeSelector')) {\n return true\n }\n }",
78
+ "match": "({context, isA}) => {\n if (isA(context.marker, 'onDateValue_dates')) {\n return true\n }\n if (isA(context.marker, 'dateTimeSelector')) {\n return true\n }\n }",
79
79
  "apply": "({context, isProcess, isTest, kms, isA}) => {\n context.evalue = instantiate(kms, isA, isProcess || isTest || context.isTest, context)\n }"
80
80
  }
81
81
  ],