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,208 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import Declaration from "../declaration";
|
|
4
|
-
|
|
5
|
-
import { define } from "../../elements";
|
|
6
|
-
import { baseTypeFromNothing } from "../../utilities/type";
|
|
7
|
-
|
|
8
|
-
export default define(class SimpleTypeDeclaration extends Declaration {
|
|
9
|
-
constructor(context, string, node, breakPoint, type, superTypes, provisional) {
|
|
10
|
-
super(context, string, node, breakPoint);
|
|
11
|
-
|
|
12
|
-
this.type = type;
|
|
13
|
-
this.superTypes = superTypes;
|
|
14
|
-
this.provisional = provisional;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
getType() {
|
|
18
|
-
return this.type;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
getSuperTypes() {
|
|
22
|
-
return this.superTypes;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
isProvisional() {
|
|
26
|
-
return this.provisional;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
getSimpleTypeDeclarationNode() {
|
|
30
|
-
const node = this.getNode(),
|
|
31
|
-
simpleTypeDeclarationNode = node; ///
|
|
32
|
-
|
|
33
|
-
return simpleTypeDeclarationNode;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
getProperties() {
|
|
37
|
-
const properties = [];
|
|
38
|
-
|
|
39
|
-
return properties;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
async verify(context) {
|
|
43
|
-
let verifies = false;
|
|
44
|
-
|
|
45
|
-
await this.break(context);
|
|
46
|
-
|
|
47
|
-
const simpleTypeDeclarationString = this.getString(); ///
|
|
48
|
-
|
|
49
|
-
context.trace(`Verifying the '${simpleTypeDeclarationString}' simple type declaration...`);
|
|
50
|
-
|
|
51
|
-
const typeVerifies = this.verifyType(context);
|
|
52
|
-
|
|
53
|
-
if (typeVerifies) {
|
|
54
|
-
const superTypesVerify = this.verifySuperTypes(context);
|
|
55
|
-
|
|
56
|
-
if (superTypesVerify) {
|
|
57
|
-
const typePrefixVerifies = this.verifyTypePrefix(context);
|
|
58
|
-
|
|
59
|
-
if (typePrefixVerifies) {
|
|
60
|
-
const properties = this.getProperties(),
|
|
61
|
-
typePrefix = context.getTypePrefix(),
|
|
62
|
-
prefixName = (typePrefix !== null) ?
|
|
63
|
-
typePrefix.getPrefixName() :
|
|
64
|
-
null;
|
|
65
|
-
|
|
66
|
-
this.type.setProvisional(this.provisional);
|
|
67
|
-
|
|
68
|
-
this.type.setProperties(properties);
|
|
69
|
-
|
|
70
|
-
this.type.setPrefixName(prefixName);
|
|
71
|
-
|
|
72
|
-
context.addType(this.type);
|
|
73
|
-
|
|
74
|
-
verifies = true;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (verifies) {
|
|
80
|
-
context.debug(`...verified the '${simpleTypeDeclarationString}' simple type declaration.`);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return verifies;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
verifyType(context) {
|
|
87
|
-
let typeVerifies = false;
|
|
88
|
-
|
|
89
|
-
const typeString = this.type.getString(),
|
|
90
|
-
simpleTypeDeclarationString = this.getString(); ///
|
|
91
|
-
|
|
92
|
-
context.trace(`Verifying the '${simpleTypeDeclarationString}' simple type declaration's '${typeString}' type...`);
|
|
93
|
-
|
|
94
|
-
const typeName = this.type.getName(),
|
|
95
|
-
typePresent = context.isTypePresentByTypeName(typeName);
|
|
96
|
-
|
|
97
|
-
if (!typePresent) {
|
|
98
|
-
const prefixedTypeName = typeName, ///
|
|
99
|
-
typePresent = context.isTypePresentByPrefixedTypeName(prefixedTypeName);
|
|
100
|
-
|
|
101
|
-
if (!typePresent) {
|
|
102
|
-
typeVerifies = true;
|
|
103
|
-
} else {
|
|
104
|
-
context.debug(`The '${typeString}' type is already present.`);
|
|
105
|
-
}
|
|
106
|
-
} else {
|
|
107
|
-
context.debug(`The '${typeString}' type is already present.`);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (typeVerifies) {
|
|
111
|
-
context.debug(`...verified the '${simpleTypeDeclarationString}' simple type declaration's '${typeString}' type`);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return typeVerifies;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
verifySuperType(superType, superTypes, context) {
|
|
118
|
-
let superTypeVerifies = false;
|
|
119
|
-
|
|
120
|
-
const superTypeString = superType.getString(),
|
|
121
|
-
simpleTypeDeclarationString = this.getString(); ///
|
|
122
|
-
|
|
123
|
-
context.trace(`Verifying the '${simpleTypeDeclarationString}' simple type declaration's '${superTypeString}' super-type...`);
|
|
124
|
-
|
|
125
|
-
const nominalTypeName = superType.getNominalTypeName(),
|
|
126
|
-
typeName = nominalTypeName, ///
|
|
127
|
-
typeComparesToTypeName = this.type.compareTypeName(typeName);
|
|
128
|
-
|
|
129
|
-
if (!typeComparesToTypeName) {
|
|
130
|
-
superType = context.findTypeByNominalTypeName(nominalTypeName);
|
|
131
|
-
|
|
132
|
-
if (superType !== null) {
|
|
133
|
-
superTypes.push(superType);
|
|
134
|
-
|
|
135
|
-
superTypeVerifies = true;
|
|
136
|
-
} else {
|
|
137
|
-
context.debug(`The '${superTypeString}' super-type is not present.`);
|
|
138
|
-
}
|
|
139
|
-
} else {
|
|
140
|
-
context.debug(`The '${superTypeString}' super-type's name compares to the ${typeName}' type's name.`);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (superTypeVerifies) {
|
|
144
|
-
context.debug(`...verified the '${simpleTypeDeclarationString}' simple type declaration's '${superTypeString}' super-type.`);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
return superTypeVerifies;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
verifySuperTypes(context) {
|
|
151
|
-
let superTypesVerify;
|
|
152
|
-
|
|
153
|
-
const superTypes = [],
|
|
154
|
-
simpleTypeDeclarationString = this.getString(); ///
|
|
155
|
-
|
|
156
|
-
context.trace(`Verifying the '${simpleTypeDeclarationString}' simple type declaration's super-types...`);
|
|
157
|
-
|
|
158
|
-
superTypesVerify = this.superTypes.every((superType) => {
|
|
159
|
-
const superTypeVerifies = this.verifySuperType(superType, superTypes, context);
|
|
160
|
-
|
|
161
|
-
if (superTypeVerifies) {
|
|
162
|
-
return true;
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
if (superTypesVerify) {
|
|
167
|
-
const superTypesLength = superTypes.length;
|
|
168
|
-
|
|
169
|
-
if (superTypesLength === 0) {
|
|
170
|
-
const baseType = baseTypeFromNothing(),
|
|
171
|
-
superTyupe = baseType; ///
|
|
172
|
-
|
|
173
|
-
superTypes.push(superTyupe);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
this.type.setSuperTypes(superTypes);
|
|
177
|
-
|
|
178
|
-
context.debug(`...verified the '${simpleTypeDeclarationString}' simple type declaration's super-types.`);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
return superTypesVerify;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
verifyTypePrefix(context) {
|
|
185
|
-
let typePrefixVerifies = false;
|
|
186
|
-
|
|
187
|
-
const typeString = this.type.getString(),
|
|
188
|
-
simpleTypeDeclarationString = this.getString(); ///
|
|
189
|
-
|
|
190
|
-
context.trace(`Verifying the '${simpleTypeDeclarationString}' simple type declaration's '${typeString}' type's prefix...`);
|
|
191
|
-
|
|
192
|
-
const typePrefixed = this.type.isPrefixed();
|
|
193
|
-
|
|
194
|
-
if (!typePrefixed) {
|
|
195
|
-
typePrefixVerifies = true;
|
|
196
|
-
} else {
|
|
197
|
-
context.debug(`The '${simpleTypeDeclarationString}' simple type declaration's '${typeString}' type is prefixed.`);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
if (typePrefixVerifies) {
|
|
201
|
-
context.debug(`...verified the '${simpleTypeDeclarationString}' simple type declaration's '${typeString}' type's prefix.`);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
return typePrefixVerifies;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
static name = "SimpleTypeDeclaration";
|
|
208
|
-
});
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import Declaration from "../declaration";
|
|
4
|
-
|
|
5
|
-
import { define } from "../../elements";
|
|
6
|
-
|
|
7
|
-
export default define(class TypePrefixDeclaration extends Declaration {
|
|
8
|
-
constructor(context, string, node, breakPoint, typePrefix) {
|
|
9
|
-
super(context, string, node, breakPoint);
|
|
10
|
-
|
|
11
|
-
this.typePrefix = typePrefix;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
getTypePrefix() {
|
|
15
|
-
return this.typePrefix;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
getTypePrefixDeclarationNode() {
|
|
19
|
-
const node = this.getNode(),
|
|
20
|
-
typePrefixDeclarationNode = node; ///
|
|
21
|
-
|
|
22
|
-
return typePrefixDeclarationNode;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async verify(context) {
|
|
26
|
-
let verifies = false;
|
|
27
|
-
|
|
28
|
-
await this.break(context);
|
|
29
|
-
|
|
30
|
-
const typePrefixDeclarationString = this.getString(); ///
|
|
31
|
-
|
|
32
|
-
context.trace(`Verifying the '${typePrefixDeclarationString}' type prefix declaration...`);
|
|
33
|
-
|
|
34
|
-
const includeRelease = false,
|
|
35
|
-
types = context.getTypes(includeRelease),
|
|
36
|
-
typesLength = types.length;
|
|
37
|
-
|
|
38
|
-
if (typesLength === 0) {
|
|
39
|
-
const typePrefixVerifies = this.typePrefix.verify(context);
|
|
40
|
-
|
|
41
|
-
if (typePrefixVerifies) {
|
|
42
|
-
context.addTypePrefix(this.typePrefix);
|
|
43
|
-
|
|
44
|
-
verifies = true;
|
|
45
|
-
}
|
|
46
|
-
} else {
|
|
47
|
-
context.debug(`Unable to verify the '${typePrefixDeclarationString}' type prefix declaration because types have already been declared.`);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (verifies) {
|
|
51
|
-
context.debug(`...verified the '${typePrefixDeclarationString}' type prefix declaration.`);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return verifies;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
static name = "TypePrefixDeclaration";
|
|
58
|
-
});
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import Declaration from "../declaration";
|
|
4
|
-
|
|
5
|
-
import { define } from "../../elements";
|
|
6
|
-
|
|
7
|
-
export default define(class VariableDeclaration extends Declaration {
|
|
8
|
-
constructor(context, string, node, breakPoint, type, variable, provisional) {
|
|
9
|
-
super(context, string, node, breakPoint);
|
|
10
|
-
|
|
11
|
-
this.type = type;
|
|
12
|
-
this.variable = variable;
|
|
13
|
-
this.provisional = provisional;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
getType() {
|
|
17
|
-
return this.type;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
getVariable() {
|
|
21
|
-
return this.variable;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
isProvisional() {
|
|
25
|
-
return this.provisional;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
getVariableDeclarationNode() {
|
|
29
|
-
const node = this.getNode(),
|
|
30
|
-
variableDeclarationNode = node; ///
|
|
31
|
-
|
|
32
|
-
return variableDeclarationNode;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
async verify(context) {
|
|
36
|
-
let verifies = false;
|
|
37
|
-
|
|
38
|
-
await this.break(context);
|
|
39
|
-
|
|
40
|
-
const variableDeclarationString = this.getString(); ///
|
|
41
|
-
|
|
42
|
-
context.trace(`Verifying the '${variableDeclarationString}' variable declaration...`);
|
|
43
|
-
|
|
44
|
-
const typeVerifies = this.verifyType(context);
|
|
45
|
-
|
|
46
|
-
if (typeVerifies) {
|
|
47
|
-
const variableVerifies = this.verifyVariable(context);
|
|
48
|
-
|
|
49
|
-
if (variableVerifies) {
|
|
50
|
-
const declaredVariable = this.variable;
|
|
51
|
-
|
|
52
|
-
context.addDeclaredVariable(declaredVariable);
|
|
53
|
-
|
|
54
|
-
verifies = true;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (verifies) {
|
|
59
|
-
context.debug(`...verified the '${variableDeclarationString}' variable declaration.`);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return verifies;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
verifyType(context) {
|
|
66
|
-
let typeVerifies = false;
|
|
67
|
-
|
|
68
|
-
const variableDeclarationString = this.getString(); ///
|
|
69
|
-
|
|
70
|
-
context.trace(`Verifying the '${variableDeclarationString}' variable declaration's type...`);
|
|
71
|
-
|
|
72
|
-
const nominalTypeName = this.type.getNominalTypeName(),
|
|
73
|
-
type = context.findTypeByNominalTypeName(nominalTypeName),
|
|
74
|
-
typePresent = (type !== null)
|
|
75
|
-
|
|
76
|
-
if (!typePresent) {
|
|
77
|
-
const typeString = this.type.getString();
|
|
78
|
-
|
|
79
|
-
context.debug(`The '${typeString}' type is not present.`);
|
|
80
|
-
} else {
|
|
81
|
-
const typeComparesToProvisional = type.compareProvisional(this.provisional);
|
|
82
|
-
|
|
83
|
-
if (!typeComparesToProvisional) {
|
|
84
|
-
const typeString = this.type.getString();
|
|
85
|
-
|
|
86
|
-
this.provisional ?
|
|
87
|
-
context.debug(`The '${variableDeclarationString}' variable declaration's '${typeString}' type is present but not provisional.`) :
|
|
88
|
-
context.debug(`The '${variableDeclarationString}' variable declaration's '${typeString}' type is present but provisional.`);
|
|
89
|
-
} else {
|
|
90
|
-
this.variable.setType(type);
|
|
91
|
-
|
|
92
|
-
this.variable.setProvisional(this.provisional);
|
|
93
|
-
|
|
94
|
-
typeVerifies = true;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (typeVerifies) {
|
|
99
|
-
context.debug(`...verified the '${variableDeclarationString}' variable declaration's type.`);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return typeVerifies;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
verifyVariable(context) {
|
|
106
|
-
let variableVerifies = false;
|
|
107
|
-
|
|
108
|
-
const variableString = this.variable.getString(),
|
|
109
|
-
variableDeclarationString = this.getString(); ///
|
|
110
|
-
|
|
111
|
-
context.trace(`Verifying the '${variableDeclarationString}' variable declaration's '${variableString}' variable...`);
|
|
112
|
-
|
|
113
|
-
const variableIdentifier = this.variable.getIdentifier(),
|
|
114
|
-
declaredVariablePresent = context.isDeclaredVariablePresentByVariableIdentifier(variableIdentifier);
|
|
115
|
-
|
|
116
|
-
if (declaredVariablePresent) {
|
|
117
|
-
context.debug(`The '${variableString}' declared variable is already present.`);
|
|
118
|
-
} else {
|
|
119
|
-
variableVerifies = true;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if (variableVerifies) {
|
|
123
|
-
context.debug(`...verified the '${variableDeclarationString}' variable declaration's '${variableString}' variable.`);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
return variableVerifies;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
static name = "VariableDeclaration";
|
|
130
|
-
});
|
package/src/element/deduction.js
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { Element } from "occam-languages";
|
|
4
|
-
|
|
5
|
-
import { define } from "../elements";
|
|
6
|
-
import { instantiateDeduction } from "../process/instantiate";
|
|
7
|
-
import { breakPointFromJSON, breakPointToBreakPointJSON } from "../utilities/breakPoint";
|
|
8
|
-
import { elide, declare, attempt, serialise, unserialise, instantiate, reconcile } from "../utilities/context";
|
|
9
|
-
|
|
10
|
-
export default define(class Deduction extends Element {
|
|
11
|
-
constructor(context, string, node, breakPoint, statement) {
|
|
12
|
-
super(context, string, node, breakPoint);
|
|
13
|
-
|
|
14
|
-
this.statement = statement;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
getStatement() {
|
|
18
|
-
return this.statement;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
getDeductionNode() {
|
|
22
|
-
const node = this.getNode(),
|
|
23
|
-
deductionNode = node; ///
|
|
24
|
-
|
|
25
|
-
return deductionNode;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
async verify(context) {
|
|
29
|
-
let verifies = false;
|
|
30
|
-
|
|
31
|
-
await this.break(context);
|
|
32
|
-
|
|
33
|
-
const deductionString = this.getString(); ///
|
|
34
|
-
|
|
35
|
-
context.trace(`Verifying the '${deductionString}' deduction...`);
|
|
36
|
-
|
|
37
|
-
if (this.statement !== null) {
|
|
38
|
-
declare((context) => {
|
|
39
|
-
elide((context) => {
|
|
40
|
-
const validates = this.validate(context);
|
|
41
|
-
|
|
42
|
-
if (validates) {
|
|
43
|
-
verifies = true;
|
|
44
|
-
}
|
|
45
|
-
}, context);
|
|
46
|
-
}, context);
|
|
47
|
-
} else {
|
|
48
|
-
context.debug(`Unable to verify the '${deductionString}' deduction because it is nonsense.`);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (verifies) {
|
|
52
|
-
context.debug(`...verified the '${deductionString}' deduction.`);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return verifies;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
validate(context) {
|
|
59
|
-
let validates = false;
|
|
60
|
-
|
|
61
|
-
const deductionString = this.getString(); ///
|
|
62
|
-
|
|
63
|
-
context.trace(`Validating the '${deductionString}' deduction...`);
|
|
64
|
-
|
|
65
|
-
attempt((context) => {
|
|
66
|
-
const statementValidates = this.validateStatement(context);
|
|
67
|
-
|
|
68
|
-
if (statementValidates) {
|
|
69
|
-
validates = true;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (validates) {
|
|
73
|
-
this.commit(context);
|
|
74
|
-
}
|
|
75
|
-
}, context);
|
|
76
|
-
|
|
77
|
-
if (validates) {
|
|
78
|
-
context.debug(`...validated the '${deductionString}' deduction.`);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return validates;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
validateStatement(context) {
|
|
85
|
-
let statementValidates = false;
|
|
86
|
-
|
|
87
|
-
const deductionnString = this.getString(); ///
|
|
88
|
-
|
|
89
|
-
context.trace(`Validating the '${deductionnString}' deductionn's statement...`);
|
|
90
|
-
|
|
91
|
-
const statement = this.statement.validate(context);
|
|
92
|
-
|
|
93
|
-
if (statement !== null) {
|
|
94
|
-
statementValidates = true;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (statementValidates) {
|
|
98
|
-
context.trace(`...validated the '${deductionnString}' deductionn's statement.`);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return statementValidates;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
unifyStep(step, context) {
|
|
105
|
-
let stepUnifies = false;
|
|
106
|
-
|
|
107
|
-
const stepString = step.getString(),
|
|
108
|
-
deductionString = this.getString(); ///
|
|
109
|
-
|
|
110
|
-
context.trace(`Unifying the '${stepString}' step with the '${deductionString}' deduction...`);
|
|
111
|
-
|
|
112
|
-
const stepContext = step.getContext(),
|
|
113
|
-
deductionContext = this.getContext(),
|
|
114
|
-
generalContext = deductionContext, ///
|
|
115
|
-
specificContext = stepContext; ///
|
|
116
|
-
|
|
117
|
-
reconcile((specificContext) => {
|
|
118
|
-
const statement = step.getStatement(),
|
|
119
|
-
statementUnifies = this.statement.unifyStatement(statement, generalContext, specificContext);
|
|
120
|
-
|
|
121
|
-
if (statementUnifies) {
|
|
122
|
-
specificContext.commit(context);
|
|
123
|
-
|
|
124
|
-
stepUnifies = true;
|
|
125
|
-
}
|
|
126
|
-
}, specificContext);
|
|
127
|
-
|
|
128
|
-
if (stepUnifies) {
|
|
129
|
-
context.debug(`...unified the '${stepString}' step with the '${deductionString}' deduction.`);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return stepUnifies;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
toJSON() {
|
|
136
|
-
const context = this.getContext();
|
|
137
|
-
|
|
138
|
-
return serialise((context) => {
|
|
139
|
-
const string = this.getString();
|
|
140
|
-
|
|
141
|
-
let breakPoint;
|
|
142
|
-
|
|
143
|
-
breakPoint = this.getBreakPoint();
|
|
144
|
-
|
|
145
|
-
const breakPointJSON = breakPointToBreakPointJSON(breakPoint);
|
|
146
|
-
|
|
147
|
-
breakPoint = breakPointJSON; ///
|
|
148
|
-
|
|
149
|
-
const json = {
|
|
150
|
-
context,
|
|
151
|
-
string,
|
|
152
|
-
breakPoint
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
return json;
|
|
156
|
-
}, context);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
static name = "Deduction";
|
|
160
|
-
|
|
161
|
-
static fromJSON(json, context) {
|
|
162
|
-
let deduction;
|
|
163
|
-
|
|
164
|
-
instantiate((context) => {
|
|
165
|
-
unserialise((json, context) => {
|
|
166
|
-
const { string } = json,
|
|
167
|
-
deductionNode = instantiateDeduction(string, context),
|
|
168
|
-
node = deductionNode, ///
|
|
169
|
-
breakPoint = breakPointFromJSON(json),
|
|
170
|
-
statement = statementFromDeductionNode(deductionNode, context);
|
|
171
|
-
|
|
172
|
-
deduction = new Deduction(context, string, node, breakPoint, statement);
|
|
173
|
-
}, json, context);
|
|
174
|
-
}, context);
|
|
175
|
-
|
|
176
|
-
return deduction;
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
function statementFromDeductionNode(deductionNode, context) {
|
|
181
|
-
const statementNode = deductionNode.getStatementNode(),
|
|
182
|
-
statement = context.findStatementByStatementNode(statementNode);
|
|
183
|
-
|
|
184
|
-
return statement;
|
|
185
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { arrayUtilities } from "necessary";
|
|
4
|
-
import { Element, asynchronousUtilities } from "occam-languages";
|
|
5
|
-
|
|
6
|
-
import { define } from "../elements";
|
|
7
|
-
|
|
8
|
-
const { last } = arrayUtilities,
|
|
9
|
-
{ asyncEvery } = asynchronousUtilities;
|
|
10
|
-
|
|
11
|
-
export default define(class Derivation extends Element {
|
|
12
|
-
constructor(context, string, node, breakPoint, subproofOrProofAssertions) {
|
|
13
|
-
super(context, string, node, breakPoint);
|
|
14
|
-
|
|
15
|
-
this.subproofOrProofAssertions = subproofOrProofAssertions;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
getSubproofOrProofAssertions() {
|
|
19
|
-
return this.subproofOrProofAssertions;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
getDerivationNode() {
|
|
23
|
-
const node = this.getNode(),
|
|
24
|
-
derivationNode = node; ///
|
|
25
|
-
|
|
26
|
-
return derivationNode;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
getLastStep() {
|
|
30
|
-
const lastSubproofOrProofAssertion = last(this.subproofOrProofAssertions),
|
|
31
|
-
lastProofAssertion = lastSubproofOrProofAssertion, ///
|
|
32
|
-
lastStep = lastProofAssertion; ///
|
|
33
|
-
|
|
34
|
-
return lastStep;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async verify(context) {
|
|
38
|
-
let verifies;
|
|
39
|
-
|
|
40
|
-
verifies = await asyncEvery(this.subproofOrProofAssertions, async (subproofOrProofAssertion) => { ///
|
|
41
|
-
const subproofOrProofAssertionVerifies = await subproofOrProofAssertion.verify(context);
|
|
42
|
-
|
|
43
|
-
if (subproofOrProofAssertionVerifies) {
|
|
44
|
-
context.assignAssignments();
|
|
45
|
-
|
|
46
|
-
context.addSubproofOrProofAssertion(subproofOrProofAssertion);
|
|
47
|
-
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
return verifies;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
static name = "Derivation";
|
|
56
|
-
});
|
|
57
|
-
|