occam-verify-cli 1.0.317 → 1.0.320

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 (51) hide show
  1. package/lib/context/file.js +44 -17
  2. package/lib/context/local.js +15 -2
  3. package/lib/context/release.js +33 -2
  4. package/lib/dom/declaration/combinator.js +2 -2
  5. package/lib/dom/declaration/complexType.js +25 -15
  6. package/lib/dom/declaration/constructor.js +2 -2
  7. package/lib/dom/declaration/simpleType.js +26 -16
  8. package/lib/dom/declaration/typePrefix.js +176 -0
  9. package/lib/dom/property.js +3 -3
  10. package/lib/dom/topLevelAssertion.js +1 -43
  11. package/lib/dom/type.js +53 -17
  12. package/lib/dom/typePrefix.js +100 -0
  13. package/lib/dom/variable.js +2 -2
  14. package/lib/index.js +3 -1
  15. package/lib/node/declaration/complexType.js +15 -1
  16. package/lib/node/declaration/simpleType.js +15 -1
  17. package/lib/node/declaration/typePrefix.js +123 -0
  18. package/lib/node/type.js +27 -17
  19. package/lib/node/typePrefix.js +6 -6
  20. package/lib/nonTerminalNodeMap.js +6 -4
  21. package/lib/ruleNames.js +11 -3
  22. package/lib/utilities/json.js +2 -2
  23. package/lib/utilities/node.js +10 -4
  24. package/lib/utilities/type.js +10 -5
  25. package/lib/verifier/topLevel.js +9 -2
  26. package/package.json +1 -1
  27. package/src/context/file.js +47 -24
  28. package/src/context/local.js +5 -1
  29. package/src/context/release.js +41 -1
  30. package/src/dom/declaration/combinator.js +1 -1
  31. package/src/dom/declaration/complexType.js +29 -19
  32. package/src/dom/declaration/constructor.js +1 -1
  33. package/src/dom/declaration/simpleType.js +29 -20
  34. package/src/dom/declaration/typePrefix.js +102 -0
  35. package/src/dom/property.js +1 -1
  36. package/src/dom/topLevelAssertion.js +3 -15
  37. package/src/dom/type.js +77 -20
  38. package/src/dom/typePrefix.js +54 -0
  39. package/src/dom/variable.js +1 -1
  40. package/src/index.js +2 -0
  41. package/src/node/declaration/complexType.js +14 -0
  42. package/src/node/declaration/simpleType.js +14 -0
  43. package/src/node/declaration/typePrefix.js +24 -0
  44. package/src/node/type.js +29 -17
  45. package/src/node/typePrefix.js +4 -4
  46. package/src/nonTerminalNodeMap.js +45 -39
  47. package/src/ruleNames.js +4 -2
  48. package/src/utilities/json.js +1 -1
  49. package/src/utilities/node.js +13 -4
  50. package/src/utilities/type.js +12 -5
  51. package/src/verifier/topLevel.js +11 -0
@@ -28,7 +28,7 @@ export default domAssigned(class Property {
28
28
  this.type = type;
29
29
  }
30
30
 
31
- matchTypeName(typeName) { return this.type.matchTypeName(typeName); }
31
+ matchTypeName(typeName, prefixed, context) { return this.type.matchTypeName(typeName, prefixed, context); }
32
32
 
33
33
  matchPropertyName(propertyName) {
34
34
  const propertyNameMatches = (this.name === propertyName);
@@ -68,21 +68,9 @@ export default class TopLevelAssertion {
68
68
  return this.hypotheses;
69
69
  }
70
70
 
71
- setContext(context) { this.context = context; }
72
-
73
- setString(string) { this.string = string; }
74
-
75
- setLabels(labels) { this.labels = labels; }
76
-
77
- setSuppositions(suppositions) { this.suppositions = suppositions; }
78
-
79
- setDeduction(deduction) { this.deduction = deduction; }
80
-
81
- setProof(proof) { this.proof = proof; }
82
-
83
- setSignature(signature) { this.signature = signature; }
84
-
85
- setHypotheses(hypotheses) { this.hypotheses = hypotheses; }
71
+ setHypotheses(hypotheses) {
72
+ this.hypotheses = hypotheses;
73
+ }
86
74
 
87
75
  getStatement() { return this.deduction.getStatement(); }
88
76
 
package/src/dom/type.js CHANGED
@@ -7,13 +7,14 @@ import dom from "../dom";
7
7
  import { domAssigned } from "../dom";
8
8
  import { OBJECT_TYPE_NAME } from "../constants";
9
9
  import { typeFromTypeNode } from "../utilities/node";
10
- import { stringFromTypeNameNameAndSuperTypes } from "../utilities/type";
10
+ import { stringFromTypeNameTypePrefixNameAndSuperTypes } from "../utilities/type";
11
11
  import { superTypesFromJSON, propertiesFromJSON, superTypesToSuperTypesJSON, propertiesToPropertiesJSON } from "../utilities/json";
12
12
 
13
13
  const { push, first } = arrayUtilities;
14
14
 
15
15
  class Type {
16
- constructor(string, name, superTypes, properties, provisional) {
16
+ constructor(context, string, name, superTypes, properties, provisional) {
17
+ this.context = context;
17
18
  this.string = string;
18
19
  this.name = name;
19
20
  this.superTypes = superTypes;
@@ -21,6 +22,10 @@ class Type {
21
22
  this.provisional = provisional;
22
23
  }
23
24
 
25
+ getContext() {
26
+ return this.context;
27
+ }
28
+
24
29
  getString() {
25
30
  return this.string;
26
31
  }
@@ -67,10 +72,6 @@ class Type {
67
72
  return provisional;
68
73
  }
69
74
 
70
- setString(string) {
71
- this.string = string;
72
- }
73
-
74
75
  setName(name) {
75
76
  this.name = name;
76
77
  }
@@ -87,6 +88,42 @@ class Type {
87
88
  this.provisional = provisional;
88
89
  }
89
90
 
91
+ getPrefix() {
92
+ let prefix = null;
93
+
94
+ if (this.context !== null) {
95
+ const typePrefix = this.context.getTypePrefix();
96
+
97
+ prefix = typePrefix; ///
98
+ }
99
+
100
+ return prefix;
101
+ }
102
+
103
+ isInternal(context) {
104
+ let internal,
105
+ fileContext,
106
+ releaseContext;
107
+
108
+ if (this.context !== null) {
109
+ fileContext = this.context; ///
110
+
111
+ releaseContext = fileContext.getReleaseContext();
112
+
113
+ const internalReleaseContext = releaseContext; ///
114
+
115
+ fileContext = context; ///
116
+
117
+ releaseContext = fileContext.getReleaseContext();
118
+
119
+ internal = (internalReleaseContext === releaseContext); ///
120
+ } else {
121
+ internal = false;
122
+ }
123
+
124
+ return internal;
125
+ }
126
+
90
127
  isBasic() {
91
128
  let basic = false;
92
129
 
@@ -182,8 +219,22 @@ class Type {
182
219
  return equalToOrSuperTypeOf;
183
220
  }
184
221
 
185
- matchTypeName(typeName) {
186
- const typeNameMatches = (this.name === typeName);
222
+ matchTypeName(typeName, prefixed, context) {
223
+ let typeNameMatches;
224
+
225
+ const naked = !prefixed,
226
+ internal = this.isInternal(context);
227
+
228
+ if (naked || internal) {
229
+ typeNameMatches = (this.name === typeName);
230
+ } else {
231
+ const prefix = this.getPrefix(),
232
+ name = (prefix !== null) ?
233
+ `${prefix}${this.name}` :
234
+ this.name;
235
+
236
+ typeNameMatches = (name === typeName);
237
+ }
187
238
 
188
239
  return typeNameMatches;
189
240
  }
@@ -226,8 +277,9 @@ class Type {
226
277
  properties = propertiesFromJSON(json, context),
227
278
  superTypes = superTypesFromJSON(json, context),
228
279
  typeName = name, ///
229
- string = stringFromTypeNameNameAndSuperTypes(typeName, superTypes),
230
- type = new Type(string, name, superTypes, properties, provisional);
280
+ typePrefixName = null,
281
+ string = stringFromTypeNameTypePrefixNameAndSuperTypes(typeName, typePrefixName, superTypes),
282
+ type = new Type(context, string, name, superTypes, properties, provisional);
231
283
 
232
284
  return type;
233
285
  }
@@ -246,16 +298,18 @@ class Type {
246
298
  }
247
299
 
248
300
  static fromTypeAndProvisional(type, provisional) {
249
- const name = type.getName(),
301
+ const context = type.getContext(),
302
+ name = type.getName(),
250
303
  superType = type, ///
251
304
  typeName = name, ///
305
+ typePrefixName = null,
252
306
  superTypes = [
253
307
  superType
254
308
  ],
255
- string = stringFromTypeNameNameAndSuperTypes(typeName, superTypes),
309
+ string = stringFromTypeNameTypePrefixNameAndSuperTypes(typeName, typePrefixName, superTypes),
256
310
  properties = type.getProperties();
257
311
 
258
- type = new Type(string, name, superTypes, properties, provisional); ///
312
+ type = new Type(context, string, name, superTypes, properties, provisional); ///
259
313
 
260
314
  return type;
261
315
  }
@@ -271,10 +325,11 @@ class Type {
271
325
  const properties = [],
272
326
  provisional = simpleTypeDeclarationNode.isProvisional(),
273
327
  typeName = simpleTypeDeclarationNode.getTypeName(),
328
+ typePrefixName = simpleTypeDeclarationNode.getTypePrefixName(),
274
329
  name = typeName, ///
275
330
  superTypes = superTypesFromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context),
276
- string = stringFromTypeNameNameAndSuperTypes(typeName, superTypes),
277
- type = new Type(string, name, superTypes, properties, provisional);
331
+ string = stringFromTypeNameTypePrefixNameAndSuperTypes(typeName, typePrefixName, superTypes),
332
+ type = new Type(context, string, name, superTypes, properties, provisional);
278
333
 
279
334
  return type;
280
335
  }
@@ -282,11 +337,12 @@ class Type {
282
337
  static fromComplexTypeDeclarationNode(complexTypeDeclarationNode, context) {
283
338
  const provisional = complexTypeDeclarationNode.isProvisional(),
284
339
  typeName = complexTypeDeclarationNode.getTypeName(),
285
- name = typeName,
340
+ typePrefixName = complexTypeDeclarationNode.getTypePrefixName(),
341
+ name = typeName, ///
286
342
  superTypes = superTypesFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context),
287
343
  properties = propertiesFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context),
288
- string = stringFromTypeNameNameAndSuperTypes(typeName, superTypes),
289
- type = new Type(string, name, superTypes, properties, provisional);
344
+ string = stringFromTypeNameTypePrefixNameAndSuperTypes(typeName, typePrefixName, superTypes),
345
+ type = new Type(context, string, name, superTypes, properties, provisional);
290
346
 
291
347
  return type;
292
348
  }
@@ -348,12 +404,13 @@ function propertiesFromComplexTypeDeclarationNode(complexTypeDeclarationNode, co
348
404
 
349
405
  class ObjectType extends Type {
350
406
  static fromNothing() {
351
- const name = OBJECT_TYPE_NAME,
407
+ const context = null,
408
+ name = OBJECT_TYPE_NAME,
352
409
  string = name, ///
353
410
  superTypes = [],
354
411
  properties = [],
355
412
  provisional = false,
356
- objectType = new ObjectType(string, name, superTypes, properties, provisional);
413
+ objectType = new ObjectType(context, string, name, superTypes, properties, provisional);
357
414
 
358
415
  return objectType;
359
416
  }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ import { domAssigned } from "../dom";
4
+
5
+ class TypePrefix {
6
+ constructor(string, name) {
7
+ this.string = string;
8
+ this.name = name;
9
+ }
10
+
11
+ getString() {
12
+ return this.string;
13
+ }
14
+
15
+ getName() {
16
+ return this.name;
17
+ }
18
+
19
+ matchTypePrefixName(typePrefixName) {
20
+ const typePrefixNameMatches = (this.name === typePrefixName);
21
+
22
+ return typePrefixNameMatches;
23
+ }
24
+
25
+ toJSON() {
26
+ const name = this.name,
27
+ json = {
28
+ name
29
+ };
30
+
31
+ return json;
32
+ }
33
+
34
+ static name = "TypePrefix";
35
+
36
+ static fromJSON(json, context) {
37
+ const { name } = json,
38
+ string = name, ///
39
+ typePrefix = new TypePrefix(string, name);
40
+
41
+ return typePrefix;
42
+ }
43
+
44
+ static fromTypePrefixDeclarationNode(typePrefixDeclarationNode, context) {
45
+ const typePrefix = typePrefixDeclarationNode.getTypePrefix(),
46
+ name = typePrefix, ///
47
+ string = name, ///
48
+ type = new TypePrefix(string, name);
49
+
50
+ return type;
51
+ }
52
+ }
53
+
54
+ export default domAssigned(TypePrefix);
@@ -217,7 +217,7 @@ export default domAssigned(class Variable {
217
217
  const { Variable } = dom,
218
218
  provisional = variableDeclarationNode.isProvisional(),
219
219
  typeNode = variableDeclarationNode.getTypeNode(),
220
- type = typeFromTypeNode(typeNode);
220
+ type = typeFromTypeNode(typeNode, context);
221
221
 
222
222
  type.setProvisional(provisional);
223
223
 
package/src/index.js CHANGED
@@ -25,6 +25,7 @@ import Judgement from "./dom/judgement";
25
25
  import MetaLemma from "./dom/metaLemma";
26
26
  import Deduction from "./dom/deduction";
27
27
  import Signature from "./dom/signature";
28
+ import TypePrefix from "./dom/typePrefix";
28
29
  import Conjecture from "./dom/conjecture";
29
30
  import Conclusion from "./dom/conclusion";
30
31
  import Derivation from "./dom/derivation";
@@ -53,6 +54,7 @@ import SimpleTypeDeclaration from "./dom/declaration/simpleType";
53
54
  import StatementSubstitution from "./dom/substitution/statement";
54
55
  import ReferenceSubstitution from "./dom/substitution/reference";
55
56
  import CombinatorDeclaration from "./dom/declaration/combinator";
57
+ import TypePrefixDeclaration from "./dom/declaration/typePrefix";
56
58
  import ConstructorDeclaration from "./dom/declaration/constructor";
57
59
  import ComplexTypeDeclaration from "./dom/declaration/complexType";
58
60
  import MetavariableDeclaration from "./dom/declaration/metavariable";
@@ -28,6 +28,13 @@ export default class ComplexTypeDeclarationNode extends NonTerminalNode {
28
28
  return provisional;
29
29
  }
30
30
 
31
+ isPrefixed() {
32
+ const typeNode = this.getTypeNode(),
33
+ prefixed = typeNode.isPrefixed();
34
+
35
+ return prefixed;
36
+ }
37
+
31
38
  getTypeName() {
32
39
  const typeNode = this.getTypeNode(),
33
40
  typeName = typeNode.getTypeName();
@@ -63,6 +70,13 @@ export default class ComplexTypeDeclarationNode extends NonTerminalNode {
63
70
  return superTypeNodes;
64
71
  }
65
72
 
73
+ getTypePrefixName() {
74
+ const typeNode = this.getTypeNode(),
75
+ typePrefixName = typeNode.getTypePrefixName();
76
+
77
+ return typePrefixName;
78
+ }
79
+
66
80
  getPropertyDeclarationNodes() {
67
81
  const ruleName = PROPERTY_DECLARATION_RULE_NAME,
68
82
  propertyDeclarationNodes = this.getNodesByRuleName(ruleName);
@@ -28,6 +28,13 @@ export default class SimpleTypeDeclarationNode extends NonTerminalNode {
28
28
  return provisional;
29
29
  }
30
30
 
31
+ isPrefixed() {
32
+ const typeNode = this.getTypeNode(),
33
+ prefixed = typeNode.isPrefixed();
34
+
35
+ return prefixed;
36
+ }
37
+
31
38
  getTypeName() {
32
39
  let typeName = null;
33
40
 
@@ -54,6 +61,13 @@ export default class SimpleTypeDeclarationNode extends NonTerminalNode {
54
61
  return typesNode;
55
62
  }
56
63
 
64
+ getTypePrefixName() {
65
+ const typeNode = this.getTypeNode(),
66
+ typePrefixName = typeNode.getTypePrefixName();
67
+
68
+ return typePrefixName;
69
+ }
70
+
57
71
  getSuperTypeNodes() {
58
72
  let superTypeNodes = [];
59
73
 
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ import NonTerminalNode from "../../node/nonTerminal";
4
+
5
+ import { TYPE_PREFIX_RULE_NAME } from "../../ruleNames";
6
+
7
+ export default class TypePrefixDeclarationNode extends NonTerminalNode {
8
+ getTypePrefix() {
9
+ const typePrefixNode = this.getTypePrefixNode(),
10
+ typePrefixName = typePrefixNode.getTypePrefixName();
11
+
12
+ return typePrefixName;
13
+ }
14
+
15
+ getTypePrefixNode() {
16
+ const ruleName = TYPE_PREFIX_RULE_NAME,
17
+ typePrefixNode = this.getNodeByRuleName(ruleName);
18
+
19
+ return typePrefixNode;
20
+ }
21
+
22
+ static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(TypePrefixDeclarationNode, ruleName, childNodes, opacity, precedence); }
23
+ }
24
+
package/src/node/type.js CHANGED
@@ -3,15 +3,23 @@
3
3
  import NonTerminalNode from "../node/nonTerminal";
4
4
 
5
5
  export default class TypeNode extends NonTerminalNode {
6
+ isPrefixed() {
7
+ const multiplicity = this.getMultiplicity(),
8
+ prefixed = (multiplicity > 1);
9
+
10
+ return prefixed;
11
+ }
12
+
6
13
  getTypeName() {
7
14
  let typeName;
8
15
 
9
- this.someChildNode((childNode) => {
10
- const childNodeTerminalNode = childNode.isTerminalNode();
16
+ const prefixed = this.isPrefixed(),
17
+ nameIndex = prefixed ? 2 : 0;
11
18
 
12
- if (childNodeTerminalNode) {
13
- const terminalNode = childNode, ///
14
- content = terminalNode.getContent();
19
+ this.someChildNode((childNode, index) => {
20
+ if (index === nameIndex) {
21
+ const typeTerminalNode = childNode, ///
22
+ content = typeTerminalNode.getContent();
15
23
 
16
24
  typeName = content; ///
17
25
 
@@ -22,23 +30,27 @@ export default class TypeNode extends NonTerminalNode {
22
30
  return typeName;
23
31
  }
24
32
 
25
- getTypePrefix() {
26
- let typePrefix;
33
+ getTypePrefixName() {
34
+ let typePrefixName = null;
27
35
 
28
- this.someChildNode((childNode) => {
29
- const childNodeTerminalNode = childNode.isTerminalNode();
36
+ const prefixed = this.isPrefixed();
30
37
 
31
- if (childNodeTerminalNode) {
32
- const terminalNode = childNode, ///
33
- content = terminalNode.getContent();
38
+ if (prefixed) {
39
+ const prefixIndex = 0;
34
40
 
35
- typePrefix = content; ///
41
+ this.someChildNode((childNode, index) => {
42
+ if (index === prefixIndex) {
43
+ const typeTerminalNode = childNode, ///
44
+ content = typeTerminalNode.getContent();
36
45
 
37
- return true;
38
- }
39
- });
46
+ typePrefixName = content; ///
47
+
48
+ return true;
49
+ }
50
+ });
51
+ }
40
52
 
41
- return typePrefix;
53
+ return typePrefixName;
42
54
  }
43
55
 
44
56
  static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(TypeNode, ruleName, childNodes, opacity, precedence); }
@@ -3,8 +3,8 @@
3
3
  import NonTerminalNode from "../node/nonTerminal";
4
4
 
5
5
  export default class TypePrefixNode extends NonTerminalNode {
6
- getTypePrefix() {
7
- let typePrefix;
6
+ getTypePrefixName() {
7
+ let typePrefixName;
8
8
 
9
9
  this.someChildNode((childNode) => {
10
10
  const childNodeTerminalNode = childNode.isTerminalNode();
@@ -13,13 +13,13 @@ export default class TypePrefixNode extends NonTerminalNode {
13
13
  const terminalNode = childNode, ///
14
14
  content = terminalNode.getContent();
15
15
 
16
- typePrefix = content; ///
16
+ typePrefixName = content; ///
17
17
 
18
18
  return true;
19
19
  }
20
20
  });
21
21
 
22
- return typePrefix;
22
+ return typePrefixName;
23
23
  }
24
24
 
25
25
  static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(TypePrefixNode, ruleName, childNodes, opacity, precedence); }
@@ -22,7 +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
+ import RuleBodyNode from "./node/body/rule";
26
26
  import StatementNode from "./node/statement";
27
27
  import ReferenceNode from "./node/reference";
28
28
  import DeductionNode from "./node/deduction";
@@ -30,37 +30,38 @@ import JudgementNode from "./node/judgement";
30
30
  import MetaLemmaNode from "./node/metaLemma";
31
31
  import ParameterNode from "./node/parameter";
32
32
  import SignatureNode from "./node/signature";
33
- import axiomBodyNode from "./node/body/axiom";
34
- import lemmaBodyNode from "./node/body/lemma";
33
+ import AxiomBodyNode from "./node/body/axiom";
34
+ import LemmaBodyNode from "./node/body/lemma";
35
35
  import DerivationNode from "./node/derivation";
36
36
  import CombinatorNode from "./node/combinator";
37
37
  import ConclusionNode from "./node/conclusion";
38
38
  import ConjectureNode from "./node/conjecture";
39
39
  import HypothesisNode from "./node/hypothesis";
40
- import ruleHeaderNode from "./node/header/rule";
40
+ import TypePrefixNode from "./node/typePrefix";
41
+ import RuleHeaderNode from "./node/header/rule";
41
42
  import SuppositionNode from "./node/supposition";
42
43
  import ConstructorNode from "./node/constructor";
43
44
  import DeclarationNode from "./node/declaration";
44
45
  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";
46
+ import TheoremBodyNode from "./node/body/theorem";
47
+ import AxiomHeaderNode from "./node/header/axiom";
48
+ import LemmaHeaderNode from "./node/header/lemma";
48
49
  import MetaArgumentNode from "./node/metaArgument";
49
50
  import MetavariableNode from "./node/metavariable";
50
51
  import QualificationNode from "./node/qualification";
51
- import theoremHeaderNode from "./node/header/theorem";
52
- import metaLemmaBodyNode from "./node/body/metaLemma";
53
52
  import ProcedureCallNode from "./node/procedureCall";
54
53
  import SubDerivationNode from "./node/subDerivation";
54
+ import TheoremHeaderNode from "./node/header/theorem";
55
+ import MetaLemmaBodyNode from "./node/body/metaLemma";
55
56
  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";
57
+ import ConjectureBodyNode from "./node/body/conjecture";
58
+ import MetatheoremBodyNode from "./node/body/metatheorem";
59
+ import MetaLemmaHeaderNode from "./node/header/metaLemma";
59
60
  import PropertyRelationNode from "./node/propertyRelation"
60
61
  import DefinedAssertionNode from "./node/assertion/defined";
61
62
  import TermSubstitutionNode from "./node/substitution/term";
62
- import conjectureHeaderNode from "./node/header/conjecture";
63
- import metatheoremHeaderNode from "./node/header/metatheorem";
63
+ import ConjectureHeaderNode from "./node/header/conjecture";
64
+ import MetatheoremHeaderNode from "./node/header/metatheorem";
64
65
  import PropertyAssertionNode from "./node/assertion/property";
65
66
  import SubproofAssertionNode from "./node/assertion/subproof";
66
67
  import FrameSubstitutionNode from "./node/substitution/frame";
@@ -69,13 +70,14 @@ import ContainedAssertionNode from "./node/assertion/contained";
69
70
  import SatisfiesAssertionNode from "./node/assertion/satisfies";
70
71
  import ParenthesisedLabelsNode from "./node/parenthesisedLabels"
71
72
  import PropertyDeclarationNode from "./node/declaration/property";
72
- import variableDeclarationNode from "./node/declaration/variable";
73
+ import VariableDeclarationNode from "./node/declaration/variable";
73
74
  import StatementSubstitutionNode from "./node/substitution/statement";
74
75
  import SimpleTypeDeclarationNode from "./node/declaration/simpleType";
75
- import combinatorDeclarationNode from "./node/declaration/combinator";
76
- import complexTypeDeclarationNode from "./node/declaration/complexType";
77
- import constructorDeclarationNode from "./node/declaration/constructor";
78
- import metavariableDeclarationNode from "./node/declaration/metavariable";
76
+ import CombinatorDeclarationNode from "./node/declaration/combinator";
77
+ import TypePrefixDeclarationNode from "./node/declaration/typePrefix";
78
+ import ComplexTypeDeclarationNode from "./node/declaration/complexType";
79
+ import DonstructorDeclarationNode from "./node/declaration/constructor";
80
+ import MetavariableDeclarationNode from "./node/declaration/metavariable";
79
81
 
80
82
  import { RULE_RULE_NAME,
81
83
  STEP_RULE_NAME,
@@ -114,10 +116,11 @@ import { RULE_RULE_NAME,
114
116
  HYPOTHESIS_RULE_NAME,
115
117
  AXIOM_BODY_RULE_NAME,
116
118
  LEMMA_BODY_RULE_NAME,
119
+ TYPE_PREFIX_RULE_NAME,
120
+ SUPPOSITION_RULE_NAME,
117
121
  RULE_HEADER_RULE_NAME,
118
122
  CONSTRUCTOR_RULE_NAME,
119
123
  DECLARATION_RULE_NAME,
120
- SUPPOSITION_RULE_NAME,
121
124
  METATHEOREM_RULE_NAME,
122
125
  AXIOM_HEADER_RULE_NAME,
123
126
  LEMMA_HEADER_RULE_NAME,
@@ -151,6 +154,7 @@ import { RULE_RULE_NAME,
151
154
  COMBINATOR_DECLARATION_RULE_NAME,
152
155
  SIMPLE_TYPE_DECLARATION_RULE_NAME,
153
156
  CONSTRUCTOR_DECLARATION_RULE_NAME,
157
+ TYPE_PREFIX_DECLARATION_RULE_NAME,
154
158
  COMPLEX_TYPE_DECLARATION_RULE_NAME,
155
159
  METAVARIABLE_DECLARATION_RULE_NAME } from "./ruleNames";
156
160
 
@@ -176,7 +180,7 @@ const NonTerminalNodeMap = {
176
180
  [EQUALITY_RULE_NAME]: EqualityNode,
177
181
  [VARIABLE_RULE_NAME]: VariableNode,
178
182
  [NONSENSE_RULE_NAME]: NonsenseNode,
179
- [RULE_BODY_RULE_NAME]: ruleBodyNode,
183
+ [RULE_BODY_RULE_NAME]: RuleBodyNode,
180
184
  [META_TYPE_RULE_NAME]: MetaTypeNode,
181
185
  [SIGNATURE_RULE_NAME]: SignatureNode,
182
186
  [REFERENCE_RULE_NAME]: ReferenceNode,
@@ -184,38 +188,39 @@ const NonTerminalNodeMap = {
184
188
  [DEDUCTION_RULE_NAME]: DeductionNode,
185
189
  [PARAMETER_RULE_NAME]: ParameterNode,
186
190
  [STATEMENT_RULE_NAME]: StatementNode,
187
- [AXIOM_BODY_RULE_NAME]: axiomBodyNode,
188
- [LEMMA_BODY_RULE_NAME]: lemmaBodyNode,
191
+ [AXIOM_BODY_RULE_NAME]: AxiomBodyNode,
192
+ [LEMMA_BODY_RULE_NAME]: LemmaBodyNode,
189
193
  [META_LEMMA_RULE_NAME]: MetaLemmaNode,
190
194
  [COMBINATOR_RULE_NAME]: CombinatorNode,
191
195
  [CONCLUSION_RULE_NAME]: ConclusionNode,
192
196
  [CONJECTURE_RULE_NAME]: ConjectureNode,
193
197
  [DERIVATION_RULE_NAME]: DerivationNode,
194
198
  [HYPOTHESIS_RULE_NAME]: HypothesisNode,
195
- [RULE_HEADER_RULE_NAME]: ruleHeaderNode,
199
+ [RULE_HEADER_RULE_NAME]: RuleHeaderNode,
200
+ [TYPE_PREFIX_RULE_NAME]: TypePrefixNode,
196
201
  [SUPPOSITION_RULE_NAME]: SuppositionNode,
197
202
  [CONSTRUCTOR_RULE_NAME]: ConstructorNode,
198
203
  [DECLARATION_RULE_NAME]: DeclarationNode,
199
204
  [METATHEOREM_RULE_NAME]: MetatheoremNode,
200
- [AXIOM_HEADER_RULE_NAME]: axiomHeaderNode,
201
- [LEMMA_HEADER_RULE_NAME]: lemmaHeaderNode,
202
- [THEOREM_BODY_RULE_NAME]: theoremBodyNode,
205
+ [AXIOM_HEADER_RULE_NAME]: AxiomHeaderNode,
206
+ [LEMMA_HEADER_RULE_NAME]: LemmaHeaderNode,
207
+ [THEOREM_BODY_RULE_NAME]: TheoremBodyNode,
203
208
  [METAVARIABLE_RULE_NAME]: MetavariableNode,
204
209
  [META_ARGUMENT_RULE_NAME]: MetaArgumentNode,
205
210
  [QUALIFICATION_RULE_NAME]: QualificationNode,
206
211
  [TYPE_ASSERTION_RULE_NAME]: TypeAssertionNode,
207
212
  [PROCEDURE_CALL_RULE_NAME]: ProcedureCallNode,
208
213
  [SUB_DERIVATION_RULE_NAME]: SubDerivationNode,
209
- [THEOREM_HEADER_RULE_NAME]: theoremHeaderNode,
210
- [META_LEMMA_BODY_RULE_NAME]: metaLemmaBodyNode,
211
- [CONJECTURE_BODY_RULE_NAME]: conjectureBodyNode,
212
- [METATHEOREM_BODY_RULE_NAME]: metatheoremBodyNode,
213
- [META_LEMMA_HEADER_RULE_NAME]: metaLemmaHeaderNode,
214
- [CONJECTURE_HEADER_RULE_NAME]: conjectureHeaderNode,
214
+ [THEOREM_HEADER_RULE_NAME]: TheoremHeaderNode,
215
+ [META_LEMMA_BODY_RULE_NAME]: MetaLemmaBodyNode,
216
+ [CONJECTURE_BODY_RULE_NAME]: ConjectureBodyNode,
217
+ [METATHEOREM_BODY_RULE_NAME]: MetatheoremBodyNode,
218
+ [META_LEMMA_HEADER_RULE_NAME]: MetaLemmaHeaderNode,
219
+ [CONJECTURE_HEADER_RULE_NAME]: ConjectureHeaderNode,
215
220
  [PROPERTY_RELATION_RULE_NAME]: PropertyRelationNode,
216
221
  [DEFINED_ASSERTION_RULE_NAME]: DefinedAssertionNode,
217
222
  [TERM_SUBSTITUTION_RULE_NAME]: TermSubstitutionNode,
218
- [METATHEOREM_HEADER_RULE_NAME]: metatheoremHeaderNode,
223
+ [METATHEOREM_HEADER_RULE_NAME]: MetatheoremHeaderNode,
219
224
  [SUBPROOF_ASSERTION_RULE_NAME]: SubproofAssertionNode,
220
225
  [PROPERTY_ASSERTION_RULE_NAME]: PropertyAssertionNode,
221
226
  [FRAME_SUBSTITUTION_RULE_NAME]: FrameSubstitutionNode,
@@ -223,14 +228,15 @@ const NonTerminalNodeMap = {
223
228
  [SATISFIES_ASSERTION_RULE_NAME]: SatisfiesAssertionNode,
224
229
  [CONTAINED_ASSERTION_RULE_NAME]: ContainedAssertionNode,
225
230
  [PARENTHESISED_LABELS_RULE_NAME]: ParenthesisedLabelsNode,
226
- [VARIABLE_DECLARATION_RULE_NAME]: variableDeclarationNode,
231
+ [VARIABLE_DECLARATION_RULE_NAME]: VariableDeclarationNode,
227
232
  [PROPERTY_DECLARATION_RULE_NAME]: PropertyDeclarationNode,
228
233
  [STATEMENT_SUBSTITUTION_RULE_NAME]: StatementSubstitutionNode,
229
- [COMBINATOR_DECLARATION_RULE_NAME]: combinatorDeclarationNode,
234
+ [COMBINATOR_DECLARATION_RULE_NAME]: CombinatorDeclarationNode,
230
235
  [SIMPLE_TYPE_DECLARATION_RULE_NAME]: SimpleTypeDeclarationNode,
231
- [CONSTRUCTOR_DECLARATION_RULE_NAME]: constructorDeclarationNode,
232
- [COMPLEX_TYPE_DECLARATION_RULE_NAME]: complexTypeDeclarationNode,
233
- [METAVARIABLE_DECLARATION_RULE_NAME]: metavariableDeclarationNode
236
+ [TYPE_PREFIX_DECLARATION_RULE_NAME]: TypePrefixDeclarationNode,
237
+ [CONSTRUCTOR_DECLARATION_RULE_NAME]: DonstructorDeclarationNode,
238
+ [COMPLEX_TYPE_DECLARATION_RULE_NAME]: ComplexTypeDeclarationNode,
239
+ [METAVARIABLE_DECLARATION_RULE_NAME]: MetavariableDeclarationNode
234
240
  };
235
241
 
236
242
  export default NonTerminalNodeMap;