occam-verify-cli 1.0.387 → 1.0.396

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 (119) hide show
  1. package/lib/action/verify.js +3 -3
  2. package/lib/context/file.js +8 -7
  3. package/lib/context/local.js +23 -57
  4. package/lib/context/temporary.js +705 -0
  5. package/lib/mixins/statement/verify.js +38 -16
  6. package/lib/mixins/step/unify.js +3 -3
  7. package/lib/node/substitution/frame.js +23 -1
  8. package/lib/node/substitution/term.js +23 -1
  9. package/lib/ontology/assertion/contained.js +77 -35
  10. package/lib/ontology/assertion/defined.js +76 -34
  11. package/lib/ontology/assertion/property.js +71 -29
  12. package/lib/ontology/assertion/satisfies.js +70 -22
  13. package/lib/ontology/assertion/subproof.js +95 -41
  14. package/lib/ontology/assertion/type.js +74 -18
  15. package/lib/ontology/assertion.js +66 -0
  16. package/lib/ontology/axiom.js +8 -11
  17. package/lib/ontology/combinator/bracketed.js +17 -3
  18. package/lib/ontology/combinator.js +17 -3
  19. package/lib/ontology/conclusion.js +38 -9
  20. package/lib/ontology/constructor/bracketed.js +17 -3
  21. package/lib/ontology/constructor.js +17 -3
  22. package/lib/ontology/declaration.js +27 -2
  23. package/lib/ontology/deduction.js +38 -9
  24. package/lib/ontology/frame.js +50 -13
  25. package/lib/ontology/hypothesis.js +11 -11
  26. package/lib/ontology/judgement.js +1 -1
  27. package/lib/ontology/label.js +5 -6
  28. package/lib/ontology/metavariable.js +11 -12
  29. package/lib/ontology/premise.js +47 -17
  30. package/lib/ontology/procedureCall.js +15 -15
  31. package/lib/ontology/procedureReference.js +1 -1
  32. package/lib/ontology/proof.js +2 -2
  33. package/lib/ontology/reference.js +4 -5
  34. package/lib/ontology/rule.js +68 -69
  35. package/lib/ontology/section.js +2 -2
  36. package/lib/ontology/signature.js +2 -2
  37. package/lib/ontology/statement.js +9 -1
  38. package/lib/ontology/step.js +37 -24
  39. package/lib/ontology/subproof.js +11 -11
  40. package/lib/ontology/substitution/frame.js +69 -21
  41. package/lib/ontology/substitution/reference.js +24 -9
  42. package/lib/ontology/substitution/statement.js +99 -79
  43. package/lib/ontology/substitution/term.js +89 -29
  44. package/lib/ontology/substitution.js +37 -30
  45. package/lib/ontology/supposition.js +56 -25
  46. package/lib/ontology/term.js +4 -3
  47. package/lib/ontology/topLevelAssertion.js +15 -15
  48. package/lib/ontology/topLevelMetaAssertion.js +2 -2
  49. package/lib/ontology/variable.js +42 -14
  50. package/lib/substitutions.js +25 -25
  51. package/lib/unifier/intrinsicLevel.js +14 -7
  52. package/lib/unifier/metaLevel.js +25 -17
  53. package/lib/utilities/brackets.js +4 -21
  54. package/lib/utilities/context.js +6 -6
  55. package/lib/utilities/json.js +24 -1
  56. package/lib/utilities/metavariable.js +18 -0
  57. package/lib/utilities/substitutions.js +3 -3
  58. package/lib/utilities/unification.js +10 -16
  59. package/lib/utilities/variable.js +30 -0
  60. package/package.json +2 -2
  61. package/src/action/verify.js +2 -2
  62. package/src/context/file.js +8 -7
  63. package/src/context/local.js +13 -61
  64. package/src/context/temporary.js +394 -0
  65. package/src/mixins/statement/verify.js +60 -23
  66. package/src/mixins/step/unify.js +2 -2
  67. package/src/node/substitution/frame.js +26 -0
  68. package/src/node/substitution/term.js +26 -0
  69. package/src/ontology/assertion/contained.js +12 -23
  70. package/src/ontology/assertion/defined.js +12 -23
  71. package/src/ontology/assertion/property.js +7 -20
  72. package/src/ontology/assertion/satisfies.js +7 -16
  73. package/src/ontology/assertion/subproof.js +36 -42
  74. package/src/ontology/assertion/type.js +10 -11
  75. package/src/ontology/assertion.js +23 -0
  76. package/src/ontology/axiom.js +7 -16
  77. package/src/ontology/combinator/bracketed.js +2 -0
  78. package/src/ontology/combinator.js +2 -0
  79. package/src/ontology/conclusion.js +51 -10
  80. package/src/ontology/constructor/bracketed.js +2 -0
  81. package/src/ontology/constructor.js +2 -0
  82. package/src/ontology/declaration.js +34 -1
  83. package/src/ontology/deduction.js +51 -10
  84. package/src/ontology/frame.js +58 -21
  85. package/src/ontology/hypothesis.js +8 -8
  86. package/src/ontology/judgement.js +1 -1
  87. package/src/ontology/label.js +2 -7
  88. package/src/ontology/metavariable.js +12 -15
  89. package/src/ontology/premise.js +64 -21
  90. package/src/ontology/procedureCall.js +14 -14
  91. package/src/ontology/procedureReference.js +2 -2
  92. package/src/ontology/proof.js +1 -1
  93. package/src/ontology/reference.js +1 -6
  94. package/src/ontology/rule.js +76 -80
  95. package/src/ontology/section.js +1 -1
  96. package/src/ontology/signature.js +1 -1
  97. package/src/ontology/statement.js +6 -0
  98. package/src/ontology/step.js +43 -26
  99. package/src/ontology/subproof.js +8 -8
  100. package/src/ontology/substitution/frame.js +72 -26
  101. package/src/ontology/substitution/reference.js +8 -6
  102. package/src/ontology/substitution/statement.js +93 -77
  103. package/src/ontology/substitution/term.js +108 -42
  104. package/src/ontology/substitution.js +27 -22
  105. package/src/ontology/supposition.js +70 -24
  106. package/src/ontology/term.js +5 -5
  107. package/src/ontology/topLevelAssertion.js +14 -16
  108. package/src/ontology/topLevelMetaAssertion.js +1 -1
  109. package/src/ontology/variable.js +64 -17
  110. package/src/substitutions.js +25 -25
  111. package/src/unifier/intrinsicLevel.js +18 -8
  112. package/src/unifier/metaLevel.js +35 -21
  113. package/src/utilities/brackets.js +3 -29
  114. package/src/utilities/context.js +5 -5
  115. package/src/utilities/json.js +28 -0
  116. package/src/utilities/metavariable.js +13 -0
  117. package/src/utilities/substitutions.js +2 -4
  118. package/src/utilities/unification.js +8 -24
  119. package/src/utilities/variable.js +22 -0
@@ -496,16 +496,17 @@ export default class FileContext {
496
496
  return axiomLemmaTheoremOrConjecture;
497
497
  }
498
498
 
499
- findMetavariable(metavariable, generalContext, specificContext) {
500
- const specificMetavariable = metavariable, ///
501
- metavariables = this.getMetavariables();
499
+ findMetavariable(metavariable) {
500
+ const metavariables = this.getMetavariables(),
501
+ specificMetavariable = metavariable; ///
502
502
 
503
503
  metavariable = metavariables.find((metavariable) => {
504
504
  const generalMetavariable = metavariable; ///
505
505
 
506
506
  metavariable = specificMetavariable; ///
507
507
 
508
- const metavariableUnifies = generalMetavariable.unifyMetavariable(metavariable, generalContext, specificContext);
508
+ const context = this, ///
509
+ metavariableUnifies = generalMetavariable.unifyMetavariable(metavariable, context);
509
510
 
510
511
  if (metavariableUnifies) {
511
512
  return true;
@@ -627,7 +628,7 @@ export default class FileContext {
627
628
  findLabelByMetavariable(metavariable) {
628
629
  const labels = this.getLabels(),
629
630
  label = labels.find((label) => {
630
- const metavariableEqualToLabelMetavariable = label.isMetavariableEqualTo(metavariable);
631
+ const metavariableEqualToLabelMetavariable = label.isMetavariableEqualToMetavariable(metavariable);
631
632
 
632
633
  if (metavariableEqualToLabelMetavariable) {
633
634
  return true;
@@ -668,8 +669,8 @@ export default class FileContext {
668
669
  return metavariable;
669
670
  }
670
671
 
671
- isMetavariablePresent(metavariable, generalContext, specificContext) {
672
- metavariable = this.findMetavariable(metavariable, generalContext, specificContext); ///
672
+ isMetavariablePresent(metavariable) {
673
+ metavariable = this.findMetavariable(metavariable);
673
674
 
674
675
  const metavariablePresent = (metavariable !== null);
675
676
 
@@ -8,9 +8,8 @@ import Equivalences from "../equivalences";
8
8
  const { last } = arrayUtilities;
9
9
 
10
10
  class LocalContext {
11
- constructor(context, tokens, variables, judgements, equivalences, stepsOrSubproofs) {
11
+ constructor(context, variables, judgements, equivalences, stepsOrSubproofs) {
12
12
  this.context = context;
13
- this.tokens = tokens;
14
13
  this.variables = variables;
15
14
  this.judgements = judgements;
16
15
  this.equivalences = equivalences;
@@ -21,10 +20,6 @@ class LocalContext {
21
20
  return this.context;
22
21
  }
23
22
 
24
- getTokens() {
25
- return this.tokens;
26
- }
27
-
28
23
  getVariables(nested = true) {
29
24
  let variables;
30
25
 
@@ -155,10 +150,6 @@ class LocalContext {
155
150
  return variableAdded;
156
151
  }
157
152
 
158
- addStepOrSubproof(stepOrSubproof) {
159
- this.stepsOrSubproofs.push(stepOrSubproof);
160
- }
161
-
162
153
  addJudgement(judgement) {
163
154
  let judgementAdded = false;
164
155
 
@@ -174,6 +165,10 @@ class LocalContext {
174
165
  return judgementAdded;
175
166
  }
176
167
 
168
+ addStepOrSubproof(stepOrSubproof) {
169
+ this.stepsOrSubproofs.push(stepOrSubproof);
170
+ }
171
+
177
172
  findProcedureByName(name) { return this.context.findProcedureByName(name); }
178
173
 
179
174
  findLabelByReference(reference, context) { return this.context.findLabelByReference(reference, context); }
@@ -229,7 +224,7 @@ class LocalContext {
229
224
 
230
225
  findEquivalenceByTerm(term) { return this.equivalences.findEquivalenceByTerm(term); }
231
226
 
232
- findMetavariable(metavariable, generalContext, specificContext) { return this.context.findMetavariable(metavariable, generalContext, specificContext); }
227
+ findMetavariable(metavariable) { return this.context.findMetavariable(metavariable); }
233
228
 
234
229
  findLabelByMetavariable(metavariable) { return this.context.findLabelByMetavariable(metavariable); }
235
230
 
@@ -249,7 +244,7 @@ class LocalContext {
249
244
 
250
245
  findAxiomLemmaTheoremOrConjectureByReference(reference) { return this.context.findAxiomLemmaTheoremOrConjectureByReference(reference); }
251
246
 
252
- isMetavariablePresent(metavariable, generalContext, specificContext) { return this.context.isMetavariablePresent(metavariable, generalContext, specificContext); }
247
+ isMetavariablePresent(metavariable) { return this.context.isMetavariablePresent(metavariable); }
253
248
 
254
249
  isTypePresentByTypeName(typeName, includeRelease = true, includeDependencies = true) { return this.context.isTypePresentByTypeName(typeName, includeRelease, includeDependencies); }
255
250
 
@@ -341,45 +336,13 @@ class LocalContext {
341
336
  return termAndPropertyRelationMatches;
342
337
  }
343
338
 
344
- nodeAsString(node, tokens = null) {
345
- if (tokens === null) {
346
- tokens = this.tokens;
347
- }
348
-
349
- const string = this.context.nodeAsString(node, tokens);
350
-
351
- return string;
352
- }
339
+ nodeAsString(node, tokens) { return this.context.nodeAsString(node, tokens); }
353
340
 
354
- nodesAsString(node, tokens = null) {
355
- if (tokens === null) {
356
- tokens = this.tokens;
357
- }
341
+ nodesAsString(node, tokens) { return this.context.nodesAsString(node, tokens); }
358
342
 
359
- const string = this.context.nodesAsString(node, tokens);
343
+ nodeAsTokens(node, tokens) { return this.context.nodeAsTokens(node, tokens); }
360
344
 
361
- return string;
362
- }
363
-
364
- nodeAsTokens(node, tokens = null) {
365
- if (tokens === null) {
366
- tokens = this.tokens;
367
- }
368
-
369
- tokens = this.context.nodeAsTokens(node, tokens); ///
370
-
371
- return tokens;
372
- }
373
-
374
- nodesAsTokens(node, tokens = null) {
375
- if (tokens === null) {
376
- tokens = this.tokens;
377
- }
378
-
379
- tokens = this.context.nodesAsTokens(node, tokens); ///
380
-
381
- return tokens;
382
- }
345
+ nodesAsTokens(node, tokens) { return this.context.nodesAsTokens(node, tokens); }
383
346
 
384
347
  tokensAsString(tokens) { return this.context.tokensAsString(tokens); }
385
348
 
@@ -393,23 +356,12 @@ class LocalContext {
393
356
 
394
357
  error(message, node = null) { this.context.error(message, node); }
395
358
 
396
- static fromContext(context) {
397
- const tokens = null,
398
- variables = [],
399
- judgements = [],
400
- equivalences = Equivalences.fromNothing(),
401
- stepsOrSubproofs = [],
402
- localContext = new LocalContext(context, tokens, variables, judgements, equivalences, stepsOrSubproofs);
403
-
404
- return localContext;
405
- }
406
-
407
- static fromContextAndTokens(context, tokens) {
359
+ static fromNothing(context) {
408
360
  const variables = [],
409
361
  judgements = [],
410
362
  equivalences = Equivalences.fromNothing(),
411
363
  stepsOrSubproofs = [],
412
- localContext = new LocalContext(context, tokens, variables, judgements, equivalences, stepsOrSubproofs);
364
+ localContext = new LocalContext(context, variables, judgements, equivalences, stepsOrSubproofs);
413
365
 
414
366
  return localContext;
415
367
  }
@@ -0,0 +1,394 @@
1
+ "use strict";
2
+
3
+ import { arrayUtilities } from "necessary";
4
+
5
+ const { first, extract } = arrayUtilities;
6
+
7
+ export default class TemporaryContext {
8
+ constructor(context, tokens, terms, frames, statements, assertions, reference, substitution) {
9
+ this.context = context;
10
+ this.tokens = tokens;
11
+ this.terms = terms;
12
+ this.frames = frames;
13
+ this.statements = statements;
14
+ this.assertions = assertions;
15
+ this.reference = reference;
16
+ this.substitution = substitution;
17
+ }
18
+
19
+ getContext() {
20
+ return this.context;
21
+ }
22
+
23
+ getTokens() {
24
+ return tokens;
25
+ }
26
+
27
+ getTerms() {
28
+ return this.terms;
29
+ }
30
+
31
+ getFrames() {
32
+ return this.frames;
33
+ }
34
+
35
+ getStatements() {
36
+ return this.statements;
37
+ }
38
+
39
+ getAssertions() {
40
+ return this.assertions;
41
+ }
42
+
43
+ getReferences() {
44
+ return this.reference;
45
+ }
46
+
47
+ getSubstitution() {
48
+ return this.substitution;
49
+ }
50
+
51
+ addTerm(term) {
52
+ const termNode = term.getNode();
53
+
54
+ extract(this.terms, (term) => {
55
+ const termMatchesTermNode = term.matchTermNode(termNode);
56
+
57
+ if (termMatchesTermNode) {
58
+ return true;
59
+ }
60
+ });
61
+
62
+ this.terms.push(term);
63
+ }
64
+
65
+ addFrame(frame) {
66
+ const frameNode = frame.getNode();
67
+
68
+ extract(this.frames, (frame) => {
69
+ const frameMatchesFrameNode = frame.matchFrameNode(frameNode);
70
+
71
+ if (frameMatchesFrameNode) {
72
+ return true;
73
+ }
74
+ });
75
+
76
+ this.frames.push(frame);
77
+ }
78
+
79
+ removeFrame(frame) {
80
+ const index = this.frames.indexOf(frame),
81
+ start = index, ///
82
+ deleteCount = 1;
83
+
84
+ this.frames.splice(start, deleteCount);
85
+ }
86
+
87
+ addStatement(statement) {
88
+ const statementNode = statement.getNode();
89
+
90
+ extract(this.statements, (statement) => {
91
+ const statementMatchesFrameNode = statement.matchStatementNode(statementNode);
92
+
93
+ if (statementMatchesFrameNode) {
94
+ return true;
95
+ }
96
+ });
97
+
98
+ this.statements.push(statement);
99
+ }
100
+
101
+ addAssertion(assertion) {
102
+ const assertionNode = assertion.getNode();
103
+
104
+ extract(this.assertions, (assertion) => {
105
+ const assertionMatchesFrameNode = assertion.matchAssertionNode(assertionNode);
106
+
107
+ if (assertionMatchesFrameNode) {
108
+ return true;
109
+ }
110
+ });
111
+
112
+ this.assertions.push(assertion);
113
+ }
114
+
115
+ addReference(reference) {
116
+ this.reference = reference;
117
+ }
118
+
119
+ addSubstitution(substitution) {
120
+ this.substitution = substitution;
121
+ }
122
+
123
+ findTermByTermNode(termNode) {
124
+ const term = this.terms.find((term) => {
125
+ const termMatchesTermNode = term.matchTermNode(termNode);
126
+
127
+ if (termMatchesTermNode) {
128
+ return true;
129
+ }
130
+ }) || null;
131
+
132
+ return term;
133
+ }
134
+
135
+ findFrameByFrameNode(frameNode) {
136
+ const frame = this.frames.find((frame) => {
137
+ const frameMatchesFrameNode = frame.matchFrameNode(frameNode);
138
+
139
+ if (frameMatchesFrameNode) {
140
+ return true;
141
+ }
142
+ }) || null;
143
+
144
+ return frame;
145
+ }
146
+
147
+ findStatementByStatementNode(statementNode) {
148
+ const statement = this.statements.find((statement) => {
149
+ const statementMatchesStatementNode = statement.matchStatementNode(statementNode);
150
+
151
+ if (statementMatchesStatementNode) {
152
+ return true;
153
+ }
154
+ }) || null;
155
+
156
+ return statement;
157
+ }
158
+
159
+ findReferenceByMetavariableName(metavariableName) {
160
+ let reference = null;
161
+
162
+ const referenceMatchesMetavariableName = this.reference.matchMetavariableName(metavariableName);
163
+
164
+ if (referenceMatchesMetavariableName) {
165
+ reference = this.reference;
166
+ }
167
+
168
+ return reference;
169
+ }
170
+
171
+ getFrame() {
172
+ let frame = null;
173
+
174
+ const framesLengtrh = this.frames.length;
175
+
176
+ if (framesLengtrh === 1) {
177
+ const firstFrame = first(this.frames);
178
+
179
+ frame = firstFrame; ///
180
+ }
181
+
182
+ return frame;
183
+ }
184
+
185
+ getVariables(nested = true) { return this.context.getVariables(nested); }
186
+
187
+ getJudgements() { return this.context.getJudgements(); }
188
+
189
+ getEquivalences() { return this.context.getEquivalences(); }
190
+
191
+ getSteps() { return this.context.getSteps(); }
192
+
193
+ getLastStep() { return this.context.getLastStep(); }
194
+
195
+ getStepsOrSubproofs() { return this.context.getStepsOrSubproofs(); }
196
+
197
+ getFilePath() { return this.context.getFilePath(); }
198
+
199
+ getLexer() { return this.context.getLexer(); }
200
+
201
+ getParser() { return this.context.getParser(); }
202
+
203
+ getAxioms() { return this.context.getAxioms(); }
204
+
205
+ getLemmas() { return this.context.getLemmas(); }
206
+
207
+ getTheorems() { return this.context.getTheorems(); }
208
+
209
+ getConjectures() { return this.context.getConjectures(); }
210
+
211
+ getCombinators() { return this.context.getCombinators(); }
212
+
213
+ getConstructors() { return this.context.getConstructors(); }
214
+
215
+ getTypePrefix() { return this.context.getTypePrefix(); }
216
+
217
+ addAxiom(axiom) { this.context.addAxiom(axiom); }
218
+
219
+ addLemma(lemma) { this.context.addLemma(lemma); }
220
+
221
+ addTheorem(theorem) { this.context.addTheorem(theorem); }
222
+
223
+ addEquality(equality, context) { return this.context.addEquality(equality, context); }
224
+
225
+ addVariable(variable, nested = true) { return this.context.addVariable(variable, nested); }
226
+
227
+ addJudgement(judgement) { return this.context.addJudgement(judgement); }
228
+
229
+ addStepOrSubproof(stepOrSubproof) { this.context.addStepOrSubproof(stepOrSubproof); }
230
+
231
+ findProcedureByName(name) { return this.context.findProcedureByName(name); }
232
+
233
+ findLabelByReference(reference, context) { return this.context.findLabelByReference(reference, context); }
234
+
235
+ findRuleByReference(reference) { return this.context.findRuleByReference(reference); }
236
+
237
+ findAxiomByReference(reference) { return this.context.findAxiomByReference(reference); }
238
+
239
+ findLemmaByReference(reference) { return this.context.findLemmaByReference(reference); }
240
+
241
+ findTheoremByReference(reference) { return this.context.findTheoremByReference(reference); }
242
+
243
+ findConjectureByReference(reference) { return this.context.findConjectureByReference(reference); }
244
+
245
+ findMetaLemmasByReference(reference) { return this.context.findMetaLemmasByReference(reference); }
246
+
247
+ findMetatheoremsByReference(reference) { return this.context.findMetatheoremsByReference(reference); }
248
+
249
+ findMetaLemmaMetatheoremByReference(reference) { return this.context.findMetaLemmaMetatheoremByReference(reference); }
250
+
251
+ findMetaLemmaMetatheoremsByReference(reference) { return this.context.findMetaLemmaMetatheoremsByReference(reference); }
252
+
253
+ findVariableByVariableIdentifier(variableIdentifier, nested = true) { return this.context.findVariableByVariableIdentifier(variableIdentifier, nested); }
254
+
255
+ findJudgementByMetavariable(metavariable) { return this.context.findJudgementByMetavariable(metavariable); }
256
+
257
+ findEquivalenceByTerm(term) { return this.context.findEquivalenceByTerm(term); }
258
+
259
+ findMetavariable(metavariable) { return this.context.findMetavariable(metavariable); }
260
+
261
+ findLabelByMetavariable(metavariable) { return this.context.findLabelByMetavariable(metavariable); }
262
+
263
+ findTypeByNominalTypeName(nominalTypeName) { return this.context.findTypeByNominalTypeName(nominalTypeName); }
264
+
265
+ findMetaTypeByMetaTypeName(metaTypeName) { return this.context.findMetaTypeByMetaTypeName(metaTypeName); }
266
+
267
+ findMetavariableByMetavariableName(metavariableName) { return this.context.findMetavariableByMetavariableName(metavariableName); }
268
+
269
+ isProcedurePresentByName(name) { return this.context.isProcedurePresentByName(name); }
270
+
271
+ isLabelPresentByReference(reference) { return this.context.isLabelPresentByReference(reference); }
272
+
273
+ isMetavariablePresentByReference(reference) { return this.context.isMetavariablePresentByReference(reference); }
274
+
275
+ isMetaLemmaMetatheoremPresentByReference(reference) { return this.context.isMetaLemmaMetatheoremPresentByReference(reference); }
276
+
277
+ findAxiomLemmaTheoremOrConjectureByReference(reference) { return this.context.findAxiomLemmaTheoremOrConjectureByReference(reference); }
278
+
279
+ isMetavariablePresent(metavariable) { return this.context.isMetavariablePresent(metavariable); }
280
+
281
+ isTypePresentByTypeName(typeName, includeRelease = true, includeDependencies = true) { return this.context.isTypePresentByTypeName(typeName, includeRelease, includeDependencies); }
282
+
283
+ isTypePresentByNominalTypeName(nominalTypeName) { return this.context.isTypePresentByNominalTypeName(nominalTypeName); }
284
+
285
+ isTypePresentByPrefixedTypeName(prefixedTypeName) { return this.context.isTypePresentByPrefixedTypeName(prefixedTypeName); }
286
+
287
+ isTypePrefixPresentByTypePrefixName(typePrefixName) { return this.context.isTypePrefixPresentByTypePrefixName(typePrefixName); }
288
+
289
+ isVariablePresentByVariableIdentifier(variableIdentifier, nested = true) { return this.context.findVariableByVariableIdentifier(variableIdentifier, nested); }
290
+
291
+ isLabelPresentByMetavariableName(metavariableName) { return this.context.isLabelPresentByMetavariableName(metavariableName); }
292
+
293
+ isLabelPresentByMetavariable(metavariable) { return this.context.isLabelPresentByMetavariable(metavariable); }
294
+
295
+ isMetavariablePresentByMetavariableName(metavariableNode) { return this.context.isMetavariablePresentByMetavariableName(metavariableNode); }
296
+
297
+ isJudgementPresentByMetavariable(metavariable) { return this.context.isJudgementPresentByMetavariable(metavariable); }
298
+
299
+ isTermGrounded(term) { return this.context.isTermGrounded(term); }
300
+
301
+ isVariableDefined(variable) { return this.context.isVariableDefined(variable); }
302
+
303
+ isMetavariableDefined(metavariable) { return this.context.isMetavariableDefined(metavariable); }
304
+
305
+ matchTermAndPropertyRelation(term, propertyRelation) { return this.context.matchTermAndPropertyRelation(term, propertyRelation); }
306
+
307
+ nodeAsString(node, tokens = null) {
308
+ if (tokens === null) {
309
+ tokens = this.tokens;
310
+ }
311
+
312
+ const string = this.context.nodeAsString(node, tokens);
313
+
314
+ return string;
315
+ }
316
+
317
+ nodesAsString(node, tokens = null) {
318
+ if (tokens === null) {
319
+ tokens = this.tokens;
320
+ }
321
+
322
+ const string = this.context.nodesAsString(node, tokens);
323
+
324
+ return string;
325
+ }
326
+
327
+ nodeAsTokens(node, tokens = null) {
328
+ if (tokens === null) {
329
+ tokens = this.tokens;
330
+ }
331
+
332
+ tokens = this.context.nodeAsTokens(node, tokens); ///
333
+
334
+ return tokens;
335
+ }
336
+
337
+ nodesAsTokens(node, tokens = null) {
338
+ if (tokens === null) {
339
+ tokens = this.tokens;
340
+ }
341
+
342
+ tokens = this.context.nodesAsTokens(node, tokens); ///
343
+
344
+ return tokens;
345
+ }
346
+
347
+ tokensAsString(tokens) { return this.context.tokensAsString(tokens); }
348
+
349
+ trace(message, node = null) { this.context.trace(message, node); }
350
+
351
+ debug(message, node = null) { this.context.debug(message, node); }
352
+
353
+ info(message, node = null) { this.context.info(message, node); }
354
+
355
+ warning(message, node = null) { this.context.warning(message, node); }
356
+
357
+ error(message, node = null) { this.context.error(message, node); }
358
+
359
+ static fromNothing(context) {
360
+ const terms = [],
361
+ frames = [],
362
+ tokens = null,
363
+ statements = [],
364
+ assertions = [],
365
+ reference = null,
366
+ substitution = null,
367
+ temporaryContext = new TemporaryContext(context, tokens, terms, frames, statements, assertions, reference, substitution);
368
+
369
+ return temporaryContext;
370
+ }
371
+
372
+ static fromTermsAndFrames(terms, frames, context) {
373
+ const tokens = null,
374
+ statements = [],
375
+ assertions = [],
376
+ reference = null,
377
+ substitution = null,
378
+ temporaryContext = new TemporaryContext(context, tokens, terms, frames, statements, assertions, reference, substitution);
379
+
380
+ return temporaryContext;
381
+ }
382
+
383
+ static fromContextAndTokens(context, tokens) {
384
+ const terms = [],
385
+ frames = [],
386
+ statements = [],
387
+ assertions = [],
388
+ reference = null,
389
+ substitution = null,
390
+ temporaryContext = new TemporaryContext(context, tokens, terms, frames, statements, assertions, reference, substitution);
391
+
392
+ return temporaryContext;
393
+ }
394
+ }