libpetri 0.5.4 → 1.0.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/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/verification/index.d.ts +200 -6
- package/dist/verification/index.js +902 -2
- package/dist/verification/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1172,7 +1172,7 @@ function produceTimeoutOutput(context, timeoutChild) {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
|
|
1174
1174
|
// src/runtime/bitmap-net-executor.ts
|
|
1175
|
-
var DEADLINE_TOLERANCE_MS =
|
|
1175
|
+
var DEADLINE_TOLERANCE_MS = 5;
|
|
1176
1176
|
var BitmapNetExecutor = class {
|
|
1177
1177
|
compiled;
|
|
1178
1178
|
marking;
|
|
@@ -1294,9 +1294,10 @@ var BitmapNetExecutor = class {
|
|
|
1294
1294
|
this.processCompletedTransitions();
|
|
1295
1295
|
this.processExternalEvents();
|
|
1296
1296
|
this.updateDirtyTransitions();
|
|
1297
|
-
|
|
1297
|
+
const cycleNowMs = performance.now();
|
|
1298
|
+
if (this.hasAnyDeadlines) this.enforceDeadlines(cycleNowMs);
|
|
1298
1299
|
if (this.shouldTerminate()) break;
|
|
1299
|
-
this.fireReadyTransitions();
|
|
1300
|
+
this.fireReadyTransitions(cycleNowMs);
|
|
1300
1301
|
if (this.hasDirtyBits()) continue;
|
|
1301
1302
|
await this.awaitWork();
|
|
1302
1303
|
}
|
|
@@ -1468,12 +1469,12 @@ var BitmapNetExecutor = class {
|
|
|
1468
1469
|
return false;
|
|
1469
1470
|
}
|
|
1470
1471
|
// ======================== Firing ========================
|
|
1471
|
-
fireReadyTransitions() {
|
|
1472
|
+
fireReadyTransitions(nowMs) {
|
|
1472
1473
|
if (this.allImmediate && this.allSamePriority) {
|
|
1473
1474
|
this.fireReadyImmediate();
|
|
1474
1475
|
return;
|
|
1475
1476
|
}
|
|
1476
|
-
this.fireReadyGeneral();
|
|
1477
|
+
this.fireReadyGeneral(nowMs);
|
|
1477
1478
|
}
|
|
1478
1479
|
/**
|
|
1479
1480
|
* Fast path for nets where all transitions are immediate and same priority.
|
|
@@ -1496,8 +1497,7 @@ var BitmapNetExecutor = class {
|
|
|
1496
1497
|
}
|
|
1497
1498
|
}
|
|
1498
1499
|
}
|
|
1499
|
-
fireReadyGeneral() {
|
|
1500
|
-
const nowMs = performance.now();
|
|
1500
|
+
fireReadyGeneral(nowMs) {
|
|
1501
1501
|
const ready = this.readyBuffer;
|
|
1502
1502
|
ready.length = 0;
|
|
1503
1503
|
for (let tid = 0; tid < this.compiled.transitionCount; tid++) {
|