occam-verify-cli 1.0.984 → 1.0.985
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/action/verify.js +22 -27
- package/lib/constants.js +1 -41
- package/lib/index.js +1 -2
- package/lib/utilities/fileContext.js +3 -8
- package/lib/utilities/releaseContext.js +2 -2
- package/package.json +5 -6
- package/src/action/verify.js +8 -18
- package/src/constants.js +0 -10
- package/src/index.js +0 -2
- package/src/utilities/fileContext.js +1 -2
- package/src/utilities/releaseContext.js +1 -1
- package/lib/context/aphasic.js +0 -27
- package/lib/context/bounded.js +0 -244
- package/lib/context/branching.js +0 -61
- package/lib/context/file/nominal.js +0 -586
- package/lib/context/illative.js +0 -28
- package/lib/context/liminal.js +0 -200
- package/lib/context/literal.js +0 -44
- package/lib/context/mnemic.js +0 -454
- package/lib/context/nested.js +0 -31
- package/lib/context/nominal.js +0 -57
- package/lib/context/phaneric.js +0 -44
- package/lib/context/thetic.js +0 -28
- package/lib/context.js +0 -445
- package/lib/element/assertion/contained.js +0 -218
- package/lib/element/assertion/defined.js +0 -213
- package/lib/element/assertion/property.js +0 -176
- package/lib/element/assertion/signature.js +0 -170
- package/lib/element/assertion/subproof.js +0 -220
- package/lib/element/assertion/type.js +0 -227
- package/lib/element/assertion.js +0 -49
- package/lib/element/assumption/metaLevel.js +0 -244
- package/lib/element/assumption.js +0 -252
- package/lib/element/combinator/bracketed.js +0 -36
- package/lib/element/combinator.js +0 -104
- package/lib/element/conclusion.js +0 -131
- package/lib/element/constructor/bracketed.js +0 -57
- package/lib/element/constructor.js +0 -129
- package/lib/element/declaration/combinator.js +0 -58
- package/lib/element/declaration/complexType.js +0 -180
- package/lib/element/declaration/constructor.js +0 -93
- package/lib/element/declaration/metavariable.js +0 -77
- package/lib/element/declaration/property.js +0 -88
- package/lib/element/declaration/simpleType.js +0 -148
- package/lib/element/declaration/typePrefix.js +0 -53
- package/lib/element/declaration/variable.js +0 -99
- package/lib/element/declaration.js +0 -15
- package/lib/element/deduction.js +0 -131
- package/lib/element/derivation.js +0 -46
- package/lib/element/equality.js +0 -211
- package/lib/element/equivalence.js +0 -200
- package/lib/element/error.js +0 -27
- package/lib/element/frame.js +0 -238
- package/lib/element/hypothesis.js +0 -135
- package/lib/element/judgement.js +0 -212
- package/lib/element/label.js +0 -135
- package/lib/element/metaType.js +0 -57
- package/lib/element/metavariable.js +0 -452
- package/lib/element/parameter.js +0 -69
- package/lib/element/procedureCall.js +0 -116
- package/lib/element/procedureReference.js +0 -56
- package/lib/element/proof.js +0 -52
- package/lib/element/proofAssertion/premise.js +0 -238
- package/lib/element/proofAssertion/step.js +0 -235
- package/lib/element/proofAssertion/supposition.js +0 -249
- package/lib/element/proofAssertion.js +0 -56
- package/lib/element/property.js +0 -176
- package/lib/element/propertyRelation.js +0 -132
- package/lib/element/reference.js +0 -227
- package/lib/element/rule.js +0 -242
- package/lib/element/section.js +0 -64
- package/lib/element/signature.js +0 -195
- package/lib/element/statement.js +0 -228
- package/lib/element/subDerivation.js +0 -46
- package/lib/element/subproof.js +0 -91
- package/lib/element/substitution/frame.js +0 -256
- package/lib/element/substitution/reference.js +0 -192
- package/lib/element/substitution/statement.js +0 -294
- package/lib/element/substitution/term.js +0 -266
- package/lib/element/substitution.js +0 -183
- package/lib/element/term.js +0 -217
- package/lib/element/topLevelAssertion/axiom.js +0 -158
- package/lib/element/topLevelAssertion/conjecture.js +0 -42
- package/lib/element/topLevelAssertion/lemma.js +0 -39
- package/lib/element/topLevelAssertion/theorem.js +0 -42
- package/lib/element/topLevelAssertion.js +0 -286
- package/lib/element/topLevelMetaAssertion/metaLemma.js +0 -42
- package/lib/element/topLevelMetaAssertion/metatheorem.js +0 -42
- package/lib/element/topLevelMetaAssertion.js +0 -179
- package/lib/element/type.js +0 -240
- package/lib/element/typePrefix.js +0 -85
- package/lib/element/variable.js +0 -206
- package/lib/elements.js +0 -27
- package/lib/metaTypeNames.js +0 -26
- package/lib/metaTypes.js +0 -66
- package/lib/node/argument.js +0 -31
- package/lib/node/assertion/contained.js +0 -51
- package/lib/node/assertion/defined.js +0 -47
- package/lib/node/assertion/property.js +0 -36
- package/lib/node/assertion/signature.js +0 -32
- package/lib/node/assertion/subproof.js +0 -28
- package/lib/node/assertion/type.js +0 -32
- package/lib/node/assertion.js +0 -18
- package/lib/node/assumption/metaLevel.js +0 -27
- package/lib/node/assumption.js +0 -27
- package/lib/node/body/axiom.js +0 -23
- package/lib/node/body/conjecture.js +0 -23
- package/lib/node/body/lemma.js +0 -23
- package/lib/node/body/metaLemma.js +0 -23
- package/lib/node/body/metatheorem.js +0 -23
- package/lib/node/body/rule.js +0 -44
- package/lib/node/body/theorem.js +0 -23
- package/lib/node/body.js +0 -31
- package/lib/node/combinator.js +0 -23
- package/lib/node/conclusion.js +0 -27
- package/lib/node/constructor.js +0 -23
- package/lib/node/declaration/combinator.js +0 -28
- package/lib/node/declaration/complexType.js +0 -72
- package/lib/node/declaration/constructor.js +0 -47
- package/lib/node/declaration/metavariable.js +0 -36
- package/lib/node/declaration/property.js +0 -44
- package/lib/node/declaration/simpleType.js +0 -72
- package/lib/node/declaration/typePrefix.js +0 -32
- package/lib/node/declaration/variable.js +0 -51
- package/lib/node/declaration.js +0 -18
- package/lib/node/deduction.js +0 -27
- package/lib/node/derivation.js +0 -26
- package/lib/node/document.js +0 -18
- package/lib/node/equality.js +0 -33
- package/lib/node/equivalence.js +0 -23
- package/lib/node/equivalences.js +0 -18
- package/lib/node/error.js +0 -18
- package/lib/node/frame.js +0 -38
- package/lib/node/header/axiom.js +0 -28
- package/lib/node/header/conjecture.js +0 -23
- package/lib/node/header/lemma.js +0 -23
- package/lib/node/header/metaLemma.js +0 -23
- package/lib/node/header/metatheorem.js +0 -23
- package/lib/node/header/rule.js +0 -23
- package/lib/node/header/theorem.js +0 -23
- package/lib/node/header.js +0 -47
- package/lib/node/hypothesis.js +0 -27
- package/lib/node/judgement.js +0 -31
- package/lib/node/label.js +0 -23
- package/lib/node/labels.js +0 -23
- package/lib/node/metaArgument.js +0 -23
- package/lib/node/metaType.js +0 -30
- package/lib/node/metavariable.js +0 -39
- package/lib/node/parameter.js +0 -47
- package/lib/node/parenthesisedLabel.js +0 -23
- package/lib/node/parenthesisedLabels.js +0 -27
- package/lib/node/placeholder.js +0 -18
- package/lib/node/procedureCall.js +0 -31
- package/lib/node/procedureReference.js +0 -30
- package/lib/node/proof.js +0 -23
- package/lib/node/proofAssertion/premise.js +0 -28
- package/lib/node/proofAssertion/step.js +0 -52
- package/lib/node/proofAssertion/supposition.js +0 -28
- package/lib/node/proofAssertion.js +0 -27
- package/lib/node/property.js +0 -30
- package/lib/node/propertyRelation.js +0 -31
- package/lib/node/qualification.js +0 -27
- package/lib/node/reference.js +0 -23
- package/lib/node/rule.js +0 -43
- package/lib/node/section.js +0 -39
- package/lib/node/signature.js +0 -23
- package/lib/node/statement.js +0 -103
- package/lib/node/subDerivation.js +0 -26
- package/lib/node/subproof.js +0 -35
- package/lib/node/substitution/frame.js +0 -40
- package/lib/node/substitution/reference.js +0 -40
- package/lib/node/substitution/statement.js +0 -60
- package/lib/node/substitution/term.js +0 -40
- package/lib/node/substitution.js +0 -18
- package/lib/node/term.js +0 -60
- package/lib/node/topLevelAssertion/axiom.js +0 -26
- package/lib/node/topLevelAssertion/conjecture.js +0 -26
- package/lib/node/topLevelAssertion/lemma.js +0 -26
- package/lib/node/topLevelAssertion/theorem.js +0 -26
- package/lib/node/topLevelAssertion.js +0 -46
- package/lib/node/topLevelMetaAssertion/metaLemma.js +0 -26
- package/lib/node/topLevelMetaAssertion/metatheorem.js +0 -26
- package/lib/node/topLevelMetaAssertion.js +0 -42
- package/lib/node/type.js +0 -60
- package/lib/node/typePrefix.js +0 -30
- package/lib/node/types.js +0 -23
- package/lib/node/variable.js +0 -30
- package/lib/nominal/lexer.js +0 -15
- package/lib/nominal/parser.js +0 -24
- package/lib/nonTerminalNodeMap.js +0 -189
- package/lib/pass/zip.js +0 -23
- package/lib/preamble.js +0 -73
- package/lib/process/assign.js +0 -62
- package/lib/process/discharge.js +0 -38
- package/lib/process/equate.js +0 -73
- package/lib/process/instantiate.js +0 -261
- package/lib/process/unification.js +0 -228
- package/lib/process/unify.js +0 -336
- package/lib/process/validate.js +0 -135
- package/lib/process/validation.js +0 -291
- package/lib/process/verify.js +0 -205
- package/lib/ruleNames.js +0 -350
- package/lib/tokenTypes.js +0 -22
- package/lib/utilities/assignment.js +0 -47
- package/lib/utilities/bnf.js +0 -21
- package/lib/utilities/brackets.js +0 -77
- package/lib/utilities/breakPoint.js +0 -38
- package/lib/utilities/context.js +0 -220
- package/lib/utilities/element.js +0 -1851
- package/lib/utilities/equivalence.js +0 -27
- package/lib/utilities/equivalences.js +0 -134
- package/lib/utilities/instance.js +0 -44
- package/lib/utilities/json.js +0 -1109
- package/lib/utilities/string.js +0 -231
- package/lib/utilities/substitutions.js +0 -86
- package/lib/utilities/synoptic.js +0 -159
- package/lib/utilities/type.js +0 -27
- package/src/context/aphasic.js +0 -15
- package/src/context/bounded.js +0 -362
- package/src/context/branching.js +0 -69
- package/src/context/file/nominal.js +0 -955
- package/src/context/illative.js +0 -17
- package/src/context/liminal.js +0 -280
- package/src/context/literal.js +0 -42
- package/src/context/mnemic.js +0 -778
- package/src/context/nested.js +0 -21
- package/src/context/nominal.js +0 -62
- package/src/context/phaneric.js +0 -43
- package/src/context/thetic.js +0 -17
- package/src/context.js +0 -722
- package/src/element/assertion/contained.js +0 -313
- package/src/element/assertion/defined.js +0 -310
- package/src/element/assertion/property.js +0 -252
- package/src/element/assertion/signature.js +0 -239
- package/src/element/assertion/subproof.js +0 -335
- package/src/element/assertion/type.js +0 -328
- package/src/element/assertion.js +0 -65
- package/src/element/assumption/metaLevel.js +0 -373
- package/src/element/assumption.js +0 -374
- package/src/element/combinator/bracketed.js +0 -32
- package/src/element/combinator.js +0 -145
- package/src/element/conclusion.js +0 -185
- package/src/element/constructor/bracketed.js +0 -68
- package/src/element/constructor.js +0 -188
- package/src/element/declaration/combinator.js +0 -66
- package/src/element/declaration/complexType.js +0 -257
- package/src/element/declaration/constructor.js +0 -122
- package/src/element/declaration/metavariable.js +0 -93
- package/src/element/declaration/property.js +0 -108
- package/src/element/declaration/simpleType.js +0 -208
- package/src/element/declaration/typePrefix.js +0 -58
- package/src/element/declaration/variable.js +0 -130
- package/src/element/declaration.js +0 -7
- package/src/element/deduction.js +0 -185
- package/src/element/derivation.js +0 -57
- package/src/element/equality.js +0 -325
- package/src/element/equivalence.js +0 -276
- package/src/element/error.js +0 -26
- package/src/element/frame.js +0 -356
- package/src/element/hypothesis.js +0 -186
- package/src/element/judgement.js +0 -303
- package/src/element/label.js +0 -186
- package/src/element/metaType.js +0 -75
- package/src/element/metavariable.js +0 -662
- package/src/element/parameter.js +0 -90
- package/src/element/procedureCall.js +0 -159
- package/src/element/procedureReference.js +0 -71
- package/src/element/proof.js +0 -61
- package/src/element/proofAssertion/premise.js +0 -354
- package/src/element/proofAssertion/step.js +0 -271
- package/src/element/proofAssertion/supposition.js +0 -377
- package/src/element/proofAssertion.js +0 -74
- package/src/element/property.js +0 -258
- package/src/element/propertyRelation.js +0 -193
- package/src/element/reference.js +0 -345
- package/src/element/rule.js +0 -358
- package/src/element/section.js +0 -78
- package/src/element/signature.js +0 -292
- package/src/element/statement.js +0 -358
- package/src/element/subDerivation.js +0 -56
- package/src/element/subproof.js +0 -116
- package/src/element/substitution/frame.js +0 -392
- package/src/element/substitution/reference.js +0 -274
- package/src/element/substitution/statement.js +0 -452
- package/src/element/substitution/term.js +0 -407
- package/src/element/substitution.js +0 -261
- package/src/element/term.js +0 -339
- package/src/element/topLevelAssertion/axiom.js +0 -244
- package/src/element/topLevelAssertion/conjecture.js +0 -40
- package/src/element/topLevelAssertion/lemma.js +0 -42
- package/src/element/topLevelAssertion/theorem.js +0 -40
- package/src/element/topLevelAssertion.js +0 -436
- package/src/element/topLevelMetaAssertion/metaLemma.js +0 -40
- package/src/element/topLevelMetaAssertion/metatheorem.js +0 -40
- package/src/element/topLevelMetaAssertion.js +0 -276
- package/src/element/type.js +0 -374
- package/src/element/typePrefix.js +0 -113
- package/src/element/variable.js +0 -259
- package/src/elements.js +0 -13
- package/src/metaTypeNames.js +0 -5
- package/src/metaTypes.js +0 -71
- package/src/node/argument.js +0 -30
- package/src/node/assertion/contained.js +0 -53
- package/src/node/assertion/defined.js +0 -46
- package/src/node/assertion/property.js +0 -30
- package/src/node/assertion/signature.js +0 -23
- package/src/node/assertion/subproof.js +0 -16
- package/src/node/assertion/type.js +0 -23
- package/src/node/assertion.js +0 -7
- package/src/node/assumption/metaLevel.js +0 -23
- package/src/node/assumption.js +0 -23
- package/src/node/body/axiom.js +0 -7
- package/src/node/body/conjecture.js +0 -7
- package/src/node/body/lemma.js +0 -7
- package/src/node/body/metaLemma.js +0 -7
- package/src/node/body/metatheorem.js +0 -7
- package/src/node/body/rule.js +0 -42
- package/src/node/body/theorem.js +0 -7
- package/src/node/body.js +0 -30
- package/src/node/combinator.js +0 -16
- package/src/node/conclusion.js +0 -23
- package/src/node/constructor.js +0 -16
- package/src/node/declaration/combinator.js +0 -16
- package/src/node/declaration/complexType.js +0 -88
- package/src/node/declaration/constructor.js +0 -46
- package/src/node/declaration/metavariable.js +0 -30
- package/src/node/declaration/property.js +0 -42
- package/src/node/declaration/simpleType.js +0 -87
- package/src/node/declaration/typePrefix.js +0 -24
- package/src/node/declaration/variable.js +0 -53
- package/src/node/declaration.js +0 -7
- package/src/node/deduction.js +0 -23
- package/src/node/derivation.js +0 -19
- package/src/node/document.js +0 -7
- package/src/node/equality.js +0 -35
- package/src/node/equivalence.js +0 -16
- package/src/node/equivalences.js +0 -7
- package/src/node/error.js +0 -7
- package/src/node/frame.js +0 -40
- package/src/node/header/axiom.js +0 -16
- package/src/node/header/conjecture.js +0 -7
- package/src/node/header/lemma.js +0 -7
- package/src/node/header/metaLemma.js +0 -7
- package/src/node/header/metatheorem.js +0 -7
- package/src/node/header/rule.js +0 -7
- package/src/node/header/theorem.js +0 -7
- package/src/node/header.js +0 -54
- package/src/node/hypothesis.js +0 -23
- package/src/node/judgement.js +0 -30
- package/src/node/label.js +0 -16
- package/src/node/labels.js +0 -16
- package/src/node/metaArgument.js +0 -16
- package/src/node/metaType.js +0 -26
- package/src/node/metavariable.js +0 -42
- package/src/node/parameter.js +0 -51
- package/src/node/parenthesisedLabel.js +0 -16
- package/src/node/parenthesisedLabels.js +0 -23
- package/src/node/placeholder.js +0 -7
- package/src/node/procedureCall.js +0 -30
- package/src/node/procedureReference.js +0 -26
- package/src/node/proof.js +0 -16
- package/src/node/proofAssertion/premise.js +0 -16
- package/src/node/proofAssertion/step.js +0 -52
- package/src/node/proofAssertion/supposition.js +0 -16
- package/src/node/proofAssertion.js +0 -23
- package/src/node/property.js +0 -28
- package/src/node/propertyRelation.js +0 -30
- package/src/node/qualification.js +0 -23
- package/src/node/reference.js +0 -16
- package/src/node/rule.js +0 -51
- package/src/node/section.js +0 -44
- package/src/node/signature.js +0 -16
- package/src/node/statement.js +0 -167
- package/src/node/subDerivation.js +0 -19
- package/src/node/subproof.js +0 -35
- package/src/node/substitution/frame.js +0 -37
- package/src/node/substitution/reference.js +0 -38
- package/src/node/substitution/statement.js +0 -70
- package/src/node/substitution/term.js +0 -38
- package/src/node/substitution.js +0 -7
- package/src/node/term.js +0 -75
- package/src/node/topLevelAssertion/axiom.js +0 -13
- package/src/node/topLevelAssertion/conjecture.js +0 -13
- package/src/node/topLevelAssertion/lemma.js +0 -13
- package/src/node/topLevelAssertion/theorem.js +0 -13
- package/src/node/topLevelAssertion.js +0 -58
- package/src/node/topLevelMetaAssertion/metaLemma.js +0 -13
- package/src/node/topLevelMetaAssertion/metatheorem.js +0 -13
- package/src/node/topLevelMetaAssertion.js +0 -51
- package/src/node/type.js +0 -74
- package/src/node/typePrefix.js +0 -26
- package/src/node/types.js +0 -16
- package/src/node/variable.js +0 -26
- package/src/nominal/lexer.js +0 -5
- package/src/nominal/parser.js +0 -12
- package/src/nonTerminalNodeMap.js +0 -261
- package/src/pass/zip.js +0 -19
- package/src/preamble.js +0 -64
- package/src/process/assign.js +0 -53
- package/src/process/discharge.js +0 -33
- package/src/process/equate.js +0 -94
- package/src/process/instantiate.js +0 -198
- package/src/process/unification.js +0 -332
- package/src/process/unify.js +0 -504
- package/src/process/validate.js +0 -174
- package/src/process/validation.js +0 -410
- package/src/process/verify.js +0 -299
- package/src/ruleNames.js +0 -86
- package/src/tokenTypes.js +0 -4
- package/src/utilities/assignment.js +0 -57
- package/src/utilities/bnf.js +0 -20
- package/src/utilities/brackets.js +0 -87
- package/src/utilities/breakPoint.js +0 -29
- package/src/utilities/context.js +0 -223
- package/src/utilities/element.js +0 -2293
- package/src/utilities/equivalence.js +0 -25
- package/src/utilities/equivalences.js +0 -158
- package/src/utilities/instance.js +0 -40
- package/src/utilities/json.js +0 -1273
- package/src/utilities/string.js +0 -282
- package/src/utilities/substitutions.js +0 -93
- package/src/utilities/synoptic.js +0 -135
- package/src/utilities/type.js +0 -19
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import Assertion from "../assertion";
|
|
4
|
-
|
|
5
|
-
import { define } from "../../elements";
|
|
6
|
-
import { instantiate } from "../../utilities/context";
|
|
7
|
-
import { breakPointFromJSON } from "../../utilities/breakPoint";
|
|
8
|
-
import { instantiateContainedAssertion } from "../../process/instantiate";
|
|
9
|
-
import { termFromTermAndSubstitutions, frameFromFrameAndSubstitutions, statementFromStatementAndSubstitutions } from "../../utilities/substitutions";
|
|
10
|
-
import { termFromContainedAssertionNode,
|
|
11
|
-
frameFromContainedAssertionNode,
|
|
12
|
-
negatedFromContainedAssertionNode,
|
|
13
|
-
statementFromContainedAssertionNode,
|
|
14
|
-
containedAssertionFromStatementNode } from "../../utilities/element";
|
|
15
|
-
|
|
16
|
-
export default define(class ContainedAssertion extends Assertion {
|
|
17
|
-
constructor(context, string, node, breakPoint, term, frame, negated, statement) {
|
|
18
|
-
super(context, string, node, breakPoint);
|
|
19
|
-
|
|
20
|
-
this.term = term;
|
|
21
|
-
this.frame = frame;
|
|
22
|
-
this.negated = negated;
|
|
23
|
-
this.statement = statement;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
getTerm() {
|
|
27
|
-
return this.term;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
getFrame() {
|
|
31
|
-
return this.frame;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
isNegated() {
|
|
35
|
-
return this.negated;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
getStatement() {
|
|
39
|
-
return this.statement;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
getContainedAssertionNode() {
|
|
43
|
-
const node = this.getNode(),
|
|
44
|
-
containedAssertionNode = node; ///
|
|
45
|
-
|
|
46
|
-
return containedAssertionNode;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
validate(context) {
|
|
50
|
-
let containedAssertion = null;
|
|
51
|
-
|
|
52
|
-
const containedAssertionString = this.getString(); ///
|
|
53
|
-
|
|
54
|
-
context.trace(`Validating the '${containedAssertionString}' contained assertion...`);
|
|
55
|
-
|
|
56
|
-
let validates = false;
|
|
57
|
-
|
|
58
|
-
const validAssertion = this.findValidAssertion(context);
|
|
59
|
-
|
|
60
|
-
if (validAssertion !== null) {
|
|
61
|
-
validates = true;
|
|
62
|
-
|
|
63
|
-
containedAssertion = validAssertion; ///
|
|
64
|
-
|
|
65
|
-
context.debug(`...the '${containedAssertionString}' contained assertion is already valid.`);
|
|
66
|
-
} else {
|
|
67
|
-
const termValidates = this.validateTerm(context),
|
|
68
|
-
frameValidates = this.validateFrame(context),
|
|
69
|
-
statementValidates = this.validateStatement(context)
|
|
70
|
-
|
|
71
|
-
if (termValidates || frameValidates || statementValidates) {
|
|
72
|
-
const stated = context.isStated();
|
|
73
|
-
|
|
74
|
-
let validatesWhenStated = false,
|
|
75
|
-
validatesWhenDerived = false;
|
|
76
|
-
|
|
77
|
-
if (stated) {
|
|
78
|
-
validatesWhenStated = this.validateWhenStated(context);
|
|
79
|
-
} else {
|
|
80
|
-
validatesWhenDerived = this.validateWhenDerived(context);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (validatesWhenStated || validatesWhenDerived) {
|
|
84
|
-
validates = true;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (validates) {
|
|
89
|
-
const assertion = this; ///
|
|
90
|
-
|
|
91
|
-
containedAssertion = assertion; ///
|
|
92
|
-
|
|
93
|
-
context.addAssertion(assertion);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (validates) {
|
|
98
|
-
context.debug(`...validated the '${containedAssertionString}' contained assertion.`);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return containedAssertion;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
validateTerm(context) {
|
|
105
|
-
let termValidates = false;
|
|
106
|
-
|
|
107
|
-
if (this.term !== null) {
|
|
108
|
-
const termString = this.term.getString(),
|
|
109
|
-
containedAssertionString = this.getString(); ///
|
|
110
|
-
|
|
111
|
-
context.trace(`Validating the '${containedAssertionString}' contained assertion's term...`);
|
|
112
|
-
|
|
113
|
-
const termSingular = this.term.isSingular();
|
|
114
|
-
|
|
115
|
-
if (termSingular) {
|
|
116
|
-
const term = this.term.validate(context, (term, context) => {
|
|
117
|
-
const validatesForwards = true;
|
|
118
|
-
|
|
119
|
-
return validatesForwards;
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
if (term !== null) {
|
|
123
|
-
this.term = term;
|
|
124
|
-
|
|
125
|
-
termValidates = true;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
if (termValidates) {
|
|
129
|
-
context.debug(`...validated the '${containedAssertionString}' contained assertion's term.`);
|
|
130
|
-
}
|
|
131
|
-
} else {
|
|
132
|
-
context.debug(`The '${termString}' term is not singular.`);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
return termValidates;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
validateFrame(context) {
|
|
140
|
-
let frameValidates = false;
|
|
141
|
-
|
|
142
|
-
if (this.frame !== null) {
|
|
143
|
-
const frameString = this.frame.getString(),
|
|
144
|
-
containedAssertionString = this.getString(); ///
|
|
145
|
-
|
|
146
|
-
context.trace(`Validating the '${containedAssertionString}' contained assertion's frame...`);
|
|
147
|
-
|
|
148
|
-
const frameSingular = this.frame.isSingular();
|
|
149
|
-
|
|
150
|
-
if (frameSingular) {
|
|
151
|
-
const frame = this.frame.validate(context);
|
|
152
|
-
|
|
153
|
-
if (frame !== null) {
|
|
154
|
-
this.frame = frame;
|
|
155
|
-
|
|
156
|
-
frameValidates = true;
|
|
157
|
-
}
|
|
158
|
-
} else {
|
|
159
|
-
context.debug(`The '${frameString}' frame is not singular.`);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
if (frameValidates) {
|
|
163
|
-
context.debug(`...validated the '${containedAssertionString}' contained assertion's frame.`);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
return frameValidates;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
validateStatement(context) {
|
|
171
|
-
let statementValidates = false;
|
|
172
|
-
|
|
173
|
-
if (this.statement !== null) {
|
|
174
|
-
const statementString = this.statement.getString();
|
|
175
|
-
|
|
176
|
-
context.trace(`Validating the '${statementString}' statement...`);
|
|
177
|
-
|
|
178
|
-
const statement = this.statement.validate(context);
|
|
179
|
-
|
|
180
|
-
if (statement !== null) {
|
|
181
|
-
statementValidates = true;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
if (statementValidates) {
|
|
185
|
-
context.debug(`...validated the '${statementString}' statement.`);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
return statementValidates;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
validateWhenStated(context) {
|
|
193
|
-
let validatesWhenStated;
|
|
194
|
-
|
|
195
|
-
const containedAssertionString = this.getString(); ///
|
|
196
|
-
|
|
197
|
-
context.trace(`Validating the '${containedAssertionString}' stated contained assertion...`);
|
|
198
|
-
|
|
199
|
-
validatesWhenStated = true;
|
|
200
|
-
|
|
201
|
-
if (validatesWhenStated) {
|
|
202
|
-
context.debug(`...validated the '${containedAssertionString}' stated contained assertion.`);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
return validatesWhenStated;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
validateWhenDerived(context) {
|
|
209
|
-
let validatesWhenDerived;
|
|
210
|
-
|
|
211
|
-
const containedAssertionString = this.getString(); ///
|
|
212
|
-
|
|
213
|
-
context.trace(`Validating the '${containedAssertionString}' derived contained assertion...`);
|
|
214
|
-
|
|
215
|
-
validatesWhenDerived = validateWhenDerived(this.term, this.frame, this.statement, this.negated, context);
|
|
216
|
-
|
|
217
|
-
if (validatesWhenDerived) {
|
|
218
|
-
context.debug(`...validated the '${containedAssertionString}' derived contained assertion.`);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
return validatesWhenDerived;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
unifyIndependently(generalContext, specificContext) {
|
|
225
|
-
let unifiesIndependently = false;
|
|
226
|
-
|
|
227
|
-
const context = specificContext, ///
|
|
228
|
-
containedAssertionString = this.getString(); ///
|
|
229
|
-
|
|
230
|
-
context.trace(`Unifying the '${containedAssertionString}' contained assertion independently...`);
|
|
231
|
-
|
|
232
|
-
const term = termFromTermAndSubstitutions(this.term, context),
|
|
233
|
-
frame = frameFromFrameAndSubstitutions(this.frame, context),
|
|
234
|
-
statement = statementFromStatementAndSubstitutions(this.statement, context),
|
|
235
|
-
validatesWhenDerived = validateWhenDerived(term, frame, statement, this.negated, context);
|
|
236
|
-
|
|
237
|
-
if (validatesWhenDerived) {
|
|
238
|
-
unifiesIndependently = true;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
if (unifiesIndependently) {
|
|
242
|
-
context.debug(`...unified the '${containedAssertionString}' contained assertion independently.`);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
return unifiesIndependently;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
static name = "ContainedAssertion";
|
|
249
|
-
|
|
250
|
-
static fromJSON(json, context) {
|
|
251
|
-
let containedAssertion = null;
|
|
252
|
-
|
|
253
|
-
const { name } = json;
|
|
254
|
-
|
|
255
|
-
if (this.name === name) {
|
|
256
|
-
instantiate((context) => {
|
|
257
|
-
const { string } = json,
|
|
258
|
-
containedAssertionNode = instantiateContainedAssertion(string, context),
|
|
259
|
-
node = containedAssertionNode, ///
|
|
260
|
-
breakPoint = breakPointFromJSON(json),
|
|
261
|
-
term = termFromContainedAssertionNode(containedAssertionNode, context),
|
|
262
|
-
frame = frameFromContainedAssertionNode(containedAssertionNode, context),
|
|
263
|
-
negated = negatedFromContainedAssertionNode(containedAssertionNode, context),
|
|
264
|
-
statement = statementFromContainedAssertionNode(containedAssertionNode, context);
|
|
265
|
-
|
|
266
|
-
context = null;
|
|
267
|
-
|
|
268
|
-
containedAssertion = new ContainedAssertion(context, string, node, breakPoint, term, frame, negated, statement);
|
|
269
|
-
}, context);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
return containedAssertion;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
static fromStatement(statement, context) {
|
|
276
|
-
const statementNode = statement.getNode(),
|
|
277
|
-
containedAssertion = containedAssertionFromStatementNode(statementNode, context);
|
|
278
|
-
|
|
279
|
-
return containedAssertion;
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
function validateWhenDerived(term, frame, statement, negated, context) {
|
|
284
|
-
let validatesWhenDerived = false;
|
|
285
|
-
|
|
286
|
-
if (statement !== null) {
|
|
287
|
-
if (term !== null) {
|
|
288
|
-
const termContained = statement.isTermContained(term, context);
|
|
289
|
-
|
|
290
|
-
if (!negated && termContained) {
|
|
291
|
-
validatesWhenDerived = true;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
if (negated && !termContained) {
|
|
295
|
-
validatesWhenDerived = true;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
if (frame !== null) {
|
|
300
|
-
const frameContained = statement.isFrameContained(frame, context);
|
|
301
|
-
|
|
302
|
-
if (!negated && frameContained) {
|
|
303
|
-
validatesWhenDerived = true;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
if (negated && !frameContained) {
|
|
307
|
-
validatesWhenDerived = true;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
return validatesWhenDerived;
|
|
313
|
-
}
|
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import Assertion from "../assertion";
|
|
4
|
-
|
|
5
|
-
import { define } from "../../elements";
|
|
6
|
-
import { instantiate } from "../../utilities/context";
|
|
7
|
-
import { breakPointFromJSON } from "../../utilities/breakPoint";
|
|
8
|
-
import { instantiateDefinedAssertion } from "../../process/instantiate";
|
|
9
|
-
import { separateGroundedTermsAndDefinedVariables } from "../../utilities/equivalences";
|
|
10
|
-
import { termFromTermAndSubstitutions, frameFromFrameAndSubstitutions } from "../../utilities/substitutions";
|
|
11
|
-
import { termFromJDefinedAssertionNode, frameFromJDefinedAssertionNode, negatedFromJDefinedAssertionNode, definedAssertionFromStatementNode } from "../../utilities/element";
|
|
12
|
-
|
|
13
|
-
export default define(class DefinedAssertion extends Assertion {
|
|
14
|
-
constructor(context, string, node, breakPoint, term, frame, negated) {
|
|
15
|
-
super(context, string, node, breakPoint);
|
|
16
|
-
|
|
17
|
-
this.term = term;
|
|
18
|
-
this.frame= frame;
|
|
19
|
-
this.negated = negated;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
getTerm() {
|
|
23
|
-
return this.term;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
getFrame() {
|
|
27
|
-
return this.frame;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
isNegated() {
|
|
31
|
-
return this.negated;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
getDefinedAssertionNode() {
|
|
35
|
-
const node = this.getNode(),
|
|
36
|
-
definedAssertionNode = node; ///
|
|
37
|
-
|
|
38
|
-
return definedAssertionNode;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
validate(context) {
|
|
42
|
-
let definedAssertion = null;
|
|
43
|
-
|
|
44
|
-
const definedAssertionString = this.getString(); ///
|
|
45
|
-
|
|
46
|
-
context.trace(`Validating the '${definedAssertionString}' defined assertion...`);
|
|
47
|
-
|
|
48
|
-
let validates = false;
|
|
49
|
-
|
|
50
|
-
const validAssertion = this.findValidAssertion(context);
|
|
51
|
-
|
|
52
|
-
if (validAssertion !== null) {
|
|
53
|
-
validates = true;
|
|
54
|
-
|
|
55
|
-
definedAssertion = validAssertion; ///
|
|
56
|
-
|
|
57
|
-
context.debug(`...the '${definedAssertionString}' defined definedAssertion is already valid.`);
|
|
58
|
-
} else {
|
|
59
|
-
const termValidates = this.validateTerm(context),
|
|
60
|
-
frameValidates = this.validateFrame(context);
|
|
61
|
-
|
|
62
|
-
if (termValidates || frameValidates) {
|
|
63
|
-
const stated = context.isStated();
|
|
64
|
-
|
|
65
|
-
let validatesWhenStated = false,
|
|
66
|
-
validatesWhenDerived = false;
|
|
67
|
-
|
|
68
|
-
if (stated) {
|
|
69
|
-
validatesWhenStated = this.validateWhenStated(context);
|
|
70
|
-
} else {
|
|
71
|
-
validatesWhenDerived = this.validateWhenDerived(context);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (validatesWhenStated || validatesWhenDerived) {
|
|
75
|
-
validates = true;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (validates) {
|
|
80
|
-
const assertion = this; ///
|
|
81
|
-
|
|
82
|
-
definedAssertion = assertion; ///
|
|
83
|
-
|
|
84
|
-
context.addAssertion(assertion);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (validates) {
|
|
89
|
-
context.debug(`...validated the '${definedAssertionString}' defined assertion.`);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return definedAssertion;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
validateTerm(context) {
|
|
96
|
-
let termValidates = false;
|
|
97
|
-
|
|
98
|
-
if (this.term !== null) {
|
|
99
|
-
const termString = this.term.getString(), ///
|
|
100
|
-
definedAssertionString = this.getString(); ///
|
|
101
|
-
|
|
102
|
-
context.trace(`Validating the '${definedAssertionString}' defined assertion's term...`);
|
|
103
|
-
|
|
104
|
-
const termSingular = this.term.isSingular();
|
|
105
|
-
|
|
106
|
-
if (termSingular) {
|
|
107
|
-
const term = this.term.validate(context, (term, context) => {
|
|
108
|
-
const validatesForwards = true;
|
|
109
|
-
|
|
110
|
-
return validatesForwards;
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
if (term !== null) {
|
|
114
|
-
this.term = term; ///
|
|
115
|
-
|
|
116
|
-
termValidates = true;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (termValidates) {
|
|
120
|
-
context.debug(`...validates the'${definedAssertionString}' defined assertion's term.`);
|
|
121
|
-
}
|
|
122
|
-
} else {
|
|
123
|
-
context.debug(`The '${termString}' term is not singular.`);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return termValidates;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
validateFrame(context) {
|
|
131
|
-
let frameValidates = false;
|
|
132
|
-
|
|
133
|
-
if (this.frame !== null) {
|
|
134
|
-
const frameString = this.frame.getString(), ///
|
|
135
|
-
definedAssertionString = this.getString(); ///
|
|
136
|
-
|
|
137
|
-
context.trace(`Validating the'${definedAssertionString}' defined assertion's '${frameString}' frame...`);
|
|
138
|
-
|
|
139
|
-
const frameSingular = this.frame.isSingular();
|
|
140
|
-
|
|
141
|
-
if (frameSingular) {
|
|
142
|
-
const frame = this.frame.validate(context);
|
|
143
|
-
|
|
144
|
-
if (frame !== null) {
|
|
145
|
-
this.frame = frame;
|
|
146
|
-
|
|
147
|
-
frameValidates = true;
|
|
148
|
-
}
|
|
149
|
-
} else {
|
|
150
|
-
context.debug(`The '${frameString}' frame is not singular.`);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (frameValidates) {
|
|
154
|
-
context.debug(`...validates the'${definedAssertionString}' defined assertion's '${frameString}' frame.`);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
return frameValidates;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
validateWhenStated(context) {
|
|
162
|
-
let validatesWhenStated;
|
|
163
|
-
|
|
164
|
-
const definedAssertionString = this.getString(); ///
|
|
165
|
-
|
|
166
|
-
context.trace(`Validating the '${definedAssertionString}' stated defined assertion...`);
|
|
167
|
-
|
|
168
|
-
validatesWhenStated = true;
|
|
169
|
-
|
|
170
|
-
if (validatesWhenStated) {
|
|
171
|
-
context.debug(`...validates the '${definedAssertionString}' stated defined assertion.`);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
return validatesWhenStated;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
validateWhenDerived(context) {
|
|
178
|
-
let validatesWhenDerived;
|
|
179
|
-
|
|
180
|
-
const definedAssertionString = this.getString(); ///
|
|
181
|
-
|
|
182
|
-
context.trace(`Validating the '${definedAssertionString}' derived defined assertion...`);
|
|
183
|
-
|
|
184
|
-
validatesWhenDerived = validateWhenDerived(this.term, this.frame, this.negated, context);
|
|
185
|
-
|
|
186
|
-
if (validatesWhenDerived) {
|
|
187
|
-
context.debug(`...validates the '${definedAssertionString}' derived defined assertion.`);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
return validatesWhenDerived;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
unifyIndependently(generalContext, specificContext) {
|
|
194
|
-
let unifiesIndependently = false;
|
|
195
|
-
|
|
196
|
-
const context = specificContext, ///
|
|
197
|
-
definedAssertionString = this.getString(); ///
|
|
198
|
-
|
|
199
|
-
context.trace(`Unifying the '${definedAssertionString}' defined assertion independently...`);
|
|
200
|
-
|
|
201
|
-
const term = termFromTermAndSubstitutions(this.term, context),
|
|
202
|
-
frame = frameFromFrameAndSubstitutions(this.frame, context),
|
|
203
|
-
validatesWhenDerived = validateWhenDerived(term, frame, this.negated, context);
|
|
204
|
-
|
|
205
|
-
if (validatesWhenDerived) {
|
|
206
|
-
unifiesIndependently = true;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
if (unifiesIndependently) {
|
|
210
|
-
context.debug(`...unified the '${definedAssertionString}' defined assertion independently.`);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
return unifiesIndependently;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
static name = "DefinedAssertion";
|
|
217
|
-
|
|
218
|
-
static fromJSON(json, context) {
|
|
219
|
-
let definedAssertion = null;
|
|
220
|
-
|
|
221
|
-
const { name } = json;
|
|
222
|
-
|
|
223
|
-
if (this.name === name) {
|
|
224
|
-
instantiate((context) => {
|
|
225
|
-
const { string } = json,
|
|
226
|
-
definedAssertionNode = instantiateDefinedAssertion(string, context),
|
|
227
|
-
node = definedAssertionNode, ///
|
|
228
|
-
breakPoint = breakPointFromJSON(json),
|
|
229
|
-
term = termFromJDefinedAssertionNode(definedAssertionNode, context),
|
|
230
|
-
frame = frameFromJDefinedAssertionNode(definedAssertionNode, context),
|
|
231
|
-
negated = negatedFromJDefinedAssertionNode(definedAssertionNode, context);
|
|
232
|
-
|
|
233
|
-
context = null;
|
|
234
|
-
|
|
235
|
-
definedAssertion = new DefinedAssertion(context, string, node, breakPoint, term, frame, negated);
|
|
236
|
-
}, context);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
return definedAssertion;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
static fromStatement(statement, context) {
|
|
243
|
-
const statementNode = statement.getNode(),
|
|
244
|
-
definedAssertion = definedAssertionFromStatementNode(statementNode, context);
|
|
245
|
-
|
|
246
|
-
return definedAssertion;
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
function isVariableDefined(variable, context) {
|
|
251
|
-
const equivalences = context.getEquivalences(),
|
|
252
|
-
groundedTerms = [],
|
|
253
|
-
definedVariables = [];
|
|
254
|
-
|
|
255
|
-
separateGroundedTermsAndDefinedVariables(equivalences, groundedTerms, definedVariables, context);
|
|
256
|
-
|
|
257
|
-
const variableMatchesDefinedVariable = definedVariables.some((definedVariable) => {
|
|
258
|
-
const definedVariableComparesToVariable = definedVariable.compareVariable(variable);
|
|
259
|
-
|
|
260
|
-
if (definedVariableComparesToVariable === variable) {
|
|
261
|
-
return true;
|
|
262
|
-
}
|
|
263
|
-
}),
|
|
264
|
-
variableDefined = variableMatchesDefinedVariable; ///
|
|
265
|
-
|
|
266
|
-
return variableDefined;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
function isMetavariableDefined(metavariable, context) {
|
|
270
|
-
const metavariableNode = metavariable.getNode(),
|
|
271
|
-
declaredJudgementPresent = context.isDeclaredJudgementPresentByMetavariableNode(metavariableNode),
|
|
272
|
-
metavariableDefined = declaredJudgementPresent; ///
|
|
273
|
-
|
|
274
|
-
return metavariableDefined
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
function validateWhenDerived(term, frame, negated, context) {
|
|
278
|
-
let validatesWhenDerived = false;
|
|
279
|
-
|
|
280
|
-
if (term !== null) {
|
|
281
|
-
const variableIdentifier = term.getVariableIdentifier(),
|
|
282
|
-
declaredDariable = context.findDeclaredVariableByVariableIdentifier(variableIdentifier),
|
|
283
|
-
declaredDariableDefined = isVariableDefined(declaredDariable, context);
|
|
284
|
-
|
|
285
|
-
if (!negated && declaredDariableDefined) {
|
|
286
|
-
validatesWhenDerived = true;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
if (negated && !declaredDariableDefined) {
|
|
290
|
-
validatesWhenDerived = true;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
if (frame!== null) {
|
|
295
|
-
const metavariableName = frame.getMetavariableName(),
|
|
296
|
-
declaredMetavariable = context.findDeclaredMetavariableByMetavariableName(metavariableName),
|
|
297
|
-
declaredMetavariableDefined = isMetavariableDefined(declaredMetavariable, context);
|
|
298
|
-
|
|
299
|
-
if (!negated && declaredMetavariableDefined) {
|
|
300
|
-
validatesWhenDerived = true;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
if (negated && !declaredMetavariableDefined) {
|
|
304
|
-
validatesWhenDerived = true;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
return validatesWhenDerived;
|
|
309
|
-
}
|
|
310
|
-
|