timed-automata-analyzer 1.0.9 → 1.0.10
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/package.json
CHANGED
|
@@ -34,8 +34,79 @@ function getStringFromWasm0(ptr, len) {
|
|
|
34
34
|
return decodeText(ptr, len);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
function _assertClass(instance, klass) {
|
|
38
|
+
if (!(instance instanceof klass)) {
|
|
39
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let cachedDataViewMemory0 = null;
|
|
44
|
+
|
|
45
|
+
function getDataViewMemory0() {
|
|
46
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
47
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
48
|
+
}
|
|
49
|
+
return cachedDataViewMemory0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
53
|
+
ptr = ptr >>> 0;
|
|
54
|
+
const mem = getDataViewMemory0();
|
|
55
|
+
const result = [];
|
|
56
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
57
|
+
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
58
|
+
}
|
|
59
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Checks all locations of the input TA for reachability and returns all unreachable locations. The
|
|
64
|
+
* result will be empty if all locations are reachable.
|
|
65
|
+
*
|
|
66
|
+
* This function will throw an error if one or more validation checks fail. The following
|
|
67
|
+
* properties will be validated:
|
|
68
|
+
* <ul>
|
|
69
|
+
* <li>There exists exactly one initial location.</li>
|
|
70
|
+
* <li>The set of locations is non-empty.</li>
|
|
71
|
+
* <li>All invariants are downward-closed.</li>
|
|
72
|
+
* <li>The highest constant used in any clock constraint is not greater than the highest allowed
|
|
73
|
+
* value (536870909).</li>
|
|
74
|
+
* <li>All locations names are unique.</li>
|
|
75
|
+
* <li>All clock names are unique.</li>
|
|
76
|
+
* <li>All clocks used in clock constraints are also contained in the set of clocks.</li>
|
|
77
|
+
* <li>All location names used as source and target of switches are also contained in the set of
|
|
78
|
+
* locations.</li>
|
|
79
|
+
* </ul>
|
|
80
|
+
* @param {TimedAutomaton} ta
|
|
81
|
+
* @returns {string[]}
|
|
82
|
+
*/
|
|
83
|
+
export function findUnreachableLocations(ta) {
|
|
84
|
+
_assertClass(ta, TimedAutomaton);
|
|
85
|
+
var ptr0 = ta.__destroy_into_raw();
|
|
86
|
+
const ret = wasm.findUnreachableLocations(ptr0);
|
|
87
|
+
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
88
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
89
|
+
return v2;
|
|
90
|
+
}
|
|
91
|
+
|
|
37
92
|
let WASM_VECTOR_LEN = 0;
|
|
38
93
|
|
|
94
|
+
function addToExternrefTable0(obj) {
|
|
95
|
+
const idx = wasm.__externref_table_alloc();
|
|
96
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
97
|
+
return idx;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
101
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
102
|
+
for (let i = 0; i < array.length; i++) {
|
|
103
|
+
const add = addToExternrefTable0(array[i]);
|
|
104
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
105
|
+
}
|
|
106
|
+
WASM_VECTOR_LEN = array.length;
|
|
107
|
+
return ptr;
|
|
108
|
+
}
|
|
109
|
+
|
|
39
110
|
const cachedTextEncoder = new TextEncoder();
|
|
40
111
|
|
|
41
112
|
if (!('encodeInto' in cachedTextEncoder)) {
|
|
@@ -88,81 +159,9 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
88
159
|
return ptr;
|
|
89
160
|
}
|
|
90
161
|
|
|
91
|
-
function _assertClass(instance, klass) {
|
|
92
|
-
if (!(instance instanceof klass)) {
|
|
93
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
let cachedDataViewMemory0 = null;
|
|
98
|
-
|
|
99
|
-
function getDataViewMemory0() {
|
|
100
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
101
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
102
|
-
}
|
|
103
|
-
return cachedDataViewMemory0;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function addToExternrefTable0(obj) {
|
|
107
|
-
const idx = wasm.__externref_table_alloc();
|
|
108
|
-
wasm.__wbindgen_export_0.set(idx, obj);
|
|
109
|
-
return idx;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
113
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
114
|
-
for (let i = 0; i < array.length; i++) {
|
|
115
|
-
const add = addToExternrefTable0(array[i]);
|
|
116
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
117
|
-
}
|
|
118
|
-
WASM_VECTOR_LEN = array.length;
|
|
119
|
-
return ptr;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
162
|
function isLikeNone(x) {
|
|
123
163
|
return x === undefined || x === null;
|
|
124
164
|
}
|
|
125
|
-
|
|
126
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
127
|
-
ptr = ptr >>> 0;
|
|
128
|
-
const mem = getDataViewMemory0();
|
|
129
|
-
const result = [];
|
|
130
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
131
|
-
result.push(wasm.__wbindgen_export_0.get(mem.getUint32(i, true)));
|
|
132
|
-
}
|
|
133
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
134
|
-
return result;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Checks all locations of the input TA for reachability and returns all unreachable locations. The
|
|
138
|
-
* result will be empty if all locations are reachable.
|
|
139
|
-
*
|
|
140
|
-
* This function will throw an error if one or more validation checks fail. The following
|
|
141
|
-
* properties will be validated:
|
|
142
|
-
* <ul>
|
|
143
|
-
* <li>There exists exactly one initial location.</li>
|
|
144
|
-
* <li>The set of locations is non-empty.</li>
|
|
145
|
-
* <li>All invariants are downward-closed.</li>
|
|
146
|
-
* <li>The highest constant used in any clock constraint is not greater than the highest allowed
|
|
147
|
-
* value (536870909).</li>
|
|
148
|
-
* <li>All locations names are unique.</li>
|
|
149
|
-
* <li>All clock names are unique.</li>
|
|
150
|
-
* <li>All clocks used in clock constraints are also contained in the set of clocks.</li>
|
|
151
|
-
* <li>All location names used as source and target of switches are also contained in the set of
|
|
152
|
-
* locations.</li>
|
|
153
|
-
* </ul>
|
|
154
|
-
* @param {TimedAutomaton} ta
|
|
155
|
-
* @returns {string[]}
|
|
156
|
-
*/
|
|
157
|
-
export function findUnreachableLocations(ta) {
|
|
158
|
-
_assertClass(ta, TimedAutomaton);
|
|
159
|
-
var ptr0 = ta.__destroy_into_raw();
|
|
160
|
-
const ret = wasm.findUnreachableLocations(ptr0);
|
|
161
|
-
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
162
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
163
|
-
return v2;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
165
|
/**
|
|
167
166
|
* @enum {0 | 1 | 2 | 3}
|
|
168
167
|
*/
|
|
@@ -414,6 +413,10 @@ export class TimedAutomaton {
|
|
|
414
413
|
}
|
|
415
414
|
if (Symbol.dispose) TimedAutomaton.prototype[Symbol.dispose] = TimedAutomaton.prototype.free;
|
|
416
415
|
|
|
416
|
+
export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
|
|
417
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
418
|
+
};
|
|
419
|
+
|
|
417
420
|
export function __wbg_clause_unwrap(arg0) {
|
|
418
421
|
const ret = Clause.__unwrap(arg0);
|
|
419
422
|
return ret;
|
|
@@ -434,10 +437,6 @@ export function __wbg_switch_unwrap(arg0) {
|
|
|
434
437
|
return ret;
|
|
435
438
|
};
|
|
436
439
|
|
|
437
|
-
export function __wbg_wbindgenthrow_451ec1a8469d7eb6(arg0, arg1) {
|
|
438
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
439
|
-
};
|
|
440
|
-
|
|
441
440
|
export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
442
441
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
443
442
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -445,7 +444,7 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
|
445
444
|
};
|
|
446
445
|
|
|
447
446
|
export function __wbindgen_init_externref_table() {
|
|
448
|
-
const table = wasm.
|
|
447
|
+
const table = wasm.__wbindgen_externrefs;
|
|
449
448
|
const offset = table.grow(4);
|
|
450
449
|
table.set(0, undefined);
|
|
451
450
|
table.set(offset + 0, undefined);
|
|
Binary file
|