occam-verify-cli 1.0.254 → 1.0.256

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.
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return TopLevelMetaAssertionNode;
9
+ }
10
+ });
11
+ var _nonTerminal = /*#__PURE__*/ _interop_require_default(require("../node/nonTerminal"));
12
+ function _assert_this_initialized(self) {
13
+ if (self === void 0) {
14
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
15
+ }
16
+ return self;
17
+ }
18
+ function _call_super(_this, derived, args) {
19
+ derived = _get_prototype_of(derived);
20
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
21
+ }
22
+ function _class_call_check(instance, Constructor) {
23
+ if (!(instance instanceof Constructor)) {
24
+ throw new TypeError("Cannot call a class as a function");
25
+ }
26
+ }
27
+ function _defineProperties(target, props) {
28
+ for(var i = 0; i < props.length; i++){
29
+ var descriptor = props[i];
30
+ descriptor.enumerable = descriptor.enumerable || false;
31
+ descriptor.configurable = true;
32
+ if ("value" in descriptor) descriptor.writable = true;
33
+ Object.defineProperty(target, descriptor.key, descriptor);
34
+ }
35
+ }
36
+ function _create_class(Constructor, protoProps, staticProps) {
37
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
38
+ if (staticProps) _defineProperties(Constructor, staticProps);
39
+ return Constructor;
40
+ }
41
+ function _get_prototype_of(o) {
42
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
43
+ return o.__proto__ || Object.getPrototypeOf(o);
44
+ };
45
+ return _get_prototype_of(o);
46
+ }
47
+ function _inherits(subClass, superClass) {
48
+ if (typeof superClass !== "function" && superClass !== null) {
49
+ throw new TypeError("Super expression must either be null or a function");
50
+ }
51
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
52
+ constructor: {
53
+ value: subClass,
54
+ writable: true,
55
+ configurable: true
56
+ }
57
+ });
58
+ if (superClass) _set_prototype_of(subClass, superClass);
59
+ }
60
+ function _interop_require_default(obj) {
61
+ return obj && obj.__esModule ? obj : {
62
+ default: obj
63
+ };
64
+ }
65
+ function _possible_constructor_return(self, call) {
66
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
67
+ return call;
68
+ }
69
+ return _assert_this_initialized(self);
70
+ }
71
+ function _set_prototype_of(o, p) {
72
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
73
+ o.__proto__ = p;
74
+ return o;
75
+ };
76
+ return _set_prototype_of(o, p);
77
+ }
78
+ function _type_of(obj) {
79
+ "@swc/helpers - typeof";
80
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
81
+ }
82
+ function _is_native_reflect_construct() {
83
+ try {
84
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
85
+ } catch (_) {}
86
+ return (_is_native_reflect_construct = function() {
87
+ return !!result;
88
+ })();
89
+ }
90
+ var TopLevelMetaAssertionNode = /*#__PURE__*/ function(NonTerminalNode) {
91
+ _inherits(TopLevelMetaAssertionNode, NonTerminalNode);
92
+ function TopLevelMetaAssertionNode() {
93
+ _class_call_check(this, TopLevelMetaAssertionNode);
94
+ return _call_super(this, TopLevelMetaAssertionNode, arguments);
95
+ }
96
+ _create_class(TopLevelMetaAssertionNode, [
97
+ {
98
+ key: "getBodyNode",
99
+ value: function getBodyNode() {
100
+ var bodyRuleName = this.constructor.bodyRuleName, ruleName = bodyRuleName, axiomBodyNode = this.getNodeByRuleName(ruleName);
101
+ return axiomBodyNode;
102
+ }
103
+ },
104
+ {
105
+ key: "getHeaderNode",
106
+ value: function getHeaderNode() {
107
+ var headerRuleName = this.constructor.headerRuleName, ruleName = headerRuleName, headerNode = this.getNodeByRuleName(ruleName);
108
+ return headerNode;
109
+ }
110
+ },
111
+ {
112
+ key: "getLabelNode",
113
+ value: function getLabelNode() {
114
+ var headerNode = this.getHeaderNode(), labelNode = headerNode.getLabelNode();
115
+ return labelNode;
116
+ }
117
+ },
118
+ {
119
+ key: "getProofNode",
120
+ value: function getProofNode() {
121
+ var bodyNode = this.getBodyNode(), proofNode = bodyNode.getProofNode();
122
+ return proofNode;
123
+ }
124
+ }
125
+ ], [
126
+ {
127
+ key: "fromRuleNameChildNodesOpacityAndPrecedence",
128
+ value: function fromRuleNameChildNodesOpacityAndPrecedence(Class, ruleName, childNodes, opacity, precedence) {
129
+ return _nonTerminal.default.fromRuleNameChildNodesOpacityAndPrecedence(Class, ruleName, childNodes, opacity, precedence);
130
+ }
131
+ }
132
+ ]);
133
+ return TopLevelMetaAssertionNode;
134
+ }(_nonTerminal.default);
135
+
136
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ub2RlL3RvcExldmVsTWV0YUFzc2VydGlvbi5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IE5vblRlcm1pbmFsTm9kZSBmcm9tIFwiLi4vbm9kZS9ub25UZXJtaW5hbFwiO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBUb3BMZXZlbE1ldGFBc3NlcnRpb25Ob2RlIGV4dGVuZHMgTm9uVGVybWluYWxOb2RlIHtcbiAgZ2V0Qm9keU5vZGUoKSB7XG4gICAgY29uc3QgeyBib2R5UnVsZU5hbWUgfSA9IHRoaXMuY29uc3RydWN0b3IsXG4gICAgICAgICAgcnVsZU5hbWUgPSBib2R5UnVsZU5hbWUsICAvLy9cbiAgICAgICAgICBheGlvbUJvZHlOb2RlID0gdGhpcy5nZXROb2RlQnlSdWxlTmFtZShydWxlTmFtZSk7XG5cbiAgICByZXR1cm4gYXhpb21Cb2R5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nQkFDRSxJQUFNRCxhQUFhLElBQUksQ0FBQ0YsYUFBYSxJQUMvQkksWUFBWUYsV0FBV0MsWUFBWTtnQkFFekMsT0FBT0M7WUFDVDs7O1lBRUFDLEtBQUFBO21CQUFBQSxTQUFBQTtnQkFDRSxJQUFNQyxXQUFXLElBQUksQ0FBQ1gsV0FBVyxJQUMzQlksWUFBWUQsU0FBU0QsWUFBWTtnQkFFdkMsT0FBT0U7WUFDVDs7OztZQUVPQyxLQUFBQTttQkFBUCxTQUFPQSwyQ0FBMkNDLEtBQUssRUFBRVosUUFBUSxFQUFFYSxVQUFVLEVBQUVDLE9BQU8sRUFBRUMsVUFBVTtnQkFBSSxPQUFPQyxvQkFBZSxDQUFDTCwwQ0FBMEMsQ0FBQ0MsT0FBT1osVUFBVWEsWUFBWUMsU0FBU0M7WUFBYTs7O1dBL0J4TWxCO0VBQWtDbUIsb0JBQWUifQ==
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "occam-verify-cli",
3
3
  "author": "James Smith",
4
- "version": "1.0.254",
4
+ "version": "1.0.256",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/occam-verify-cli",
7
7
  "description": "Occam's Verifier",
@@ -12,11 +12,11 @@
12
12
  "dependencies": {
13
13
  "argumentative": "^2.0.32",
14
14
  "necessary": "^15.0.1",
15
- "occam-custom-grammars": "^5.0.1240",
16
- "occam-entities": "^1.0.382",
17
- "occam-file-system": "^6.0.397",
18
- "occam-furtle": "^2.0.190",
19
- "occam-grammars": "^1.3.319",
15
+ "occam-custom-grammars": "^5.0.1242",
16
+ "occam-entities": "^1.0.384",
17
+ "occam-file-system": "^6.0.399",
18
+ "occam-furtle": "^2.0.192",
19
+ "occam-grammars": "^1.3.323",
20
20
  "occam-lexers": "^23.1.3",
21
21
  "occam-parsers": "^23.1.5",
22
22
  "occam-query": "^4.1.110"
@@ -70,6 +70,12 @@ export default domAssigned(class Metavariable {
70
70
  return nameMatches;
71
71
  }
72
72
 
73
+ matchValue(value) {
74
+ const valueMatches = (value === this.name);
75
+
76
+ return valueMatches;
77
+ }
78
+
73
79
  matchMetavariableName(metavariableName) {
74
80
  const metavariableNameMatches = (metavariableName === this.name);
75
81
 
@@ -3,16 +3,16 @@
3
3
  import { domAssigned } from "../dom";
4
4
 
5
5
  export default domAssigned(class Parameter {
6
- constructor(name) {
7
- this.name = name;
6
+ constructor(value) {
7
+ this.value = value;
8
8
  }
9
9
 
10
- getName() {
11
- return this.name;
10
+ getValue() {
11
+ return this.value;
12
12
  }
13
13
 
14
14
  getString() {
15
- const string = this.name; ///
15
+ const string = this.value; ///
16
16
 
17
17
  return string;
18
18
  }
@@ -21,9 +21,9 @@ export default domAssigned(class Parameter {
21
21
  let replacementNode = null;
22
22
 
23
23
  const substitution = substitutions.findSubstitution((substitution) => {
24
- const nameMatches = substitution.matchName(this.name);
24
+ const valueMatches = substitution.matchValue(this.value);
25
25
 
26
- if (nameMatches) {
26
+ if (valueMatches) {
27
27
  return true;
28
28
  }
29
29
  });
@@ -36,9 +36,9 @@ export default domAssigned(class Parameter {
36
36
  }
37
37
 
38
38
  toJSON() {
39
- const name = this.name,
39
+ const value = this.value,
40
40
  json = {
41
- name
41
+ value
42
42
  };
43
43
 
44
44
  return json;
@@ -47,16 +47,16 @@ export default domAssigned(class Parameter {
47
47
  static name = "Parameter";
48
48
 
49
49
  static fromJSON(json, context) {
50
- const { name } = json,
51
- parameter = new Parameter(name);
50
+ const { value } = json,
51
+ parameter = new Parameter(value);
52
52
 
53
53
  return parameter;
54
54
  }
55
55
 
56
56
  static fromParameterNode(parameterNode, context) {
57
- const parameterName = parameterNode.getParameterName(),
58
- name = parameterName, ///
59
- parameter = new Parameter(name);
57
+ const parameterValue = parameterNode.getParameterValue(),
58
+ value = parameterValue, ///
59
+ parameter = new Parameter(value);
60
60
 
61
61
  return parameter;
62
62
  }
@@ -6,43 +6,43 @@ import { domAssigned } from "../dom";
6
6
  import { typeFromJSON, typeToTypeJSON } from "../utilities/json";
7
7
 
8
8
  export default domAssigned(class Property {
9
- constructor(string, name, type) {
9
+ constructor(string, type, name, identifier) {
10
10
  this.string = string;
11
- this.name = name;
12
11
  this.type = type;
12
+ this.identifier = identifier;
13
13
  }
14
14
 
15
15
  getString() {
16
16
  return this.string;
17
17
  }
18
18
 
19
- getName() {
20
- return this.name;
21
- }
22
-
23
19
  getType() {
24
20
  return this.type;
25
21
  }
26
22
 
23
+ getIdentifier() {
24
+ return this.identifier;
25
+ }
26
+
27
27
  setType(type) {
28
28
  this.type = type;
29
29
  }
30
30
 
31
31
  matchTypeName(typeName) { return this.type.matchTypeName(typeName); }
32
32
 
33
- matchPropertyName(propertyName) {
34
- const propertyNameMatches = (this.name === propertyName);
33
+ matchPropertyIdentifier(propertyIdentifier) {
34
+ const propertyIdentifierMatches = (this.identifier === propertyIdentifier);
35
35
 
36
- return propertyNameMatches;
36
+ return propertyIdentifierMatches;
37
37
  }
38
38
 
39
39
  toJSON() {
40
40
  const typeJSON = typeToTypeJSON(this.type),
41
- name = this.name, ///
41
+ identifier = this.identifier, ///
42
42
  type = typeJSON, ///
43
43
  json = {
44
44
  type,
45
- name
45
+ identifier
46
46
  };
47
47
 
48
48
  return json;
@@ -51,10 +51,10 @@ export default domAssigned(class Property {
51
51
  static name = "Property";
52
52
 
53
53
  static fromJSON(json, context) {
54
- const { name } = json,
54
+ const { identifier } = json,
55
55
  type = typeFromJSON(json, context),
56
- string = name, ///
57
- property = new Property(string, name, type);
56
+ string = identifier, ///
57
+ property = new Property(string, type, identifier);
58
58
 
59
59
  return property;
60
60
  }
@@ -75,10 +75,10 @@ export default domAssigned(class Property {
75
75
  static fromPropertyDeclarationNode(propertyDeclarationNode, context) {
76
76
  const { Type } = dom,
77
77
  type = Type.fromPropertyDeclarationNode(propertyDeclarationNode),
78
- propertyName = propertyDeclarationNode.getPropertyName(),
79
- name = propertyName, ///
80
- string = name, ///
81
- property = new Property(string, name, type);
78
+ propertyIdentifier = propertyDeclarationNode.getPropertyIdentifier(),
79
+ identifier = propertyIdentifier, ///
80
+ string = identifier, ///
81
+ property = new Property(string, type, identifier);
82
82
 
83
83
  return property;
84
84
  }
@@ -86,11 +86,11 @@ export default domAssigned(class Property {
86
86
 
87
87
  function propertyFromPropertyNode(propertyNode, context) {
88
88
  const { Property } = dom,
89
- propertyName = propertyNode.getPropertyName(),
90
- name = propertyName, ///
89
+ propertyIdentifier = propertyNode.getPropertyIdentifier(),
90
+ identifier = propertyIdentifier, ///
91
91
  type = null,
92
- string = name, ///
93
- property = new Property(string, name, type);
92
+ string = identifier, ///
93
+ property = new Property(string, type, identifier);
94
94
 
95
95
  return property;
96
96
  }
@@ -26,7 +26,7 @@ export default domAssigned(class FrameSubstitution extends Substitution {
26
26
 
27
27
  isMetavariableEqualTo(metavariable) { return this.metavariable.isEqualTo(metavariable); }
28
28
 
29
- matchName(name) { return this.metavariable.matchName(name); }
29
+ matchValue(value) { return this.metavariable.matchValue(value); }
30
30
 
31
31
  getReplacementNode() {
32
32
  const frameNode = this.frame.getNode(),
@@ -49,7 +49,7 @@ export default domAssigned(class TermSubstitution extends Substitution {
49
49
  return replacementNode;
50
50
  }
51
51
 
52
- matchName(name) { return this.variable.matchName(name); }
52
+ matchValue(value) { return this.variable.matchValue(value); }
53
53
 
54
54
  static fromStatementNode(statementNode, context) {
55
55
  let termSubstitution = null;
@@ -9,11 +9,11 @@ import { typeFromJSON, typeToTypeJSON } from "../utilities/json";
9
9
  import { variableNodeFromVariableString } from "../context/partial/variable";
10
10
 
11
11
  export default domAssigned(class Variable {
12
- constructor(string, node, name, type, propertyRelations) {
12
+ constructor(string, node, type, identifier, propertyRelations) {
13
13
  this.string = string;
14
14
  this.node = node;
15
- this.name = name;
16
15
  this.type = type;
16
+ this.identifier = identifier;
17
17
  this.propertyRelations = propertyRelations;
18
18
  }
19
19
 
@@ -25,8 +25,8 @@ export default domAssigned(class Variable {
25
25
  return this.node;
26
26
  }
27
27
 
28
- getName() {
29
- return this.name;
28
+ getIdentifier() {
29
+ return this.identifier;
30
30
  }
31
31
 
32
32
  getType() {
@@ -48,16 +48,16 @@ export default domAssigned(class Variable {
48
48
  return equalTo;
49
49
  }
50
50
 
51
- matchName(name) {
52
- const nameMatches = (name === this.name);
51
+ mathValue(value) {
52
+ const valueMatches = (value === this.identifier);
53
53
 
54
- return nameMatches;
54
+ return valueMatches;
55
55
  }
56
56
 
57
- matchVariableName(variableName) {
58
- const variableNameMatches = (variableName === this.name);
57
+ matchVariableIdentifier(variableIdentifier) {
58
+ const variableIdentifierMatches = (variableIdentifier === this.identifier);
59
59
 
60
- return variableNameMatches;
60
+ return variableIdentifierMatches;
61
61
  }
62
62
 
63
63
  verify(context) {
@@ -67,8 +67,8 @@ export default domAssigned(class Variable {
67
67
 
68
68
  context.trace(`Verifying the '${variableString}' variable...`);
69
69
 
70
- const variableName = this.name,
71
- variable = context.findVariableByVariableName(variableName);
70
+ const variableIdentifier = this.identifier,
71
+ variable = context.findVariableByVariableIdentifier(variableIdentifier);
72
72
 
73
73
  if (variable !== null) {
74
74
  const type = variable.getType();
@@ -167,12 +167,12 @@ export default domAssigned(class Variable {
167
167
  const { string } = json,
168
168
  variableString = string, ///
169
169
  variableNode = variableNodeFromVariableString(variableString, context),
170
- variableName = variableNode.getVariableName(),
170
+ variableIdentifier = variableNode.getVariableIdentifier(),
171
171
  node = variableNode,
172
- name = variableName, ///
172
+ identifier = variableIdentifier, ///
173
173
  type = typeFromJSON(json, context),
174
174
  propertyRelations = [],
175
- variable = new Variable(string, node, name, type, propertyRelations);
175
+ variable = new Variable(string, node, type, identifier, propertyRelations);
176
176
 
177
177
  return variable;
178
178
  }
@@ -219,12 +219,12 @@ export default domAssigned(class Variable {
219
219
  type.setProvisional(provisional);
220
220
 
221
221
  const variableNode = variableDeclarationNode.getVariableNode(),
222
- variableName = variableDeclarationNode.getVariableName(),
222
+ variableIdentifier = variableDeclarationNode.getVariableIdentifier(),
223
223
  node = variableNode, ///
224
- name = variableName, ///
225
- string = name, ///
224
+ identifier = variableIdentifier, ///
225
+ string = identifier, ///
226
226
  propertyRelations = [],
227
- variable = new Variable(string, node, name, type, propertyRelations);
227
+ variable = new Variable(string, node, type, identifier, propertyRelations);
228
228
 
229
229
  return variable;
230
230
  }
@@ -233,7 +233,7 @@ export default domAssigned(class Variable {
233
233
  let propertyRelations;
234
234
 
235
235
  const node = variable.getNode(),
236
- name = variable.getName(),
236
+ identifier = variable.getName(),
237
237
  type = variable.getType();
238
238
 
239
239
  propertyRelations = variable.getPropertyRelations();
@@ -243,9 +243,9 @@ export default domAssigned(class Variable {
243
243
  propertyRelation
244
244
  ];
245
245
 
246
- const string = stringFromNameAndPropertyRelations(name, propertyRelations);
246
+ const string = stringFromNameAndPropertyRelations(identifier, propertyRelations);
247
247
 
248
- variable = new Variable(string, node, name, type, propertyRelations);
248
+ variable = new Variable(string, node, type, identifier, propertyRelations);
249
249
 
250
250
  return variable;
251
251
  }
@@ -254,16 +254,16 @@ export default domAssigned(class Variable {
254
254
  function variableFromVariableNodeAndType(variableNode, type) {
255
255
  const { Variable } = dom,
256
256
  node = variableNode, ///
257
- variableName = variableNode.getVariableName(),
258
- string = variableName, ///,
259
- name = variableName, ///
257
+ variableIdentifier = variableNode.getVariableIdentifier(),
258
+ string = variableIdentifier, ///,
259
+ identifier = variableIdentifier, ///
260
260
  propertyRelations = [],
261
- variable = new Variable(string, node, name, type, propertyRelations);
261
+ variable = new Variable(string, node, type, identifier, propertyRelations);
262
262
 
263
263
  return variable;
264
264
  }
265
265
 
266
- function stringFromNameAndPropertyRelations(name, propertyRelations) {
266
+ function stringFromNameAndPropertyRelations(identifier, propertyRelations) {
267
267
  const propertyRelationsString = propertyRelations.reduce((propertyRelationsString, propertyRelation) => {
268
268
  const propertyRelationString = propertyRelation.getString();
269
269
 
@@ -271,7 +271,7 @@ function stringFromNameAndPropertyRelations(name, propertyRelations) {
271
271
 
272
272
  return propertyRelationsString;
273
273
  }, EMPTY_STRING),
274
- string = `${name}${propertyRelationsString}`;
274
+ string = `${identifier}${propertyRelationsString}`;
275
275
 
276
276
  return string;
277
277
  }
package/src/node/axiom.js CHANGED
@@ -1,38 +1,13 @@
1
1
  "use strict";
2
2
 
3
- import NonTerminalNode from "../node/nonTerminal";
3
+ import TopLevelAssertionNode from "../node/topLevelAssertion";
4
4
 
5
5
  import { AXIOM_BODY_RULE_NAME, AXIOM_HEADER_RULE_NAME } from "../ruleNames";
6
6
 
7
- export default class AxiomNode extends NonTerminalNode {
8
- getAxiomBodyNode() {
9
- const ruleName = AXIOM_BODY_RULE_NAME,
10
- axiomBodyNode = this.getNodeByRuleName(ruleName);
7
+ export default class AxiomNode extends TopLevelAssertionNode {
8
+ static bodyRuleName = AXIOM_BODY_RULE_NAME;
11
9
 
12
- return axiomBodyNode;
13
- }
10
+ static headerRuleName = AXIOM_HEADER_RULE_NAME;
14
11
 
15
-
16
- getAxiomHeaderNode() {
17
- const ruleName = AXIOM_HEADER_RULE_NAME,
18
- axiomHeaderNode = this.getNodeByRuleName(ruleName);
19
-
20
- return axiomHeaderNode;
21
- }
22
-
23
- getSignatureNode() {
24
- const axiomHeaderNode = this.getAxiomHeaderNode(),
25
- signatureNode = axiomHeaderNode.getSignatureNode();
26
-
27
- return signatureNode;
28
- }
29
-
30
- getLabelNodes() {
31
- const axiomHeaderNode = this.getAxiomHeaderNode(),
32
- labelNodes = axiomHeaderNode.getLabelNodes();
33
-
34
- return labelNodes;
35
- }
36
-
37
- static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(AxiomNode, ruleName, childNodes, opacity, precedence); }
12
+ static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return TopLevelAssertionNode.fromRuleNameChildNodesOpacityAndPrecedence(AxiomNode, ruleName, childNodes, opacity, precedence); }
38
13
  }
@@ -1,44 +1,13 @@
1
1
  "use strict";
2
2
 
3
- import NonTerminalNode from "../node/nonTerminal";
3
+ import TopLevelAssertionNode from "../node/topLevelAssertion";
4
4
 
5
5
  import { CONJECTURE_BODY_RULE_NAME, CONJECTURE_HEADER_RULE_NAME } from "../ruleNames";
6
6
 
7
- export default class ConjectureNode extends NonTerminalNode {
8
- getConjectureBodyNode() {
9
- const ruleName = CONJECTURE_BODY_RULE_NAME,
10
- conjectureBodyNode = this.getNodeByRuleName(ruleName);
7
+ export default class ConjectureNode extends TopLevelAssertionNode {
8
+ static bodyRuleName = CONJECTURE_BODY_RULE_NAME;
11
9
 
12
- return conjectureBodyNode;
13
- }
10
+ static headerRuleName = CONJECTURE_HEADER_RULE_NAME;
14
11
 
15
- getConjectureHeaderNode() {
16
- const ruleName = CONJECTURE_HEADER_RULE_NAME,
17
- conjectureHeaderNode = this.getNodeByRuleName(ruleName);
18
-
19
- return conjectureHeaderNode;
20
- }
21
-
22
- getLabelNodes() {
23
- const conjectureHeaderNode = this.getConjectureHeaderNode(),
24
- labelNodes = conjectureHeaderNode.getLabelNodes();
25
-
26
- return labelNodes;
27
- }
28
-
29
- getSuppositionNodes() {
30
- const conjectureBodyNode = this.getConjectureBodyNode(),
31
- suppositionNodes = conjectureBodyNode.getSuppositionNodes();
32
-
33
- return suppositionNodes;
34
- }
35
-
36
- getDeductionNode() {
37
- const conjectureBodyNode = this.getConjectureBodyNode(),
38
- deductionNode = conjectureBodyNode.getDeductionNode();
39
-
40
- return deductionNode;
41
- }
42
-
43
- static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(ConjectureNode, ruleName, childNodes, opacity, precedence); }
12
+ static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return TopLevelAssertionNode.fromRuleNameChildNodesOpacityAndPrecedence(ConjectureNode, ruleName, childNodes, opacity, precedence); }
44
13
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  import NonTerminalNode from "../node/nonTerminal";
4
4
 
5
- import { PARENTHESISED_LABELS_RULE_NAME } from "../ruleNames";
5
+ import {PARENTHESISED_LABELS_RULE_NAME, SIGNATURE_RULE_NAME} from "../ruleNames";
6
6
 
7
7
  export default class HeaderNode extends NonTerminalNode {
8
8
  getParenthesisedLabelsNode() {
@@ -12,6 +12,13 @@ export default class HeaderNode extends NonTerminalNode {
12
12
  return parenthesisedLabelsNode;
13
13
  }
14
14
 
15
+ getSignatureNode() {
16
+ const ruleName = SIGNATURE_RULE_NAME,
17
+ signatureNode = this.getNodeByRuleName(ruleName);
18
+
19
+ return signatureNode;
20
+ }
21
+
15
22
  getLabelNodes() {
16
23
  let labelNodes = [];
17
24