timed-automata-analyzer 0.9.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Luthium
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # Analyzer for Timed Automata
2
+
3
+ This project provides an analyzer for Timed Automata.
4
+ The analyzer is written in Rust and compiled to WebAssembly to offer a fast and efficient tool to implement analyses for websites.
5
+ Currently, the analyzer offers functionality to find unreachable locations in a given TA.
6
+
7
+ ## Getting Started
8
+
9
+ To use the tool in your JavaScript/TypeScript project, simply install the package `timed-automata-analyzer` with your favorite package manager.
10
+ Then map your Timed Automata into the TA model provided by the analyzer.
11
+ When this is done, you can find unreachable locations by using the function `findUnreachableLocations(ta)`.
12
+ The function returns an array of strings containing the names of all unreachable locations.
13
+ If all locations are reachable, the array is empty.
14
+
15
+ Note that the analyzer validates the input TA before starting the analysis.
16
+ In case of any validation issues (e.g., missing initial location), `findUnreachableLocations(ta)` throws an error.
17
+
18
+ ## Developing the Tool
19
+
20
+ In case you want to contribute to the tool or fork the repository, only few steps are necessary:
21
+ - As a first step, you need to install Rust.
22
+ See the [Rust website](https://www.rust-lang.org/tools/install) for information on how to do this.
23
+ - Additionally, you need to install _wasm-pack_ with `cargo install wasm-pack` for WebAssembly outputs.
24
+ - The WebAssembly binary (including glue code for JavaScript/TypeScript and an NPM package) is generated by running `wasm-pack build --target bundler`.
25
+ - This project includes an extensive test suite. Tests can be run with `cargo test`.
26
+ - For linting, this project uses the built-in linter of Rust as well as [Clippy](https://github.com/rust-lang/rust-clippy).
27
+ To run the linters, execute `cargo check` and `cargo clippy`, respectively.
28
+ - For further information on compiling Rust to WebAssembly, see the [MDN Web Docs](https://developer.mozilla.org/en-US/docs/WebAssembly/Rust_to_Wasm).
29
+
30
+ ## Additional Information
31
+
32
+ - Most of the algorithms for checking reachability are based on the paper [Timed Automata: Semantics, Algorithms and Tools](https://doi.org/10.1007/978-3-540-27755-2_3).
33
+ - In case you want to see the analyzer in action, I built a React app for modeling and analyzing Timed Automata.
34
+ The React app is available [here](https://luth1um.github.io/timed-automata-analysis/), while the repository for the React app is available [here](https://github.com/luth1um/timed-automata-analysis).
35
+ - An introduction to Timed Automata can be found in [Wikipedia](https://en.wikipedia.org/wiki/Timed_automaton).
36
+ - The original paper on Timed Automata is [Automata for modeling real-time systems](https://doi.org/10.1007/BFb0032042) by Alur and Dill.
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "timed-automata-analyzer",
3
+ "type": "module",
4
+ "collaborators": [
5
+ "luth1um"
6
+ ],
7
+ "description": "An analyzer for Timed Automata written in Rust",
8
+ "version": "0.9.0",
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/luth1um/ta-analyzer"
13
+ },
14
+ "files": [
15
+ "timed_automata_analyzer_bg.wasm",
16
+ "timed_automata_analyzer.js",
17
+ "timed_automata_analyzer_bg.js",
18
+ "timed_automata_analyzer.d.ts"
19
+ ],
20
+ "main": "timed_automata_analyzer.js",
21
+ "types": "timed_automata_analyzer.d.ts",
22
+ "sideEffects": [
23
+ "./timed_automata_analyzer.js",
24
+ "./snippets/*"
25
+ ]
26
+ }
@@ -0,0 +1,79 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * @param {TimedAutomaton} ta
5
+ * @returns {(string)[]}
6
+ */
7
+ export function findUnreachableLocations(ta: TimedAutomaton): (string)[];
8
+ /**
9
+ */
10
+ export enum ClockComparator {
11
+ LESSER = 0,
12
+ LEQ = 1,
13
+ GEQ = 2,
14
+ GREATER = 3,
15
+ }
16
+ /**
17
+ */
18
+ export class Clause {
19
+ free(): void;
20
+ /**
21
+ * @param {Clock} lhs
22
+ * @param {ClockComparator} op
23
+ * @param {number} rhs
24
+ */
25
+ constructor(lhs: Clock, op: ClockComparator, rhs: number);
26
+ }
27
+ /**
28
+ */
29
+ export class Clock {
30
+ free(): void;
31
+ /**
32
+ * @param {string} name
33
+ */
34
+ constructor(name: string);
35
+ }
36
+ /**
37
+ */
38
+ export class ClockConstraint {
39
+ free(): void;
40
+ /**
41
+ * @param {(Clause)[]} clauses
42
+ */
43
+ constructor(clauses: (Clause)[]);
44
+ }
45
+ /**
46
+ */
47
+ export class Location {
48
+ free(): void;
49
+ /**
50
+ * @param {string} name
51
+ * @param {boolean} is_initial
52
+ * @param {ClockConstraint | undefined} [invariant]
53
+ */
54
+ constructor(name: string, is_initial: boolean, invariant?: ClockConstraint);
55
+ }
56
+ /**
57
+ */
58
+ export class Switch {
59
+ free(): void;
60
+ /**
61
+ * @param {Location} source
62
+ * @param {ClockConstraint | undefined} guard
63
+ * @param {string} action
64
+ * @param {(Clock)[]} reset
65
+ * @param {Location} target
66
+ */
67
+ constructor(source: Location, guard: ClockConstraint | undefined, action: string, reset: (Clock)[], target: Location);
68
+ }
69
+ /**
70
+ */
71
+ export class TimedAutomaton {
72
+ free(): void;
73
+ /**
74
+ * @param {(Location)[]} locations
75
+ * @param {(Clock)[]} clocks
76
+ * @param {(Switch)[]} switches
77
+ */
78
+ constructor(locations: (Location)[], clocks: (Clock)[], switches: (Switch)[]);
79
+ }
@@ -0,0 +1,5 @@
1
+
2
+ import * as wasm from "./timed_automata_analyzer_bg.wasm";
3
+ import { __wbg_set_wasm } from "./timed_automata_analyzer_bg.js";
4
+ __wbg_set_wasm(wasm);
5
+ export * from "./timed_automata_analyzer_bg.js";
@@ -0,0 +1,450 @@
1
+ let wasm;
2
+ export function __wbg_set_wasm(val) {
3
+ wasm = val;
4
+ }
5
+
6
+
7
+ const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
8
+
9
+ let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
10
+
11
+ cachedTextDecoder.decode();
12
+
13
+ let cachedUint8ArrayMemory0 = null;
14
+
15
+ function getUint8ArrayMemory0() {
16
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
17
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
18
+ }
19
+ return cachedUint8ArrayMemory0;
20
+ }
21
+
22
+ function getStringFromWasm0(ptr, len) {
23
+ ptr = ptr >>> 0;
24
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
25
+ }
26
+
27
+ const heap = new Array(128).fill(undefined);
28
+
29
+ heap.push(undefined, null, true, false);
30
+
31
+ let heap_next = heap.length;
32
+
33
+ function addHeapObject(obj) {
34
+ if (heap_next === heap.length) heap.push(heap.length + 1);
35
+ const idx = heap_next;
36
+ heap_next = heap[idx];
37
+
38
+ heap[idx] = obj;
39
+ return idx;
40
+ }
41
+
42
+ function getObject(idx) { return heap[idx]; }
43
+
44
+ function dropObject(idx) {
45
+ if (idx < 132) return;
46
+ heap[idx] = heap_next;
47
+ heap_next = idx;
48
+ }
49
+
50
+ function takeObject(idx) {
51
+ const ret = getObject(idx);
52
+ dropObject(idx);
53
+ return ret;
54
+ }
55
+
56
+ let WASM_VECTOR_LEN = 0;
57
+
58
+ const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
59
+
60
+ let cachedTextEncoder = new lTextEncoder('utf-8');
61
+
62
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
63
+ ? function (arg, view) {
64
+ return cachedTextEncoder.encodeInto(arg, view);
65
+ }
66
+ : function (arg, view) {
67
+ const buf = cachedTextEncoder.encode(arg);
68
+ view.set(buf);
69
+ return {
70
+ read: arg.length,
71
+ written: buf.length
72
+ };
73
+ });
74
+
75
+ function passStringToWasm0(arg, malloc, realloc) {
76
+
77
+ if (realloc === undefined) {
78
+ const buf = cachedTextEncoder.encode(arg);
79
+ const ptr = malloc(buf.length, 1) >>> 0;
80
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
81
+ WASM_VECTOR_LEN = buf.length;
82
+ return ptr;
83
+ }
84
+
85
+ let len = arg.length;
86
+ let ptr = malloc(len, 1) >>> 0;
87
+
88
+ const mem = getUint8ArrayMemory0();
89
+
90
+ let offset = 0;
91
+
92
+ for (; offset < len; offset++) {
93
+ const code = arg.charCodeAt(offset);
94
+ if (code > 0x7F) break;
95
+ mem[ptr + offset] = code;
96
+ }
97
+
98
+ if (offset !== len) {
99
+ if (offset !== 0) {
100
+ arg = arg.slice(offset);
101
+ }
102
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
103
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
104
+ const ret = encodeString(arg, view);
105
+
106
+ offset += ret.written;
107
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
108
+ }
109
+
110
+ WASM_VECTOR_LEN = offset;
111
+ return ptr;
112
+ }
113
+
114
+ function _assertClass(instance, klass) {
115
+ if (!(instance instanceof klass)) {
116
+ throw new Error(`expected instance of ${klass.name}`);
117
+ }
118
+ return instance.ptr;
119
+ }
120
+
121
+ let cachedDataViewMemory0 = null;
122
+
123
+ function getDataViewMemory0() {
124
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
125
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
126
+ }
127
+ return cachedDataViewMemory0;
128
+ }
129
+
130
+ function passArrayJsValueToWasm0(array, malloc) {
131
+ const ptr = malloc(array.length * 4, 4) >>> 0;
132
+ const mem = getDataViewMemory0();
133
+ for (let i = 0; i < array.length; i++) {
134
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
135
+ }
136
+ WASM_VECTOR_LEN = array.length;
137
+ return ptr;
138
+ }
139
+
140
+ function isLikeNone(x) {
141
+ return x === undefined || x === null;
142
+ }
143
+
144
+ function getArrayJsValueFromWasm0(ptr, len) {
145
+ ptr = ptr >>> 0;
146
+ const mem = getDataViewMemory0();
147
+ const result = [];
148
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
149
+ result.push(takeObject(mem.getUint32(i, true)));
150
+ }
151
+ return result;
152
+ }
153
+ /**
154
+ * @param {TimedAutomaton} ta
155
+ * @returns {(string)[]}
156
+ */
157
+ export function findUnreachableLocations(ta) {
158
+ try {
159
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
160
+ _assertClass(ta, TimedAutomaton);
161
+ var ptr0 = ta.__destroy_into_raw();
162
+ wasm.findUnreachableLocations(retptr, ptr0);
163
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
164
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
165
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
166
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
167
+ return v2;
168
+ } finally {
169
+ wasm.__wbindgen_add_to_stack_pointer(16);
170
+ }
171
+ }
172
+
173
+ /**
174
+ */
175
+ export const ClockComparator = Object.freeze({ LESSER:0,"0":"LESSER",LEQ:1,"1":"LEQ",GEQ:2,"2":"GEQ",GREATER:3,"3":"GREATER", });
176
+
177
+ const ClauseFinalization = (typeof FinalizationRegistry === 'undefined')
178
+ ? { register: () => {}, unregister: () => {} }
179
+ : new FinalizationRegistry(ptr => wasm.__wbg_clause_free(ptr >>> 0, 1));
180
+ /**
181
+ */
182
+ export class Clause {
183
+
184
+ static __unwrap(jsValue) {
185
+ if (!(jsValue instanceof Clause)) {
186
+ return 0;
187
+ }
188
+ return jsValue.__destroy_into_raw();
189
+ }
190
+
191
+ __destroy_into_raw() {
192
+ const ptr = this.__wbg_ptr;
193
+ this.__wbg_ptr = 0;
194
+ ClauseFinalization.unregister(this);
195
+ return ptr;
196
+ }
197
+
198
+ free() {
199
+ const ptr = this.__destroy_into_raw();
200
+ wasm.__wbg_clause_free(ptr, 0);
201
+ }
202
+ /**
203
+ * @param {Clock} lhs
204
+ * @param {ClockComparator} op
205
+ * @param {number} rhs
206
+ */
207
+ constructor(lhs, op, rhs) {
208
+ _assertClass(lhs, Clock);
209
+ const ret = wasm.clause_new(lhs.__wbg_ptr, op, rhs);
210
+ this.__wbg_ptr = ret >>> 0;
211
+ ClauseFinalization.register(this, this.__wbg_ptr, this);
212
+ return this;
213
+ }
214
+ }
215
+
216
+ const ClockFinalization = (typeof FinalizationRegistry === 'undefined')
217
+ ? { register: () => {}, unregister: () => {} }
218
+ : new FinalizationRegistry(ptr => wasm.__wbg_clock_free(ptr >>> 0, 1));
219
+ /**
220
+ */
221
+ export class Clock {
222
+
223
+ static __unwrap(jsValue) {
224
+ if (!(jsValue instanceof Clock)) {
225
+ return 0;
226
+ }
227
+ return jsValue.__destroy_into_raw();
228
+ }
229
+
230
+ __destroy_into_raw() {
231
+ const ptr = this.__wbg_ptr;
232
+ this.__wbg_ptr = 0;
233
+ ClockFinalization.unregister(this);
234
+ return ptr;
235
+ }
236
+
237
+ free() {
238
+ const ptr = this.__destroy_into_raw();
239
+ wasm.__wbg_clock_free(ptr, 0);
240
+ }
241
+ /**
242
+ * @param {string} name
243
+ */
244
+ constructor(name) {
245
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
246
+ const len0 = WASM_VECTOR_LEN;
247
+ const ret = wasm.clock_new(ptr0, len0);
248
+ this.__wbg_ptr = ret >>> 0;
249
+ ClockFinalization.register(this, this.__wbg_ptr, this);
250
+ return this;
251
+ }
252
+ }
253
+
254
+ const ClockConstraintFinalization = (typeof FinalizationRegistry === 'undefined')
255
+ ? { register: () => {}, unregister: () => {} }
256
+ : new FinalizationRegistry(ptr => wasm.__wbg_clockconstraint_free(ptr >>> 0, 1));
257
+ /**
258
+ */
259
+ export class ClockConstraint {
260
+
261
+ __destroy_into_raw() {
262
+ const ptr = this.__wbg_ptr;
263
+ this.__wbg_ptr = 0;
264
+ ClockConstraintFinalization.unregister(this);
265
+ return ptr;
266
+ }
267
+
268
+ free() {
269
+ const ptr = this.__destroy_into_raw();
270
+ wasm.__wbg_clockconstraint_free(ptr, 0);
271
+ }
272
+ /**
273
+ * @param {(Clause)[]} clauses
274
+ */
275
+ constructor(clauses) {
276
+ const ptr0 = passArrayJsValueToWasm0(clauses, wasm.__wbindgen_malloc);
277
+ const len0 = WASM_VECTOR_LEN;
278
+ const ret = wasm.clockconstraint_new(ptr0, len0);
279
+ this.__wbg_ptr = ret >>> 0;
280
+ ClockConstraintFinalization.register(this, this.__wbg_ptr, this);
281
+ return this;
282
+ }
283
+ }
284
+
285
+ const LocationFinalization = (typeof FinalizationRegistry === 'undefined')
286
+ ? { register: () => {}, unregister: () => {} }
287
+ : new FinalizationRegistry(ptr => wasm.__wbg_location_free(ptr >>> 0, 1));
288
+ /**
289
+ */
290
+ export class Location {
291
+
292
+ static __unwrap(jsValue) {
293
+ if (!(jsValue instanceof Location)) {
294
+ return 0;
295
+ }
296
+ return jsValue.__destroy_into_raw();
297
+ }
298
+
299
+ __destroy_into_raw() {
300
+ const ptr = this.__wbg_ptr;
301
+ this.__wbg_ptr = 0;
302
+ LocationFinalization.unregister(this);
303
+ return ptr;
304
+ }
305
+
306
+ free() {
307
+ const ptr = this.__destroy_into_raw();
308
+ wasm.__wbg_location_free(ptr, 0);
309
+ }
310
+ /**
311
+ * @param {string} name
312
+ * @param {boolean} is_initial
313
+ * @param {ClockConstraint | undefined} [invariant]
314
+ */
315
+ constructor(name, is_initial, invariant) {
316
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
317
+ const len0 = WASM_VECTOR_LEN;
318
+ let ptr1 = 0;
319
+ if (!isLikeNone(invariant)) {
320
+ _assertClass(invariant, ClockConstraint);
321
+ ptr1 = invariant.__destroy_into_raw();
322
+ }
323
+ const ret = wasm.location_new(ptr0, len0, is_initial, ptr1);
324
+ this.__wbg_ptr = ret >>> 0;
325
+ LocationFinalization.register(this, this.__wbg_ptr, this);
326
+ return this;
327
+ }
328
+ }
329
+
330
+ const SwitchFinalization = (typeof FinalizationRegistry === 'undefined')
331
+ ? { register: () => {}, unregister: () => {} }
332
+ : new FinalizationRegistry(ptr => wasm.__wbg_switch_free(ptr >>> 0, 1));
333
+ /**
334
+ */
335
+ export class Switch {
336
+
337
+ static __unwrap(jsValue) {
338
+ if (!(jsValue instanceof Switch)) {
339
+ return 0;
340
+ }
341
+ return jsValue.__destroy_into_raw();
342
+ }
343
+
344
+ __destroy_into_raw() {
345
+ const ptr = this.__wbg_ptr;
346
+ this.__wbg_ptr = 0;
347
+ SwitchFinalization.unregister(this);
348
+ return ptr;
349
+ }
350
+
351
+ free() {
352
+ const ptr = this.__destroy_into_raw();
353
+ wasm.__wbg_switch_free(ptr, 0);
354
+ }
355
+ /**
356
+ * @param {Location} source
357
+ * @param {ClockConstraint | undefined} guard
358
+ * @param {string} action
359
+ * @param {(Clock)[]} reset
360
+ * @param {Location} target
361
+ */
362
+ constructor(source, guard, action, reset, target) {
363
+ _assertClass(source, Location);
364
+ let ptr0 = 0;
365
+ if (!isLikeNone(guard)) {
366
+ _assertClass(guard, ClockConstraint);
367
+ ptr0 = guard.__destroy_into_raw();
368
+ }
369
+ const ptr1 = passStringToWasm0(action, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
370
+ const len1 = WASM_VECTOR_LEN;
371
+ const ptr2 = passArrayJsValueToWasm0(reset, wasm.__wbindgen_malloc);
372
+ const len2 = WASM_VECTOR_LEN;
373
+ _assertClass(target, Location);
374
+ const ret = wasm.switch_new(source.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, target.__wbg_ptr);
375
+ this.__wbg_ptr = ret >>> 0;
376
+ SwitchFinalization.register(this, this.__wbg_ptr, this);
377
+ return this;
378
+ }
379
+ }
380
+
381
+ const TimedAutomatonFinalization = (typeof FinalizationRegistry === 'undefined')
382
+ ? { register: () => {}, unregister: () => {} }
383
+ : new FinalizationRegistry(ptr => wasm.__wbg_timedautomaton_free(ptr >>> 0, 1));
384
+ /**
385
+ */
386
+ export class TimedAutomaton {
387
+
388
+ __destroy_into_raw() {
389
+ const ptr = this.__wbg_ptr;
390
+ this.__wbg_ptr = 0;
391
+ TimedAutomatonFinalization.unregister(this);
392
+ return ptr;
393
+ }
394
+
395
+ free() {
396
+ const ptr = this.__destroy_into_raw();
397
+ wasm.__wbg_timedautomaton_free(ptr, 0);
398
+ }
399
+ /**
400
+ * @param {(Location)[]} locations
401
+ * @param {(Clock)[]} clocks
402
+ * @param {(Switch)[]} switches
403
+ */
404
+ constructor(locations, clocks, switches) {
405
+ const ptr0 = passArrayJsValueToWasm0(locations, wasm.__wbindgen_malloc);
406
+ const len0 = WASM_VECTOR_LEN;
407
+ const ptr1 = passArrayJsValueToWasm0(clocks, wasm.__wbindgen_malloc);
408
+ const len1 = WASM_VECTOR_LEN;
409
+ const ptr2 = passArrayJsValueToWasm0(switches, wasm.__wbindgen_malloc);
410
+ const len2 = WASM_VECTOR_LEN;
411
+ const ret = wasm.timedautomaton_new(ptr0, len0, ptr1, len1, ptr2, len2);
412
+ this.__wbg_ptr = ret >>> 0;
413
+ TimedAutomatonFinalization.register(this, this.__wbg_ptr, this);
414
+ return this;
415
+ }
416
+ }
417
+
418
+ export function __wbg_clock_unwrap(arg0) {
419
+ const ret = Clock.__unwrap(takeObject(arg0));
420
+ return ret;
421
+ };
422
+
423
+ export function __wbg_clause_unwrap(arg0) {
424
+ const ret = Clause.__unwrap(takeObject(arg0));
425
+ return ret;
426
+ };
427
+
428
+ export function __wbg_location_unwrap(arg0) {
429
+ const ret = Location.__unwrap(takeObject(arg0));
430
+ return ret;
431
+ };
432
+
433
+ export function __wbg_switch_unwrap(arg0) {
434
+ const ret = Switch.__unwrap(takeObject(arg0));
435
+ return ret;
436
+ };
437
+
438
+ export function __wbindgen_string_new(arg0, arg1) {
439
+ const ret = getStringFromWasm0(arg0, arg1);
440
+ return addHeapObject(ret);
441
+ };
442
+
443
+ export function __wbindgen_object_drop_ref(arg0) {
444
+ takeObject(arg0);
445
+ };
446
+
447
+ export function __wbindgen_throw(arg0, arg1) {
448
+ throw new Error(getStringFromWasm0(arg0, arg1));
449
+ };
450
+
Binary file