occam-verify-cli 1.0.662 → 1.0.664
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/.swcrc +3 -0
- package/lib/abbreviations.js +10 -10
- package/lib/action/help.js +27 -2
- package/lib/action/verify.js +33 -205
- package/lib/action/version.js +6 -6
- package/lib/commands.js +4 -4
- package/lib/constants.js +16 -16
- package/lib/context/ephemeral.js +337 -540
- package/lib/context/file/nominal.js +545 -1040
- package/lib/context/liminal.js +159 -325
- package/lib/context/literal.js +34 -138
- package/lib/context/nominal.js +29 -124
- package/lib/context/scoped.js +163 -325
- package/lib/context/synthetic.js +31 -126
- package/lib/context.js +230 -482
- package/lib/defaults.js +8 -8
- package/lib/element/assertion/contained.js +159 -299
- package/lib/element/assertion/defined.js +145 -279
- package/lib/element/assertion/property.js +132 -266
- package/lib/element/assertion/satisfies.js +108 -239
- package/lib/element/assertion/subproof.js +88 -207
- package/lib/element/assertion/type.js +132 -262
- package/lib/element/assertion.js +17 -156
- package/lib/element/assumption.js +187 -386
- package/lib/element/combinator/bracketed.js +19 -142
- package/lib/element/combinator.js +65 -228
- package/lib/element/conclusion.js +72 -370
- package/lib/element/constructor/bracketed.js +34 -157
- package/lib/element/constructor.js +81 -253
- package/lib/element/declaration/combinator.js +41 -286
- package/lib/element/declaration/complexType.js +184 -452
- package/lib/element/declaration/constructor.js +69 -323
- package/lib/element/declaration/metavariable.js +70 -317
- package/lib/element/declaration/simpleType.js +117 -378
- package/lib/element/declaration/typePrefix.js +54 -299
- package/lib/element/declaration/variable.js +74 -328
- package/lib/element/declaration.js +3 -114
- package/lib/element/deduction.js +76 -378
- package/lib/element/derivation.js +31 -340
- package/lib/element/equality.js +152 -347
- package/lib/element/equivalence.js +160 -385
- package/lib/element/equivalences.js +132 -356
- package/lib/element/error.js +16 -290
- package/lib/element/frame.js +210 -418
- package/lib/element/hypothesis.js +56 -354
- package/lib/element/judgement.js +120 -305
- package/lib/element/label.js +62 -236
- package/lib/element/metaType.js +35 -200
- package/lib/element/metavariable.js +249 -459
- package/lib/element/parameter.js +39 -202
- package/lib/element/procedureCall.js +74 -381
- package/lib/element/procedureReference.js +27 -186
- package/lib/element/proof.js +38 -349
- package/lib/element/proofAssertion/premise.js +174 -466
- package/lib/element/proofAssertion/step.js +144 -495
- package/lib/element/proofAssertion/supposition.js +170 -466
- package/lib/element/proofAssertion.js +47 -195
- package/lib/element/property.js +36 -201
- package/lib/element/propertyRelation.js +62 -223
- package/lib/element/reference.js +173 -378
- package/lib/element/rule.js +178 -673
- package/lib/element/section.js +47 -356
- package/lib/element/signature.js +96 -264
- package/lib/element/statement.js +195 -395
- package/lib/element/subDerivation.js +32 -341
- package/lib/element/subproof.js +73 -448
- package/lib/element/substitution/frame.js +114 -257
- package/lib/element/substitution/reference.js +108 -248
- package/lib/element/substitution/statement.js +223 -397
- package/lib/element/substitution/term.js +123 -266
- package/lib/element/substitution.js +97 -296
- package/lib/element/term.js +139 -339
- package/lib/element/topLevelAssertion/axiom.js +153 -459
- package/lib/element/topLevelAssertion/conjecture.js +24 -295
- package/lib/element/topLevelAssertion/lemma.js +22 -289
- package/lib/element/topLevelAssertion/theorem.js +24 -295
- package/lib/element/topLevelAssertion.js +218 -718
- package/lib/element/topLevelMetaAssertion/metaLemma.js +24 -290
- package/lib/element/topLevelMetaAssertion/metatheorem.js +24 -290
- package/lib/element/topLevelMetaAssertion.js +109 -509
- package/lib/element/type.js +198 -435
- package/lib/element/typePrefix.js +27 -186
- package/lib/element/variable.js +119 -308
- package/lib/elements.js +4 -4
- package/lib/index.js +4 -4
- package/lib/main.js +18 -18
- package/lib/messages.js +2 -2
- package/lib/metaTypeNames.js +4 -4
- package/lib/metaTypes.js +10 -10
- package/lib/node/argument.js +15 -109
- package/lib/node/assertion/contained.js +33 -130
- package/lib/node/assertion/defined.js +29 -123
- package/lib/node/assertion/property.js +18 -112
- package/lib/node/assertion/satisfies.js +14 -105
- package/lib/node/assertion/subproof.js +10 -98
- package/lib/node/assertion/type.js +14 -105
- package/lib/node/assertion.js +5 -89
- package/lib/node/assumption.js +12 -103
- package/lib/node/body/axiom.js +5 -89
- package/lib/node/body/conjecture.js +5 -89
- package/lib/node/body/lemma.js +5 -89
- package/lib/node/body/metaLemma.js +5 -89
- package/lib/node/body/metatheorem.js +5 -89
- package/lib/node/body/rule.js +26 -126
- package/lib/node/body/theorem.js +5 -89
- package/lib/node/body.js +15 -109
- package/lib/node/combinator.js +9 -97
- package/lib/node/conclusion.js +12 -103
- package/lib/node/constructor.js +9 -97
- package/lib/node/declaration/combinator.js +10 -98
- package/lib/node/declaration/complexType.js +53 -162
- package/lib/node/declaration/constructor.js +29 -123
- package/lib/node/declaration/metavariable.js +18 -112
- package/lib/node/declaration/property.js +26 -123
- package/lib/node/declaration/simpleType.js +52 -158
- package/lib/node/declaration/typePrefix.js +14 -105
- package/lib/node/declaration/variable.js +33 -130
- package/lib/node/declaration.js +5 -89
- package/lib/node/deduction.js +12 -103
- package/lib/node/derivation.js +12 -125
- package/lib/node/document.js +5 -89
- package/lib/node/equality.js +17 -111
- package/lib/node/equivalence.js +9 -97
- package/lib/node/equivalences.js +5 -89
- package/lib/node/error.js +5 -89
- package/lib/node/frame.js +26 -123
- package/lib/node/header/axiom.js +10 -98
- package/lib/node/header/conjecture.js +5 -89
- package/lib/node/header/lemma.js +5 -89
- package/lib/node/header/metaLemma.js +5 -89
- package/lib/node/header/metatheorem.js +5 -89
- package/lib/node/header/rule.js +5 -89
- package/lib/node/header/theorem.js +5 -89
- package/lib/node/header.js +30 -130
- package/lib/node/hypothesis.js +12 -103
- package/lib/node/judgement.js +15 -109
- package/lib/node/label.js +9 -97
- package/lib/node/labels.js +9 -97
- package/lib/node/metaArgument.js +9 -97
- package/lib/node/metaType.js +16 -104
- package/lib/node/metavariable.js +23 -117
- package/lib/node/parameter.js +32 -123
- package/lib/node/parenthesisedLabel.js +9 -97
- package/lib/node/parenthesisedLabels.js +12 -103
- package/lib/node/placeholder.js +5 -89
- package/lib/node/procedureCall.js +15 -109
- package/lib/node/procedureReference.js +16 -104
- package/lib/node/proof.js +9 -97
- package/lib/node/proofAssertion/premise.js +10 -98
- package/lib/node/proofAssertion/step.js +32 -132
- package/lib/node/proofAssertion/supposition.js +10 -98
- package/lib/node/proofAssertion.js +12 -103
- package/lib/node/property.js +15 -106
- package/lib/node/propertyRelation.js +15 -109
- package/lib/node/qualification.js +12 -103
- package/lib/node/reference.js +9 -97
- package/lib/node/rule.js +26 -129
- package/lib/node/section.js +22 -122
- package/lib/node/signature.js +9 -97
- package/lib/node/statement.js +93 -238
- package/lib/node/subDerivation.js +12 -125
- package/lib/node/subproof.js +18 -115
- package/lib/node/substitution/frame.js +22 -119
- package/lib/node/substitution/reference.js +22 -119
- package/lib/node/substitution/statement.js +42 -151
- package/lib/node/substitution/term.js +22 -119
- package/lib/node/substitution.js +5 -89
- package/lib/node/term.js +51 -160
- package/lib/node/topLevelAssertion/axiom.js +8 -105
- package/lib/node/topLevelAssertion/conjecture.js +8 -105
- package/lib/node/topLevelAssertion/lemma.js +8 -105
- package/lib/node/topLevelAssertion/theorem.js +8 -105
- package/lib/node/topLevelAssertion.js +29 -135
- package/lib/node/topLevelMetaAssertion/metaLemma.js +8 -105
- package/lib/node/topLevelMetaAssertion/metatheorem.js +8 -105
- package/lib/node/topLevelMetaAssertion.js +25 -128
- package/lib/node/type.js +43 -140
- package/lib/node/typePrefix.js +16 -104
- package/lib/node/types.js +9 -97
- package/lib/node/variable.js +16 -104
- package/lib/nominal/lexer.js +3 -68
- package/lib/nominal/parser.js +7 -85
- package/lib/nonTerminalNodeMap.js +171 -101
- package/lib/options.js +6 -6
- package/lib/preamble.js +62 -62
- package/lib/prepare.js +4 -4
- package/lib/process/assign.js +20 -20
- package/lib/process/equate.js +39 -117
- package/lib/process/instantiate.js +10 -9
- package/lib/process/unify.js +199 -325
- package/lib/process/validate.js +87 -195
- package/lib/process/verify.js +263 -786
- package/lib/ruleNames.js +84 -84
- package/lib/tokenTypes.js +3 -3
- package/lib/utilities/bnf.js +7 -7
- package/lib/utilities/brackets.js +18 -18
- package/lib/utilities/clock.js +8 -8
- package/lib/utilities/context.js +23 -191
- package/lib/utilities/element.js +276 -276
- package/lib/utilities/equivalence.js +7 -7
- package/lib/utilities/fileContext.js +9 -9
- package/lib/utilities/instance.js +14 -14
- package/lib/utilities/json.js +211 -211
- package/lib/utilities/releaseContext.js +19 -147
- package/lib/utilities/statement.js +10 -10
- package/lib/utilities/string.js +47 -47
- package/lib/utilities/substitutions.js +19 -19
- package/lib/utilities/type.js +5 -5
- package/lib/utilities/unification.js +196 -426
- package/lib/utilities/validation.js +72 -72
- package/package.json +1 -1
|
@@ -8,193 +8,34 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return _default;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
_construct = function construct(Parent, args, Class) {
|
|
33
|
-
var a = [
|
|
34
|
-
null
|
|
35
|
-
];
|
|
36
|
-
a.push.apply(a, args);
|
|
37
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
38
|
-
var instance = new Constructor();
|
|
39
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
40
|
-
return instance;
|
|
11
|
+
const _occamlanguages = require("occam-languages");
|
|
12
|
+
const _elements = require("../elements");
|
|
13
|
+
const _default = (0, _elements.define)(class ProcedureReference extends _occamlanguages.Element {
|
|
14
|
+
constructor(context, string, node, name){
|
|
15
|
+
super(context, string, node);
|
|
16
|
+
this.name = name;
|
|
17
|
+
}
|
|
18
|
+
getName() {
|
|
19
|
+
return this.name;
|
|
20
|
+
}
|
|
21
|
+
getProcedureReferenceNode() {
|
|
22
|
+
const node = this.getNode(), procedureReferenceNode = node; ///
|
|
23
|
+
return procedureReferenceNode;
|
|
24
|
+
}
|
|
25
|
+
getProcedureName() {
|
|
26
|
+
const procedureName = this.name; ///
|
|
27
|
+
return procedureName;
|
|
28
|
+
}
|
|
29
|
+
toJSON() {
|
|
30
|
+
const name = this.name, json = {
|
|
31
|
+
name
|
|
41
32
|
};
|
|
33
|
+
return json;
|
|
42
34
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
for(var i = 0; i < props.length; i++){
|
|
47
|
-
var descriptor = props[i];
|
|
48
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
49
|
-
descriptor.configurable = true;
|
|
50
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
51
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
55
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
56
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
57
|
-
return Constructor;
|
|
58
|
-
}
|
|
59
|
-
function _define_property(obj, key, value) {
|
|
60
|
-
if (key in obj) {
|
|
61
|
-
Object.defineProperty(obj, key, {
|
|
62
|
-
value: value,
|
|
63
|
-
enumerable: true,
|
|
64
|
-
configurable: true,
|
|
65
|
-
writable: true
|
|
66
|
-
});
|
|
67
|
-
} else {
|
|
68
|
-
obj[key] = value;
|
|
69
|
-
}
|
|
70
|
-
return obj;
|
|
71
|
-
}
|
|
72
|
-
function _get_prototype_of(o) {
|
|
73
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
74
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
75
|
-
};
|
|
76
|
-
return _get_prototype_of(o);
|
|
77
|
-
}
|
|
78
|
-
function _inherits(subClass, superClass) {
|
|
79
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
80
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
35
|
+
static name = "ProcedureReference";
|
|
36
|
+
static fromJSON(json, context) {
|
|
37
|
+
debugger;
|
|
81
38
|
}
|
|
82
|
-
|
|
83
|
-
constructor: {
|
|
84
|
-
value: subClass,
|
|
85
|
-
writable: true,
|
|
86
|
-
configurable: true
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
90
|
-
}
|
|
91
|
-
function _is_native_function(fn) {
|
|
92
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
93
|
-
}
|
|
94
|
-
function _possible_constructor_return(self, call) {
|
|
95
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
96
|
-
return call;
|
|
97
|
-
}
|
|
98
|
-
return _assert_this_initialized(self);
|
|
99
|
-
}
|
|
100
|
-
function _set_prototype_of(o, p) {
|
|
101
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
102
|
-
o.__proto__ = p;
|
|
103
|
-
return o;
|
|
104
|
-
};
|
|
105
|
-
return _set_prototype_of(o, p);
|
|
106
|
-
}
|
|
107
|
-
function _type_of(obj) {
|
|
108
|
-
"@swc/helpers - typeof";
|
|
109
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
110
|
-
}
|
|
111
|
-
function _wrap_native_super(Class) {
|
|
112
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
113
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
114
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
115
|
-
if (typeof Class !== "function") {
|
|
116
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
117
|
-
}
|
|
118
|
-
if (typeof _cache !== "undefined") {
|
|
119
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
120
|
-
_cache.set(Class, Wrapper);
|
|
121
|
-
}
|
|
122
|
-
function Wrapper() {
|
|
123
|
-
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
124
|
-
}
|
|
125
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
126
|
-
constructor: {
|
|
127
|
-
value: Wrapper,
|
|
128
|
-
enumerable: false,
|
|
129
|
-
writable: true,
|
|
130
|
-
configurable: true
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
return _set_prototype_of(Wrapper, Class);
|
|
134
|
-
};
|
|
135
|
-
return _wrap_native_super(Class);
|
|
136
|
-
}
|
|
137
|
-
function _is_native_reflect_construct() {
|
|
138
|
-
try {
|
|
139
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
140
|
-
} catch (_) {}
|
|
141
|
-
return (_is_native_reflect_construct = function() {
|
|
142
|
-
return !!result;
|
|
143
|
-
})();
|
|
144
|
-
}
|
|
145
|
-
var _ProcedureReference;
|
|
146
|
-
var _default = (0, _elements.define)((_ProcedureReference = /*#__PURE__*/ function(Element) {
|
|
147
|
-
_inherits(ProcedureReference, Element);
|
|
148
|
-
function ProcedureReference(context, string, node, name) {
|
|
149
|
-
_class_call_check(this, ProcedureReference);
|
|
150
|
-
var _this;
|
|
151
|
-
_this = _call_super(this, ProcedureReference, [
|
|
152
|
-
context,
|
|
153
|
-
string,
|
|
154
|
-
node
|
|
155
|
-
]);
|
|
156
|
-
_this.name = name;
|
|
157
|
-
return _this;
|
|
158
|
-
}
|
|
159
|
-
_create_class(ProcedureReference, [
|
|
160
|
-
{
|
|
161
|
-
key: "getName",
|
|
162
|
-
value: function getName() {
|
|
163
|
-
return this.name;
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
key: "getProcedureReferenceNode",
|
|
168
|
-
value: function getProcedureReferenceNode() {
|
|
169
|
-
var node = this.getNode(), procedureReferenceNode = node; ///
|
|
170
|
-
return procedureReferenceNode;
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
key: "getProcedureName",
|
|
175
|
-
value: function getProcedureName() {
|
|
176
|
-
var procedureName = this.name; ///
|
|
177
|
-
return procedureName;
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
key: "toJSON",
|
|
182
|
-
value: function toJSON() {
|
|
183
|
-
var name = this.name, json = {
|
|
184
|
-
name: name
|
|
185
|
-
};
|
|
186
|
-
return json;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
], [
|
|
190
|
-
{
|
|
191
|
-
key: "fromJSON",
|
|
192
|
-
value: function fromJSON(json, context) {
|
|
193
|
-
debugger;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
]);
|
|
197
|
-
return ProcedureReference;
|
|
198
|
-
}(_wrap_native_super(_occamlanguages.Element)), _define_property(_ProcedureReference, "name", "ProcedureReference"), _ProcedureReference));
|
|
39
|
+
});
|
|
199
40
|
|
|
200
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbGVtZW50L3Byb2NlZHVyZVJlZmVyZW5jZS5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IHsgRWxlbWVudCB9IGZyb20gXCJvY2NhbS1sYW5ndWFnZXNcIjtcblxuaW1wb3J0IHsgZGVmaW5lIH0gZnJvbSBcIi4uL2VsZW1lbnRzXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGRlZmluZShjbGFzcyBQcm9jZWR1cmVSZWZlcmVuY2UgZXh0ZW5kcyBFbGVtZW50IHtcbiAgY29uc3RydWN0b3IoY29udGV4dCwgc3RyaW5nLCBub2RlLCBuYW1lKSB7XG4gICAgc3VwZXIoY29udGV4dCwgc3RyaW5nLCBub2RlKTt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FBOzs7Z0NBSndCOzBCQUVEO01BRXZCLFdBQWVBLElBQUFBLGdCQUFNLEVBQUMsTUFBTUMsMkJBQTJCQyx1QkFBTztJQUM1RCxZQUFZQyxPQUFPLEVBQUVDLE1BQU0sRUFBRUMsSUFBSSxFQUFFQyxJQUFJLENBQUU7UUFDdkMsS0FBSyxDQUFDSCxTQUFTQyxRQUFRQztRQUN2QixJQUFJLENBQUNDLElBQUksR0FBR0E7SUFDZDtJQUVBQyxVQUFVO1FBQ1IsT0FBTyxJQUFJLENBQUNELElBQUk7SUFDbEI7SUFFQUUsNEJBQTRCO1FBQzFCLE1BQU1ILE9BQU8sSUFBSSxDQUFDSSxPQUFPLElBQ25CQyx5QkFBeUJMLE1BQU8sR0FBRztRQUV6QyxPQUFPSztJQUNUO0lBRUFDLG1CQUFtQjtRQUNqQixNQUFNQyxnQkFBZ0IsSUFBSSxDQUFDTixJQUFJLEVBQUcsR0FBRztRQUVyQyxPQUFPTTtJQUNUO0lBRUFDLFNBQVM7UUFDUCxNQUFNUCxPQUFPLElBQUksQ0FBQ0EsSUFBSSxFQUNoQlEsT0FBTztZQUNMUjtRQUNGO1FBRU4sT0FBT1E7SUFDVDtJQUVBLE9BQU9SLE9BQU8scUJBQXFCO0lBRW5DLE9BQU9TLFNBQVNELElBQUksRUFBRVgsT0FBTyxFQUFFO1FBQzdCLFFBQVE7SUFDVjtBQUNGIn0=
|
package/lib/element/proof.js
CHANGED
|
@@ -8,356 +8,45 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return _default;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
44
|
-
}
|
|
45
|
-
_next(undefined);
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
function _call_super(_this, derived, args) {
|
|
50
|
-
derived = _get_prototype_of(derived);
|
|
51
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
52
|
-
}
|
|
53
|
-
function _class_call_check(instance, Constructor) {
|
|
54
|
-
if (!(instance instanceof Constructor)) {
|
|
55
|
-
throw new TypeError("Cannot call a class as a function");
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function _construct(Parent, args, Class) {
|
|
59
|
-
if (_is_native_reflect_construct()) {
|
|
60
|
-
_construct = Reflect.construct;
|
|
61
|
-
} else {
|
|
62
|
-
_construct = function construct(Parent, args, Class) {
|
|
63
|
-
var a = [
|
|
64
|
-
null
|
|
65
|
-
];
|
|
66
|
-
a.push.apply(a, args);
|
|
67
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
68
|
-
var instance = new Constructor();
|
|
69
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
70
|
-
return instance;
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
return _construct.apply(null, arguments);
|
|
74
|
-
}
|
|
75
|
-
function _defineProperties(target, props) {
|
|
76
|
-
for(var i = 0; i < props.length; i++){
|
|
77
|
-
var descriptor = props[i];
|
|
78
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
79
|
-
descriptor.configurable = true;
|
|
80
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
81
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
85
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
86
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
87
|
-
return Constructor;
|
|
88
|
-
}
|
|
89
|
-
function _define_property(obj, key, value) {
|
|
90
|
-
if (key in obj) {
|
|
91
|
-
Object.defineProperty(obj, key, {
|
|
92
|
-
value: value,
|
|
93
|
-
enumerable: true,
|
|
94
|
-
configurable: true,
|
|
95
|
-
writable: true
|
|
96
|
-
});
|
|
97
|
-
} else {
|
|
98
|
-
obj[key] = value;
|
|
99
|
-
}
|
|
100
|
-
return obj;
|
|
101
|
-
}
|
|
102
|
-
function _get_prototype_of(o) {
|
|
103
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
104
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
105
|
-
};
|
|
106
|
-
return _get_prototype_of(o);
|
|
107
|
-
}
|
|
108
|
-
function _inherits(subClass, superClass) {
|
|
109
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
110
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
111
|
-
}
|
|
112
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
113
|
-
constructor: {
|
|
114
|
-
value: subClass,
|
|
115
|
-
writable: true,
|
|
116
|
-
configurable: true
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
120
|
-
}
|
|
121
|
-
function _is_native_function(fn) {
|
|
122
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
123
|
-
}
|
|
124
|
-
function _possible_constructor_return(self, call) {
|
|
125
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
126
|
-
return call;
|
|
127
|
-
}
|
|
128
|
-
return _assert_this_initialized(self);
|
|
129
|
-
}
|
|
130
|
-
function _set_prototype_of(o, p) {
|
|
131
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
132
|
-
o.__proto__ = p;
|
|
133
|
-
return o;
|
|
134
|
-
};
|
|
135
|
-
return _set_prototype_of(o, p);
|
|
136
|
-
}
|
|
137
|
-
function _type_of(obj) {
|
|
138
|
-
"@swc/helpers - typeof";
|
|
139
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
140
|
-
}
|
|
141
|
-
function _wrap_native_super(Class) {
|
|
142
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
143
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
144
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
145
|
-
if (typeof Class !== "function") {
|
|
146
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
147
|
-
}
|
|
148
|
-
if (typeof _cache !== "undefined") {
|
|
149
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
150
|
-
_cache.set(Class, Wrapper);
|
|
151
|
-
}
|
|
152
|
-
function Wrapper() {
|
|
153
|
-
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
154
|
-
}
|
|
155
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
156
|
-
constructor: {
|
|
157
|
-
value: Wrapper,
|
|
158
|
-
enumerable: false,
|
|
159
|
-
writable: true,
|
|
160
|
-
configurable: true
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
return _set_prototype_of(Wrapper, Class);
|
|
164
|
-
};
|
|
165
|
-
return _wrap_native_super(Class);
|
|
166
|
-
}
|
|
167
|
-
function _is_native_reflect_construct() {
|
|
168
|
-
try {
|
|
169
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
170
|
-
} catch (_) {}
|
|
171
|
-
return (_is_native_reflect_construct = function() {
|
|
172
|
-
return !!result;
|
|
173
|
-
})();
|
|
174
|
-
}
|
|
175
|
-
function _ts_generator(thisArg, body) {
|
|
176
|
-
var f, y, t, _ = {
|
|
177
|
-
label: 0,
|
|
178
|
-
sent: function() {
|
|
179
|
-
if (t[0] & 1) throw t[1];
|
|
180
|
-
return t[1];
|
|
181
|
-
},
|
|
182
|
-
trys: [],
|
|
183
|
-
ops: []
|
|
184
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
185
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
186
|
-
return this;
|
|
187
|
-
}), g;
|
|
188
|
-
function verb(n) {
|
|
189
|
-
return function(v) {
|
|
190
|
-
return step([
|
|
191
|
-
n,
|
|
192
|
-
v
|
|
193
|
-
]);
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
function step(op) {
|
|
197
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
198
|
-
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
199
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
200
|
-
if (y = 0, t) op = [
|
|
201
|
-
op[0] & 2,
|
|
202
|
-
t.value
|
|
203
|
-
];
|
|
204
|
-
switch(op[0]){
|
|
205
|
-
case 0:
|
|
206
|
-
case 1:
|
|
207
|
-
t = op;
|
|
208
|
-
break;
|
|
209
|
-
case 4:
|
|
210
|
-
_.label++;
|
|
211
|
-
return {
|
|
212
|
-
value: op[1],
|
|
213
|
-
done: false
|
|
214
|
-
};
|
|
215
|
-
case 5:
|
|
216
|
-
_.label++;
|
|
217
|
-
y = op[1];
|
|
218
|
-
op = [
|
|
219
|
-
0
|
|
220
|
-
];
|
|
221
|
-
continue;
|
|
222
|
-
case 7:
|
|
223
|
-
op = _.ops.pop();
|
|
224
|
-
_.trys.pop();
|
|
225
|
-
continue;
|
|
226
|
-
default:
|
|
227
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
228
|
-
_ = 0;
|
|
229
|
-
continue;
|
|
230
|
-
}
|
|
231
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
232
|
-
_.label = op[1];
|
|
233
|
-
break;
|
|
234
|
-
}
|
|
235
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
236
|
-
_.label = t[1];
|
|
237
|
-
t = op;
|
|
238
|
-
break;
|
|
11
|
+
const _occamlanguages = require("occam-languages");
|
|
12
|
+
const _elements = require("../elements");
|
|
13
|
+
const _context = require("../utilities/context");
|
|
14
|
+
const _default = (0, _elements.define)(class Proof extends _occamlanguages.Element {
|
|
15
|
+
constructor(context, string, node, derivation){
|
|
16
|
+
super(context, string, node);
|
|
17
|
+
this.derivation = derivation;
|
|
18
|
+
}
|
|
19
|
+
getDerivation() {
|
|
20
|
+
return this.derivation;
|
|
21
|
+
}
|
|
22
|
+
getProofNode() {
|
|
23
|
+
const node = this.getNode(), proofNode = node; ///
|
|
24
|
+
return proofNode;
|
|
25
|
+
}
|
|
26
|
+
getLastProofAssertion() {
|
|
27
|
+
return this.derivation.getLastProofAssertion();
|
|
28
|
+
}
|
|
29
|
+
getStatement() {
|
|
30
|
+
const lastProofAssertion = this.getLastProofAssertion(), lastProofAssertionStatement = lastProofAssertion.getStatement(), statement = lastProofAssertionStatement; ///
|
|
31
|
+
return statement;
|
|
32
|
+
}
|
|
33
|
+
async verify(statement, context) {
|
|
34
|
+
let verifies = false;
|
|
35
|
+
await (0, _context.asyncScope)(async (context)=>{
|
|
36
|
+
const derivationVerifies = await this.derivation.verify(context);
|
|
37
|
+
if (derivationVerifies) {
|
|
38
|
+
const lastProofAssertion = context.getLastProofAssertion();
|
|
39
|
+
if (lastProofAssertion !== null) {
|
|
40
|
+
const proof = this, proofStatement = proof.getStatement(), proofStatementEqualToStatement = proofStatement.isEqualTo(statement);
|
|
41
|
+
if (proofStatementEqualToStatement) {
|
|
42
|
+
verifies = true;
|
|
239
43
|
}
|
|
240
|
-
|
|
241
|
-
_.label = t[2];
|
|
242
|
-
_.ops.push(op);
|
|
243
|
-
break;
|
|
244
|
-
}
|
|
245
|
-
if (t[2]) _.ops.pop();
|
|
246
|
-
_.trys.pop();
|
|
247
|
-
continue;
|
|
44
|
+
}
|
|
248
45
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
op = [
|
|
252
|
-
6,
|
|
253
|
-
e
|
|
254
|
-
];
|
|
255
|
-
y = 0;
|
|
256
|
-
} finally{
|
|
257
|
-
f = t = 0;
|
|
258
|
-
}
|
|
259
|
-
if (op[0] & 5) throw op[1];
|
|
260
|
-
return {
|
|
261
|
-
value: op[0] ? op[1] : void 0,
|
|
262
|
-
done: true
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
var _Proof;
|
|
267
|
-
var _default = (0, _elements.define)((_Proof = /*#__PURE__*/ function(Element) {
|
|
268
|
-
_inherits(Proof, Element);
|
|
269
|
-
function Proof(context, string, node, derivation) {
|
|
270
|
-
_class_call_check(this, Proof);
|
|
271
|
-
var _this;
|
|
272
|
-
_this = _call_super(this, Proof, [
|
|
273
|
-
context,
|
|
274
|
-
string,
|
|
275
|
-
node
|
|
276
|
-
]);
|
|
277
|
-
_this.derivation = derivation;
|
|
278
|
-
return _this;
|
|
46
|
+
}, context);
|
|
47
|
+
return verifies;
|
|
279
48
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
key: "getDerivation",
|
|
283
|
-
value: function getDerivation() {
|
|
284
|
-
return this.derivation;
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
key: "getProofNode",
|
|
289
|
-
value: function getProofNode() {
|
|
290
|
-
var node = this.getNode(), proofNode = node; ///
|
|
291
|
-
return proofNode;
|
|
292
|
-
}
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
key: "getLastProofAssertion",
|
|
296
|
-
value: function getLastProofAssertion() {
|
|
297
|
-
return this.derivation.getLastProofAssertion();
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
key: "getStatement",
|
|
302
|
-
value: function getStatement() {
|
|
303
|
-
var lastProofAssertion = this.getLastProofAssertion(), lastProofAssertionStatement = lastProofAssertion.getStatement(), statement = lastProofAssertionStatement; ///
|
|
304
|
-
return statement;
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
key: "verify",
|
|
309
|
-
value: function verify(statement, context) {
|
|
310
|
-
return _async_to_generator(function() {
|
|
311
|
-
var _this, verifies;
|
|
312
|
-
return _ts_generator(this, function(_state) {
|
|
313
|
-
switch(_state.label){
|
|
314
|
-
case 0:
|
|
315
|
-
_this = this;
|
|
316
|
-
verifies = false;
|
|
317
|
-
return [
|
|
318
|
-
4,
|
|
319
|
-
(0, _context.asyncScope)(function(context) {
|
|
320
|
-
return _async_to_generator(function() {
|
|
321
|
-
var derivationVerifies, lastProofAssertion, proof, proofStatement, proofStatementEqualToStatement;
|
|
322
|
-
return _ts_generator(this, function(_state) {
|
|
323
|
-
switch(_state.label){
|
|
324
|
-
case 0:
|
|
325
|
-
return [
|
|
326
|
-
4,
|
|
327
|
-
this.derivation.verify(context)
|
|
328
|
-
];
|
|
329
|
-
case 1:
|
|
330
|
-
derivationVerifies = _state.sent();
|
|
331
|
-
if (derivationVerifies) {
|
|
332
|
-
lastProofAssertion = context.getLastProofAssertion();
|
|
333
|
-
if (lastProofAssertion !== null) {
|
|
334
|
-
proof = this, proofStatement = proof.getStatement(), proofStatementEqualToStatement = proofStatement.isEqualTo(statement);
|
|
335
|
-
if (proofStatementEqualToStatement) {
|
|
336
|
-
verifies = true;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
return [
|
|
341
|
-
2
|
|
342
|
-
];
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
}).call(_this);
|
|
346
|
-
}, context)
|
|
347
|
-
];
|
|
348
|
-
case 1:
|
|
349
|
-
_state.sent();
|
|
350
|
-
return [
|
|
351
|
-
2,
|
|
352
|
-
verifies
|
|
353
|
-
];
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
}).call(this);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
]);
|
|
360
|
-
return Proof;
|
|
361
|
-
}(_wrap_native_super(_occamlanguages.Element)), _define_property(_Proof, "name", "Proof"), _Proof));
|
|
49
|
+
static name = "Proof";
|
|
50
|
+
});
|
|
362
51
|
|
|
363
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
52
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbGVtZW50L3Byb29mLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgeyBFbGVtZW50IH0gZnJvbSBcIm9jY2FtLWxhbmd1YWdlc1wiO1xuXG5pbXBvcnQgeyBkZWZpbmUgfSBmcm9tIFwiLi4vZWxlbWVudHNcIjtcbmltcG9ydCB7IGFzeW5jU2NvcGUgfSBmcm9tIFwiLi4vdXRpbGl0aWVzL2NvbnRleHRcIjtcblxuZXhwb3J0IGRlZmF1bHQgZGVmaW5lKGNsYXNzIFByb29mIGV4dGVuZHMgRWxlbWVudCB7XG4gIGNvbnN0cnVjdG9yKGNvbnRleHQsIHN0cmluZywgbm9kZSwgZGVyaXZhdGlvbikge1xuICAgIHN1cGVyKGNvbnRleHQsIHN0cmluZywgbm9kZSk7XG5cbiAgICB0aGlzLmRlcml2YXRpb24gPSBkZXJpdmF0aW9uO1xuICB9XG5cbiAgZ2V0RGVyaXZhdGlvbigpIHtcbiAgICByZXR1cm4gdGhpcy5kZXJpdmF0aW9uO1xuICB9XG5cbiAgZ2V0UHJvb2ZOb2RlKCkge1xuICAgIGNvbnN0IG5vZGUg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