occam-verify-cli 1.0.251 → 1.0.252
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/subproof.js +1 -2
- package/lib/node/axiom.js +37 -7
- package/lib/node/body/axiom.js +123 -0
- package/lib/node/body/conjecture.js +130 -0
- package/lib/node/body/lemma.js +130 -0
- package/lib/node/body/metaLemma.js +130 -0
- package/lib/node/{topLevelMetaAssertion.js → body/metatheorem.js} +14 -28
- package/lib/node/body/rule.js +130 -0
- package/lib/node/body/theorem.js +130 -0
- package/lib/node/body.js +108 -0
- package/lib/node/conjecture.js +44 -7
- package/lib/node/header/axiom.js +116 -0
- package/lib/node/header/conjecture.js +107 -0
- package/lib/node/header/lemma.js +107 -0
- package/lib/node/header/metaLemma.js +107 -0
- package/lib/node/header/metatheorem.js +107 -0
- package/lib/node/header/rule.js +107 -0
- package/lib/node/header/theorem.js +107 -0
- package/lib/node/header.js +127 -0
- package/lib/node/lemma.js +51 -7
- package/lib/node/metaLemma.js +51 -7
- package/lib/node/metatheorem.js +51 -7
- package/lib/node/qualification.js +123 -0
- package/lib/node/rule.js +22 -15
- package/lib/node/step.js +18 -3
- package/lib/node/theorem.js +51 -7
- package/lib/nonTerminalNodeMap.js +18 -3
- package/lib/ruleNames.js +61 -1
- package/package.json +6 -6
- package/src/dom/subproof.js +1 -3
- package/src/node/axiom.js +34 -3
- package/src/node/body/axiom.js +22 -0
- package/src/node/body/conjecture.js +30 -0
- package/src/node/body/lemma.js +30 -0
- package/src/node/body/metaLemma.js +30 -0
- package/src/node/body/metatheorem.js +30 -0
- package/src/node/body/rule.js +30 -0
- package/src/node/body/theorem.js +30 -0
- package/src/node/body.js +9 -0
- package/src/node/conjecture.js +40 -3
- package/src/node/header/axiom.js +16 -0
- package/src/node/header/conjecture.js +7 -0
- package/src/node/header/lemma.js +7 -0
- package/src/node/header/metaLemma.js +7 -0
- package/src/node/header/metatheorem.js +7 -0
- package/src/node/header/rule.js +7 -0
- package/src/node/header/theorem.js +7 -0
- package/src/node/header.js +28 -0
- package/src/node/lemma.js +47 -3
- package/src/node/metaLemma.js +47 -3
- package/src/node/metatheorem.js +47 -3
- package/src/node/qualification.js +23 -0
- package/src/node/rule.js +24 -17
- package/src/node/step.js +22 -5
- package/src/node/theorem.js +47 -3
- package/src/nonTerminalNodeMap.js +47 -2
- package/src/ruleNames.js +15 -0
- package/lib/node/topLevelAssertion.js +0 -155
- package/src/node/topLevelAssertion.js +0 -60
- package/src/node/topLevelMetaAssertion.js +0 -44
package/src/node/lemma.js
CHANGED
|
@@ -1,7 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import NonTerminalNode from "../node/nonTerminal";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { LEMMA_BODY_RULE_NAME, LEMMA_HEADER_RULE_NAME } from "../ruleNames";
|
|
6
|
+
|
|
7
|
+
export default class LemmaNode extends NonTerminalNode {
|
|
8
|
+
getLemmaBodyNode() {
|
|
9
|
+
const ruleName = LEMMA_BODY_RULE_NAME,
|
|
10
|
+
lemmaBodyNode = this.getNodeByRuleName(ruleName);
|
|
11
|
+
|
|
12
|
+
return lemmaBodyNode;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getLemmaHeaderNode() {
|
|
16
|
+
const ruleName = LEMMA_HEADER_RULE_NAME,
|
|
17
|
+
lemmaHeaderNode = this.getNodeByRuleName(ruleName);
|
|
18
|
+
|
|
19
|
+
return lemmaHeaderNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
getLabelNodes() {
|
|
23
|
+
const lemmaHeaderNode = this.getLemmaHeaderNode(),
|
|
24
|
+
labelNodes = lemmaHeaderNode.getLabelNodes();
|
|
25
|
+
|
|
26
|
+
return labelNodes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
getSuppositionNodes() {
|
|
30
|
+
const lemmaBodyNode = this.getLemmaBodyNode(),
|
|
31
|
+
suppositionNodes = lemmaBodyNode.getSuppositionNodes();
|
|
32
|
+
|
|
33
|
+
return suppositionNodes;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
getDeductionNode() {
|
|
37
|
+
const lemmaBodyNode = this.getLemmaBodyNode(),
|
|
38
|
+
deductionNode = lemmaBodyNode.getDeductionNode();
|
|
39
|
+
|
|
40
|
+
return deductionNode;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
getProofNode() {
|
|
44
|
+
const lemmaBodyNode = this.getLemmaBodyNode(),
|
|
45
|
+
proofNode = lemmaBodyNode.getProofNode();
|
|
46
|
+
|
|
47
|
+
return proofNode;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(LemmaNode, ruleName, childNodes, opacity, precedence); }
|
|
7
51
|
}
|
package/src/node/metaLemma.js
CHANGED
|
@@ -1,7 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import NonTerminalNode from "../node/nonTerminal";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { META_LEMMA_BODY_RULE_NAME, META_LEMMA_HEADER_RULE_NAME } from "../ruleNames";
|
|
6
|
+
|
|
7
|
+
export default class MetaLemmaNode extends NonTerminalNode {
|
|
8
|
+
getMetaLemmaBodyNode() {
|
|
9
|
+
const ruleName = META_LEMMA_BODY_RULE_NAME,
|
|
10
|
+
metaLemmaBodyNode = this.getNodeByRuleName(ruleName);
|
|
11
|
+
|
|
12
|
+
return metaLemmaBodyNode;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getMetaLemmaHeaderNode() {
|
|
16
|
+
const ruleName = META_LEMMA_HEADER_RULE_NAME,
|
|
17
|
+
metaLemmaHeaderNode = this.getNodeByRuleName(ruleName);
|
|
18
|
+
|
|
19
|
+
return metaLemmaHeaderNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
getLabelNode() {
|
|
23
|
+
const metaLemmaHeaderNode = this.getMetaLemmaHeaderNode(),
|
|
24
|
+
labelNode = metaLemmaHeaderNode.getLabelNode();
|
|
25
|
+
|
|
26
|
+
return labelNode;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
getSuppositionNodes() {
|
|
30
|
+
const metaLemmaBodyNode = this.getMetaLemmaBodyNode(),
|
|
31
|
+
suppositionNodes = metaLemmaBodyNode.getSuppositionNodes();
|
|
32
|
+
|
|
33
|
+
return suppositionNodes;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
getDeductionNode() {
|
|
37
|
+
const metaLemmaBodyNode = this.getMetaLemmaBodyNode(),
|
|
38
|
+
deductionNode = metaLemmaBodyNode.getDeductionNode();
|
|
39
|
+
|
|
40
|
+
return deductionNode;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
getProofNode() {
|
|
44
|
+
const metaLemmaBodyNode = this.getMetaLemmaBodyNode(),
|
|
45
|
+
proofNode = metaLemmaBodyNode.getProofNode();
|
|
46
|
+
|
|
47
|
+
return proofNode;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(MetaLemmaNode, ruleName, childNodes, opacity, precedence); }
|
|
7
51
|
}
|
package/src/node/metatheorem.js
CHANGED
|
@@ -1,7 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import NonTerminalNode from "../node/nonTerminal";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { METATHEOREM_BODY_RULE_NAME, METATHEOREM_HEADER_RULE_NAME } from "../ruleNames";
|
|
6
|
+
|
|
7
|
+
export default class MetatheoremNode extends NonTerminalNode {
|
|
8
|
+
getMetatheoremBodyNode() {
|
|
9
|
+
const ruleName = METATHEOREM_BODY_RULE_NAME,
|
|
10
|
+
metatheoremBodyNode = this.getNodeByRuleName(ruleName);
|
|
11
|
+
|
|
12
|
+
return metatheoremBodyNode;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getMetatheoremHeaderNode() {
|
|
16
|
+
const ruleName = METATHEOREM_HEADER_RULE_NAME,
|
|
17
|
+
metatheoremHeaderNode = this.getNodeByRuleName(ruleName);
|
|
18
|
+
|
|
19
|
+
return metatheoremHeaderNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
getLabelNode() {
|
|
23
|
+
const metatheoremHeaderNode = this.getMetatheoremHeaderNode(),
|
|
24
|
+
labelNode = metatheoremHeaderNode.getLabelNode();
|
|
25
|
+
|
|
26
|
+
return labelNode;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
getSuppositionNodes() {
|
|
30
|
+
const metatheoremBodyNode = this.getMetatheoremBodyNode(),
|
|
31
|
+
suppositionNodes = metatheoremBodyNode.getSuppositionNodes();
|
|
32
|
+
|
|
33
|
+
return suppositionNodes;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
getConclusionNode() {
|
|
37
|
+
const metatheoremBodyNode = this.getMetatheoremBodyNode(),
|
|
38
|
+
conclusionNode = metatheoremBodyNode.getConclusionNode();
|
|
39
|
+
|
|
40
|
+
return conclusionNode;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
getProofNode() {
|
|
44
|
+
const metatheoremBodyNode = this.getMetatheoremBodyNode(),
|
|
45
|
+
proofNode = metatheoremBodyNode.getProofNode();
|
|
46
|
+
|
|
47
|
+
return proofNode;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(MetatheoremNode, ruleName, childNodes, opacity, precedence); }
|
|
7
51
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import NonTerminalNode from "../node/nonTerminal";
|
|
4
|
+
|
|
5
|
+
import { REFERENCE_RULE_NAME, SATISFIES_ASSERTION_RULE_NAME } from "../ruleNames";
|
|
6
|
+
|
|
7
|
+
export default class QualificationNode extends NonTerminalNode {
|
|
8
|
+
getReferenceNode() {
|
|
9
|
+
const ruleName = REFERENCE_RULE_NAME,
|
|
10
|
+
referenceNode = this.getNodeByRuleName(ruleName);
|
|
11
|
+
|
|
12
|
+
return referenceNode;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getSatisfiedAssertionNode() {
|
|
16
|
+
const ruleName = SATISFIES_ASSERTION_RULE_NAME,
|
|
17
|
+
satisfiedAssertionNode = this.getNodeByRuleName(ruleName);
|
|
18
|
+
|
|
19
|
+
return satisfiedAssertionNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(QualificationNode, ruleName, childNodes, opacity, precedence); }
|
|
23
|
+
}
|
package/src/node/rule.js
CHANGED
|
@@ -2,42 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
import NonTerminalNode from "../node/nonTerminal";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {RULE_BODY_RULE_NAME, RULE_HEADER_RULE_NAME} from "../ruleNames";
|
|
6
6
|
|
|
7
7
|
export default class RuleNode extends NonTerminalNode {
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
8
|
+
getRuleBodyNode() {
|
|
9
|
+
const ruleName = RULE_BODY_RULE_NAME,
|
|
10
|
+
ruleBodyNode = this.getNodeByRuleName(ruleName);
|
|
11
11
|
|
|
12
|
-
return
|
|
12
|
+
return ruleBodyNode;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
const ruleName =
|
|
17
|
-
|
|
15
|
+
getRuleHeaderNode() {
|
|
16
|
+
const ruleName = RULE_HEADER_RULE_NAME,
|
|
17
|
+
ruleHeaderNode = this.getNodeByRuleName(ruleName);
|
|
18
18
|
|
|
19
|
-
return
|
|
19
|
+
return ruleHeaderNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
getLabelNodes() {
|
|
23
|
+
const ruleHeaderNode = this.getRuleHeaderNode(),
|
|
24
|
+
labelNodes = ruleHeaderNode.getLabelNodes();
|
|
25
|
+
|
|
26
|
+
return labelNodes;
|
|
20
27
|
}
|
|
21
28
|
|
|
22
29
|
getPremiseNodes() {
|
|
23
|
-
const
|
|
24
|
-
premiseNodes =
|
|
30
|
+
const ruleBodyNode = this.getRuleBodyNode(),
|
|
31
|
+
premiseNodes = ruleBodyNode.getPremiseNodes();
|
|
25
32
|
|
|
26
33
|
return premiseNodes;
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
getConclusionNode() {
|
|
30
|
-
const
|
|
31
|
-
conclusionNode =
|
|
37
|
+
const ruleBodyNode = this.getRuleBodyNode(),
|
|
38
|
+
conclusionNode = ruleBodyNode.getConclusionNode();
|
|
32
39
|
|
|
33
40
|
return conclusionNode;
|
|
34
41
|
}
|
|
35
42
|
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
43
|
+
getProofNode() {
|
|
44
|
+
const ruleBodyNode = this.getRuleBodyNode(),
|
|
45
|
+
proofNode = ruleBodyNode.getProofNode();
|
|
39
46
|
|
|
40
|
-
return
|
|
47
|
+
return proofNode;
|
|
41
48
|
}
|
|
42
49
|
|
|
43
50
|
static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(RuleNode, ruleName, childNodes, opacity, precedence); }
|
package/src/node/step.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import NonTerminalNode from "../node/nonTerminal";
|
|
4
4
|
|
|
5
|
-
import { NONSENSE_RULE_NAME,
|
|
5
|
+
import { NONSENSE_RULE_NAME, STATEMENT_RULE_NAME, QUALIFICATION_RULE_NAME } from "../ruleNames";
|
|
6
6
|
|
|
7
7
|
export default class StepNode extends NonTerminalNode {
|
|
8
8
|
isStepNode() {
|
|
@@ -31,16 +31,33 @@ export default class StepNode extends NonTerminalNode {
|
|
|
31
31
|
return statementNode;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
getQualificationNode() {
|
|
35
|
+
const ruleName = QUALIFICATION_RULE_NAME,
|
|
36
|
+
qualificationNode = this.getNodeByRuleName(ruleName);
|
|
37
|
+
|
|
38
|
+
return qualificationNode;
|
|
39
|
+
}
|
|
40
|
+
|
|
34
41
|
getReferenceNode() {
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
let referenceNode = null;
|
|
43
|
+
|
|
44
|
+
const qualificationNode = this.getQualificationNode();
|
|
45
|
+
|
|
46
|
+
if (qualificationNode !== null) {
|
|
47
|
+
referenceNode = qualificationNode.getReferenceNode();
|
|
48
|
+
}
|
|
37
49
|
|
|
38
50
|
return referenceNode;
|
|
39
51
|
}
|
|
40
52
|
|
|
41
53
|
getSatisfiedAssertionNode() {
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
let satisfiedAssertionNode = null;
|
|
55
|
+
|
|
56
|
+
const qualificationNode = this.getQualificationNode();
|
|
57
|
+
|
|
58
|
+
if (qualificationNode !== null) {
|
|
59
|
+
satisfiedAssertionNode = qualificationNode.getSatisfiedAssertionNode();
|
|
60
|
+
}
|
|
44
61
|
|
|
45
62
|
return satisfiedAssertionNode;
|
|
46
63
|
}
|
package/src/node/theorem.js
CHANGED
|
@@ -1,7 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import NonTerminalNode from "../node/nonTerminal";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { THEOREM_BODY_RULE_NAME, THEOREM_HEADER_RULE_NAME } from "../ruleNames";
|
|
6
|
+
|
|
7
|
+
export default class TheoremNode extends NonTerminalNode {
|
|
8
|
+
getTheoremBodyNode() {
|
|
9
|
+
const ruleName = THEOREM_BODY_RULE_NAME,
|
|
10
|
+
theoremBodyNode = this.getNodeByRuleName(ruleName);
|
|
11
|
+
|
|
12
|
+
return theoremBodyNode;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getTheoremHeaderNode() {
|
|
16
|
+
const ruleName = THEOREM_HEADER_RULE_NAME,
|
|
17
|
+
theoremHeaderNode = this.getNodeByRuleName(ruleName);
|
|
18
|
+
|
|
19
|
+
return theoremHeaderNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
getLabelsNode() {
|
|
23
|
+
const theoremHeaderNode = this.getTheoremHeaderNode(),
|
|
24
|
+
labelNodes = theoremHeaderNode.getLabelNodes();
|
|
25
|
+
|
|
26
|
+
return labelNodes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
getSuppositionNodes() {
|
|
30
|
+
const theoremBodyNode = this.getTheoremBodyNode(),
|
|
31
|
+
suppositionNodes = theoremBodyNode.getSuppositionNodes();
|
|
32
|
+
|
|
33
|
+
return suppositionNodes;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
getDeductionNode() {
|
|
37
|
+
const theoremBodyNode = this.getTheoremBodyNode(),
|
|
38
|
+
deductionNode = theoremBodyNode.getDeductionNode();
|
|
39
|
+
|
|
40
|
+
return deductionNode;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
getProofNode() {
|
|
44
|
+
const theoremBodyNode = this.getTheoremBodyNode(),
|
|
45
|
+
proofNode = theoremBodyNode.getProofNode();
|
|
46
|
+
|
|
47
|
+
return proofNode;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(TheoremNode, ruleName, childNodes, opacity, precedence); }
|
|
7
51
|
}
|
|
@@ -22,6 +22,7 @@ import PropertyNode from "./node/property";
|
|
|
22
22
|
import MetaTypeNode from "./node/metaType";
|
|
23
23
|
import EqualityNode from "./node/equality";
|
|
24
24
|
import VariableNode from "./node/variable";
|
|
25
|
+
import ruleBodyNode from "./node/body/rule";
|
|
25
26
|
import StatementNode from "./node/statement";
|
|
26
27
|
import ReferenceNode from "./node/reference";
|
|
27
28
|
import DeductionNode from "./node/deduction";
|
|
@@ -29,23 +30,37 @@ import JudgementNode from "./node/judgement";
|
|
|
29
30
|
import MetaLemmaNode from "./node/metaLemma";
|
|
30
31
|
import ParameterNode from "./node/parameter";
|
|
31
32
|
import SignatureNode from "./node/signature";
|
|
33
|
+
import axiomBodyNode from "./node/body/axiom";
|
|
34
|
+
import lemmaBodyNode from "./node/body/lemma";
|
|
32
35
|
import DerivationNode from "./node/derivation";
|
|
33
36
|
import CombinatorNode from "./node/combinator";
|
|
34
37
|
import ConclusionNode from "./node/conclusion";
|
|
35
38
|
import ConjectureNode from "./node/conjecture";
|
|
36
39
|
import HypothesisNode from "./node/hypothesis";
|
|
40
|
+
import ruleHeaderNode from "./node/header/rule";
|
|
37
41
|
import SuppositionNode from "./node/supposition";
|
|
38
42
|
import ConstructorNode from "./node/constructor";
|
|
39
43
|
import DeclarationNode from "./node/declaration";
|
|
40
44
|
import MetatheoremNode from "./node/metatheorem";
|
|
45
|
+
import theoremBodyNode from "./node/body/theorem";
|
|
46
|
+
import axiomHeaderNode from "./node/header/axiom";
|
|
47
|
+
import lemmaHeaderNode from "./node/header/lemma";
|
|
41
48
|
import MetaArgumentNode from "./node/metaArgument";
|
|
42
49
|
import MetavariableNode from "./node/metavariable";
|
|
50
|
+
import QualificationNode from "./node/qualification";
|
|
51
|
+
import theoremHeaderNode from "./node/header/theorem";
|
|
52
|
+
import metaLemmaBodyNode from "./node/body/metaLemma";
|
|
43
53
|
import ProcedureCallNode from "./node/procedureCall";
|
|
44
54
|
import SubDerivationNode from "./node/subDerivation";
|
|
45
55
|
import TypeAssertionNode from "./node/assertion/type";
|
|
56
|
+
import conjectureBodyNode from "./node/body/conjecture";
|
|
57
|
+
import metatheoremBodyNode from "./node/body/metatheorem";
|
|
58
|
+
import metaLemmaHeaderNode from "./node/header/metaLemma";
|
|
46
59
|
import PropertyRelationNode from "./node/propertyRelation"
|
|
47
60
|
import DefinedAssertionNode from "./node/assertion/defined";
|
|
48
61
|
import TermSubstitutionNode from "./node/substitution/term";
|
|
62
|
+
import conjectureHeaderNode from "./node/header/conjecture";
|
|
63
|
+
import metatheoremHeaderNode from "./node/header/metatheorem";
|
|
49
64
|
import PropertyAssertionNode from "./node/assertion/property";
|
|
50
65
|
import SubproofAssertionNode from "./node/assertion/subproof";
|
|
51
66
|
import FrameSubstitutionNode from "./node/substitution/frame";
|
|
@@ -91,24 +106,39 @@ import { RULE_RULE_NAME,
|
|
|
91
106
|
PARAMETER_RULE_NAME,
|
|
92
107
|
REFERENCE_RULE_NAME,
|
|
93
108
|
STATEMENT_RULE_NAME,
|
|
109
|
+
RULE_BODY_RULE_NAME,
|
|
94
110
|
META_LEMMA_RULE_NAME,
|
|
95
111
|
DERIVATION_RULE_NAME,
|
|
96
112
|
COMBINATOR_RULE_NAME,
|
|
97
113
|
CONCLUSION_RULE_NAME,
|
|
98
114
|
CONJECTURE_RULE_NAME,
|
|
99
115
|
HYPOTHESIS_RULE_NAME,
|
|
116
|
+
AXIOM_BODY_RULE_NAME,
|
|
117
|
+
LEMMA_BODY_RULE_NAME,
|
|
118
|
+
RULE_HEADER_RULE_NAME,
|
|
100
119
|
CONSTRUCTOR_RULE_NAME,
|
|
101
120
|
DECLARATION_RULE_NAME,
|
|
102
121
|
SUPPOSITION_RULE_NAME,
|
|
103
122
|
METATHEOREM_RULE_NAME,
|
|
123
|
+
AXIOM_HEADER_RULE_NAME,
|
|
124
|
+
LEMMA_HEADER_RULE_NAME,
|
|
125
|
+
THEOREM_BODY_RULE_NAME,
|
|
104
126
|
METAVARIABLE_RULE_NAME,
|
|
127
|
+
QUALIFICATION_RULE_NAME,
|
|
105
128
|
META_ARGUMENT_RULE_NAME,
|
|
129
|
+
THEOREM_HEADER_RULE_NAME,
|
|
106
130
|
SUB_DERIVATION_RULE_NAME,
|
|
107
131
|
TYPE_ASSERTION_RULE_NAME,
|
|
108
132
|
PROCEDURE_CALL_RULE_NAME,
|
|
133
|
+
CONJECTURE_BODY_RULE_NAME,
|
|
134
|
+
META_LEMMA_BODY_RULE_NAME,
|
|
135
|
+
METATHEOREM_BODY_RULE_NAME,
|
|
136
|
+
CONJECTURE_HEADER_RULE_NAME,
|
|
137
|
+
META_LEMMA_HEADER_RULE_NAME,
|
|
109
138
|
PROPERTY_RELATION_RULE_NAME,
|
|
110
139
|
DEFINED_ASSERTION_RULE_NAME,
|
|
111
140
|
TERM_SUBSTITUTION_RULE_NAME,
|
|
141
|
+
METATHEOREM_HEADER_RULE_NAME,
|
|
112
142
|
SUBPROOF_ASSERTION_RULE_NAME,
|
|
113
143
|
PROPERTY_ASSERTION_RULE_NAME,
|
|
114
144
|
FRAME_SUBSTITUTION_RULE_NAME,
|
|
@@ -126,7 +156,7 @@ import { RULE_RULE_NAME,
|
|
|
126
156
|
COMPLEX_TYPE_DECLARATION_RULE_NAME,
|
|
127
157
|
METAVARIABLE_DECLARATION_RULE_NAME } from "./ruleNames";
|
|
128
158
|
|
|
129
|
-
const
|
|
159
|
+
const NonTerminalNodeMap = {
|
|
130
160
|
[RULE_RULE_NAME]: RuleNode,
|
|
131
161
|
[STEP_RULE_NAME]: StepNode,
|
|
132
162
|
[TERM_RULE_NAME]: TermNode,
|
|
@@ -148,6 +178,7 @@ const nonTerminalNodeMap = {
|
|
|
148
178
|
[EQUALITY_RULE_NAME]: EqualityNode,
|
|
149
179
|
[VARIABLE_RULE_NAME]: VariableNode,
|
|
150
180
|
[NONSENSE_RULE_NAME]: NonsenseNode,
|
|
181
|
+
[RULE_BODY_RULE_NAME]: ruleBodyNode,
|
|
151
182
|
[META_TYPE_RULE_NAME]: MetaTypeNode,
|
|
152
183
|
[SIGNATURE_RULE_NAME]: SignatureNode,
|
|
153
184
|
[REFERENCE_RULE_NAME]: ReferenceNode,
|
|
@@ -155,24 +186,38 @@ const nonTerminalNodeMap = {
|
|
|
155
186
|
[DEDUCTION_RULE_NAME]: DeductionNode,
|
|
156
187
|
[PARAMETER_RULE_NAME]: ParameterNode,
|
|
157
188
|
[STATEMENT_RULE_NAME]: StatementNode,
|
|
189
|
+
[AXIOM_BODY_RULE_NAME]: axiomBodyNode,
|
|
190
|
+
[LEMMA_BODY_RULE_NAME]: lemmaBodyNode,
|
|
158
191
|
[META_LEMMA_RULE_NAME]: MetaLemmaNode,
|
|
159
192
|
[COMBINATOR_RULE_NAME]: CombinatorNode,
|
|
160
193
|
[CONCLUSION_RULE_NAME]: ConclusionNode,
|
|
161
194
|
[CONJECTURE_RULE_NAME]: ConjectureNode,
|
|
162
195
|
[DERIVATION_RULE_NAME]: DerivationNode,
|
|
163
196
|
[HYPOTHESIS_RULE_NAME]: HypothesisNode,
|
|
197
|
+
[RULE_HEADER_RULE_NAME]: ruleHeaderNode,
|
|
164
198
|
[SUPPOSITION_RULE_NAME]: SuppositionNode,
|
|
165
199
|
[CONSTRUCTOR_RULE_NAME]: ConstructorNode,
|
|
166
200
|
[DECLARATION_RULE_NAME]: DeclarationNode,
|
|
167
201
|
[METATHEOREM_RULE_NAME]: MetatheoremNode,
|
|
202
|
+
[AXIOM_HEADER_RULE_NAME]: axiomHeaderNode,
|
|
203
|
+
[LEMMA_HEADER_RULE_NAME]: lemmaHeaderNode,
|
|
204
|
+
[THEOREM_BODY_RULE_NAME]: theoremBodyNode,
|
|
168
205
|
[METAVARIABLE_RULE_NAME]: MetavariableNode,
|
|
169
206
|
[META_ARGUMENT_RULE_NAME]: MetaArgumentNode,
|
|
207
|
+
[QUALIFICATION_RULE_NAME]: QualificationNode,
|
|
170
208
|
[TYPE_ASSERTION_RULE_NAME]: TypeAssertionNode,
|
|
171
209
|
[PROCEDURE_CALL_RULE_NAME]: ProcedureCallNode,
|
|
172
210
|
[SUB_DERIVATION_RULE_NAME]: SubDerivationNode,
|
|
211
|
+
[THEOREM_HEADER_RULE_NAME]: theoremHeaderNode,
|
|
212
|
+
[META_LEMMA_BODY_RULE_NAME]: metaLemmaBodyNode,
|
|
213
|
+
[CONJECTURE_BODY_RULE_NAME]: conjectureBodyNode,
|
|
214
|
+
[METATHEOREM_BODY_RULE_NAME]: metatheoremBodyNode,
|
|
215
|
+
[META_LEMMA_HEADER_RULE_NAME]: metaLemmaHeaderNode,
|
|
216
|
+
[CONJECTURE_HEADER_RULE_NAME]: conjectureHeaderNode,
|
|
173
217
|
[PROPERTY_RELATION_RULE_NAME]: PropertyRelationNode,
|
|
174
218
|
[DEFINED_ASSERTION_RULE_NAME]: DefinedAssertionNode,
|
|
175
219
|
[TERM_SUBSTITUTION_RULE_NAME]: TermSubstitutionNode,
|
|
220
|
+
[METATHEOREM_HEADER_RULE_NAME]: metatheoremHeaderNode,
|
|
176
221
|
[SUBPROOF_ASSERTION_RULE_NAME]: SubproofAssertionNode,
|
|
177
222
|
[PROPERTY_ASSERTION_RULE_NAME]: PropertyAssertionNode,
|
|
178
223
|
[FRAME_SUBSTITUTION_RULE_NAME]: FrameSubstitutionNode,
|
|
@@ -191,4 +236,4 @@ const nonTerminalNodeMap = {
|
|
|
191
236
|
[METAVARIABLE_DECLARATION_RULE_NAME]: metavariableDeclarationNode
|
|
192
237
|
};
|
|
193
238
|
|
|
194
|
-
export default
|
|
239
|
+
export default NonTerminalNodeMap;
|
package/src/ruleNames.js
CHANGED
|
@@ -28,24 +28,39 @@ export const DEDUCTION_RULE_NAME = "deduction";
|
|
|
28
28
|
export const JUDGEMENT_RULE_NAME = "judgement";
|
|
29
29
|
export const REFERENCE_RULE_NAME = "reference";
|
|
30
30
|
export const STATEMENT_RULE_NAME = "statement";
|
|
31
|
+
export const RULE_BODY_RULE_NAME = "ruleBody";
|
|
31
32
|
export const META_LEMMA_RULE_NAME = "metaLemma";
|
|
32
33
|
export const COMBINATOR_RULE_NAME = "combinator";
|
|
33
34
|
export const CONCLUSION_RULE_NAME = "conclusion";
|
|
34
35
|
export const CONJECTURE_RULE_NAME = "conjecture";
|
|
35
36
|
export const DERIVATION_RULE_NAME = "derivation";
|
|
36
37
|
export const HYPOTHESIS_RULE_NAME = "hypothesis";
|
|
38
|
+
export const AXIOM_BODY_RULE_NAME = "axiomBody";
|
|
39
|
+
export const LEMMA_BODY_RULE_NAME = "lemmaBody";
|
|
37
40
|
export const SUPPOSITION_RULE_NAME = "supposition";
|
|
38
41
|
export const CONSTRUCTOR_RULE_NAME = "constructor";
|
|
39
42
|
export const DECLARATION_RULE_NAME = "declaration";
|
|
40
43
|
export const METATHEOREM_RULE_NAME = "metatheorem";
|
|
44
|
+
export const RULE_HEADER_RULE_NAME = "ruleHeader";
|
|
45
|
+
export const AXIOM_HEADER_RULE_NAME = "axiomHeader";
|
|
46
|
+
export const LEMMA_HEADER_RULE_NAME = "lemmaHeader";
|
|
47
|
+
export const THEOREM_BODY_RULE_NAME = "theoremBody";
|
|
41
48
|
export const METAVARIABLE_RULE_NAME = "metavariable";
|
|
42
49
|
export const META_ARGUMENT_RULE_NAME = "metaArgument";
|
|
50
|
+
export const QUALIFICATION_RULE_NAME = "qualification";
|
|
43
51
|
export const PROCEDURE_CALL_RULE_NAME = "procedureCall";
|
|
44
52
|
export const SUB_DERIVATION_RULE_NAME = "subDerivation";
|
|
45
53
|
export const TYPE_ASSERTION_RULE_NAME = "typeAssertion";
|
|
54
|
+
export const THEOREM_HEADER_RULE_NAME = "theoremHeader";
|
|
55
|
+
export const CONJECTURE_BODY_RULE_NAME = "conjectureBody";
|
|
56
|
+
export const META_LEMMA_BODY_RULE_NAME = "metaLemmaBody";
|
|
57
|
+
export const METATHEOREM_BODY_RULE_NAME = "metatheoremBody";
|
|
46
58
|
export const PROPERTY_RELATION_RULE_NAME = "propertyRelation";
|
|
47
59
|
export const DEFINED_ASSERTION_RULE_NAME = "definedAssertion";
|
|
48
60
|
export const TERM_SUBSTITUTION_RULE_NAME = "termSubstitution";
|
|
61
|
+
export const CONJECTURE_HEADER_RULE_NAME = "conjectureHeader";
|
|
62
|
+
export const META_LEMMA_HEADER_RULE_NAME = "metaLemmaHeader";
|
|
63
|
+
export const METATHEOREM_HEADER_RULE_NAME = "metatheoremHeader";
|
|
49
64
|
export const PROPERTY_ASSERTION_RULE_NAME = "propertyAssertion";
|
|
50
65
|
export const SUBPROOF_ASSERTION_RULE_NAME = "subproofAssertion";
|
|
51
66
|
export const FRAME_SUBSTITUTION_RULE_NAME = "frameSubstitution";
|