occam-verify-cli 0.0.909 → 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 (88) 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 -35
  5. package/lib/context/local.js +14 -19
  6. package/lib/context/localMeta.js +16 -21
  7. package/lib/declaration.js +10 -10
  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 +10 -10
  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 +19 -19
  19. package/lib/rule.js +21 -21
  20. package/lib/step/metaproof.js +14 -53
  21. package/lib/step/proof.js +10 -22
  22. package/lib/substitution/metastatementForMetavariable.js +11 -11
  23. package/lib/substitution/statementForMetavariable.js +9 -8
  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 +96 -0
  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/metaDerivation.js +7 -7
  35. package/lib/verify/metaSubDerivation.js +6 -6
  36. package/lib/verify/metaproofStep.js +98 -0
  37. package/lib/verify/metastatement/unqualified.js +4 -7
  38. package/lib/verify/metastatement.js +35 -6
  39. package/lib/verify/ruleProofStep.js +25 -14
  40. package/lib/verify/statement/unqualified.js +3 -3
  41. package/lib/verify/statement.js +4 -7
  42. package/package.json +2 -2
  43. package/src/axiomLemmaTheoremConjecture.js +6 -6
  44. package/src/conclusion.js +6 -6
  45. package/src/consequent.js +2 -2
  46. package/src/context/file.js +6 -30
  47. package/src/context/local.js +13 -19
  48. package/src/context/localMeta.js +15 -21
  49. package/src/declaration.js +12 -12
  50. package/src/equivalence.js +14 -14
  51. package/src/frame.js +4 -4
  52. package/src/frameAssertion.js +2 -2
  53. package/src/metaConsequent.js +3 -3
  54. package/src/metaLemmaMetatheorem.js +10 -10
  55. package/src/metaSupposition.js +9 -9
  56. package/src/metaType.js +7 -7
  57. package/src/metavariable.js +6 -6
  58. package/src/mixins/nodesVerifier/intrinsiclevel.js +2 -2
  59. package/src/mixins/nodesVerifier/metaLevel.js +2 -2
  60. package/src/premise.js +18 -18
  61. package/src/rule.js +22 -22
  62. package/src/step/metaproof.js +12 -73
  63. package/src/step/proof.js +8 -26
  64. package/src/substitution/metastatementForMetavariable.js +10 -10
  65. package/src/substitution/statementForMetavariable.js +6 -4
  66. package/src/substitution/termForVariable.js +8 -8
  67. package/src/substitution.js +10 -10
  68. package/src/supposition.js +2 -2
  69. package/src/type.js +7 -7
  70. package/src/utilities/match.js +100 -0
  71. package/src/variable.js +11 -11
  72. package/src/verify/containedAssertion.js +76 -27
  73. package/src/verify/definedAssertion.js +90 -41
  74. package/src/verify/frame.js +1 -1
  75. package/src/verify/frameAssertion.js +2 -2
  76. package/src/verify/metaDerivation.js +6 -6
  77. package/src/verify/metaSubDerivation.js +6 -6
  78. package/src/verify/{metaProofStep.js → metaproofStep.js} +60 -19
  79. package/src/verify/metastatement/unqualified.js +3 -7
  80. package/src/verify/metastatement.js +46 -5
  81. package/src/verify/ruleProofStep.js +22 -1
  82. package/src/verify/statement/unqualified.js +2 -2
  83. package/src/verify/statement.js +2 -6
  84. package/lib/utilities/metaproof.js +0 -59
  85. package/lib/utilities/proof.js +0 -59
  86. package/lib/verify/metaProofStep.js +0 -76
  87. package/src/utilities/metaproof.js +0 -53
  88. package/src/utilities/proof.js +0 -53
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "occam-verify-cli",
3
3
  "author": "James Smith",
4
- "version": "0.0.909",
4
+ "version": "0.0.911",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/occam-verify-cli",
7
7
  "description": "Occam's Verifier",
@@ -12,7 +12,7 @@
12
12
  "dependencies": {
13
13
  "argumentative": "^2.0.28",
14
14
  "necessary": "^14.0.1",
15
- "occam-custom-grammars": "^5.0.809",
15
+ "occam-custom-grammars": "^5.0.811",
16
16
  "occam-entities": "^1.0.146",
17
17
  "occam-file-system": "^6.0.187",
18
18
  "occam-grammar-utilities": "^8.0.207",
@@ -48,7 +48,7 @@ export default class AxiomLemmaTheoremConjecture {
48
48
  }
49
49
 
50
50
  matchMetavariableNode(metavariableNode) {
51
- const metavariableNodeMatches = this.labels.some((label) => {
51
+ const matchesMetavariableNode = this.labels.some((label) => {
52
52
  const labelMatchesMetavariableNode = label.matchMetavariableNode(metavariableNode);
53
53
 
54
54
  if (labelMatchesMetavariableNode) {
@@ -56,7 +56,7 @@ export default class AxiomLemmaTheoremConjecture {
56
56
  }
57
57
  });
58
58
 
59
- return metavariableNodeMatches;
59
+ return matchesMetavariableNode;
60
60
  }
61
61
 
62
62
  toJSON(tokens) {
@@ -149,17 +149,17 @@ function matchSupposition(supposition, proofStep, substitutions, localContext, s
149
149
  const statementNode = proofStep.getStatementNode();
150
150
 
151
151
  if (statementNode !== null) {
152
- const statementMatches = supposition.matchStatementNode(statementNode, substitutions, localContext, statementLocalContext);
152
+ const suppositionMatchesStatementNode = supposition.matchStatementNode(statementNode, substitutions, localContext, statementLocalContext);
153
153
 
154
- suppositionMatches = statementMatches; ///
154
+ suppositionMatches = suppositionMatchesStatementNode; ///
155
155
  }
156
156
 
157
157
  return suppositionMatches;
158
158
  }
159
159
 
160
160
  function matchConsequent(consequent, statementNode, substitutions, localContext, statementLocalContext) {
161
- const nonTerminalNodeMatches = consequent.matchStatementNode(statementNode, substitutions, localContext, statementLocalContext),
162
- consequentMatches = nonTerminalNodeMatches; ///
161
+ const consequentMatchesStatementNode = consequent.matchStatementNode(statementNode, substitutions, localContext, statementLocalContext),
162
+ consequentMatches = consequentMatchesStatementNode; ///
163
163
 
164
164
  return consequentMatches;
165
165
  }
package/src/conclusion.js CHANGED
@@ -22,7 +22,7 @@ export default class Conclusion {
22
22
  }
23
23
 
24
24
  matchStatementNode(statementNode, substitutions, localContext, statementLocalContext) {
25
- let statementNodeMatches = false;
25
+ let matchesStatementNose = false;
26
26
 
27
27
  if (this.metastatementNode !== null) {
28
28
  const nonTerminalNodeA = this.metastatementNode, ///
@@ -35,14 +35,14 @@ export default class Conclusion {
35
35
  return verifiedAhead;
36
36
  });
37
37
 
38
- statementNodeMatches = nonTerminalNodeVerified; ///
38
+ matchesStatementNose = nonTerminalNodeVerified; ///
39
39
  }
40
40
 
41
- return statementNodeMatches;
41
+ return matchesStatementNose;
42
42
  }
43
43
 
44
44
  matchMetastatementNode(metastatementNode, substitutions, fileContext, localMetaContext) {
45
- let metastatementNodeMatches = false;
45
+ let matchesMetastatementNode = false;
46
46
 
47
47
  if (this.metastatementNode !== null) {
48
48
  const nonTerminalNodeA = this.metastatementNode, ///
@@ -56,10 +56,10 @@ export default class Conclusion {
56
56
  return verifiedAhead;
57
57
  });
58
58
 
59
- metastatementNodeMatches = nonTerminalNodeVerified; ///
59
+ matchesMetastatementNode = nonTerminalNodeVerified; ///
60
60
  }
61
61
 
62
- return metastatementNodeMatches;
62
+ return matchesMetastatementNode;
63
63
  }
64
64
 
65
65
  toJSON(tokens) {
package/src/consequent.js CHANGED
@@ -24,9 +24,9 @@ export default class Consequent {
24
24
 
25
25
  return verifiedAhead;
26
26
  }),
27
- statementNodeMatches = nonTerminalNodeVerified; ///
27
+ matchesStatementNode = nonTerminalNodeVerified; ///
28
28
 
29
- return statementNodeMatches;
29
+ return matchesStatementNode;
30
30
  }
31
31
 
32
32
  toJSON(tokens) {
@@ -337,9 +337,9 @@ export default class FileContext {
337
337
  const node = variableNode, ///
338
338
  variables = this.getVariables(),
339
339
  variable = variables.find((variable) => {
340
- const nodeMatches = variable.matchNode(node);
340
+ const variableMatchesNode = variable.matchNode(node);
341
341
 
342
- if (nodeMatches) {
342
+ if (variableMatchesNode) {
343
343
  return true;
344
344
  }
345
345
  }) || null;
@@ -520,30 +520,6 @@ export default class FileContext {
520
520
  return metavariablePresent;
521
521
  }
522
522
 
523
- isTermGrounded(term) {
524
- const termGrounded = false; ///
525
-
526
- return termGrounded;
527
- }
528
-
529
- isVariableDefined(variable) {
530
- const variableDefined = false; ///
531
-
532
- return variableDefined;
533
- }
534
-
535
- matchStatement(statementNode) {
536
- const statementMatches = false;
537
-
538
- return statementMatches;
539
- }
540
-
541
- matchMetastatement(metastatementNode) {
542
- const metastatementMatches = false;
543
-
544
- return metastatementMatches;
545
- }
546
-
547
523
  nodeAsString(node) {
548
524
  const string = nodeAsString(node, this.tokens);
549
525
 
@@ -581,9 +557,9 @@ export default class FileContext {
581
557
 
582
558
  const node = variable.getNode(),
583
559
  variablePresent = this.variables.some((variable) => {
584
- const nodeMatches = variable.matchNode(node);
560
+ const variableMatchesNode = variable.matchNode(node);
585
561
 
586
- if (nodeMatches) {
562
+ if (variableMatchesNode) {
587
563
  return true;
588
564
  }
589
565
  });
@@ -622,9 +598,9 @@ export default class FileContext {
622
598
 
623
599
  const name = metavariable.getName(),
624
600
  metavariablePresent = this.metavariables.some((metavariable) => {
625
- const nodeMatches = metavariable.matchName(name);
601
+ const metavariableMatchesNode = metavariable.matchName(name);
626
602
 
627
- if (nodeMatches) {
603
+ if (metavariableMatchesNode) {
628
604
  return true;
629
605
  }
630
606
  });
@@ -4,7 +4,7 @@ import Variable from "../variable";
4
4
  import Equivalence from "../equivalence";
5
5
  import contextMixins from "../mixins/context";
6
6
 
7
- import { last } from "../utilities/array";
7
+ import { last, reverse } from "../utilities/array";
8
8
  import { mergeEquivalences, findEquivalenceByTerm, groundedTermsAndDefinedVariablesFromFromEquivalences } from "../utilities/equivalences";
9
9
 
10
10
  class LocalContext {
@@ -183,9 +183,9 @@ class LocalContext {
183
183
 
184
184
  const node = variable.getNode(),
185
185
  variablePresent = this.variables.some((variable) => {
186
- const nodeMatches = variable.matchNode(node);
186
+ const variableMatchesNode = variable.matchNode(node);
187
187
 
188
- if (nodeMatches) {
188
+ if (variableMatchesNode) {
189
189
  return true;
190
190
  }
191
191
  });
@@ -215,26 +215,20 @@ class LocalContext {
215
215
  this.equivalences.splice(start, deleteCount);
216
216
  }
217
217
 
218
- matchStatement(statementNode) {
219
- let statementMatches = false;
218
+ matchStatementNode(statementNode) {
219
+ let proofSteps = this.getProofSteps();
220
220
 
221
- if (!statementMatches) {
222
- const proofStepMatchesStatement = this.proofSteps.some((proofStep) => {
223
- const proofStepMatchesStatement = proofStep.match(statementNode);
221
+ proofSteps = reverse(proofSteps); ///
224
222
 
225
- if (proofStepMatchesStatement) {
226
- return true;
227
- }
228
- });
229
-
230
- statementMatches = proofStepMatchesStatement; ///
231
- }
223
+ const matchesStatementNode = proofSteps.some((proofStep) => {
224
+ const proofStepMatchesStatementNode = proofStep.matchStatementNode(statementNode);
232
225
 
233
- if (!statementMatches) {
234
- statementMatches = this.context.matchStatement(statementNode);
235
- }
226
+ if (proofStepMatchesStatementNode) {
227
+ return true;
228
+ }
229
+ });
236
230
 
237
- return statementMatches;
231
+ return matchesStatementNode;
238
232
  }
239
233
 
240
234
  findVariableByVariableNode(variableNode) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import LocalContext from "../context/local";
4
4
 
5
- import { last } from "../utilities/array";
5
+ import { last, reverse } from "../utilities/array";
6
6
 
7
7
  class LocalMetaContext extends LocalContext {
8
8
  constructor(context, variables, proofSteps, equivalences, metavariables, metaproofSteps, frameAssertions) {
@@ -78,9 +78,9 @@ class LocalMetaContext extends LocalContext {
78
78
 
79
79
  const node = metavariable.getName(),
80
80
  metavariablePresent = this.metavariables.some((metavariable) => {
81
- const nodeMatches = metavariable.matchNode(node);
81
+ const metavariableMatchesNode = metavariable.matchNode(node);
82
82
 
83
- if (nodeMatches) {
83
+ if (metavariableMatchesNode) {
84
84
  return true;
85
85
  }
86
86
  });
@@ -98,26 +98,20 @@ class LocalMetaContext extends LocalContext {
98
98
  this.metaproofSteps.push(metaproofStep);
99
99
  }
100
100
 
101
- matchMetastatement(metastatementNode) {
102
- let metastatementMatches = false;
101
+ matchMetastatementNode(metastatementNode) {
102
+ let metaproofSteps = this.getMetaproofSteps();
103
103
 
104
- if (!metastatementMatches) {
105
- const proofStepMatchesMetastatement = this.metaproofSteps.some((metaproofStep) => {
106
- const proofStepMatchesMetastatement = metaproofStep.match(metastatementNode);
104
+ metaproofSteps = reverse(metaproofSteps); ///
107
105
 
108
- if (proofStepMatchesMetastatement) {
109
- return true;
110
- }
111
- });
106
+ const matchesMetastatementNode = metaproofSteps.some((metaproofStep) => {
107
+ const metaproofStepMatchesMetastatementNode = metaproofStep.matchMetastatementNode(metastatementNode);
112
108
 
113
- metastatementMatches = proofStepMatchesMetastatement; ///
114
- }
115
-
116
- if (!metastatementMatches) {
117
- metastatementMatches = this.context.matchMetastatement(metastatementNode);
118
- }
109
+ if (metaproofStepMatchesMetastatementNode) {
110
+ return true;
111
+ }
112
+ });
119
113
 
120
- return metastatementMatches;
114
+ return matchesMetastatementNode;
121
115
  }
122
116
 
123
117
  findMetavariableByMetavariableNode(metavariableNode, localMetaContext) {
@@ -137,9 +131,9 @@ class LocalMetaContext extends LocalContext {
137
131
  findFrameAssertionByMetavariableNode(metavariableNode) {
138
132
  const frameAssertions = this.getFrameAssertions(),
139
133
  frameAssertion = frameAssertions.find((frameAssertion) => {
140
- const metavariableMatches = frameAssertion.matchMetavariableNode(metavariableNode);
134
+ const frameAssertionMatchesMetavariableNode = frameAssertion.matchMetavariableNode(metavariableNode);
141
135
 
142
- if (metavariableMatches) {
136
+ if (frameAssertionMatchesMetavariableNode) {
143
137
  return true;
144
138
  }
145
139
  }) || null;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import { matchMetastatement } from "./utilities/metaproof";
3
+ import { matchMetastatementModuloBrackets } from "./utilities/match";
4
4
 
5
5
  export default class Declaration {
6
6
  constructor(metavariableNode, metastatementNode) {
@@ -19,35 +19,35 @@ export default class Declaration {
19
19
  matchSubstitution(substitution) {
20
20
  const metavariableNode = substitution.getMetavariableNode(),
21
21
  metastatementNode = substitution.getMetastatementNode(),
22
- metavariableNodeMatches = this.matchMetavariableNode(metavariableNode),
23
- metastatementNodeMatches = this.matchMetastatementNode(metastatementNode),
24
- substitutionMatches = (metavariableNodeMatches && metastatementNodeMatches);
22
+ matchesMetavariableNode = this.matchMetavariableNode(metavariableNode),
23
+ matchesMetastatementNode = this.matchMetastatementNode(metastatementNode),
24
+ matchesSubstitution = (matchesMetavariableNode && matchesMetastatementNode);
25
25
 
26
- return substitutionMatches;
26
+ return matchesSubstitution;
27
27
  }
28
28
 
29
29
  matchMetavariableNode(metavariableNode) {
30
- const metavariableNodeMatches = this.metavariableNode.match(metavariableNode);
30
+ const matchesMetavariableNode = this.metavariableNode.match(metavariableNode);
31
31
 
32
- return metavariableNodeMatches;
32
+ return matchesMetavariableNode;
33
33
  }
34
34
 
35
35
  matchMetastatementNode(metastatementNode) {
36
36
  const metastatementNodeA = metastatementNode, ///
37
37
  metastatementNodeB = this.metastatementNode, ///
38
- metastatementMatches = matchMetastatement(metastatementNodeA, metastatementNodeB),
39
- metastatementNodeMatches = metastatementMatches; ///
38
+ metastatementMatches = matchMetastatementModuloBrackets(metastatementNodeA, metastatementNodeB),
39
+ matchesMetastatementNode = metastatementMatches; ///
40
40
 
41
- return metastatementNodeMatches;
41
+ return matchesMetastatementNode;
42
42
  }
43
43
 
44
44
  matchMetaLemmaOrMetaTheorem(metaLemmaMetatheorem) {
45
45
  const metaConsequent = metaLemmaMetatheorem.getMetaConsequent(),
46
46
  metastatementNode = metaConsequent.getMetastatementNode(),
47
47
  matches = this.metastatementNode.match(metastatementNode),
48
- metaLemmaOrMetaTheoremMatches = matches; ///
48
+ matchesMetaLemmaOrMetaTheorem = matches; ///
49
49
 
50
- return metaLemmaOrMetaTheoremMatches;
50
+ return matchesMetaLemmaOrMetaTheorem;
51
51
  }
52
52
 
53
53
  static fromMetavariableNodeAndMetastatementNode(metavariableNode, metastatementNode) {
@@ -49,14 +49,14 @@ export default class Equivalence {
49
49
  const typeB = type; ///
50
50
 
51
51
  const typeAEqualToTypeB = typeA.isEqualTo(typeB),
52
- typeMatches = typeAEqualToTypeB; ///
52
+ matchesType = typeAEqualToTypeB; ///
53
53
 
54
- return typeMatches;
54
+ return matchesType;
55
55
  }
56
56
 
57
57
  matchTerm(term) {
58
58
  const termA = term, ///
59
- termMatches = this.terms.some((term) => {
59
+ matchesTerm = this.terms.some((term) => {
60
60
  const termB = term, ///
61
61
  termAMatchesTermB = termA.match(termB);
62
62
 
@@ -65,24 +65,24 @@ export default class Equivalence {
65
65
  }
66
66
  });
67
67
 
68
- return termMatches;
68
+ return matchesTerm;
69
69
  }
70
70
 
71
71
  matchTerms(terms) {
72
- const termsMatch = terms.every((term) => {
73
- const termMatches = this.matchTerm(term);
72
+ const matchesTerms = terms.every((term) => {
73
+ const matchesTerm = this.matchTerm(term);
74
74
 
75
- if (termMatches) {
75
+ if (matchesTerm) {
76
76
  return true;
77
77
  }
78
78
  })
79
79
 
80
- return termsMatch;
80
+ return matchesTerms;
81
81
  }
82
82
 
83
83
  matchTermNode(termNode) {
84
84
  const termNodeA = termNode, ///
85
- termNodeMatches = this.terms.some((term) => {
85
+ matchesTermNode = this.terms.some((term) => {
86
86
  const termNode = term.getNode(),
87
87
  termNodeB = termNode, ///
88
88
  termNodeAMatchesTermB = termNodeA.match(termNodeB);
@@ -92,19 +92,19 @@ export default class Equivalence {
92
92
  }
93
93
  });
94
94
 
95
- return termNodeMatches;
95
+ return matchesTermNode;
96
96
  }
97
97
 
98
98
  matchTermNodes(termNodes) {
99
- const termNodesMatch = termNodes.every((termNode) => {
100
- const termNodeMatches = this.matchTermNode(termNode);
99
+ const matchesTermNodes = termNodes.every((termNode) => {
100
+ const matchesTermNode = this.matchTermNode(termNode);
101
101
 
102
- if (termNodeMatches) {
102
+ if (matchesTermNode) {
103
103
  return true;
104
104
  }
105
105
  });
106
106
 
107
- return termNodesMatch;
107
+ return matchesTermNodes;
108
108
  }
109
109
 
110
110
  getGroundedTerms(definedVariables, groundedTerms, localContext) {
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
  }
@@ -11,7 +11,7 @@ import { statementNodeFromStatementString, metastatementNodeFromMetastatementStr
11
11
  const subproofAssertionNodeQuery = nodeQuery("/metastatement/subproofAssertion!"),
12
12
  subproofAssertionMetastatementNodesQuery = nodesQuery("/subproofAssertion/metastatement"),
13
13
  metaSubproofMetaSuppositionMetastatementNodesQuery = nodesQuery("/metaSubproof/metaSupposition/unqualifiedMetastatement/metastatement!"),
14
- metaSubproofLastMetaProofStepMetastatementNodeQuery = nodeQuery("/metaSubproof/metaSubDerivation/lastMetaProofStep/unqualifiedMetastatement|qualifiedMetastatement/metastatement!");
14
+ metaSubproofLastMetpProofStepMetastatementNodeQuery = nodeQuery("/metaSubproof/metaSubDerivation/lastMetpProofStep/unqualifiedMetastatement|qualifiedMetastatement/metastatement!");
15
15
 
16
16
  export default class MetaSupposition {
17
17
  constructor(metastatementNode, statementNode) {
@@ -28,21 +28,21 @@ 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);
35
35
 
36
36
  if (subproofAssertionNode !== null) {
37
37
  const metaSubproofMetaSuppositionMetastatementNodes = metaSubproofMetaSuppositionMetastatementNodesQuery(metaSubproofNode),
38
- metaSubproofLastMetaProofStepMetastatementNode = metaSubproofLastMetaProofStepMetastatementNodeQuery(metaSubproofNode),
38
+ metaSubproofLastMetpProofStepMetastatementNode = metaSubproofLastMetpProofStepMetastatementNodeQuery(metaSubproofNode),
39
39
  metaSubproofMetastatementNodes = [
40
40
  ...metaSubproofMetaSuppositionMetastatementNodes,
41
- metaSubproofLastMetaProofStepMetastatementNode
41
+ metaSubproofLastMetpProofStepMetastatementNode
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) {