occam-verify-cli 0.0.1272 → 0.0.1273
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dom/assertion/contained.js +4 -4
- package/lib/dom/assertion/property.js +231 -0
- package/lib/dom/declaration/complexType.js +8 -2
- package/lib/dom/declaration/variable.js +2 -2
- package/lib/dom/declaration.js +3 -3
- package/lib/dom/property.js +16 -20
- package/lib/dom/type.js +25 -6
- package/lib/index.js +2 -1
- package/lib/mixins/statement/verify.js +36 -21
- package/lib/utilities/verification.js +9 -1
- package/package.json +1 -1
- package/src/dom/assertion/contained.js +3 -3
- package/src/dom/assertion/property.js +179 -0
- package/src/dom/declaration/complexType.js +13 -2
- package/src/dom/declaration/variable.js +1 -1
- package/src/dom/declaration.js +2 -2
- package/src/dom/property.js +18 -28
- package/src/dom/type.js +31 -5
- package/src/index.js +1 -0
- package/src/mixins/statement/verify.js +56 -32
- package/src/utilities/verification.js +10 -0
|
@@ -27,6 +27,9 @@ _export(exports, {
|
|
|
27
27
|
metavariableFromStatement: function() {
|
|
28
28
|
return metavariableFromStatement;
|
|
29
29
|
},
|
|
30
|
+
propertyAssertionFromStatement: function() {
|
|
31
|
+
return propertyAssertionFromStatement;
|
|
32
|
+
},
|
|
30
33
|
subproofAssertionFromStatement: function() {
|
|
31
34
|
return subproofAssertionFromStatement;
|
|
32
35
|
},
|
|
@@ -71,6 +74,11 @@ function definedAssertionFromStatement(statement, context) {
|
|
|
71
74
|
var DefinedAssertion = _dom.default.DefinedAssertion, statementNode = statement.getNode(), definedAssertion = DefinedAssertion.fromStatementNode(statementNode, context);
|
|
72
75
|
return definedAssertion;
|
|
73
76
|
}
|
|
77
|
+
function propertyAssertionFromStatement(statement, context) {
|
|
78
|
+
context = contextFromStatement(statement, context); ///
|
|
79
|
+
var PropertyAssertion = _dom.default.PropertyAssertion, statementNode = statement.getNode(), propertyAssertion = PropertyAssertion.fromStatementNode(statementNode, context);
|
|
80
|
+
return propertyAssertion;
|
|
81
|
+
}
|
|
74
82
|
function containedAssertionFromStatement(statement, context) {
|
|
75
83
|
context = contextFromStatement(statement, context); ///
|
|
76
84
|
var ContainedAssertion = _dom.default.ContainedAssertion, statementNode = statement.getNode(), containedAssertion = ContainedAssertion.fromStatementNode(statementNode, context);
|
|
@@ -92,4 +100,4 @@ function contextFromStatement(statement, context) {
|
|
|
92
100
|
return context;
|
|
93
101
|
}
|
|
94
102
|
|
|
95
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
103
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvdmVyaWZpY2F0aW9uLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgZG9tIGZyb20gXCIuLi9kb21cIjtcbmltcG9ydCBMb2NhbENvbnRleHQgZnJvbSBcIi4uL2NvbnRleHQvbG9jYWxcIjtcblxuZXhwb3J0IGZ1bmN0aW9uIG1ldGF2YXJpYWJsZUZyb21GcmFtZShmcmFtZSwgY29udGV4dCkge1xuICBjb250ZXh0ID0gY29udGV4dEZyb21GcmFtZShmcmFtZSwgY29udGV4dCk7IC8vL1xuXG4gIGNvbnN0IHsgTWV0YXZhcmlhYmxlIH0gPSBkb20sXG4gICAgICAgIGZyYW1lTm9kZSA9IGZyYW1lLmdldE5vZGUoKSxcbiAgICAgICAgbWV0YXZhcmlhYmxlID0gTWV0YXZhcmlhYmxlLmZyb21GcmFtZU5vZGUoZnJhbWVOb2RlLCBjb250ZXh0KTtcblxuICByZXR1cm4gbWV0YXZhcmlhYmxlO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZXF1YWxpdHlGcm9tU3RhdGVtZW50KHN0YXRlbWVudCwgY29udGV4dCkge1xuICBjb250ZXh0ID0gY29udGV4dEZyb21TdGF0ZW1lbnQoc3RhdGVtZW50LCBjb250ZXh0KTsgLy8vX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UFFUixPQUFPO0lBQy9EQSxVQUFVUyxxQkFBcUJELFdBQVdSLFVBQVUsR0FBRztJQUV2RCxJQUFNLEFBQUV3QixvQkFBc0JyQixZQUFHLENBQXpCcUIsbUJBQ0ZiLGdCQUFnQkgsVUFBVUgsT0FBTyxJQUNqQ29CLG9CQUFvQkQsa0JBQWtCWCxpQkFBaUIsQ0FBQ0YsZUFBZVg7SUFFN0UsT0FBT3lCO0FBQ1Q7QUFFQSxTQUFTeEIsaUJBQWlCRixLQUFLLEVBQUVDLE9BQU87SUFDdEMsSUFBTTBCLGNBQWMzQixNQUFNNEIsU0FBUyxJQUM3QkMsU0FBU0YsYUFDVEcsZUFBZUMsY0FBWSxDQUFDQyxvQkFBb0IsQ0FBQy9CLFNBQVM0QjtJQUVoRTVCLFVBQVU2QixjQUFjLEdBQUc7SUFFM0IsT0FBTzdCO0FBQ1Q7QUFFQSxTQUFTUyxxQkFBcUJELFNBQVMsRUFBRVIsT0FBTztJQUM5QyxJQUFNZ0Msa0JBQWtCeEIsVUFBVW1CLFNBQVMsSUFDckNDLFNBQVNJLGlCQUNUSCxlQUFlQyxjQUFZLENBQUNDLG9CQUFvQixDQUFDL0IsU0FBUzRCO0lBRWhFNUIsVUFBVTZCLGNBQWMsR0FBRztJQUUzQixPQUFPN0I7QUFDVCJ9
|
package/package.json
CHANGED
|
@@ -99,7 +99,7 @@ export default domAssigned(class ContainedAssertion {
|
|
|
99
99
|
});
|
|
100
100
|
|
|
101
101
|
if (termVerified) {
|
|
102
|
-
context.
|
|
102
|
+
context.debug(`...verified the '${containedAssertionString}' contained assertion's '${termString}' term.`);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -122,7 +122,7 @@ export default domAssigned(class ContainedAssertion {
|
|
|
122
122
|
frameVerified = this.frame.verify(assignments, stated, context);
|
|
123
123
|
|
|
124
124
|
if (frameVerified) {
|
|
125
|
-
context.
|
|
125
|
+
context.debug(`...verified the '${containedAssertionString}' contained assertion's '${frameString}' frame.`);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -145,7 +145,7 @@ export default domAssigned(class ContainedAssertion {
|
|
|
145
145
|
statementVerified = this.statement.verify(assignments, stated, context);
|
|
146
146
|
|
|
147
147
|
if (statementVerified) {
|
|
148
|
-
context.
|
|
148
|
+
context.debug(`...verified the '${containedAssertionString}' contained assertion's '${statementString}' statement.`);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import dom from "../../dom";
|
|
4
|
+
|
|
5
|
+
import { nodeQuery } from "../../utilities/query";
|
|
6
|
+
import { domAssigned } from "../../dom";
|
|
7
|
+
|
|
8
|
+
const propertyNodeQuery = nodeQuery("/propertyAssertion/property"),
|
|
9
|
+
leftTermNodeQuery = nodeQuery("/propertyAssertion/term[0]"),
|
|
10
|
+
rightTermNodeQuery = nodeQuery("/propertyAssertion/term[1]"),
|
|
11
|
+
propertyAssertionNodeQuery = nodeQuery("/statement/propertyAssertion");
|
|
12
|
+
|
|
13
|
+
export default domAssigned(class PropertyAssertion {
|
|
14
|
+
constructor(string, node, tokens, property, leftTerm, rightTerm) {
|
|
15
|
+
this.string = string;
|
|
16
|
+
this.node = node;
|
|
17
|
+
this.tokens = tokens;
|
|
18
|
+
this.property = property;
|
|
19
|
+
this.leftTerm = leftTerm;
|
|
20
|
+
this.rightTerm = rightTerm;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
getString() {
|
|
24
|
+
return this.string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
getNode() {
|
|
28
|
+
return this.node;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
getTokens() {
|
|
32
|
+
return this.tokens;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
getProperty() {
|
|
36
|
+
return this.property;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
getLeftTerm() {
|
|
40
|
+
return this.leftTerm;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
getRightTerm() {
|
|
44
|
+
return this.rightTerm;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
verify(assignments, stated, context) {
|
|
48
|
+
let verified = false;
|
|
49
|
+
|
|
50
|
+
const propertyAssertionString = this.string; ///
|
|
51
|
+
|
|
52
|
+
context.trace(`Verifying the '${propertyAssertionString}' property assertion...`);
|
|
53
|
+
|
|
54
|
+
const rightTermVerified = this.verifyRightTerm(assignments, stated, context);
|
|
55
|
+
|
|
56
|
+
if (rightTermVerified) {
|
|
57
|
+
const leftTermVerified = this.verifyLeftTerm(assignments, stated, context);
|
|
58
|
+
|
|
59
|
+
if (leftTermVerified) {
|
|
60
|
+
const propertyVerified = this.verifyProperty(assignments, stated, context);
|
|
61
|
+
|
|
62
|
+
if (propertyVerified) {
|
|
63
|
+
verified = true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (verified) {
|
|
69
|
+
context.debug(`...verified the '${propertyAssertionString}' property assertion.`);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return verified;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
verifyProperty(assignments, stated, context) {
|
|
76
|
+
let propertyVerified;
|
|
77
|
+
|
|
78
|
+
const propertyString = this.property.getString(),
|
|
79
|
+
propertyAssertionString = this.string; ///
|
|
80
|
+
|
|
81
|
+
context.trace(`Verifying the '${propertyAssertionString}' property assertion's '${propertyString}' property...`);
|
|
82
|
+
|
|
83
|
+
const rightTermType = this.rightTerm.getType(),
|
|
84
|
+
propertyName = this.property.getName(),
|
|
85
|
+
property = rightTermType.findPropertyByPropertyName(propertyName);
|
|
86
|
+
|
|
87
|
+
if (property === null) {
|
|
88
|
+
const rightTermTypeName = rightTermType.getName();
|
|
89
|
+
|
|
90
|
+
context.debug(`The '${propertyName}' property is not a property of the right term's '${rightTermTypeName}' type.`);
|
|
91
|
+
} else {
|
|
92
|
+
const leftTermType = this.leftTerm.getType(),
|
|
93
|
+
propertyType = property.getType(),
|
|
94
|
+
leftTermTypeEqualToOrSubTypeOfPropertyType = leftTermType.isEqualToOrSubTypeOf(propertyType);
|
|
95
|
+
|
|
96
|
+
if (!leftTermTypeEqualToOrSubTypeOfPropertyType) {
|
|
97
|
+
const leftTermTypeName = leftTermType.getName(),
|
|
98
|
+
propertyTypeName = propertyType.getName();
|
|
99
|
+
|
|
100
|
+
context.debug(`The left term's '${leftTermTypeName}' type is not equal to or a sub-type of the '${propertyName}' property's '${propertyTypeName}' type.`);
|
|
101
|
+
} else {
|
|
102
|
+
propertyVerified = true;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (propertyVerified) {
|
|
107
|
+
context.debug(`...verified the '${propertyAssertionString}' property assertion's '${propertyString}' property.`);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return propertyVerified;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
verifyLeftTerm(assignments, stated, context) {
|
|
114
|
+
let leftTermVerified;
|
|
115
|
+
|
|
116
|
+
const leftTermString = this.leftTerm.getString(),
|
|
117
|
+
propertyAssertionString = this.string; ///
|
|
118
|
+
|
|
119
|
+
context.trace(`Verifying the '${propertyAssertionString}' property assertion's '${leftTermString}' left term...`);
|
|
120
|
+
|
|
121
|
+
leftTermVerified = this.leftTerm.verify(context, () => {
|
|
122
|
+
const verifiedAhead = true;
|
|
123
|
+
|
|
124
|
+
return verifiedAhead;
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
if (leftTermVerified) {
|
|
128
|
+
context.debug(`...verified the '${propertyAssertionString}' property assertion's '${leftTermString}' left term.`);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return leftTermVerified;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
verifyRightTerm(assignments, stated, context) {
|
|
135
|
+
let rightTermVerified;
|
|
136
|
+
|
|
137
|
+
const rightTermString = this.rightTerm.getString(),
|
|
138
|
+
propertyAssertionString = this.string; ///
|
|
139
|
+
|
|
140
|
+
context.trace(`Verifying the '${propertyAssertionString}' property assertion's '${rightTermString}' right term...`);
|
|
141
|
+
|
|
142
|
+
rightTermVerified = this.rightTerm.verify(context, () => {
|
|
143
|
+
const verifiedAhead = true;
|
|
144
|
+
|
|
145
|
+
return verifiedAhead;
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
if (rightTermVerified) {
|
|
149
|
+
context.debug(`...verified the '${propertyAssertionString}' property assertion's '${rightTermString}' right term.`);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return rightTermVerified;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
static name = "PropertyAssertion";
|
|
156
|
+
|
|
157
|
+
static fromStatementNode(statementNode, context) {
|
|
158
|
+
let propertyAssertion = null;
|
|
159
|
+
|
|
160
|
+
const propertyAssertionNode = propertyAssertionNodeQuery(statementNode);
|
|
161
|
+
|
|
162
|
+
if (propertyAssertionNode !== null) {
|
|
163
|
+
const { Term, Property } = dom,
|
|
164
|
+
node = propertyAssertionNode, ///
|
|
165
|
+
string = context.nodeAsString(node),
|
|
166
|
+
tokens = context.nodeAsTokens(node),
|
|
167
|
+
propertyNode = propertyNodeQuery(propertyAssertionNode),
|
|
168
|
+
leftTermNode = leftTermNodeQuery(propertyAssertionNode),
|
|
169
|
+
rightTermNode = rightTermNodeQuery(propertyAssertionNode),
|
|
170
|
+
property = Property.fromPropertyNode(propertyNode, context),
|
|
171
|
+
leftTerm = Term.fromTermNode(leftTermNode, context),
|
|
172
|
+
rightTerm = Term.fromTermNode(rightTermNode, context);
|
|
173
|
+
|
|
174
|
+
propertyAssertion = new PropertyAssertion(string, node, tokens, property, leftTerm, rightTerm);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return propertyAssertion;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
@@ -110,10 +110,21 @@ export default domAssigned(class ComplexTypeDeclaration {
|
|
|
110
110
|
if (count > 1) {
|
|
111
111
|
this.fileContext.debug(`The '${propertyString}' property appears more than once.`);
|
|
112
112
|
} else {
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
let propertyType;
|
|
114
|
+
|
|
115
|
+
propertyType = property.getType();
|
|
116
|
+
|
|
117
|
+
const propertyTypeVerified = this.verifyPropertyType(propertyType);
|
|
115
118
|
|
|
116
119
|
if (propertyTypeVerified) {
|
|
120
|
+
const propertyTypeName = propertyType.getName();
|
|
121
|
+
|
|
122
|
+
propertyType = this.fileContext.findTypeByTypeName(propertyTypeName);
|
|
123
|
+
|
|
124
|
+
const type = propertyType; ///
|
|
125
|
+
|
|
126
|
+
property.setType(type);
|
|
127
|
+
|
|
117
128
|
propertyVerified = true;
|
|
118
129
|
}
|
|
119
130
|
}
|
|
@@ -6,7 +6,7 @@ import { objectType } from "../type";
|
|
|
6
6
|
import { domAssigned } from "../../dom";
|
|
7
7
|
|
|
8
8
|
export default domAssigned(class VariableDeclaration {
|
|
9
|
-
constructor(fileContext,
|
|
9
|
+
constructor(fileContext, variable) {
|
|
10
10
|
this.fileContext = fileContext;
|
|
11
11
|
this.variable = variable;
|
|
12
12
|
}
|
package/src/dom/declaration.js
CHANGED
|
@@ -149,7 +149,7 @@ export default domAssigned(class Declaration {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
if (verifiedWhenStated) {
|
|
152
|
-
context.
|
|
152
|
+
context.debug(`...verified the '${declarationString}' stated declaration.`);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
return verifiedWhenStated;
|
|
@@ -172,7 +172,7 @@ export default domAssigned(class Declaration {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
if (verifiedWhenDerived) {
|
|
175
|
-
context.
|
|
175
|
+
context.debug(`...verified the '${declarationString}' derived declaration.`);
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
return verifiedWhenDerived;
|
package/src/dom/property.js
CHANGED
|
@@ -6,8 +6,7 @@ import { nodeQuery } from "../utilities/query";
|
|
|
6
6
|
import { domAssigned } from "../dom";
|
|
7
7
|
import { typeFromJSON, typeToTypeJSON } from "../utilities/json";
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
propertyNodeQuery = nodeQuery("/propertyDeclaration/property"),
|
|
9
|
+
const propertyNodeQuery = nodeQuery("/propertyDeclaration/property"),
|
|
11
10
|
nameTerminalNodeQuery = nodeQuery("/property/@name");
|
|
12
11
|
|
|
13
12
|
export default domAssigned(class Property {
|
|
@@ -29,28 +28,16 @@ export default domAssigned(class Property {
|
|
|
29
28
|
return this.type;
|
|
30
29
|
}
|
|
31
30
|
|
|
31
|
+
setType(type) {
|
|
32
|
+
this.type = type;
|
|
33
|
+
}
|
|
34
|
+
|
|
32
35
|
matchPropertyName(propertyName) {
|
|
33
36
|
const propertyNameMatches = (propertyName === this.name);
|
|
34
37
|
|
|
35
38
|
return propertyNameMatches;
|
|
36
39
|
}
|
|
37
40
|
|
|
38
|
-
verify(context) {
|
|
39
|
-
let verified;
|
|
40
|
-
|
|
41
|
-
const propertyString = this.string; ///
|
|
42
|
-
|
|
43
|
-
context.trace(`Verifying the '${propertyString}' property...`);
|
|
44
|
-
|
|
45
|
-
debugger
|
|
46
|
-
|
|
47
|
-
if (verified) {
|
|
48
|
-
context.debug(`...verified the '${propertyString}' property.`);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return verified;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
41
|
toJSON() {
|
|
55
42
|
const typeJSON = typeToTypeJSON(this.type),
|
|
56
43
|
name = this.name, ///
|
|
@@ -74,11 +61,22 @@ export default domAssigned(class Property {
|
|
|
74
61
|
return property;
|
|
75
62
|
}
|
|
76
63
|
|
|
64
|
+
static fromPropertyNode(propertyNode, fileContext) {
|
|
65
|
+
const node = propertyNode, ///
|
|
66
|
+
name = nameFromPropertyNode(propertyNode),
|
|
67
|
+
type = null,
|
|
68
|
+
string = fileContext.nodeAsString(node),
|
|
69
|
+
property = new Property(string, name, type);
|
|
70
|
+
|
|
71
|
+
return property;
|
|
72
|
+
}
|
|
73
|
+
|
|
77
74
|
static fromPropertyDeclarationNode(propertyDeclarationNode, fileContext) {
|
|
78
|
-
const
|
|
75
|
+
const { Type } = dom,
|
|
76
|
+
propertyNode = propertyNodeQuery(propertyDeclarationNode),
|
|
79
77
|
node = propertyNode, ///
|
|
80
78
|
name = nameFromPropertyNode(propertyNode),
|
|
81
|
-
type =
|
|
79
|
+
type = Type.fromPropertyDeclarationNode(propertyDeclarationNode),
|
|
82
80
|
string = fileContext.nodeAsString(node),
|
|
83
81
|
property = new Property(string, name, type);
|
|
84
82
|
|
|
@@ -93,11 +91,3 @@ function nameFromPropertyNode(propertyNode, fileContext) {
|
|
|
93
91
|
|
|
94
92
|
return name;
|
|
95
93
|
}
|
|
96
|
-
|
|
97
|
-
function typeFromPropertyNode(propertyNode, fileContext) {
|
|
98
|
-
const { Type } = dom,
|
|
99
|
-
typeNode = typeNodeQuery(propertyNode),
|
|
100
|
-
type = Type.fromTypeNode(typeNode);
|
|
101
|
-
|
|
102
|
-
return type;
|
|
103
|
-
}
|
package/src/dom/type.js
CHANGED
|
@@ -10,6 +10,7 @@ import { superTypeFromJSON, propertiesFromJSON, superTypeToSuperTypeJSON, proper
|
|
|
10
10
|
|
|
11
11
|
const typeDeclarationTypeNodeQuery = nodeQuery("/typeDeclaration|complexTypeDeclaration/type[0]"),
|
|
12
12
|
propertyDeclarationNodesQuery = nodesQuery("/complexTypeDeclaration/propertyDeclaration"),
|
|
13
|
+
propertyDeclarationTypeNodeQuery = nodeQuery("/propertyDeclaration/type"),
|
|
13
14
|
typeDeclarationSuperTypeNodeQuery = nodeQuery("/typeDeclaration|complexTypeDeclaration/type[1]");
|
|
14
15
|
|
|
15
16
|
class Type {
|
|
@@ -118,12 +119,16 @@ class Type {
|
|
|
118
119
|
return typeNameMatches;
|
|
119
120
|
}
|
|
120
121
|
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
typeNodeMatches = typeNameMatches; ///
|
|
122
|
+
findPropertyByPropertyName(propertyName) {
|
|
123
|
+
const property = this.properties.find((property) => {
|
|
124
|
+
const propertyNameMatches = property.matchPropertyName(propertyName);
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
if (propertyNameMatches) {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
}) || null;
|
|
130
|
+
|
|
131
|
+
return property;
|
|
127
132
|
}
|
|
128
133
|
|
|
129
134
|
toJSON() {
|
|
@@ -183,6 +188,27 @@ class Type {
|
|
|
183
188
|
return type;
|
|
184
189
|
}
|
|
185
190
|
|
|
191
|
+
static fromPropertyDeclarationNode(propertyDeclarationNode, fileContext) {
|
|
192
|
+
let type;
|
|
193
|
+
|
|
194
|
+
const propertyDeclarationTypeNode = propertyDeclarationTypeNodeQuery(propertyDeclarationNode);
|
|
195
|
+
|
|
196
|
+
if (propertyDeclarationTypeNode === null) {
|
|
197
|
+
type = objectType;
|
|
198
|
+
} else {
|
|
199
|
+
const typeNode = propertyDeclarationTypeNode, ///
|
|
200
|
+
typeName = typeNameFromTypeNode(typeNode),
|
|
201
|
+
name = typeName, ///
|
|
202
|
+
string = name, ///
|
|
203
|
+
superType = null,
|
|
204
|
+
properties = null;
|
|
205
|
+
|
|
206
|
+
type = new Type(string, name, superType, properties);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
return type;
|
|
210
|
+
}
|
|
211
|
+
|
|
186
212
|
static fromComplexTypeDeclarationNode(complexTypeDeclarationNode, fileContext) {
|
|
187
213
|
const properties = propertiesFromComplexTypeDeclarationNode(complexTypeDeclarationNode, fileContext),
|
|
188
214
|
superType = superTypeFromComplexTypeDeclarationNode(complexTypeDeclarationNode, fileContext),
|
package/src/index.js
CHANGED
|
@@ -38,6 +38,7 @@ import TypeAssertion from "./dom/assertion/type";
|
|
|
38
38
|
import TypeDeclaration from "./dom/declaration/type";
|
|
39
39
|
import DefinedAssertion from "./dom/assertion/defined";
|
|
40
40
|
import SubproofAssertion from "./dom/assertion/subproof";
|
|
41
|
+
import PropertyAssertion from "./dom/assertion/property";
|
|
41
42
|
import ContainedAssertion from "./dom/assertion/contained";
|
|
42
43
|
import VariableDeclaration from "./dom/declaration/variable";
|
|
43
44
|
import BracketedCombinator from "./dom/combinator/bracketed";
|
|
@@ -7,9 +7,39 @@ import { equalityFromStatement,
|
|
|
7
7
|
metavariableFromStatement,
|
|
8
8
|
typeAssertionFromStatement,
|
|
9
9
|
definedAssertionFromStatement,
|
|
10
|
+
propertyAssertionFromStatement,
|
|
10
11
|
containedAssertionFromStatement,
|
|
11
12
|
subproofAssertionFromStatement } from "../../utilities/verification";
|
|
12
13
|
|
|
14
|
+
function unifyWithBracketedCombinator(statement, assignments, stated, context) {
|
|
15
|
+
stated = true; ///
|
|
16
|
+
|
|
17
|
+
assignments = null; ///
|
|
18
|
+
|
|
19
|
+
const { BracketedCombinator } = dom,
|
|
20
|
+
bracketedCombinator = BracketedCombinator.fromNothing(),
|
|
21
|
+
unifiedWithBracketedCombinator = bracketedCombinator.unifyStatement(statement, assignments, stated, context);
|
|
22
|
+
|
|
23
|
+
return unifiedWithBracketedCombinator;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function unifyWithCombinators(statement, assignments, stated, context) {
|
|
27
|
+
stated = true; ///
|
|
28
|
+
|
|
29
|
+
assignments = null; ///
|
|
30
|
+
|
|
31
|
+
const combinators = context.getCombinators(),
|
|
32
|
+
unifiedWithCombinators = combinators.some((combinator) => {
|
|
33
|
+
const unifiedWithCombinator = combinator.unifyStatement(statement, assignments, stated, context);
|
|
34
|
+
|
|
35
|
+
if (unifiedWithCombinator) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return unifiedWithCombinators;
|
|
41
|
+
}
|
|
42
|
+
|
|
13
43
|
function verifyAsMetavariable(statement, assignments, stated, context) {
|
|
14
44
|
let verifiedAsMetavariable = false;
|
|
15
45
|
|
|
@@ -120,6 +150,28 @@ function verifyAsDefinedAssertion(statement, assignments, stated, context) {
|
|
|
120
150
|
return verifiedAsDefinedAssertion;
|
|
121
151
|
}
|
|
122
152
|
|
|
153
|
+
function verifyAsPropertyAssertion(statement, assignments, stated, context) {
|
|
154
|
+
let verifiedAsPropertyAssertion = false;
|
|
155
|
+
|
|
156
|
+
const propertyAssertion = propertyAssertionFromStatement(statement, context);
|
|
157
|
+
|
|
158
|
+
if (propertyAssertion !== null) {
|
|
159
|
+
const statementString = statement.getString();
|
|
160
|
+
|
|
161
|
+
context.trace(`Verifying the '${statementString}' statement as a property assertion...`);
|
|
162
|
+
|
|
163
|
+
const propertyAssertionVerified = propertyAssertion.verify(assignments, stated, context);
|
|
164
|
+
|
|
165
|
+
verifiedAsPropertyAssertion = propertyAssertionVerified; ///
|
|
166
|
+
|
|
167
|
+
if (verifiedAsPropertyAssertion) {
|
|
168
|
+
context.debug(`...verified the '${statementString}' statement as a property assertion.`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return verifiedAsPropertyAssertion;
|
|
173
|
+
}
|
|
174
|
+
|
|
123
175
|
function verifyAsContainedAssertion(statement, assignments, stated, context) {
|
|
124
176
|
let verifiedAsContainedAssertion = false;
|
|
125
177
|
|
|
@@ -164,45 +216,17 @@ function verifyAsSubproofAssertion(statement, assignments, stated, context) {
|
|
|
164
216
|
return verifiedAsSubproofAssertion;
|
|
165
217
|
}
|
|
166
218
|
|
|
167
|
-
function unifyWithBracketedCombinator(statement, assignments, stated, context) {
|
|
168
|
-
stated = true; ///
|
|
169
|
-
|
|
170
|
-
assignments = null; ///
|
|
171
|
-
|
|
172
|
-
const { BracketedCombinator } = dom,
|
|
173
|
-
bracketedCombinator = BracketedCombinator.fromNothing(),
|
|
174
|
-
unifiedWithBracketedCombinator = bracketedCombinator.unifyStatement(statement, assignments, stated, context);
|
|
175
|
-
|
|
176
|
-
return unifiedWithBracketedCombinator;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function unifyWithCombinators(statement, assignments, stated, context) {
|
|
180
|
-
stated = true; ///
|
|
181
|
-
|
|
182
|
-
assignments = null; ///
|
|
183
|
-
|
|
184
|
-
const combinators = context.getCombinators(),
|
|
185
|
-
unifiedWithCombinators = combinators.some((combinator) => {
|
|
186
|
-
const unifiedWithCombinator = combinator.unifyStatement(statement, assignments, stated, context);
|
|
187
|
-
|
|
188
|
-
if (unifiedWithCombinator) {
|
|
189
|
-
return true;
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
return unifiedWithCombinators;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
219
|
const verifyMixins = [
|
|
220
|
+
unifyWithBracketedCombinator,
|
|
221
|
+
unifyWithCombinators,
|
|
197
222
|
verifyAsMetavariable,
|
|
198
223
|
verifyAsEquality,
|
|
199
224
|
verifyAsJudgement,
|
|
200
225
|
verifyAsTypeAssertion,
|
|
201
226
|
verifyAsDefinedAssertion,
|
|
202
227
|
verifyAsContainedAssertion,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
unifyWithCombinators
|
|
228
|
+
verifyAsPropertyAssertion,
|
|
229
|
+
verifyAsSubproofAssertion
|
|
206
230
|
];
|
|
207
231
|
|
|
208
232
|
export default verifyMixins;
|
|
@@ -63,6 +63,16 @@ export function definedAssertionFromStatement(statement, context) {
|
|
|
63
63
|
return definedAssertion;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
export function propertyAssertionFromStatement(statement, context) {
|
|
67
|
+
context = contextFromStatement(statement, context); ///
|
|
68
|
+
|
|
69
|
+
const { PropertyAssertion } = dom,
|
|
70
|
+
statementNode = statement.getNode(),
|
|
71
|
+
propertyAssertion = PropertyAssertion.fromStatementNode(statementNode, context);
|
|
72
|
+
|
|
73
|
+
return propertyAssertion;
|
|
74
|
+
}
|
|
75
|
+
|
|
66
76
|
export function containedAssertionFromStatement(statement, context) {
|
|
67
77
|
context = contextFromStatement(statement, context); ///
|
|
68
78
|
|