occam-verify-cli 1.0.405 → 1.0.414

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 (122) hide show
  1. package/lib/context/file.js +3 -3
  2. package/lib/context/local.js +3 -3
  3. package/lib/context/release.js +2 -2
  4. package/lib/context/temporary.js +103 -54
  5. package/lib/mixins/statement/verify.js +2 -2
  6. package/lib/mixins/step/unify.js +2 -2
  7. package/lib/node/argument.js +2 -2
  8. package/lib/node/assumption.js +6 -6
  9. package/lib/node/frame.js +19 -7
  10. package/lib/node/judgement.js +8 -1
  11. package/lib/node/statement.js +34 -15
  12. package/lib/node/substitution/term.js +3 -11
  13. package/lib/node/term.js +20 -8
  14. package/lib/nonTerminalNode.js +3 -3
  15. package/lib/ontology/assertion/contained.js +7 -7
  16. package/lib/ontology/assertion/defined.js +8 -8
  17. package/lib/ontology/assertion/subproof.js +3 -3
  18. package/lib/ontology/assumption.js +49 -45
  19. package/lib/ontology/combinator.js +3 -3
  20. package/lib/ontology/constructor.js +3 -3
  21. package/lib/ontology/equality.js +4 -4
  22. package/lib/ontology/equivalence.js +2 -2
  23. package/lib/ontology/frame.js +37 -12
  24. package/lib/ontology/judgement.js +13 -6
  25. package/lib/ontology/metavariable.js +75 -76
  26. package/lib/ontology/propertyRelation.js +2 -2
  27. package/lib/ontology/reference.js +33 -4
  28. package/lib/ontology/signature.js +2 -2
  29. package/lib/ontology/statement.js +33 -8
  30. package/lib/ontology/step.js +4 -4
  31. package/lib/ontology/substitution/frame.js +13 -15
  32. package/lib/ontology/substitution/statement.js +31 -32
  33. package/lib/ontology/substitution/term.js +26 -25
  34. package/lib/ontology/substitution.js +2 -2
  35. package/lib/ontology/substitutions.js +4 -4
  36. package/lib/ontology/term.js +26 -12
  37. package/lib/ontology/variable.js +2 -2
  38. package/lib/process/equate.js +322 -0
  39. package/lib/process/unify.js +623 -0
  40. package/lib/process/verify.js +332 -0
  41. package/lib/utilities/brackets.js +3 -8
  42. package/lib/utilities/context.js +4 -14
  43. package/lib/utilities/json.js +18 -1
  44. package/lib/utilities/pass.js +68 -0
  45. package/lib/utilities/substitutions.js +11 -16
  46. package/package.json +2 -2
  47. package/src/context/file.js +2 -2
  48. package/src/context/local.js +2 -2
  49. package/src/context/release.js +1 -1
  50. package/src/context/temporary.js +124 -54
  51. package/src/mixins/statement/verify.js +3 -1
  52. package/src/mixins/step/unify.js +0 -1
  53. package/src/node/argument.js +1 -1
  54. package/src/node/assumption.js +4 -4
  55. package/src/node/frame.js +19 -5
  56. package/src/node/judgement.js +7 -0
  57. package/src/node/statement.js +35 -13
  58. package/src/node/substitution/term.js +4 -14
  59. package/src/node/term.js +20 -6
  60. package/src/nonTerminalNode.js +1 -1
  61. package/src/ontology/assertion/contained.js +6 -6
  62. package/src/ontology/assertion/defined.js +7 -7
  63. package/src/ontology/assertion/subproof.js +1 -1
  64. package/src/ontology/assumption.js +52 -57
  65. package/src/ontology/combinator.js +1 -1
  66. package/src/ontology/constructor.js +1 -1
  67. package/src/ontology/equality.js +3 -3
  68. package/src/ontology/equivalence.js +1 -1
  69. package/src/ontology/frame.js +44 -10
  70. package/src/ontology/judgement.js +8 -3
  71. package/src/ontology/metavariable.js +108 -102
  72. package/src/ontology/propertyRelation.js +3 -2
  73. package/src/ontology/reference.js +39 -1
  74. package/src/ontology/signature.js +3 -3
  75. package/src/ontology/statement.js +38 -4
  76. package/src/ontology/step.js +7 -7
  77. package/src/ontology/substitution/frame.js +13 -17
  78. package/src/ontology/substitution/statement.js +45 -48
  79. package/src/ontology/substitution/term.js +19 -19
  80. package/src/ontology/substitution.js +3 -2
  81. package/src/ontology/substitutions.js +3 -3
  82. package/src/ontology/term.js +26 -5
  83. package/src/ontology/variable.js +3 -2
  84. package/src/process/equate.js +212 -0
  85. package/src/process/unify.js +634 -0
  86. package/src/process/verify.js +204 -0
  87. package/src/utilities/brackets.js +2 -11
  88. package/src/utilities/context.js +1 -21
  89. package/src/utilities/json.js +19 -0
  90. package/src/utilities/{unifier.js → pass.js} +17 -1
  91. package/src/utilities/substitutions.js +10 -20
  92. package/lib/unifier/equantional.js +0 -170
  93. package/lib/unifier/intrinsicLevel.js +0 -144
  94. package/lib/unifier/metaLevel.js +0 -197
  95. package/lib/unifier/metavariable.js +0 -140
  96. package/lib/unifier/statementWithCombinator.js +0 -177
  97. package/lib/unifier/termWithConstructor.js +0 -145
  98. package/lib/unifier.js +0 -241
  99. package/lib/utilities/arguments.js +0 -28
  100. package/lib/utilities/frame.js +0 -18
  101. package/lib/utilities/metavariable.js +0 -18
  102. package/lib/utilities/statement.js +0 -18
  103. package/lib/utilities/unification.js +0 -109
  104. package/lib/utilities/unifier.js +0 -51
  105. package/lib/utilities/variable.js +0 -18
  106. package/lib/verifier/combinator.js +0 -158
  107. package/lib/verifier.js +0 -219
  108. package/src/unifier/equantional.js +0 -90
  109. package/src/unifier/intrinsicLevel.js +0 -52
  110. package/src/unifier/metaLevel.js +0 -151
  111. package/src/unifier/metavariable.js +0 -50
  112. package/src/unifier/statementWithCombinator.js +0 -114
  113. package/src/unifier/termWithConstructor.js +0 -56
  114. package/src/unifier.js +0 -183
  115. package/src/utilities/arguments.js +0 -21
  116. package/src/utilities/frame.js +0 -13
  117. package/src/utilities/metavariable.js +0 -13
  118. package/src/utilities/statement.js +0 -13
  119. package/src/utilities/unification.js +0 -136
  120. package/src/utilities/variable.js +0 -13
  121. package/src/verifier/combinator.js +0 -72
  122. package/src/verifier.js +0 -150
@@ -67,10 +67,10 @@ export default define(class DefinedAssertion extends Assertion {
67
67
 
68
68
  context.trace(`Verifying the '${termString}' term...`);
69
69
 
70
- const termSimple = this.term.isSimple();
70
+ const termSingular = this.term.isSingular();
71
71
 
72
- if (!termSimple) {
73
- context.debug(`The '${termString}' term is not simple.`);
72
+ if (!termSingular) {
73
+ context.debug(`The '${termString}' term is not singular.`);
74
74
  } else {
75
75
  termVerifies = this.term.verify(context, () => {
76
76
  const verifiesAhead = true;
@@ -95,10 +95,10 @@ export default define(class DefinedAssertion extends Assertion {
95
95
 
96
96
  context.trace(`Verifying the '${frameString}' frame...`);
97
97
 
98
- const frameSimple = this.frame.isSimple();
98
+ const frameSingular = this.frame.isSingular();
99
99
 
100
- if (!frameSimple) {
101
- context.debug(`The '${frameString}' frame is not simple.`);
100
+ if (!frameSingular) {
101
+ context.debug(`The '${frameString}' frame is not singular.`);
102
102
  } else {
103
103
  stated = true; ///
104
104
 
@@ -153,7 +153,7 @@ export default define(class DefinedAssertion extends Assertion {
153
153
  unifyIndependently(substitutions, generalContext, specificContext) {
154
154
  let unifiesIndependently;
155
155
 
156
- const context = generalContext, ///
156
+ const context = specificContext, ///
157
157
  definedAssertionString = this.getString(); ///
158
158
 
159
159
  context.trace(`Unifying the '${definedAssertionString}' defined assertion independently...`);
@@ -6,7 +6,7 @@ import ontology from "../../ontology";
6
6
  import Assertion from "../assertion";
7
7
 
8
8
  import { define } from "../../ontology";
9
- import { unifyStatement } from "../../utilities/unification";
9
+ import { unifyStatement } from "../../process/unify";
10
10
 
11
11
  const { match } = arrayUtilities;
12
12
 
@@ -3,15 +3,15 @@
3
3
  import ontology from "../ontology";
4
4
 
5
5
  import { define } from "../ontology";
6
- import { unifyStatementIntrinsically } from "../utilities/unification";
7
- import { metavariableFromJSON, metavariableToMetavariableJSON } from "../utilities/json";
6
+ import { unifyStatementIntrinsically } from "../process/unify";
7
+ import { referenceFromJSON, referenceToReferenceJSON } from "../utilities/json";
8
8
 
9
9
  export default define(class Assumption {
10
- constructor(string, node, statement, metavariable) {
10
+ constructor(string, node, statement, reference) {
11
11
  this.string = string;
12
12
  this.node = node;
13
13
  this.statement = statement;
14
- this.metavariable = metavariable;
14
+ this.reference = reference;
15
15
  }
16
16
 
17
17
  getString() {
@@ -26,10 +26,12 @@ export default define(class Assumption {
26
26
  return this.statement;
27
27
  }
28
28
 
29
- getMetavariable() {
30
- return this.metavariable;
29
+ getReference() {
30
+ return this.reference;
31
31
  }
32
32
 
33
+ getMetavariable() { return this.reference.getMetavariable(); }
34
+
33
35
  isSimple() {
34
36
  const simple = (this.statement === null);
35
37
 
@@ -47,7 +49,8 @@ export default define(class Assumption {
47
49
  const simple = this.isSimple();
48
50
 
49
51
  if (simple) {
50
- const judgement = context.findJudgementByMetavariable(this.metavariable);
52
+ const metavariable = this.reference.getMetavariable(),
53
+ judgement = context.findJudgementByMetavariable(metavariable);
51
54
 
52
55
  if (judgement !== null) {
53
56
  const assumption = judgement.getDeclaration();
@@ -58,9 +61,9 @@ export default define(class Assumption {
58
61
  const statement = substitution.getStatement(),
59
62
  metavariable = substitution.getMetavariable(),
60
63
  statementEqualToStatement = this.statement.isEqualTo(statement),
61
- metavariableEqualToMetavariable = this.metavariable.isEqualTo(metavariable);
64
+ referenceMetavariableEqualToMetavariable = this.reference.isMetavariableEqualToMetavariable(metavariable);
62
65
 
63
- if (metavariableEqualToMetavariable && statementEqualToStatement) {
66
+ if (statementEqualToStatement && referenceMetavariableEqualToMetavariable) {
64
67
  substitutionMatches = true;
65
68
  }
66
69
  }
@@ -82,13 +85,13 @@ export default define(class Assumption {
82
85
  const simple = this.isSimple();
83
86
 
84
87
  if (simple) {
85
- const verifiesAsMetavariable = this.verifyAsMetavariable(assignments, stated, context);
88
+ const referenceVerifiesAsMetavariable = this.verifyReferenceAsMetavariable(assignments, stated, context);
86
89
 
87
- verifies = verifiesAsMetavariable; ///
90
+ verifies = referenceVerifiesAsMetavariable; ///
88
91
  } else {
89
- const metavariableVerifiesAsReference = this.verifyMetavariableAsReference(assignments, stated, context);
92
+ const referenceVerified = this.verifyReference(assignments, stated, context);
90
93
 
91
- if (metavariableVerifiesAsReference) {
94
+ if (referenceVerified) {
92
95
  const statementVerifies = this.verifyStatement(assignments, stated, context);
93
96
 
94
97
  if (statementVerifies) {
@@ -115,24 +118,21 @@ export default define(class Assumption {
115
118
  return verifies;
116
119
  }
117
120
 
118
- verifyMetavariableAsReference(assignments, stated, context) {
119
- let metavariableVerifiesAsReference;
120
-
121
- const assumptionString = this.string,
122
- metavariableString = this.metavariable.getString();
121
+ verifyReference(assignments, stated, context) {
122
+ let referenceVerified;
123
123
 
124
- context.trace(`Verifying the '${assumptionString}' assumption's '${metavariableString}' metavariable as a reference...`);
124
+ const referenceString = this.reference.getString(),
125
+ assumptionString = this.string; ///
125
126
 
126
- const reference = referenceFromMetavariable(this.metavariable, context),
127
- referenceVerifies = reference.verify(context);
127
+ context.trace(`Verifying the '${assumptionString}' assumption's '${referenceString}' reference...`);
128
128
 
129
- metavariableVerifiesAsReference = referenceVerifies; ///
129
+ referenceVerified = this.reference.verify(context);
130
130
 
131
- if (metavariableVerifiesAsReference) {
132
- context.debug(`...verified the '${assumptionString}' assumption's '${metavariableString}' metavariable as a reference.`);
131
+ if (referenceVerified) {
132
+ context.debug(`...verified the '${assumptionString}' assumption's '${referenceString}' reference.`);
133
133
  }
134
134
 
135
- return metavariableVerifiesAsReference;
135
+ return referenceVerified;
136
136
  }
137
137
 
138
138
  verifyStatement(assignments, stated, context) {
@@ -159,21 +159,27 @@ export default define(class Assumption {
159
159
  return statementVerifies;
160
160
  }
161
161
 
162
- verifyAsMetavariable(assignments, stated, context) {
163
- let verifiesAsMetavariable;
162
+ verifyReferenceAsMetavariable(assignments, stated, context) {
163
+ let referenceVerifiesAsMetavariable = false;
164
164
 
165
- const assumptionString = this.string, ///
166
- metavariableString = this.metavariable.getString();
165
+ const referenceString = this.reference.getString(),
166
+ assumptionString = this.string; ///
167
167
 
168
- context.trace(`Verifying the '${assumptionString}' assumption's '${metavariableString}' metavariable...`);
168
+ context.trace(`Verifying the '${assumptionString}' assumption's '${referenceString}' reference as s metavariable...`);
169
169
 
170
- verifiesAsMetavariable = this.metavariable.verify(context);
170
+ const metavariable = this.reference.getMetavariable(),
171
+ metavariableName = metavariable.getName(),
172
+ metavariablePresent = context.isMetavariablePresentByMetavariableName(metavariableName);
171
173
 
172
- if (verifiesAsMetavariable) {
173
- context.debug(`...verified the '${assumptionString}' assumption's '${metavariableString}' metavariable.`);
174
+ if (metavariablePresent) {
175
+ referenceVerifiesAsMetavariable = true;
174
176
  }
175
177
 
176
- return verifiesAsMetavariable;
178
+ if (referenceVerifiesAsMetavariable) {
179
+ context.debug(`...verified the '${assumptionString}' assumption's '${referenceString}' reference as a metavariable.`);
180
+ }
181
+
182
+ return referenceVerifiesAsMetavariable;
177
183
  }
178
184
 
179
185
  verifyWhenStated(assignments, context) {
@@ -183,13 +189,12 @@ export default define(class Assumption {
183
189
 
184
190
  context.trace(`Verifying the '${assumptionString}' stated assumption...`);
185
191
 
186
- const reference = referenceFromMetavariable(this.metavariable, context),
187
- metavariablePresent = context.isMetavariablePresentByReference(reference);
192
+ const metavariablePresent = context.isMetavariablePresentByReference(this.reference);
188
193
 
189
194
  if (metavariablePresent) {
190
195
  verifiesWhenStated = true;
191
196
  } else {
192
- const metaLemmaMetatheorems = context.findMetaLemmaMetatheoremsByReference(reference),
197
+ const metaLemmaMetatheorems = context.findMetaLemmaMetatheoremsByReference(this.reference),
193
198
  metaLemmaMetatheoremsUnify = metaLemmaMetatheorems.every((metaLemmaMetatheorem) => {
194
199
  const metaLemmaMetatheoremUnifies = this.unifyMetaLemmaMetatheorem(metaLemmaMetatheorem, context);
195
200
 
@@ -215,8 +220,7 @@ export default define(class Assumption {
215
220
 
216
221
  context.trace(`Verifying the '${assumptionString}' derived assumption...`);
217
222
 
218
- const reference = referenceFromMetavariable(this.metavariable, context),
219
- metaLemmaMetatheoremPresent = context.isMetaLemmaMetatheoremPresentByReference(reference);
223
+ const metaLemmaMetatheoremPresent = context.isMetaLemmaMetatheoremPresentByReference(this.reference);
220
224
 
221
225
  verifiesWhenDerived = metaLemmaMetatheoremPresent; ///
222
226
 
@@ -264,8 +268,7 @@ export default define(class Assumption {
264
268
 
265
269
  context.trace(`Unifying the '${labelString}' label with the '${assumptionString}' assumption...`);
266
270
 
267
- const reference = referenceFromMetavariable(this.metavariable, context),
268
- labelUnifies = reference.unifyLabel(label, substitutions, context);
271
+ const labelUnifies = this.reference.unifyLabel(label, substitutions, context);
269
272
 
270
273
  labelUnifiesWithReference = labelUnifies; ///
271
274
 
@@ -325,10 +328,10 @@ export default define(class Assumption {
325
328
  const simple = this.isSimple();
326
329
 
327
330
  if (simple) {
328
- const metavariable = this.getMetavariable(),
329
- metavariableJSON = metavariableToMetavariableJSON(metavariable);
331
+ const reference = this, ///
332
+ referenceJSON = referenceToReferenceJSON(reference);
330
333
 
331
- json = metavariableJSON; ///
334
+ json = referenceJSON; ///
332
335
  }
333
336
 
334
337
  return json;
@@ -343,9 +346,9 @@ export default define(class Assumption {
343
346
  const string = null,
344
347
  node = null,
345
348
  statement = null,
346
- metavariable = metavariableFromJSON(json, context);
349
+ reference = referenceFromJSON(json, context);
347
350
 
348
- assumption = new Assumption(string, node, statement, metavariable)
351
+ assumption = new Assumption(string, node, statement, reference)
349
352
  }
350
353
 
351
354
  return assumption;
@@ -365,21 +368,13 @@ export default define(class Assumption {
365
368
  }
366
369
  });
367
370
 
368
- function referenceFromMetavariable(metavariable, context) {
369
- const { Reference } = ontology,
370
- metavariableNode = metavariable.getNode(),
371
- reference = Reference.fromMetavariableNode(metavariableNode, context);
372
-
373
- return reference;
374
- }
375
-
376
371
  function assumptionFromAssumptionNode(assumptionNode, context) {
377
- const { Metavariable, Assumption, Statement } = ontology,
372
+ const { Reference, Assumption, Statement } = ontology,
378
373
  node = assumptionNode, ///
379
374
  string = context.nodeAsString(node),
380
375
  statement = Statement.fromAssumptionNode(assumptionNode, context),
381
- metavariable = Metavariable.fromAssumptionNode(assumptionNode, context),
382
- assumption = new Assumption(string, node, statement, metavariable);
376
+ reference = Reference.fromAssumptionNode(assumptionNode, context),
377
+ assumption = new Assumption(string, node, statement, reference);
383
378
 
384
379
  return assumption;
385
380
  }
@@ -3,7 +3,7 @@
3
3
  import ontology from "../ontology";
4
4
 
5
5
  import { define } from "../ontology";
6
- import { unifyStatementWithCombinator } from "../utilities/unification";
6
+ import { unifyStatementWithCombinator } from "../process/unify";
7
7
  import { statementFromJSON, statementToStatementJSON } from "../utilities/json";
8
8
 
9
9
  export default define(class Combinator {
@@ -4,7 +4,7 @@ import ontology from "../ontology";
4
4
 
5
5
  import { define } from "../ontology";
6
6
  import { baseType } from ".//type";
7
- import { unifyTermWithConstructor } from "../utilities/unification";
7
+ import { unifyTermWithConstructor } from "../process/unify";
8
8
  import { termFromJSON, termToTermJSON } from "../utilities/json";
9
9
 
10
10
  export default define(class Constructor {
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  import ontology from "../ontology";
4
- import equationalUnifier from "../unifier/equantional";
5
4
  import EqualityAssignment from "../assignment/equality";
6
5
  import VariableAssignment from "../assignment/variable";
7
6
 
8
7
  import { define } from "../ontology";
8
+ import { equateTerms } from "../process/equate";
9
9
 
10
10
  export default define(class Equality {
11
11
  constructor(string, leftTerm, rightTerm) {
@@ -67,9 +67,9 @@ export default define(class Equality {
67
67
 
68
68
  const leftTermNode = this.leftTerm.getNode(),
69
69
  rightTermNode = this.rightTerm.getNode(),
70
- termsEquates = equationalUnifier.equateTerms(leftTermNode, rightTermNode, context);
70
+ termsEquate = equateTerms(leftTermNode, rightTermNode, context);
71
71
 
72
- if (termsEquates) {
72
+ if (termsEquate) {
73
73
  equal = true;
74
74
  }
75
75
 
@@ -143,7 +143,7 @@ export default define(class Equivalence {
143
143
  compress(terms, (termA, termB) => {
144
144
  const termAEqualToTermB = termA.isEqualTo(termB);
145
145
 
146
- if (termAEqualToTermB) {
146
+ if (!termAEqualToTermB) {
147
147
  return true;
148
148
  }
149
149
  });
@@ -53,9 +53,9 @@ export default define(class Frame {
53
53
  getMetavariable() {
54
54
  let metavariable = null;
55
55
 
56
- const simple = this.isSimple();
56
+ const singular = this.isSingular();
57
57
 
58
- if (simple) {
58
+ if (singular) {
59
59
  const assumption = this.getAssumption();
60
60
 
61
61
  metavariable = assumption.getMetavariable();
@@ -64,15 +64,49 @@ export default define(class Frame {
64
64
  return metavariable;
65
65
  }
66
66
 
67
- isSimple() { return this.node.isSimple();}
67
+ getMetavariableName() {
68
+ let metavariableName = null;
69
+
70
+ const singular = this.isSingular();
71
+
72
+ if (singular) {
73
+ metavariableName = this.node.getMetavariableName();
74
+ }
75
+
76
+ return metavariableName;
77
+ }
78
+
79
+ isSingular() { return this.node.isSingular(); }
68
80
 
69
81
  isEqualTo(frame) {
70
- const frameString = frame.getString(),
71
- equalTo = (frameString === this.string);
82
+ const frameNode = frame.getNode(),
83
+ matches = this.node.match(frameNode),
84
+ equalTo = matches; ///
72
85
 
73
86
  return equalTo;
74
87
  }
75
88
 
89
+ isMetavariableEqualToMetavariable(metavariable, context) {
90
+ let metavariableEqualToMetavariable;
91
+
92
+ const singular = this.isSingular();
93
+
94
+ if (singular) {
95
+ const metavariableA = metavariable, ///
96
+ singularMetavariableNode = this.node.getSingularMetavariableNode(),
97
+ metavariableName = singularMetavariableNode.getMetavariableName();
98
+
99
+ metavariable = context.findMetavariableByMetavariableName(metavariableName)
100
+
101
+ const metavariableB = metavariable,
102
+ equalTo = metavariableA.isEqualTo(metavariableB);
103
+
104
+ metavariableEqualToMetavariable = equalTo; ///
105
+ }
106
+
107
+ return metavariableEqualToMetavariable;
108
+ }
109
+
76
110
  matchFrameNode(frameNode) { return this.node.match(frameNode); }
77
111
 
78
112
  matchSubstitution(substitution, context) {
@@ -165,10 +199,10 @@ export default define(class Frame {
165
199
 
166
200
  context.trace(`Verifying the '${frameString}' stated frame...`);
167
201
 
168
- const simple = this.isSimple();
202
+ const singular = this.isSingular();
169
203
 
170
- if (!simple) {
171
- context.trace(`The '${frameString}' stated frame must be simple.`);
204
+ if (!singular) {
205
+ context.trace(`The '${frameString}' stated frame must be singular.`);
172
206
  } else {
173
207
  verifiesWhenStated = true;
174
208
  }
@@ -253,9 +287,9 @@ export default define(class Frame {
253
287
  toJSON() {
254
288
  let json = null;
255
289
 
256
- const simple = this.isSimple();
290
+ const singular = this.isSingular();
257
291
 
258
- if (simple) {
292
+ if (singular) {
259
293
  const assumption = this.getAssumption(),
260
294
  assumptionJSON = assumption.toJSON();
261
295
 
@@ -6,8 +6,9 @@ import JudgementAssignment from "../assignment/judgement";
6
6
  import { define } from "../ontology";
7
7
 
8
8
  export default define(class Judgement {
9
- constructor(string, frame, assumption) {
9
+ constructor(string, node, frame, assumption) {
10
10
  this.string = string;
11
+ this.node = node;
11
12
  this.frame = frame;
12
13
  this.assumption = assumption;
13
14
  }
@@ -16,6 +17,10 @@ export default define(class Judgement {
16
17
  return this.string;
17
18
  }
18
19
 
20
+ getNode() {
21
+ return this.node;
22
+ }
23
+
19
24
  getFrame() {
20
25
  return this.frame;
21
26
  }
@@ -24,7 +29,7 @@ export default define(class Judgement {
24
29
  return this.assumption;
25
30
  }
26
31
 
27
- isSimple() { return this.frame.isSimple(); }
32
+ isSingular() { return this.node.isSingular(); }
28
33
 
29
34
  getMetavariable() { return this.frame.getMetavariable(); }
30
35
 
@@ -157,7 +162,7 @@ export default define(class Judgement {
157
162
  frame = Frame.fromJudgementNode(judgementNode, context),
158
163
  assumption = Assumption.fromJudgementNode(judgementNode, context);
159
164
 
160
- judgement = new Judgement(string, frame, assumption);
165
+ judgement = new Judgement(string, node, frame, assumption);
161
166
  }
162
167
 
163
168
  return judgement;