occam-verify-cli 1.0.304 → 1.0.306
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/dom/declaration.js +52 -57
- package/lib/dom/metavariable.js +8 -1
- package/lib/dom/procedureCall.js +2 -2
- package/lib/dom/reference.js +1 -8
- package/lib/node/declaration.js +1 -8
- package/lib/node/frame.js +14 -2
- package/lib/node/statement.js +1 -8
- package/lib/unifier/metaLevel.js +17 -42
- package/package.json +1 -1
- package/src/dom/declaration.js +62 -56
- package/src/dom/metavariable.js +7 -0
- package/src/dom/procedureCall.js +1 -1
- package/src/dom/reference.js +0 -7
- package/src/node/declaration.js +0 -7
- package/src/node/frame.js +16 -2
- package/src/node/statement.js +0 -7
- package/src/unifier/metaLevel.js +23 -68
package/src/dom/declaration.js
CHANGED
|
@@ -7,10 +7,10 @@ import { domAssigned } from "../dom";
|
|
|
7
7
|
import { unifyStatementIntrinsically } from "../utilities/unification";
|
|
8
8
|
|
|
9
9
|
export default domAssigned(class Declaration {
|
|
10
|
-
constructor(string, node,
|
|
10
|
+
constructor(string, node, metavariable, statement) {
|
|
11
11
|
this.string = string;
|
|
12
12
|
this.node = node;
|
|
13
|
-
this.
|
|
13
|
+
this.metavariable = metavariable;
|
|
14
14
|
this.statement = statement;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -22,26 +22,18 @@ export default domAssigned(class Declaration {
|
|
|
22
22
|
return this.node;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
return this.
|
|
25
|
+
getMetavariable() {
|
|
26
|
+
return this.metavariable;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
getStatement() {
|
|
30
30
|
return this.statement;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
isSimple() {
|
|
34
|
-
|
|
35
|
-
getMetavariable() {
|
|
36
|
-
let metavariable = null;
|
|
37
|
-
|
|
38
|
-
const simple = this.isSimple();
|
|
39
|
-
|
|
40
|
-
if (simple) {
|
|
41
|
-
metavariable = this.reference.getMetavariable();
|
|
42
|
-
}
|
|
33
|
+
isSimple() {
|
|
34
|
+
const simple = (this.statement === null);
|
|
43
35
|
|
|
44
|
-
return
|
|
36
|
+
return simple;
|
|
45
37
|
}
|
|
46
38
|
|
|
47
39
|
matchSubstitution(substitution, context) {
|
|
@@ -55,8 +47,7 @@ export default domAssigned(class Declaration {
|
|
|
55
47
|
const simple = this.isSimple();
|
|
56
48
|
|
|
57
49
|
if (simple) {
|
|
58
|
-
const
|
|
59
|
-
judgement = context.findJudgementByMetavariable(metavariable);
|
|
50
|
+
const judgement = context.findJudgementByMetavariable(this.metavariable);
|
|
60
51
|
|
|
61
52
|
if (judgement !== null) {
|
|
62
53
|
const declaration = judgement.getDeclaration();
|
|
@@ -67,9 +58,9 @@ export default domAssigned(class Declaration {
|
|
|
67
58
|
const statement = substitution.getStatement(),
|
|
68
59
|
metavariable = substitution.getMetavariable(),
|
|
69
60
|
statementEqualToStatement = this.statement.isEqualTo(statement),
|
|
70
|
-
|
|
61
|
+
metavariableEqualToMetavariable = this.metavariable.isEqualTo(metavariable);
|
|
71
62
|
|
|
72
|
-
if (
|
|
63
|
+
if (metavariableEqualToMetavariable && statementEqualToStatement) {
|
|
73
64
|
substitutionMatches = true;
|
|
74
65
|
}
|
|
75
66
|
}
|
|
@@ -91,13 +82,13 @@ export default domAssigned(class Declaration {
|
|
|
91
82
|
const simple = this.isSimple();
|
|
92
83
|
|
|
93
84
|
if (simple) {
|
|
94
|
-
const
|
|
85
|
+
const verifiesAsMetavariable = this.verifyAsMetavariable(assignments, stated, context);
|
|
95
86
|
|
|
96
|
-
verifies =
|
|
87
|
+
verifies = verifiesAsMetavariable; ///
|
|
97
88
|
} else {
|
|
98
|
-
const
|
|
89
|
+
const metavariableVerifiesAsReference = this.verifyMetavariableAsReference(assignments, stated, context);
|
|
99
90
|
|
|
100
|
-
if (
|
|
91
|
+
if (metavariableVerifiesAsReference) {
|
|
101
92
|
const statementVerifies = this.verifyStatement(assignments, stated, context);
|
|
102
93
|
|
|
103
94
|
if (statementVerifies) {
|
|
@@ -124,20 +115,24 @@ export default domAssigned(class Declaration {
|
|
|
124
115
|
return verifies;
|
|
125
116
|
}
|
|
126
117
|
|
|
127
|
-
|
|
128
|
-
let
|
|
118
|
+
verifyMetavariableAsReference(assignments, stated, context) {
|
|
119
|
+
let metavariableVerifiesAsReference;
|
|
129
120
|
|
|
130
|
-
const
|
|
121
|
+
const declarationString = this.string,
|
|
122
|
+
metavariableString = this.metavariable.getString();
|
|
131
123
|
|
|
132
|
-
context.trace(`Verifying the '${
|
|
124
|
+
context.trace(`Verifying the '${declarationString}' declaration's '${metavariableString}' metavariable as a reference...`);
|
|
133
125
|
|
|
134
|
-
|
|
126
|
+
const reference = referenceFromMetavariable(this.metavariable, context),
|
|
127
|
+
referenceVerifies = reference.verify(context);
|
|
135
128
|
|
|
136
|
-
|
|
137
|
-
|
|
129
|
+
metavariableVerifiesAsReference = referenceVerifies; ///
|
|
130
|
+
|
|
131
|
+
if (metavariableVerifiesAsReference) {
|
|
132
|
+
context.debug(`...verified the '${declarationString}' declaration's '${metavariableString}' metavariable as a reference.`);
|
|
138
133
|
}
|
|
139
134
|
|
|
140
|
-
return
|
|
135
|
+
return metavariableVerifiesAsReference;
|
|
141
136
|
}
|
|
142
137
|
|
|
143
138
|
verifyStatement(assignments, stated, context) {
|
|
@@ -164,23 +159,21 @@ export default domAssigned(class Declaration {
|
|
|
164
159
|
return statementVerifies;
|
|
165
160
|
}
|
|
166
161
|
|
|
167
|
-
|
|
168
|
-
let
|
|
169
|
-
|
|
170
|
-
const referenceString = this.reference.getString();
|
|
162
|
+
verifyAsMetavariable(assignments, stated, context) {
|
|
163
|
+
let verifiesAsMetavariable;
|
|
171
164
|
|
|
172
|
-
|
|
165
|
+
const declarationString = this.string, ///
|
|
166
|
+
metavariableString = this.metavariable.getString();
|
|
173
167
|
|
|
174
|
-
|
|
175
|
-
metavariableVerifies = metavariable.verify(context);
|
|
168
|
+
context.trace(`Verifying the '${declarationString}' declaration's '${metavariableString}' metavariable...`);
|
|
176
169
|
|
|
177
|
-
|
|
170
|
+
verifiesAsMetavariable = this.metavariable.verify(context);
|
|
178
171
|
|
|
179
|
-
if (
|
|
180
|
-
context.debug(`...verified the '${
|
|
172
|
+
if (verifiesAsMetavariable) {
|
|
173
|
+
context.debug(`...verified the '${declarationString}' declaration's '${metavariableString}' metavariable.`);
|
|
181
174
|
}
|
|
182
175
|
|
|
183
|
-
return
|
|
176
|
+
return verifiesAsMetavariable;
|
|
184
177
|
}
|
|
185
178
|
|
|
186
179
|
verifyWhenStated(assignments, context) {
|
|
@@ -190,12 +183,13 @@ export default domAssigned(class Declaration {
|
|
|
190
183
|
|
|
191
184
|
context.trace(`Verifying the '${declarationString}' stated declaration...`);
|
|
192
185
|
|
|
193
|
-
const
|
|
186
|
+
const reference = referenceFromMetavariable(this.metavariable, context),
|
|
187
|
+
metavariablePresent = context.isMetavariablePresentByReference(reference);
|
|
194
188
|
|
|
195
189
|
if (metavariablePresent) {
|
|
196
190
|
verifiesWhenStated = true;
|
|
197
191
|
} else {
|
|
198
|
-
const metaLemmaMetatheorems = context.findMetaLemmaMetatheoremsByReference(
|
|
192
|
+
const metaLemmaMetatheorems = context.findMetaLemmaMetatheoremsByReference(reference),
|
|
199
193
|
metaLemmaMetatheoremsUnify = metaLemmaMetatheorems.every((metaLemmaMetatheorem) => {
|
|
200
194
|
const metaLemmaMetatheoremUnifies = this.unifyMetaLemmaMetatheorem(metaLemmaMetatheorem, context);
|
|
201
195
|
|
|
@@ -221,7 +215,8 @@ export default domAssigned(class Declaration {
|
|
|
221
215
|
|
|
222
216
|
context.trace(`Verifying the '${declarationString}' derived declaration...`);
|
|
223
217
|
|
|
224
|
-
const
|
|
218
|
+
const reference = referenceFromMetavariable(this.metavariable, context),
|
|
219
|
+
metaLemmaMetatheoremPresent = context.isMetaLemmaMetatheoremPresentByReference(reference);
|
|
225
220
|
|
|
226
221
|
verifiesWhenDerived = metaLemmaMetatheoremPresent; ///
|
|
227
222
|
|
|
@@ -235,7 +230,9 @@ export default domAssigned(class Declaration {
|
|
|
235
230
|
unifyStatement(statement, substitutions, generalContext, specificContext) {
|
|
236
231
|
let statementUnifies;
|
|
237
232
|
|
|
238
|
-
|
|
233
|
+
const simple = this.isSimple();
|
|
234
|
+
|
|
235
|
+
if (simple) {
|
|
239
236
|
statementUnifies = false;
|
|
240
237
|
} else {
|
|
241
238
|
const context = generalContext, ///
|
|
@@ -258,21 +255,22 @@ export default domAssigned(class Declaration {
|
|
|
258
255
|
return statementUnifies;
|
|
259
256
|
}
|
|
260
257
|
|
|
261
|
-
|
|
258
|
+
unifyLabel(label, substitutions, generalContext, specificContext) {
|
|
262
259
|
let labelUnifiesWithReference;
|
|
263
260
|
|
|
264
261
|
const context = generalContext, ///
|
|
265
262
|
labelString = label.getString(),
|
|
266
|
-
|
|
263
|
+
declarationString = this.string; //;/
|
|
267
264
|
|
|
268
|
-
context.trace(`Unifying the '${labelString}' label with the '${
|
|
265
|
+
context.trace(`Unifying the '${labelString}' label with the '${declarationString}' declaration...`);
|
|
269
266
|
|
|
270
|
-
const
|
|
267
|
+
const reference = referenceFromMetavariable(this.metavariable, context),
|
|
268
|
+
labelUnifies = reference.unifyLabel(label, substitutions, context);
|
|
271
269
|
|
|
272
270
|
labelUnifiesWithReference = labelUnifies; ///
|
|
273
271
|
|
|
274
272
|
if (labelUnifiesWithReference) {
|
|
275
|
-
context.debug(`...unified the '${labelString}' label with the '${
|
|
273
|
+
context.debug(`...unified the '${labelString}' label with the '${declarationString}' declaration.`);
|
|
276
274
|
}
|
|
277
275
|
|
|
278
276
|
return labelUnifiesWithReference;
|
|
@@ -294,9 +292,9 @@ export default domAssigned(class Declaration {
|
|
|
294
292
|
labelSubstitutions = Substitutions.fromNothing(),
|
|
295
293
|
label = metaLemmaMetatheorem.getLabel(),
|
|
296
294
|
substitutions = labelSubstitutions, ///
|
|
297
|
-
|
|
295
|
+
labelUnifies = this.unifyLabel(label, substitutions, generalContext, specificContext);
|
|
298
296
|
|
|
299
|
-
if (
|
|
297
|
+
if (labelUnifies) {
|
|
300
298
|
const statementSubstitutions = Substitutions.fromNothing(),
|
|
301
299
|
statement = metaLemmaMetatheorem.getStatement(),
|
|
302
300
|
substitutions = statementSubstitutions, ///
|
|
@@ -334,13 +332,21 @@ export default domAssigned(class Declaration {
|
|
|
334
332
|
}
|
|
335
333
|
});
|
|
336
334
|
|
|
335
|
+
function referenceFromMetavariable(metavariable, context) {
|
|
336
|
+
const { Reference } = dom,
|
|
337
|
+
metavariableNode = metavariable.getNode(),
|
|
338
|
+
reference = Reference.fromMetavariableNode(metavariableNode, context);
|
|
339
|
+
|
|
340
|
+
return reference;
|
|
341
|
+
}
|
|
342
|
+
|
|
337
343
|
function declarationFromDeclarationNode(declarationNode, context) {
|
|
338
|
-
const {
|
|
344
|
+
const { Metavariable, Declaration, Statement } = dom,
|
|
339
345
|
node = declarationNode, ///
|
|
340
346
|
string = context.nodeAsString(node),
|
|
341
|
-
|
|
347
|
+
metavariable = Metavariable.fromDeclarationNode(declarationNode, context),
|
|
342
348
|
statement = Statement.fromDeclarationNode(declarationNode, context),
|
|
343
|
-
declaration = new Declaration(string, node,
|
|
349
|
+
declaration = new Declaration(string, node, metavariable, statement);
|
|
344
350
|
|
|
345
351
|
return declaration;
|
|
346
352
|
}
|
package/src/dom/metavariable.js
CHANGED
|
@@ -398,6 +398,13 @@ export default domAssigned(class Metavariable {
|
|
|
398
398
|
return metavariable;
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
+
static fromDeclarationNode(declarationNode, context) {
|
|
402
|
+
const metavariableNode = declarationNode.getMetavariableNode(),
|
|
403
|
+
metavariable = metavariableFromMetavariableNode(metavariableNode, context);
|
|
404
|
+
|
|
405
|
+
return metavariable;
|
|
406
|
+
}
|
|
407
|
+
|
|
401
408
|
static fromMetavariableNode(metavariableNode, context) {
|
|
402
409
|
let metavariable = null;
|
|
403
410
|
|
package/src/dom/procedureCall.js
CHANGED
package/src/dom/reference.js
CHANGED
|
@@ -195,13 +195,6 @@ export default domAssigned(class Reference {
|
|
|
195
195
|
return reference;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
static fromDeclarationNode(declarationNode, context) {
|
|
199
|
-
const metavariableNode = declarationNode.getMetavariableNode(),
|
|
200
|
-
reference = referenceFromMetavariableNode(metavariableNode, context);
|
|
201
|
-
|
|
202
|
-
return reference;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
198
|
static fromMetavariableNode(metavariableNode, context) {
|
|
206
199
|
const reference = referenceFromMetavariableNode(metavariableNode, context);
|
|
207
200
|
|
package/src/node/declaration.js
CHANGED
|
@@ -5,13 +5,6 @@ import NonTerminalNode from "../node/nonTerminal";
|
|
|
5
5
|
import { STATEMENT_RULE_NAME, METAVARIABLE_RULE_NAME } from "../ruleNames";
|
|
6
6
|
|
|
7
7
|
export default class DeclarationNode extends NonTerminalNode {
|
|
8
|
-
isSimple() {
|
|
9
|
-
const statementNode = this.getStatementNode(),
|
|
10
|
-
simple = (statementNode === null);
|
|
11
|
-
|
|
12
|
-
return simple;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
8
|
getStatementNode() {
|
|
16
9
|
const ruleName = STATEMENT_RULE_NAME,
|
|
17
10
|
statementNode = this.getNodeByRuleName(ruleName);
|
package/src/node/frame.js
CHANGED
|
@@ -19,9 +19,23 @@ export default class FrameNode extends NonTerminalNode {
|
|
|
19
19
|
return metavariableNodes;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
getSingularDeclarationNode() {
|
|
23
|
+
const ruleName = DECLARATION_RULE_NAME,
|
|
24
|
+
singularDeclarationNode = this.getSingularTNodeByRuleName(ruleName);
|
|
25
|
+
|
|
26
|
+
return singularDeclarationNode;
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
getSingularMetavariableNode() {
|
|
23
|
-
|
|
24
|
-
|
|
30
|
+
let singularMetavariableNode = null;
|
|
31
|
+
|
|
32
|
+
const singularDeclarationNode = this.getSingularDeclarationNode();
|
|
33
|
+
|
|
34
|
+
if (singularDeclarationNode !== null) {
|
|
35
|
+
const metavariableNode = singularDeclarationNode.getMetavariableNode();
|
|
36
|
+
|
|
37
|
+
singularMetavariableNode = metavariableNode; ///
|
|
38
|
+
}
|
|
25
39
|
|
|
26
40
|
return singularMetavariableNode;
|
|
27
41
|
}
|
package/src/node/statement.js
CHANGED
|
@@ -122,13 +122,6 @@ export default class StatementNode extends NonTerminalNode {
|
|
|
122
122
|
return satisfiedAssertionNode;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
getSingularMetavariableNode() {
|
|
126
|
-
const ruleName = METAVARIABLE_RULE_NAME,
|
|
127
|
-
singularMetavariableNode = this.getSingularTNodeByRuleName(ruleName);
|
|
128
|
-
|
|
129
|
-
return singularMetavariableNode;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
125
|
getSingularMetaArgumentNode() {
|
|
133
126
|
const ruleName = META_ARGUMENT_RULE_NAME,
|
|
134
127
|
singularMetaArgumentNode = this.getNodeByRuleName(ruleName);
|
package/src/unifier/metaLevel.js
CHANGED
|
@@ -9,8 +9,8 @@ const termNodeQuery = nodeQuery("/term"),
|
|
|
9
9
|
frameNodeQuery = nodeQuery("/frame"),
|
|
10
10
|
statementNodeQuery = nodeQuery("/statement"),
|
|
11
11
|
termVariableNodeQuery = nodeQuery("/term/variable!"),
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
statementMetavariableNodeQuery = nodeQuery("/statement/metavariable!"),
|
|
13
|
+
frameDeclarationMetavariableNodeQuery = nodeQuery("/frame/declaration!/metavariable!");
|
|
14
14
|
|
|
15
15
|
class MetaLevelUnifier extends Unifier {
|
|
16
16
|
unify(generalNonTerminalNode, specificNonTerminalNode, substitutions, generalContext, specificContext) {
|
|
@@ -25,83 +25,50 @@ class MetaLevelUnifier extends Unifier {
|
|
|
25
25
|
|
|
26
26
|
static maps = [
|
|
27
27
|
{
|
|
28
|
-
generalNodeQuery:
|
|
28
|
+
generalNodeQuery: statementMetavariableNodeQuery,
|
|
29
29
|
specificNodeQuery: statementNodeQuery,
|
|
30
|
-
unify: (
|
|
30
|
+
unify: (generalStatementMetavariableNode, specificStatementNode, substitutions, generalContext, specificContext) => {
|
|
31
31
|
let statementUnifies;
|
|
32
32
|
|
|
33
|
-
const
|
|
34
|
-
singularMetavariableNode = statementNode.getSingularMetavariableNode();
|
|
33
|
+
const { Metavariable, Statement } = dom; ///
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
let context,
|
|
36
|
+
statementNode;
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
statementNode;
|
|
38
|
+
context = generalContext; ///
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
const metavariableNode = generalStatementMetavariableNode, ///
|
|
41
|
+
metavariable = Metavariable.fromMetavariableNode(metavariableNode, context);
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
const metavariableNodeParentNode = metavariableNode.getParentNode();
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
frameSubstitution = FrameSubstitution.fromStatementNode(statementNode, context),
|
|
48
|
-
termSubstitution = TermSubstitution.fromStatementNode(statementNode, context),
|
|
49
|
-
metavariable = Metavariable.fromStatementNode(statementNode, context),
|
|
50
|
-
substitution = (frameSubstitution || termSubstitution);
|
|
45
|
+
statementNode = metavariableNodeParentNode; ///
|
|
51
46
|
|
|
52
|
-
|
|
47
|
+
const { TermSubstitution, FrameSubstitution } = dom,
|
|
48
|
+
frameSubstitution = FrameSubstitution.fromStatementNode(statementNode, context),
|
|
49
|
+
termSubstitution = TermSubstitution.fromStatementNode(statementNode, context),
|
|
50
|
+
substitution = (frameSubstitution || termSubstitution);
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
context = specificContext; ///
|
|
55
53
|
|
|
56
|
-
|
|
54
|
+
statementNode = specificStatementNode; ///
|
|
57
55
|
|
|
58
|
-
|
|
59
|
-
} else {
|
|
60
|
-
const childNodesUnify = unifyChildNodes(generalStatementNode, specificStatementNode, substitutions, generalContext, specificContext);
|
|
56
|
+
const statement = Statement.fromStatementNode(statementNode, context);
|
|
61
57
|
|
|
62
|
-
|
|
63
|
-
}
|
|
58
|
+
statementUnifies = metavariable.unifyStatement(statement, substitution, substitutions, generalContext, specificContext);
|
|
64
59
|
|
|
65
60
|
return statementUnifies;
|
|
66
61
|
}
|
|
67
62
|
},
|
|
68
63
|
{
|
|
69
|
-
generalNodeQuery:
|
|
70
|
-
specificNodeQuery: declarationMetavariableNodeQuery,
|
|
71
|
-
unify: (generalDeclarationMetavariableNode, specificDeclarationMetavariableNode, substitutions, generalContext, specificContext) => {
|
|
72
|
-
let referenceUnifies;
|
|
73
|
-
|
|
74
|
-
const { Frame, Metavariable } = dom;
|
|
75
|
-
|
|
76
|
-
let context,
|
|
77
|
-
metavariableNode;
|
|
78
|
-
|
|
79
|
-
context = generalContext; ///
|
|
80
|
-
|
|
81
|
-
metavariableNode = generalDeclarationMetavariableNode; ///
|
|
82
|
-
|
|
83
|
-
const metavariable = Metavariable.fromMetavariableNode(metavariableNode, context);
|
|
84
|
-
|
|
85
|
-
context = specificContext; ///
|
|
86
|
-
|
|
87
|
-
metavariableNode = specificDeclarationMetavariableNode; ///
|
|
88
|
-
|
|
89
|
-
const frame = Frame.fromMetavariableNode(metavariableNode, context);
|
|
90
|
-
|
|
91
|
-
referenceUnifies = metavariable.unifyFrame(frame, substitutions, generalContext, specificContext);
|
|
92
|
-
|
|
93
|
-
return referenceUnifies;
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
generalNodeQuery: frameMetavariableNodeQuery,
|
|
64
|
+
generalNodeQuery: frameDeclarationMetavariableNodeQuery,
|
|
98
65
|
specificNodeQuery: frameNodeQuery,
|
|
99
|
-
unify: (
|
|
66
|
+
unify: (generalFrameDeclarationMetavariableNode, specificFrameNode, substitutions, generalContext, specificContext) => {
|
|
100
67
|
let frameUnifies;
|
|
101
68
|
|
|
102
69
|
const { Frame, Metavariable } = dom,
|
|
103
70
|
frameNode = specificFrameNode, ///
|
|
104
|
-
metavariableNode =
|
|
71
|
+
metavariableNode = generalFrameDeclarationMetavariableNode; ///
|
|
105
72
|
|
|
106
73
|
let context;
|
|
107
74
|
|
|
@@ -149,15 +116,3 @@ class MetaLevelUnifier extends Unifier {
|
|
|
149
116
|
const metaLevelUnifier = new MetaLevelUnifier();
|
|
150
117
|
|
|
151
118
|
export default metaLevelUnifier;
|
|
152
|
-
|
|
153
|
-
function unifyChildNodes(generalStatementNode, specificStatementNode, substitutions, generalContext, specificContext) {
|
|
154
|
-
const generalNonTerminalNode = generalStatementNode, ///
|
|
155
|
-
specificNonTerminalNode = specificStatementNode, ///
|
|
156
|
-
generalNonTerminalNodeChildNodes = generalNonTerminalNode.getChildNodes(),
|
|
157
|
-
specificNonTerminalNodeChildNodes = specificNonTerminalNode.getChildNodes(),
|
|
158
|
-
generalChildNodes = generalNonTerminalNodeChildNodes, ///
|
|
159
|
-
specificChildNodes = specificNonTerminalNodeChildNodes, ///
|
|
160
|
-
childNodesUnify = metaLevelUnifier.unifyChildNodes(generalChildNodes, specificChildNodes, substitutions, generalContext, specificContext);
|
|
161
|
-
|
|
162
|
-
return childNodesUnify;
|
|
163
|
-
}
|