occam-verify-cli 0.0.910 → 0.0.911

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.
Files changed (79) hide show
  1. package/lib/axiomLemmaTheoremConjecture.js +6 -6
  2. package/lib/conclusion.js +7 -7
  3. package/lib/consequent.js +3 -3
  4. package/lib/context/file.js +7 -7
  5. package/lib/context/local.js +9 -9
  6. package/lib/context/localMeta.js +11 -11
  7. package/lib/declaration.js +9 -9
  8. package/lib/equivalence.js +15 -15
  9. package/lib/frame.js +5 -5
  10. package/lib/frameAssertion.js +3 -3
  11. package/lib/metaConsequent.js +4 -4
  12. package/lib/metaLemmaMetatheorem.js +10 -10
  13. package/lib/metaSupposition.js +7 -7
  14. package/lib/metaType.js +7 -7
  15. package/lib/metavariable.js +7 -7
  16. package/lib/mixins/nodesVerifier/intrinsiclevel.js +3 -3
  17. package/lib/mixins/nodesVerifier/metaLevel.js +3 -3
  18. package/lib/premise.js +16 -16
  19. package/lib/rule.js +21 -21
  20. package/lib/step/metaproof.js +6 -6
  21. package/lib/step/proof.js +6 -6
  22. package/lib/substitution/metastatementForMetavariable.js +8 -8
  23. package/lib/substitution/statementForMetavariable.js +5 -4
  24. package/lib/substitution/termForVariable.js +9 -9
  25. package/lib/substitution.js +11 -11
  26. package/lib/supposition.js +3 -3
  27. package/lib/type.js +7 -7
  28. package/lib/utilities/match.js +3 -3
  29. package/lib/variable.js +8 -8
  30. package/lib/verify/containedAssertion.js +54 -20
  31. package/lib/verify/definedAssertion.js +67 -33
  32. package/lib/verify/frame.js +2 -2
  33. package/lib/verify/frameAssertion.js +3 -3
  34. package/lib/verify/metaproofStep.js +37 -15
  35. package/lib/verify/metastatement/unqualified.js +3 -3
  36. package/lib/verify/metastatement.js +35 -6
  37. package/lib/verify/ruleProofStep.js +25 -14
  38. package/lib/verify/statement/unqualified.js +3 -3
  39. package/lib/verify/statement.js +4 -7
  40. package/package.json +2 -2
  41. package/src/axiomLemmaTheoremConjecture.js +6 -6
  42. package/src/conclusion.js +6 -6
  43. package/src/consequent.js +2 -2
  44. package/src/context/file.js +6 -6
  45. package/src/context/local.js +7 -7
  46. package/src/context/localMeta.js +9 -9
  47. package/src/declaration.js +10 -10
  48. package/src/equivalence.js +14 -14
  49. package/src/frame.js +4 -4
  50. package/src/frameAssertion.js +2 -2
  51. package/src/metaConsequent.js +3 -3
  52. package/src/metaLemmaMetatheorem.js +10 -10
  53. package/src/metaSupposition.js +6 -6
  54. package/src/metaType.js +7 -7
  55. package/src/metavariable.js +6 -6
  56. package/src/mixins/nodesVerifier/intrinsiclevel.js +2 -2
  57. package/src/mixins/nodesVerifier/metaLevel.js +2 -2
  58. package/src/premise.js +15 -15
  59. package/src/rule.js +22 -22
  60. package/src/step/metaproof.js +4 -4
  61. package/src/step/proof.js +4 -4
  62. package/src/substitution/metastatementForMetavariable.js +7 -7
  63. package/src/substitution/statementForMetavariable.js +5 -3
  64. package/src/substitution/termForVariable.js +8 -8
  65. package/src/substitution.js +10 -10
  66. package/src/supposition.js +2 -2
  67. package/src/type.js +7 -7
  68. package/src/utilities/match.js +2 -2
  69. package/src/variable.js +11 -11
  70. package/src/verify/containedAssertion.js +76 -27
  71. package/src/verify/definedAssertion.js +90 -41
  72. package/src/verify/frame.js +1 -1
  73. package/src/verify/frameAssertion.js +2 -2
  74. package/src/verify/metaproofStep.js +43 -2
  75. package/src/verify/metastatement/unqualified.js +2 -2
  76. package/src/verify/metastatement.js +46 -5
  77. package/src/verify/ruleProofStep.js +22 -1
  78. package/src/verify/statement/unqualified.js +2 -2
  79. package/src/verify/statement.js +2 -6
package/src/frame.js CHANGED
@@ -37,7 +37,7 @@ export default class Frame {
37
37
  }
38
38
 
39
39
  matchSubstitution(substitution) {
40
- const substitutionMatches = this.declarations.some((declaration) => {
40
+ const matchesSubstitution = this.declarations.some((declaration) => {
41
41
  const declarationMatchesSubstitution = declaration.matchSubstitution(substitution);
42
42
 
43
43
  if (declarationMatchesSubstitution) {
@@ -45,12 +45,12 @@ export default class Frame {
45
45
  }
46
46
  });
47
47
 
48
- return substitutionMatches;
48
+ return matchesSubstitution;
49
49
  }
50
50
 
51
51
  matchMetaLemmaOrMetaTheorem(metaLemmaMetatheorem) {
52
52
  const substitutions = metaLemmaMetatheorem.getSubstitutions(),
53
- metaLemmaOrMetaTheoremMatches = substitutions.every((substitution) => {
53
+ matchesMetaLemmaOrMetaTheorem = substitutions.every((substitution) => {
54
54
  const frameMatchesSubstitution = this.matchSubstitution(substitution);
55
55
 
56
56
  if (frameMatchesSubstitution) {
@@ -58,7 +58,7 @@ export default class Frame {
58
58
  }
59
59
  });
60
60
 
61
- return metaLemmaOrMetaTheoremMatches;
61
+ return matchesMetaLemmaOrMetaTheorem;
62
62
  }
63
63
 
64
64
  static fromDeclarations(declarations) {
@@ -22,9 +22,9 @@ export default class FrameAssertion {
22
22
  getDeclarations() { return this.frame.getDeclarations(); }
23
23
 
24
24
  matchMetavariableNode(metavariableNode) {
25
- const metavariableNodeMatches = this.metavariableNode.match(metavariableNode);
25
+ const matchesMetavariableNode = this.metavariableNode.match(metavariableNode);
26
26
 
27
- return metavariableNodeMatches;
27
+ return matchesMetavariableNode;
28
28
  }
29
29
 
30
30
  matchMetaLemmaOrMetaTheorem(metaLemmaMetatheorem) { return this.frame.matchMetaLemmaOrMetaTheorem(metaLemmaMetatheorem); }
@@ -21,7 +21,7 @@ export default class MetaConsequent {
21
21
  }
22
22
 
23
23
  matchMetastatementNode(metastatementNode, substitutions, fileContext, localMetaContext) {
24
- let metastatementNodeMatches = false;
24
+ let matchesMetastatementNode = false;
25
25
 
26
26
  if (this.metastatementNode !== null) {
27
27
  const nonTerminalNodeA = this.metastatementNode, ///
@@ -35,10 +35,10 @@ export default class MetaConsequent {
35
35
  return verifiedAhead;
36
36
  });
37
37
 
38
- metastatementNodeMatches = nonTerminalNodeVerified; ///
38
+ matchesMetastatementNode = nonTerminalNodeVerified; ///
39
39
  }
40
40
 
41
- return metastatementNodeMatches;
41
+ return matchesMetastatementNode;
42
42
  }
43
43
 
44
44
  toJSON(tokens) {
@@ -53,7 +53,7 @@ export default class MetaLemmaMetatheorem {
53
53
  }
54
54
 
55
55
  matchMetavariableNode(metavariableNode) {
56
- const metavariableNodeMatches = this.labels.some((label) => {
56
+ const matchesMetavariableNode = this.labels.some((label) => {
57
57
  const labelMatchesMetavariableNode = label.matchMetavariableNode(metavariableNode);
58
58
 
59
59
  if (labelMatchesMetavariableNode) {
@@ -61,7 +61,7 @@ export default class MetaLemmaMetatheorem {
61
61
  }
62
62
  });
63
63
 
64
- return metavariableNodeMatches;
64
+ return matchesMetavariableNode;
65
65
  }
66
66
 
67
67
  toJSON(tokens) {
@@ -160,29 +160,29 @@ function matchMetaSuppositions(metaSuppositions, metaproofSteps, substitutions,
160
160
  }
161
161
 
162
162
  function matchMetaSupposition(metaSupposition, metaproofStep, substitutions, fileContext, localMetaContext) {
163
- let suppositionMatches = false;
163
+ let matchesMetaSupposition = false;
164
164
 
165
165
  const metaSubproofNode = metaproofStep.getMetaSubproofNode(),
166
166
  metastatementNode = metaproofStep.getMetastatementNode();
167
167
 
168
168
  if (metaSubproofNode !== null) {
169
- const metaSubProofMatches = metaSupposition.matchMetaSubproofNode(metaSubproofNode, substitutions, fileContext, localMetaContext);
169
+ const metaSuppositionMatchesMetaSubproofNode = metaSupposition.matchMetaSubproofNode(metaSubproofNode, substitutions, fileContext, localMetaContext);
170
170
 
171
- suppositionMatches - metaSubProofMatches; ///
171
+ matchesMetaSupposition - metaSuppositionMatchesMetaSubproofNode; ///
172
172
  }
173
173
 
174
174
  if (metastatementNode !== null) {
175
- const metastatementMatches = metaSupposition.matchMetastatementNode(metastatementNode, substitutions, fileContext, localMetaContext);
175
+ const metaSuppositionMatchesMetastatementNode = metaSupposition.matchMetastatementNode(metastatementNode, substitutions, fileContext, localMetaContext);
176
176
 
177
- suppositionMatches - metastatementMatches; ///
177
+ matchesMetaSupposition - metaSuppositionMatchesMetastatementNode; ///
178
178
  }
179
179
 
180
- return suppositionMatches;
180
+ return matchesMetaSupposition;
181
181
  }
182
182
 
183
183
  function matchMetaConsequent(metaConsequent, metastatementNode, substitutions, fileContext, localMetaContext) {
184
- const nonTerminalNodeMatches = metaConsequent.matchMetastatementNode(metastatementNode, substitutions, fileContext, localMetaContext),
185
- metaConsequentMatches = nonTerminalNodeMatches; ///
184
+ const metaConsequentMatchesMetastatementNode = metaConsequent.matchMetastatementNode(metastatementNode, substitutions, fileContext, localMetaContext),
185
+ metaConsequentMatches = metaConsequentMatchesMetastatementNode; ///
186
186
 
187
187
  return metaConsequentMatches;
188
188
  }
@@ -28,7 +28,7 @@ export default class MetaSupposition {
28
28
  }
29
29
 
30
30
  matchMetaSubproofNode(metaSubproofNode, substitutions, fileContext, localMetaContext) {
31
- let metaSubproofNodeMatches = false;
31
+ let matchesMetaSubproofNode = false;
32
32
 
33
33
  if (this.metastatementNode !== null) {
34
34
  const subproofAssertionNode = subproofAssertionNodeQuery(this.metastatementNode);
@@ -42,7 +42,7 @@ export default class MetaSupposition {
42
42
  ],
43
43
  subproofAssertionMetastatementNodes = subproofAssertionMetastatementNodesQuery(subproofAssertionNode);
44
44
 
45
- metaSubproofNodeMatches = match(subproofAssertionMetastatementNodes, metaSubproofMetastatementNodes, (subproofAssertionMetastatementNode, ruleSubproofMetastatementNode) => {
45
+ matchesMetaSubproofNode = match(subproofAssertionMetastatementNodes, metaSubproofMetastatementNodes, (subproofAssertionMetastatementNode, ruleSubproofMetastatementNode) => {
46
46
  const nonTerminalNodeA = subproofAssertionMetastatementNode, ///
47
47
  nonTerminalNodeB = ruleSubproofMetastatementNode, ///
48
48
  fileContextA = fileContext, ///
@@ -61,11 +61,11 @@ export default class MetaSupposition {
61
61
  }
62
62
  }
63
63
 
64
- return metaSubproofNodeMatches;
64
+ return matchesMetaSubproofNode;
65
65
  }
66
66
 
67
67
  matchMetastatementNode(metastatementNode, substitutions, fileContext, localMetaContext) {
68
- let metastatementNodeMatches = false;
68
+ let matchesMetastatementNode = false;
69
69
 
70
70
  if (this.metastatementNode !== null) {
71
71
  const nonTerminalNodeA = this.metastatementNode, ///
@@ -79,10 +79,10 @@ export default class MetaSupposition {
79
79
  return verifiedAhead;
80
80
  });
81
81
 
82
- metastatementNodeMatches = nonTerminalNodeVerified; ///
82
+ matchesMetastatementNode = nonTerminalNodeVerified; ///
83
83
  }
84
84
 
85
- return metastatementNodeMatches;
85
+ return matchesMetastatementNode;
86
86
  }
87
87
 
88
88
  toJSON(tokens) {
package/src/metaType.js CHANGED
@@ -25,23 +25,23 @@ export default class MetaType {
25
25
  }
26
26
 
27
27
  matchName(name) {
28
- const nameMatches = (this.name === name);
28
+ const matchesName = (this.name === name);
29
29
 
30
- return nameMatches;
30
+ return matchesName;
31
31
  }
32
32
 
33
33
  matchMetaTypeName(metaTypeName) {
34
- const metaTypeNameMatches = (this.name === metaTypeName);
34
+ const matchesMetaTypeName = (this.name === metaTypeName);
35
35
 
36
- return metaTypeNameMatches;
36
+ return matchesMetaTypeName;
37
37
  }
38
38
 
39
39
  matchMetaTypeNode(metaTypeNode) {
40
40
  const metaTypeName = metaTypeNameFromMetaTypeNode(metaTypeNode),
41
- metaTypeNameMatches = this.matchMetaTypeName(metaTypeName),
42
- metaTypeNodeMatches = metaTypeNameMatches; ///
41
+ matchesMetaTypeName = this.matchMetaTypeName(metaTypeName),
42
+ matchesMetaTypeNode = matchesMetaTypeName; ///
43
43
 
44
- return metaTypeNodeMatches;
44
+ return matchesMetaTypeNode;
45
45
  }
46
46
 
47
47
  asString(tokens) {
@@ -37,13 +37,13 @@ export default class Metavariable {
37
37
  }
38
38
 
39
39
  matchName(name) {
40
- const nameMatches = (this.name === name);
40
+ const matchesName = (this.name === name);
41
41
 
42
- return nameMatches;
42
+ return matchesName;
43
43
  }
44
44
 
45
45
  matchNode(node, localMetaContext) {
46
- let nodeMatches = false;
46
+ let matchesNode = false;
47
47
 
48
48
  const metavariableNode = node, ///
49
49
  typeNode = typeNodeQuery(metavariableNode);
@@ -57,16 +57,16 @@ export default class Metavariable {
57
57
  if (false) {
58
58
  ///
59
59
  } else if ((termNode === null) && (this.termType === null)) {
60
- nodeMatches = true;
60
+ matchesNode = true;
61
61
  } else if ((termNode !== null) && (this.termType !== null)) {
62
62
  const termVerifiedAgainstTermType = verifyTermAgainstTermType(termNode, this.termType, localMetaContext);
63
63
 
64
- nodeMatches = termVerifiedAgainstTermType; ///
64
+ matchesNode = termVerifiedAgainstTermType; ///
65
65
  }
66
66
  }
67
67
  }
68
68
 
69
- return nodeMatches;
69
+ return matchesNode;
70
70
  }
71
71
 
72
72
  toJSON(tokens) {
@@ -18,9 +18,9 @@ function verifyVariableNode(variableNodeA, termNodeB, substitutions, localContex
18
18
 
19
19
  if (substitution !== null) {
20
20
  const termNode = termNodeB, ///
21
- termNodeMatches = substitution.matchTermNode(termNode);
21
+ substitutionMatchesTermNode = substitution.matchTermNode(termNode);
22
22
 
23
- if (termNodeMatches) {
23
+ if (substitutionMatchesTermNode) {
24
24
  const verifiedAhead = verifyAhead();
25
25
 
26
26
  variableNodeVerified = verifiedAhead; ///
@@ -15,9 +15,9 @@ function verifyMetavariableNode(metavariableNodeA, metastatementNodeB, substitut
15
15
 
16
16
  if (substitution !== null) {
17
17
  const metastatementNode = metastatementNodeB, ///
18
- metastatementNodeMatches = substitution.matchMetastatementNode(metastatementNode);
18
+ substitutionMetastatementNode = substitution.matchMetastatementNode(metastatementNode);
19
19
 
20
- metavariableNodeVerified = metastatementNodeMatches; ///
20
+ metavariableNodeVerified = substitutionMetastatementNode; ///
21
21
  } else {
22
22
  const metavariableNode = metavariableNodeA, ///
23
23
  metastatementNode = metastatementNodeB, ///
package/src/premise.js CHANGED
@@ -34,7 +34,7 @@ export default class Premise {
34
34
  }
35
35
 
36
36
  matchStatementNode(statementNode, substitutions, fileContext, localContext) {
37
- let statementNodeMatches = false;
37
+ let matchesStatementNode = false;
38
38
 
39
39
  if (this.metastatementNode !== null) {
40
40
  const nonTerminalNodeA = this.metastatementNode, ///
@@ -48,14 +48,14 @@ export default class Premise {
48
48
  return verifiedAhead;
49
49
  });
50
50
 
51
- statementNodeMatches = nonTerminalNodeVerified; ///
51
+ matchesStatementNode = nonTerminalNodeVerified; ///
52
52
  }
53
53
 
54
- return statementNodeMatches;
54
+ return matchesStatementNode;
55
55
  }
56
56
 
57
57
  matchSubproofNode(subproofNode, substitutions, fileContext, localContext) {
58
- let subproofNodeMatches = false;
58
+ let matchesSubproofNode = false;
59
59
 
60
60
  if (this.metastatementNode !== null) {
61
61
  const subproofAssertionNode = subproofAssertionNodeQuery(this.metastatementNode);
@@ -69,7 +69,7 @@ export default class Premise {
69
69
  ],
70
70
  subproofAssertionMetastatementNodes = subproofAssertionMetastatementNodesQuery(subproofAssertionNode);
71
71
 
72
- subproofNodeMatches = match(subproofAssertionMetastatementNodes, subproofStatementNodes, (subproofAssertionMetastatementNode, subproofStatementNode) => {
72
+ matchesSubproofNode = match(subproofAssertionMetastatementNodes, subproofStatementNodes, (subproofAssertionMetastatementNode, subproofStatementNode) => {
73
73
  const nonTerminalNodeA = subproofAssertionMetastatementNode, ///
74
74
  nonTerminalNodeB = subproofStatementNode, ///
75
75
  fileContextA = fileContext, ///
@@ -88,11 +88,11 @@ export default class Premise {
88
88
  }
89
89
  }
90
90
 
91
- return subproofNodeMatches;
91
+ return matchesSubproofNode;
92
92
  }
93
93
 
94
94
  matchRuleSubproofNode(ruleSubproofNode, substitutions, fileContext, localMetaContext) {
95
- let ruleSubproofNodeMatches = false;
95
+ let matchesRuleSubproofNode = false;
96
96
 
97
97
  if (this.metastatementNode !== null) {
98
98
  const subproofAssertionNode = subproofAssertionNodeQuery(this.metastatementNode);
@@ -106,7 +106,7 @@ export default class Premise {
106
106
  ],
107
107
  subproofAssertionMetastatementNodes = subproofAssertionMetastatementNodesQuery(subproofAssertionNode);
108
108
 
109
- ruleSubproofNodeMatches = match(subproofAssertionMetastatementNodes, ruleSubproofMetastatementNodes, (subproofAssertionMetastatementNode, ruleSubproofMetastatementNode) => {
109
+ matchesRuleSubproofNode = match(subproofAssertionMetastatementNodes, ruleSubproofMetastatementNodes, (subproofAssertionMetastatementNode, ruleSubproofMetastatementNode) => {
110
110
  const nonTerminalNodeA = subproofAssertionMetastatementNode, ///
111
111
  nonTerminalNodeB = ruleSubproofMetastatementNode, ///
112
112
  fileContextA = fileContext, ///
@@ -125,11 +125,11 @@ export default class Premise {
125
125
  }
126
126
  }
127
127
 
128
- return ruleSubproofNodeMatches;
128
+ return matchesRuleSubproofNode;
129
129
  }
130
130
 
131
131
  matchMetaSubproofNode(metaSubproofNode, substitutions, fileContext, localMetaContext) {
132
- let metaSubproofNodeMatches = false;
132
+ let matchesMetaSubproofNode = false;
133
133
 
134
134
  if (this.metastatementNode !== null) {
135
135
  const subproofAssertionNode = subproofAssertionNodeQuery(this.metastatementNode);
@@ -143,7 +143,7 @@ export default class Premise {
143
143
  ],
144
144
  subproofAssertionMetastatementNodes = subproofAssertionMetastatementNodesQuery(subproofAssertionNode);
145
145
 
146
- metaSubproofNodeMatches = match(subproofAssertionMetastatementNodes, metaSubproofMetastatementNodes, (subproofAssertionMetastatementNode, ruleSubproofMetastatementNode) => {
146
+ matchesMetaSubproofNode = match(subproofAssertionMetastatementNodes, metaSubproofMetastatementNodes, (subproofAssertionMetastatementNode, ruleSubproofMetastatementNode) => {
147
147
  const nonTerminalNodeA = subproofAssertionMetastatementNode, ///
148
148
  nonTerminalNodeB = ruleSubproofMetastatementNode, ///
149
149
  fileContextA = fileContext, ///
@@ -162,11 +162,11 @@ export default class Premise {
162
162
  }
163
163
  }
164
164
 
165
- return metaSubproofNodeMatches;
165
+ return matchesMetaSubproofNode;
166
166
  }
167
167
 
168
168
  matchMetastatementNode(metastatementNode, substitutions, fileContext, localMetaContext) {
169
- let metastatementNodeMatches = false;
169
+ let matchesMetastatementNode = false;
170
170
 
171
171
  if (this.metastatementNode !== null) {
172
172
  const nonTerminalNodeA = this.metastatementNode, ///
@@ -180,10 +180,10 @@ export default class Premise {
180
180
  return verifiedAhead;
181
181
  });
182
182
 
183
- metastatementNodeMatches = nonTerminalNodeVerified; ///
183
+ matchesMetastatementNode = nonTerminalNodeVerified; ///
184
184
  }
185
185
 
186
- return metastatementNodeMatches;
186
+ return matchesMetastatementNode;
187
187
  }
188
188
 
189
189
  toJSON(tokens) {
package/src/rule.js CHANGED
@@ -31,7 +31,7 @@ export default class Rule {
31
31
  }
32
32
 
33
33
  matchStatement(statementNode, localContext) {
34
- let statementNatches = false;
34
+ let matchesStatement = false;
35
35
 
36
36
  const proofSteps = localContext.getProofSteps(),
37
37
  substitutions = [],
@@ -40,14 +40,14 @@ export default class Rule {
40
40
  if (premisesMatch) {
41
41
  const conclusionMatches = matchConclusion(this.conclusion, statementNode, substitutions, this.fileContext, localContext);
42
42
 
43
- statementNatches = conclusionMatches; ///
43
+ matchesStatement = conclusionMatches; ///
44
44
  }
45
45
 
46
- return statementNatches;
46
+ return matchesStatement;
47
47
  }
48
48
 
49
49
  matchMetastatement(metastatementNode, localMetaContext) {
50
- let metastatementNatches = false;
50
+ let matchesMetastatement = false;
51
51
 
52
52
  const metaproofSteps = localMetaContext.getMetaproofSteps(),
53
53
  substitutions = [],
@@ -56,14 +56,14 @@ export default class Rule {
56
56
  if (premisesMatch) {
57
57
  const conclusionMatches = metaMatchConclusion(this.conclusion, metastatementNode, substitutions, this.fileContext, localMetaContext);
58
58
 
59
- metastatementNatches = conclusionMatches; ///
59
+ matchesMetastatement = conclusionMatches; ///
60
60
  }
61
61
 
62
- return metastatementNatches;
62
+ return matchesMetastatement;
63
63
  }
64
64
 
65
65
  matchMetavariableNode(metavariableNode) {
66
- const metavariableNodeMatches = this.labels.some((label) => {
66
+ const matchesMetavariableNode = this.labels.some((label) => {
67
67
  const labelMatchesMetavariableNode = label.matchMetavariableNode(metavariableNode);
68
68
 
69
69
  if (labelMatchesMetavariableNode) {
@@ -71,7 +71,7 @@ export default class Rule {
71
71
  }
72
72
  });
73
73
 
74
- return metavariableNodeMatches;
74
+ return matchesMetavariableNode;
75
75
  }
76
76
 
77
77
  toJSON(tokens) {
@@ -150,15 +150,15 @@ function matchPremise(premise, proofStep, substitutions, fileContext, localConte
150
150
  statementNode = proofStep.getStatementNode();
151
151
 
152
152
  if (subproofNode !== null) {
153
- const subproofNodeMatches = premise.matchSubproofNode(subproofNode, substitutions, fileContext, localContext);
153
+ const premiseMatchesSubproofNode = premise.matchSubproofNode(subproofNode, substitutions, fileContext, localContext);
154
154
 
155
- premiseMatches = subproofNodeMatches; ///
155
+ premiseMatches = premiseMatchesSubproofNode; ///
156
156
  }
157
157
 
158
158
  if (statementNode !== null) {
159
- const statementNodeMatches = premise.matchStatementNode(statementNode, substitutions, fileContext, localContext);
159
+ const premiseMatchesStatementNode = premise.matchStatementNode(statementNode, substitutions, fileContext, localContext);
160
160
 
161
- premiseMatches = statementNodeMatches; ///
161
+ premiseMatches = premiseMatchesStatementNode; ///
162
162
  }
163
163
 
164
164
  return premiseMatches;
@@ -181,8 +181,8 @@ function matchPremises(premises, proofSteps, substitutions, fileContext, localCo
181
181
  }
182
182
 
183
183
  function matchConclusion(conclusion, statementNode, substitutions, fileContext, localContext) {
184
- const statementNodeMatches = conclusion.matchStatementNode(statementNode, substitutions, fileContext, localContext),
185
- conclusionMatches = statementNodeMatches; ///
184
+ const conclusionMatchesStatementNode = conclusion.matchStatementNode(statementNode, substitutions, fileContext, localContext),
185
+ conclusionMatches = conclusionMatchesStatementNode; ///
186
186
 
187
187
  return conclusionMatches;
188
188
  }
@@ -195,21 +195,21 @@ function metaMatchPremise(premise, metaproofStep, substitutions, fileContext, lo
195
195
  metastatementNode = metaproofStep.getMetastatementNode()
196
196
 
197
197
  if (ruleSubproofNode !== null) {
198
- const ruleSubProofNodeMatches = premise.matchRuleSubproofNode(ruleSubproofNode, substitutions, fileContext, localMetaContext);
198
+ const premiseMatchesRuleSubproofNode = premise.matchRuleSubproofNode(ruleSubproofNode, substitutions, fileContext, localMetaContext);
199
199
 
200
- premiseMatches = ruleSubProofNodeMatches; ///
200
+ premiseMatches = premiseMatchesRuleSubproofNode; ///
201
201
  }
202
202
 
203
203
  if (metaSubproofNode !== null) {
204
- const metaSubProofNodeMatches = premise.matchMetaSubproofNode(metaSubproofNode, substitutions, fileContext, localMetaContext);
204
+ const premiseMatchesMetaSubproofNode = premise.matchMetaSubproofNode(metaSubproofNode, substitutions, fileContext, localMetaContext);
205
205
 
206
- premiseMatches = metaSubProofNodeMatches; ///
206
+ premiseMatches = premiseMatchesMetaSubproofNode; ///
207
207
  }
208
208
 
209
209
  if (metastatementNode !== null) {
210
- const metastatementNodeMatches = premise.matchMetastatementNode(metastatementNode, substitutions, fileContext, localMetaContext);
210
+ const premiseMatchesMetastatementNode = premise.matchMetastatementNode(metastatementNode, substitutions, fileContext, localMetaContext);
211
211
 
212
- premiseMatches = metastatementNodeMatches; ///
212
+ premiseMatches = premiseMatchesMetastatementNode; ///
213
213
  }
214
214
 
215
215
  return premiseMatches;
@@ -232,8 +232,8 @@ function metaMatchPremises(premises, metaproofSteps, substitutions, fileContext,
232
232
  }
233
233
 
234
234
  function metaMatchConclusion(conclusion, metastatementNode, substitutions, fileContext, localMetaContext) {
235
- const metastatementNodeMatches = conclusion.matchMetastatementNode(metastatementNode, substitutions, fileContext, localMetaContext),
236
- conclusionMatches = metastatementNodeMatches; ///
235
+ const conclusionMatchesMetastatementNode = conclusion.matchMetastatementNode(metastatementNode, substitutions, fileContext, localMetaContext),
236
+ conclusionMatches = conclusionMatchesMetastatementNode; ///
237
237
 
238
238
  return conclusionMatches;
239
239
  }
@@ -24,14 +24,14 @@ export default class MetaproofStep {
24
24
  return this.metastatementNode;
25
25
  }
26
26
 
27
- matchMetastatement(metastatementNode) {
28
- let matches = false;
27
+ matchMetastatementNode(metastatementNode) {
28
+ let matchesMetastatementNode = false;
29
29
 
30
30
  if (this.metastatementNode !== null) {
31
- matches = this.metastatementNode.match(metastatementNode);
31
+ matchesMetastatementNode = this.metastatementNode.match(metastatementNode);
32
32
  }
33
33
 
34
- return matches;
34
+ return matchesMetastatementNode;
35
35
  }
36
36
 
37
37
  static fromStatementNode(statementNode) {
package/src/step/proof.js CHANGED
@@ -14,14 +14,14 @@ export default class ProofStep {
14
14
  return this.statementNode;
15
15
  }
16
16
 
17
- matchStatement(statementNode) {
18
- let matches = false;
17
+ matchStatementNode(statementNode) {
18
+ let matchesStatementNode = false;
19
19
 
20
20
  if (this.statementNode !== null) {
21
- matches = this.statementNode.match(statementNode);
21
+ matchesStatementNode = this.statementNode.match(statementNode);
22
22
  }
23
23
 
24
- return matches;
24
+ return matchesStatementNode;
25
25
  }
26
26
 
27
27
  static fromSubproofNode(subproofNode) {
@@ -23,27 +23,27 @@ export default class MetastatementForMetavariableSubstitution extends Substituti
23
23
  }
24
24
 
25
25
  matchMetavariableNode(metavariableNode) {
26
- const metavariableNodeMatches = this.metavariableNode.match(metavariableNode);
26
+ const matchesMetavariableNode = this.metavariableNode.match(metavariableNode);
27
27
 
28
- return metavariableNodeMatches;
28
+ return matchesMetavariableNode;
29
29
  }
30
30
 
31
31
  matchMetastatementNode(metastatementNode) {
32
- let metastatementNodeMatches;
32
+ let matchesMetastatementNode;
33
33
 
34
- metastatementNodeMatches = this.metastatementNode.match(metastatementNode)
34
+ matchesMetastatementNode = this.metastatementNode.match(metastatementNode)
35
35
 
36
- if (!metastatementNodeMatches) {
36
+ if (!matchesMetastatementNode) {
37
37
  const bracketedMetastatementChildNode = bracketedMetastatementChildNodeFromMetastatementNode(metastatementNode);
38
38
 
39
39
  if (bracketedMetastatementChildNode !== null) {
40
40
  const metastatementNode = bracketedMetastatementChildNode; ///
41
41
 
42
- metastatementNodeMatches = this.metastatementNode.match(metastatementNode);
42
+ matchesMetastatementNode = this.metastatementNode.match(metastatementNode);
43
43
  }
44
44
  }
45
45
 
46
- return metastatementNodeMatches;
46
+ return matchesMetastatementNode;
47
47
  }
48
48
 
49
49
  toJSON(tokens) {
@@ -50,9 +50,9 @@ export default class StatementForMetavariableSubstitution extends Substitution {
50
50
  }
51
51
 
52
52
  matchMetavariableNode(metavariableNode) {
53
- const metavariableNodeMatches = this.metavariableNode.match(metavariableNode);
53
+ const matchesMetavariableNode = this.metavariableNode.match(metavariableNode);
54
54
 
55
- return metavariableNodeMatches;
55
+ return matchesMetavariableNode;
56
56
  }
57
57
 
58
58
  static fromMetavariableNodeAndStatementNode(metavariableNode, statementNode) {
@@ -102,7 +102,9 @@ function matchStatementNode(statementNodeA, statementNodeB, substitution, substi
102
102
  let statementNodeMatches;
103
103
 
104
104
  if (substitution === null) {
105
- statementNodeMatches = statementNodeB.match(statementNodeA);
105
+ const statementNodeAMatchesStatementNodeB = statementNodeB.match(statementNodeA);
106
+
107
+ statementNodeMatches = statementNodeAMatchesStatementNodeB; ///
106
108
  } else {
107
109
  const statementVerifiedAgainstStatement = verifyStatementAgainstStatement(statementNodeA, statementNodeB, substitution, substitutions, localContextA, localContextB);
108
110
 
@@ -34,15 +34,15 @@ export default class TermForVariableSubstitution extends Substitution {
34
34
  }
35
35
 
36
36
  matchTermNode(termNode) {
37
- const termNodeMatches = this.termNode.match(termNode);
37
+ const matchesTermNode = this.termNode.match(termNode);
38
38
 
39
- return termNodeMatches;
39
+ return matchesTermNode;
40
40
  }
41
41
 
42
42
  matchVariableNode(variableNode) {
43
- const variableNodeMatches = this.variableNode.match(variableNode);
43
+ const matchesVariableNode = this.variableNode.match(variableNode);
44
44
 
45
- return variableNodeMatches;
45
+ return matchesVariableNode;
46
46
  }
47
47
 
48
48
  static fromSubstitutionNode(substitutionNode) {
@@ -91,9 +91,9 @@ function substituteTermNode(termNode, substitutions) {
91
91
 
92
92
  if (termVariableNode !== null) {
93
93
  substitutions.some((substitution) => {
94
- const variableNodeMatches = substitution.matchVariableNode(termVariableNode);
94
+ const substitutionMatchesVariableNode = substitution.matchVariableNode(termVariableNode);
95
95
 
96
- if (variableNodeMatches) {
96
+ if (substitutionMatchesVariableNode) {
97
97
  termNode = substitution.getTermNode(); ///
98
98
 
99
99
  return true;
@@ -106,9 +106,9 @@ function substituteTermNode(termNode, substitutions) {
106
106
 
107
107
  function substituteVariableNode(variableNode, substitutions) {
108
108
  substitutions.some((substitution) => {
109
- const variableNodeMatches = substitution.matchVariableNode(variableNode);
109
+ const substitutionMatchesVariableNode = substitution.matchVariableNode(variableNode);
110
110
 
111
- if (variableNodeMatches) {
111
+ if (substitutionMatchesVariableNode) {
112
112
  const termNode = substitution.getTermNode(),
113
113
  termVariableNode = variableNodeQuery(termNode);
114
114