occam-verify-cli 1.0.587 → 1.0.602
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.
- package/lib/context/ephemeral.js +74 -2
- package/lib/context/file/nominal.js +11 -9
- package/lib/context/liminal.js +161 -24
- package/lib/context/literal.js +8 -2
- package/lib/context/scoped.js +4 -28
- package/lib/context/synthetic.js +146 -0
- package/lib/context.js +170 -1
- package/lib/element/assertion/contained.js +21 -15
- package/lib/element/assertion/defined.js +45 -65
- package/lib/element/assertion/property.js +25 -19
- package/lib/element/assertion/satisfies.js +14 -8
- package/lib/element/assertion/subproof.js +12 -6
- package/lib/element/assertion.js +47 -1
- package/lib/element/assumption.js +12 -12
- package/lib/element/conclusion.js +2 -2
- package/lib/element/deduction.js +2 -2
- package/lib/element/frame.js +61 -29
- package/lib/element/judgement.js +7 -1
- package/lib/element/label.js +8 -8
- package/lib/element/metavariable.js +71 -59
- package/lib/element/procedureCall.js +24 -8
- package/lib/element/proof.js +43 -35
- package/lib/element/proofAssertion/premise.js +122 -97
- package/lib/element/proofAssertion/step.js +161 -115
- package/lib/element/proofAssertion/supposition.js +157 -118
- package/lib/element/proofAssertion.js +3 -3
- package/lib/element/reference.js +40 -7
- package/lib/element/rule.js +227 -95
- package/lib/element/signature.js +2 -1
- package/lib/element/statement.js +67 -34
- package/lib/element/substitution/frame.js +36 -16
- package/lib/element/substitution/reference.js +36 -16
- package/lib/element/substitution/statement.js +94 -55
- package/lib/element/substitution/term.js +36 -16
- package/lib/element/substitution.js +54 -17
- package/lib/element/substitutions.js +4 -276
- package/lib/element/term.js +60 -31
- package/lib/element/topLevelAssertion/axiom.js +13 -4
- package/lib/element/topLevelAssertion/conjecture.js +7 -2
- package/lib/element/topLevelAssertion/theorem.js +7 -2
- package/lib/element/topLevelAssertion.js +201 -134
- package/lib/element/topLevelMetaAssertion.js +310 -51
- package/lib/element/variable.js +15 -6
- package/lib/node/substitution/statement.js +33 -1
- package/lib/process/unify.js +6 -6
- package/lib/utilities/context.js +10 -25
- package/lib/utilities/element.js +34 -9
- package/lib/utilities/statement.js +1 -8
- package/lib/utilities/string.js +12 -1
- package/lib/utilities/substitutions.js +42 -16
- package/lib/utilities/unification.js +3 -1
- package/lib/utilities/validation.js +2 -2
- package/package.json +4 -4
- package/src/context/ephemeral.js +73 -1
- package/src/context/file/nominal.js +14 -11
- package/src/context/liminal.js +180 -25
- package/src/context/literal.js +3 -1
- package/src/context/scoped.js +3 -35
- package/src/context/synthetic.js +49 -0
- package/src/context.js +163 -1
- package/src/element/assertion/contained.js +28 -20
- package/src/element/assertion/defined.js +62 -34
- package/src/element/assertion/property.js +27 -19
- package/src/element/assertion/satisfies.js +15 -7
- package/src/element/assertion/subproof.js +13 -5
- package/src/element/assertion.js +35 -0
- package/src/element/assumption.js +5 -5
- package/src/element/conclusion.js +2 -4
- package/src/element/deduction.js +2 -4
- package/src/element/frame.js +71 -39
- package/src/element/judgement.js +2 -0
- package/src/element/label.js +4 -4
- package/src/element/metavariable.js +94 -75
- package/src/element/procedureCall.js +6 -6
- package/src/element/proof.js +6 -6
- package/src/element/proofAssertion/premise.js +101 -69
- package/src/element/proofAssertion/step.js +78 -39
- package/src/element/proofAssertion/supposition.js +141 -115
- package/src/element/proofAssertion.js +3 -2
- package/src/element/reference.js +52 -10
- package/src/element/rule.js +138 -76
- package/src/element/signature.js +2 -0
- package/src/element/statement.js +76 -45
- package/src/element/substitution/frame.js +44 -15
- package/src/element/substitution/reference.js +44 -15
- package/src/element/substitution/statement.js +124 -72
- package/src/element/substitution/term.js +43 -15
- package/src/element/substitution.js +55 -18
- package/src/element/substitutions.js +1 -258
- package/src/element/term.js +65 -34
- package/src/element/topLevelAssertion/axiom.js +1 -1
- package/src/element/topLevelAssertion/conjecture.js +1 -1
- package/src/element/topLevelAssertion/theorem.js +1 -1
- package/src/element/topLevelAssertion.js +128 -48
- package/src/element/topLevelMetaAssertion.js +86 -32
- package/src/element/variable.js +15 -5
- package/src/node/substitution/statement.js +33 -0
- package/src/process/unify.js +6 -8
- package/src/utilities/context.js +9 -8
- package/src/utilities/element.js +37 -10
- package/src/utilities/statement.js +0 -7
- package/src/utilities/string.js +14 -0
- package/src/utilities/substitutions.js +59 -17
- package/src/utilities/unification.js +4 -0
- package/src/utilities/validation.js +3 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import ProofAssertion from "../proofAssertion";
|
|
4
|
-
import assignAssignments from "../../process/assign";
|
|
5
4
|
|
|
6
5
|
import { define } from "../../elements";
|
|
7
|
-
import { attempt } from "../../utilities/context";
|
|
6
|
+
import { attempt, liminally } from "../../utilities/context";
|
|
8
7
|
import { statementFromJSON, procedureCallFromJSON, statementToStatementJSON, procedureCallToProcedureCallJSON } from "../../utilities/json";
|
|
9
8
|
|
|
10
9
|
export default define(class Supposition extends ProofAssertion {
|
|
@@ -24,161 +23,142 @@ export default define(class Supposition extends ProofAssertion {
|
|
|
24
23
|
return stated;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
await this.break(context);
|
|
26
|
+
validate(assignments, context) {
|
|
27
|
+
let validates = false;
|
|
31
28
|
|
|
32
29
|
const suppositionString = this.getString(); ///
|
|
33
30
|
|
|
34
|
-
context.trace(`
|
|
31
|
+
context.trace(`Validatting the '${suppositionString}' supposition...`);
|
|
35
32
|
|
|
36
33
|
const statement = this.getStatement(),
|
|
37
34
|
procedureCall = this.getProcedureCall();
|
|
38
35
|
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
statementValidates = this.validateStatement(assignments, context);
|
|
36
|
+
if (false) {
|
|
37
|
+
///
|
|
38
|
+
} else if (statement !== null) {
|
|
39
|
+
const statementValidates = this.validateStatement(assignments, context);
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
if (statementValidates) {
|
|
42
|
+
validates = true;
|
|
43
|
+
}
|
|
44
|
+
} else if (procedureCall !== null) {
|
|
45
|
+
const procedureCallValidates = this.validateProcedureCall(assignments, context);
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
if (procedureCallValidates) {
|
|
48
|
+
validates = true;
|
|
49
|
+
}
|
|
50
|
+
} else {
|
|
51
|
+
context.debug(`Unable to validate the '${suppositionString}' supposition because it is nonsense.`);
|
|
52
|
+
}
|
|
50
53
|
|
|
51
|
-
|
|
54
|
+
if (validates) {
|
|
55
|
+
context.debug(`...validated the '${suppositionString}' supposition.`);
|
|
56
|
+
}
|
|
52
57
|
|
|
53
|
-
|
|
58
|
+
return validates;
|
|
59
|
+
}
|
|
54
60
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
}
|
|
61
|
+
validateProcedureCall(assignments, context) {
|
|
62
|
+
let procedureCallValidates = false;
|
|
59
63
|
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
const suppositionString = this.getString(), ///
|
|
65
|
+
procedureCallString = this.procedureCall.getString();
|
|
62
66
|
|
|
63
|
-
|
|
64
|
-
this.setContext(context);
|
|
67
|
+
context.trace(`Validatting the '${suppositionString}' supposition's '${procedureCallString}' procedure call...`);
|
|
65
68
|
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}, context);
|
|
70
|
-
} else {
|
|
71
|
-
context.debug(`Unable to verify the '${suppositionString}' supposition because it is nonsense.`);
|
|
72
|
-
}
|
|
69
|
+
procedureCallValidates = this.procedureCall.validate(context);
|
|
73
70
|
|
|
74
|
-
if (
|
|
75
|
-
context.debug(`...
|
|
71
|
+
if (procedureCallValidates) {
|
|
72
|
+
context.debug(`...validated the '${suppositionString}' supposition's '${procedureCallString}' procedure call.`);
|
|
76
73
|
}
|
|
77
74
|
|
|
78
|
-
return
|
|
75
|
+
return procedureCallValidates;
|
|
79
76
|
}
|
|
80
77
|
|
|
81
|
-
|
|
82
|
-
let
|
|
78
|
+
unifySupposition(supposition, generalContext, specificContext) {
|
|
79
|
+
let suppositionUnifies;
|
|
83
80
|
|
|
84
|
-
const
|
|
81
|
+
const context = specificContext, ///
|
|
82
|
+
specificSupposition = supposition, ///
|
|
83
|
+
generalSuppositionString = this.getString(), ///
|
|
84
|
+
specificSuppositionString = specificSupposition.getString();
|
|
85
85
|
|
|
86
|
-
context.trace(`Unifying the '${
|
|
86
|
+
context.trace(`Unifying the '${specificSuppositionString}' supposition with the '${generalSuppositionString}' supposition...`);
|
|
87
87
|
|
|
88
|
-
const statement =
|
|
88
|
+
const statement = specificSupposition.getStatement(),
|
|
89
|
+
statementUnifies = this.unifyStatement(statement, generalContext, specificContext);
|
|
89
90
|
|
|
90
|
-
|
|
91
|
-
const statementUnifiesIndependently = statement.unifyIndependently(context);
|
|
91
|
+
suppositionUnifies = statementUnifies; ///
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
93
|
+
if (suppositionUnifies) {
|
|
94
|
+
context.debug(`...unified the '${specificSuppositionString}' supposition with the '${generalSuppositionString}' supposition.`);
|
|
96
95
|
}
|
|
97
96
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (procedureCallResolvedIndependently) {
|
|
102
|
-
unifiesIndependently = true;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
97
|
+
return suppositionUnifies;
|
|
98
|
+
}
|
|
105
99
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
100
|
+
unifySubproofOrProofAssertion(subproofOrProofAssertion, context) {
|
|
101
|
+
let subproofOrProofAssertionUnifies;
|
|
109
102
|
|
|
110
|
-
|
|
111
|
-
|
|
103
|
+
const suppositionString = this.getString(), ///
|
|
104
|
+
subproofOrProofAssertionString = subproofOrProofAssertion.getString();
|
|
112
105
|
|
|
113
|
-
|
|
114
|
-
let subproofOrProofAssertionUnifies = false;
|
|
106
|
+
context.trace(`Unifying the '${subproofOrProofAssertionString}' subproof or proof assertion with the '${suppositionString}' supposition...`);
|
|
115
107
|
|
|
116
108
|
const subproofOrProofAssertionProofAssertion = subproofOrProofAssertion.isProofAssertion(),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
substitutions.snapshot(context);
|
|
109
|
+
proofAssertion = subproofOrProofAssertionProofAssertion ?
|
|
110
|
+
subproofOrProofAssertion :
|
|
111
|
+
null,
|
|
112
|
+
subproof = subproofOrProofAssertionProofAssertion ?
|
|
113
|
+
null :
|
|
114
|
+
subproofOrProofAssertion;
|
|
125
115
|
|
|
126
|
-
if (
|
|
127
|
-
const
|
|
116
|
+
if (proofAssertion !== null) {
|
|
117
|
+
const proofAssertionUnifies = this.unifyProofAssertion(proofAssertion, context);
|
|
128
118
|
|
|
129
|
-
if (
|
|
119
|
+
if (proofAssertionUnifies) {
|
|
130
120
|
subproofOrProofAssertionUnifies = true;
|
|
131
121
|
}
|
|
132
122
|
}
|
|
133
123
|
|
|
134
|
-
if (
|
|
135
|
-
const
|
|
124
|
+
if (subproof !== null) {
|
|
125
|
+
const subproofUnifies = this.unifySubproof(subproof, context);
|
|
136
126
|
|
|
137
|
-
if (
|
|
127
|
+
if (subproofUnifies) {
|
|
138
128
|
subproofOrProofAssertionUnifies = true;
|
|
139
129
|
}
|
|
140
130
|
}
|
|
141
131
|
|
|
142
132
|
if (subproofOrProofAssertionUnifies) {
|
|
143
|
-
|
|
133
|
+
context.debug(`...unified the '${subproofOrProofAssertionString}' subproof or proof assertion with the '${suppositionString}' supposition.`);
|
|
144
134
|
}
|
|
145
135
|
|
|
146
|
-
subproofOrProofAssertionUnifies ?
|
|
147
|
-
substitutions.continue(context) :
|
|
148
|
-
substitutions.rollback(context);
|
|
149
|
-
|
|
150
136
|
return subproofOrProofAssertionUnifies;
|
|
151
137
|
}
|
|
152
138
|
|
|
153
|
-
unifyProofAssertion(proofAssertion,
|
|
154
|
-
let proofAssertionUnifies
|
|
139
|
+
unifyProofAssertion(proofAssertion, context) {
|
|
140
|
+
let proofAssertionUnifies;
|
|
155
141
|
|
|
156
142
|
const suppositionString = this.getString(), ///
|
|
157
143
|
proofAssertionString = proofAssertion.getString();
|
|
158
144
|
|
|
159
145
|
context.trace(`Unifying the '${proofAssertionString}' proof assertion with the '${suppositionString}' supposition...`);
|
|
160
146
|
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const generalContext = context; ///
|
|
166
|
-
|
|
167
|
-
context = specificContext; ///
|
|
147
|
+
const proofAssertionContext = proofAssertion.getContext(),
|
|
148
|
+
suppositionContext = this.getContext(),
|
|
149
|
+
generalContext = suppositionContext, ///
|
|
150
|
+
specificContext = proofAssertionContext; ///
|
|
168
151
|
|
|
169
|
-
|
|
152
|
+
proofAssertionUnifies = liminally((specificContext) => {
|
|
153
|
+
const statement = proofAssertion.getStatement(),
|
|
154
|
+
statementUnifies = this.unifyStatement(statement, generalContext, specificContext);
|
|
170
155
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// const statement = proofAssertion.getStatement(),
|
|
174
|
-
// statementUnifies = this.unifyStatement(statement, substitutions, generalContext, specificContext);
|
|
175
|
-
//
|
|
176
|
-
// return statementUnifies;
|
|
177
|
-
// }, specificContext, proofAssertionContext);
|
|
156
|
+
if (statementUnifies) {
|
|
157
|
+
specificContext.commit(context);
|
|
178
158
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
}, specificContext);
|
|
182
162
|
|
|
183
163
|
if (proofAssertionUnifies) {
|
|
184
164
|
context.debug(`...unified the '${proofAssertionString}' proof assertion with the '${suppositionString}' supposition.`);
|
|
@@ -187,11 +167,11 @@ export default define(class Supposition extends ProofAssertion {
|
|
|
187
167
|
return proofAssertionUnifies;
|
|
188
168
|
}
|
|
189
169
|
|
|
190
|
-
unifySubproof(subproof,
|
|
170
|
+
unifySubproof(subproof, context) {
|
|
191
171
|
let subproofUnifies = false;
|
|
192
172
|
|
|
193
|
-
const
|
|
194
|
-
|
|
173
|
+
const suppositionString = this.getString(),
|
|
174
|
+
subproofString = subproof.getString();
|
|
195
175
|
|
|
196
176
|
context.trace(`Unifying the '${subproofString}' subproof with the '${suppositionString}' supposition...`);
|
|
197
177
|
|
|
@@ -229,26 +209,71 @@ export default define(class Supposition extends ProofAssertion {
|
|
|
229
209
|
return subproofUnifies;
|
|
230
210
|
}
|
|
231
211
|
|
|
232
|
-
|
|
233
|
-
let
|
|
212
|
+
async verify(assignments, context) {
|
|
213
|
+
let verifies = false;
|
|
234
214
|
|
|
235
|
-
|
|
236
|
-
specificSupposition = supposition, ///
|
|
237
|
-
generalSuppositionString = this.getString(), ///
|
|
238
|
-
specificSuppositionString = specificSupposition.getString();
|
|
215
|
+
await this.break(context);
|
|
239
216
|
|
|
240
|
-
|
|
217
|
+
const suppositionString = this.getString(); ///
|
|
241
218
|
|
|
242
|
-
|
|
243
|
-
statementUnifies = this.unifyStatement(statement, substitutions, generalContext, specificContext);
|
|
219
|
+
context.trace(`Verifying the '${suppositionString}' supposition...`);
|
|
244
220
|
|
|
245
|
-
|
|
221
|
+
attempt((context) => {
|
|
222
|
+
const validates = this.validate(assignments, context);
|
|
246
223
|
|
|
247
|
-
|
|
248
|
-
|
|
224
|
+
if (validates) {
|
|
225
|
+
this.setContext(context);
|
|
226
|
+
|
|
227
|
+
verifies = true;
|
|
228
|
+
}
|
|
229
|
+
}, context);
|
|
230
|
+
|
|
231
|
+
if (verifies) {
|
|
232
|
+
context.debug(`...verified the '${suppositionString}' supposition.`);
|
|
249
233
|
}
|
|
250
234
|
|
|
251
|
-
return
|
|
235
|
+
return verifies;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
async unifyIndependently(context) {
|
|
239
|
+
let unifiesIndependently = false;
|
|
240
|
+
|
|
241
|
+
const suppositionString = this.getString(); ///
|
|
242
|
+
|
|
243
|
+
context.trace(`Unifying the '${suppositionString}' supposition independently...`);
|
|
244
|
+
|
|
245
|
+
const statement = this.getStatement(),
|
|
246
|
+
procedureCall = this.getProcedureCall();
|
|
247
|
+
|
|
248
|
+
if (statement !== null) {
|
|
249
|
+
const specificContext = context; ///
|
|
250
|
+
|
|
251
|
+
context = this.getContext();
|
|
252
|
+
|
|
253
|
+
const generalContext = context; ///
|
|
254
|
+
|
|
255
|
+
context = specificContext; ///
|
|
256
|
+
|
|
257
|
+
const statementUnifiesIndependently = statement.unifyIndependently(generalContext, specificContext);
|
|
258
|
+
|
|
259
|
+
if (statementUnifiesIndependently) {
|
|
260
|
+
unifiesIndependently = true;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (procedureCall !== null) {
|
|
265
|
+
const procedureCallResolvedIndependently = await procedureCall.unifyIndependently(context);
|
|
266
|
+
|
|
267
|
+
if (procedureCallResolvedIndependently) {
|
|
268
|
+
unifiesIndependently = true;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (unifiesIndependently) {
|
|
273
|
+
context.debug(`...unified the '${suppositionString}' supposition independenly.`);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
return unifiesIndependently;
|
|
252
277
|
}
|
|
253
278
|
|
|
254
279
|
toJSON() {
|
|
@@ -287,3 +312,4 @@ export default define(class Supposition extends ProofAssertion {
|
|
|
287
312
|
return supposition;
|
|
288
313
|
}
|
|
289
314
|
});
|
|
315
|
+
|
|
@@ -65,7 +65,7 @@ export default class ProofAssertion extends Element {
|
|
|
65
65
|
return statementValidates;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
unifyStatement(statement,
|
|
68
|
+
unifyStatement(statement, generalContext, specificContext) {
|
|
69
69
|
let statementUnifies = false;
|
|
70
70
|
|
|
71
71
|
if (this.statement !== null) {
|
|
@@ -74,7 +74,8 @@ export default class ProofAssertion extends Element {
|
|
|
74
74
|
proofAssertionString = this.getString(); ///
|
|
75
75
|
|
|
76
76
|
context.trace(`Unifying the '${statementString}' statement with the '${proofAssertionString}' proof assertion...`);
|
|
77
|
-
|
|
77
|
+
|
|
78
|
+
statementUnifies = this.statement.unifyStatement(statement, generalContext, specificContext);
|
|
78
79
|
|
|
79
80
|
if (statementUnifies) {
|
|
80
81
|
context.debug(`...unified the '${statementString}' statement with the '${proofAssertionString}' proof assertion.`);
|
package/src/element/reference.js
CHANGED
|
@@ -34,15 +34,37 @@ export default define(class Reference extends Element {
|
|
|
34
34
|
return metavariableNode;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
getReferenceNode() {
|
|
38
|
+
const node = this.getNode(),
|
|
39
|
+
assertionNode = node; ///
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
return assertionNode;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
matchReferenceNode(assertionNode) {
|
|
45
|
+
const assertionNodeA = assertionNode; ///
|
|
46
|
+
|
|
47
|
+
assertionNode = this.getReferenceNode();
|
|
48
|
+
|
|
49
|
+
const assertionNodeB = assertionNode, ///
|
|
50
|
+
assertionNodeAAMatchesReferenceBNodeB = assertionNodeA.match(assertionNodeB),
|
|
51
|
+
equalTo = assertionNodeAAMatchesReferenceBNodeB; ///
|
|
52
|
+
|
|
53
|
+
return equalTo;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
isValid(context) {
|
|
57
|
+
const assertionNode = this.getReferenceNode(),
|
|
58
|
+
assertionPresent = context.isReferencePresentByReferenceNode(assertionNode),
|
|
59
|
+
valid = assertionPresent; ///
|
|
60
|
+
|
|
61
|
+
return valid;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
isEqualTo(assertion) {
|
|
65
|
+
const assertionNode = assertion.getNode(),
|
|
66
|
+
assertionNodeMatches = this.matchReferenceNode(assertionNode),
|
|
67
|
+
equalTo = assertionNodeMatches; ///
|
|
46
68
|
|
|
47
69
|
return equalTo;
|
|
48
70
|
}
|
|
@@ -63,6 +85,26 @@ export default define(class Reference extends Element {
|
|
|
63
85
|
return comparesToParamter;
|
|
64
86
|
}
|
|
65
87
|
|
|
88
|
+
compareMetavariable(metavariable) {
|
|
89
|
+
let metavaraibleComparseTo = false;
|
|
90
|
+
|
|
91
|
+
let metavariableName;
|
|
92
|
+
|
|
93
|
+
metavariableName = this.metavariable.getName();
|
|
94
|
+
|
|
95
|
+
const metavariableNameA = metavariableName ///
|
|
96
|
+
|
|
97
|
+
metavariableName = metavariable.getName();
|
|
98
|
+
|
|
99
|
+
const metavariableNameB = metavariableName; ///
|
|
100
|
+
|
|
101
|
+
if (metavariableNameA === metavariableNameB) {
|
|
102
|
+
metavaraibleComparseTo = true;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return metavaraibleComparseTo;
|
|
106
|
+
}
|
|
107
|
+
|
|
66
108
|
compareMetavariableName(metavariableName) { return this.metavariable.compareMetavariableName(metavariableName); }
|
|
67
109
|
|
|
68
110
|
matchMetavariableNode(metavariableNode) { return this.metavariable.matchNode(metavariableNode); }
|
|
@@ -105,7 +147,7 @@ export default define(class Reference extends Element {
|
|
|
105
147
|
validateMetavariable(context) {
|
|
106
148
|
let metavariableValidates = false;
|
|
107
149
|
|
|
108
|
-
const referenceString = this.getString(),
|
|
150
|
+
const referenceString = this.getString(), ///
|
|
109
151
|
metavariableString = this.metavariable.getString();
|
|
110
152
|
|
|
111
153
|
context.trace(`Validating the '${referenceString}' reference's '${metavariableString}' metavariable....'`);
|
|
@@ -131,7 +173,7 @@ export default define(class Reference extends Element {
|
|
|
131
173
|
validateAsMetavariable(context) {
|
|
132
174
|
let validatesAsMetavariable = false;
|
|
133
175
|
|
|
134
|
-
const referenceString = this.getString();
|
|
176
|
+
const referenceString = this.getString(); ///
|
|
135
177
|
|
|
136
178
|
context.trace(`Validating the '${referenceString}' reference as a metavaraible...`);
|
|
137
179
|
|