libpetri 3.0.1 → 4.1.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/README.md +5 -1
- package/dist/{chunk-JZIEWVAV.js → chunk-FD3S4TZM.js} +1330 -1077
- package/dist/chunk-FD3S4TZM.js.map +1 -0
- package/dist/{chunk-6NH64RCU.js → chunk-GJAHGHGT.js} +2 -2
- package/dist/debug/index.d.ts +2 -2
- package/dist/doclet/index.d.ts +1 -1
- package/dist/doclet/resources/petrinet-diagrams.js +6364 -6360
- package/dist/{event-store-BFX_yJ8I.d.ts → event-store-B3ppVTpO.d.ts} +1 -1
- package/dist/export/index.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/{petri-net-WSScMyDL.d.ts → petri-net-p0ONpSAO.d.ts} +32 -2
- package/dist/render-dom/index.js +1 -1
- package/dist/verification/index.d.ts +307 -214
- package/dist/verification/index.js +39 -7
- package/dist/verification/index.js.map +1 -1
- package/dist/viewer/index.js +1 -1
- package/dist/viewer/viewer.iife.js +6364 -6360
- package/package.json +4 -7
- package/dist/chunk-JZIEWVAV.js.map +0 -1
- /package/dist/{chunk-6NH64RCU.js.map → chunk-GJAHGHGT.js.map} +0 -0
package/dist/export/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as PetriNet, S as SubnetDef, a as Place, T as Token, b as Transition, E as EnvironmentPlace, c as TransitionContext, O as Out } from './petri-net-
|
|
2
|
-
export { A as Arc, d as ArcInhibitor, e as ArcInput, f as ArcOutput, g as ArcRead, h as ArcReset, C as Channel, i as ComposeBindings, F as FusionSet, j as FusionSetBuilder, I as In, k as InAll, l as InAtLeast, m as InExactly, n as InOne, o as Instance, p as Interface, q as InterfaceBuilder, K as KeyFn, L as LogFn, M as MAX_DURATION_MS, r as MatchKey, s as MatchSpec, N as NameId, t as OutAnd, u as OutForwardInput, v as OutPlace, w as OutTimeout, x as OutXor, y as OutputEntry, z as PetriNetBuilder, B as Port, D as PortDirection, G as SubnetDefBuilder, H as SubnetInstance, J as Timing, Q as TimingDeadline, R as TimingDelayed, U as TimingExact, V as TimingImmediate, W as TimingWindow, X as TokenInput, Y as TokenOutput, Z as TransitionAction, _ as TransitionBuilder, $ as VerificationHarness, a0 as VerificationResult, a1 as all, a2 as allPlaces, a3 as and, a4 as andPlaces, a5 as arcPlace, a6 as atLeast, a7 as consumptionCount, a8 as deadline, a9 as delayed, aa as earliest, ab as enumerateBranches, ac as environmentPlace, ad as exact, ae as exactly, af as fork, ag as forwardInput, ah as hasDeadline, ai as immediate, aj as inhibitorArc, ak as inputArc, al as isPassthrough, am as isUnit, an as keyForPlace, ao as latest, ap as matchCorrelates, aq as matchKey, ar as matchSpec, as as nameId, at as one, au as outPlace, av as outputArc, aw as passthrough, ax as place, ay as produce, az as readArc, aA as requiredCount, aB as resetArc, aC as timeout, aD as timeoutPlace, aE as tokenAt, aF as tokenOf, aG as transform, aH as transformAsync, aI as transformFrom, aJ as unitToken, aK as window, aL as withTimeout, aM as xor, aN as xorPlaces } from './petri-net-
|
|
3
|
-
import { E as EventStore } from './event-store-
|
|
4
|
-
export { A as ActionTimedOut, a as ExecutionCompleted, b as ExecutionStarted, I as InMemoryEventStore, L as LogMessage, M as MarkingSnapshot, N as NetEvent, T as TokenAdded, c as TokenRemoved, d as TransitionClockRestarted, e as TransitionCompleted, f as TransitionEnabled, g as TransitionFailed, h as TransitionStarted, i as TransitionTimedOut, j as eventTransitionName, k as eventsOfType, l as failures, m as filterEvents, n as inMemoryEventStore, o as isFailureEvent, p as noopEventStore, t as transitionEvents } from './event-store-
|
|
1
|
+
import { P as PetriNet, S as SubnetDef, a as Place, T as Token, b as Transition, E as EnvironmentPlace, c as TransitionContext, O as Out } from './petri-net-p0ONpSAO.js';
|
|
2
|
+
export { A as Arc, d as ArcInhibitor, e as ArcInput, f as ArcOutput, g as ArcRead, h as ArcReset, C as Channel, i as ComposeBindings, F as FusionSet, j as FusionSetBuilder, I as In, k as InAll, l as InAtLeast, m as InExactly, n as InOne, o as Instance, p as Interface, q as InterfaceBuilder, K as KeyFn, L as LogFn, M as MAX_DURATION_MS, r as MatchKey, s as MatchSpec, N as NameId, t as OutAnd, u as OutForwardInput, v as OutPlace, w as OutTimeout, x as OutXor, y as OutputEntry, z as PetriNetBuilder, B as Port, D as PortDirection, G as SubnetDefBuilder, H as SubnetInstance, J as Timing, Q as TimingDeadline, R as TimingDelayed, U as TimingExact, V as TimingImmediate, W as TimingWindow, X as TokenInput, Y as TokenOutput, Z as TransitionAction, _ as TransitionBuilder, $ as VerificationHarness, a0 as VerificationResult, a1 as all, a2 as allPlaces, a3 as and, a4 as andPlaces, a5 as arcPlace, a6 as atLeast, a7 as consumptionCount, a8 as deadline, a9 as delayed, aa as earliest, ab as enumerateBranches, ac as environmentPlace, ad as exact, ae as exactly, af as fork, ag as forwardInput, ah as hasDeadline, ai as immediate, aj as inhibitorArc, ak as inputArc, al as isPassthrough, am as isUnit, an as keyForPlace, ao as latest, ap as matchCorrelates, aq as matchKey, ar as matchSpec, as as nameId, at as one, au as outPlace, av as outputArc, aw as passthrough, ax as place, ay as produce, az as readArc, aA as requiredCount, aB as resetArc, aC as timeout, aD as timeoutPlace, aE as tokenAt, aF as tokenOf, aG as transform, aH as transformAsync, aI as transformFrom, aJ as unitToken, aK as window, aL as withTimeout, aM as xor, aN as xorPlaces } from './petri-net-p0ONpSAO.js';
|
|
3
|
+
import { E as EventStore } from './event-store-B3ppVTpO.js';
|
|
4
|
+
export { A as ActionTimedOut, a as ExecutionCompleted, b as ExecutionStarted, I as InMemoryEventStore, L as LogMessage, M as MarkingSnapshot, N as NetEvent, T as TokenAdded, c as TokenRemoved, d as TransitionClockRestarted, e as TransitionCompleted, f as TransitionEnabled, g as TransitionFailed, h as TransitionStarted, i as TransitionTimedOut, j as eventTransitionName, k as eventsOfType, l as failures, m as filterEvents, n as inMemoryEventStore, o as isFailureEvent, p as noopEventStore, t as transitionEvents } from './event-store-B3ppVTpO.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Discriminated sum-type abstraction over Petri nets, distinguishing **closed**
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
SmtVerifier,
|
|
3
3
|
all,
|
|
4
4
|
allPlaces,
|
|
5
|
+
alwaysAvailable,
|
|
5
6
|
and,
|
|
6
7
|
andPlaces,
|
|
7
8
|
atLeast,
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
withTimeout,
|
|
28
29
|
xor,
|
|
29
30
|
xorPlaces
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-FD3S4TZM.js";
|
|
31
32
|
import {
|
|
32
33
|
eventTransitionName,
|
|
33
34
|
isFailureEvent
|
|
@@ -1488,7 +1489,7 @@ var SubnetDef = class _SubnetDef {
|
|
|
1488
1489
|
* {@link SmtVerificationResult}s
|
|
1489
1490
|
* @throws when an input or in-out port is missing a harness generator
|
|
1490
1491
|
*/
|
|
1491
|
-
async verify(harness) {
|
|
1492
|
+
async verify(harness, environmentMode = alwaysAvailable()) {
|
|
1492
1493
|
if (harness === null || harness === void 0) {
|
|
1493
1494
|
throw new Error("SubnetDef.verify: harness must not be null/undefined");
|
|
1494
1495
|
}
|
|
@@ -1550,6 +1551,7 @@ var SubnetDef = class _SubnetDef {
|
|
|
1550
1551
|
const verifier = SmtVerifier.forNet(syntheticNet).property(property);
|
|
1551
1552
|
if (envPlaces.length > 0) {
|
|
1552
1553
|
verifier.environmentPlaces(...envPlaces);
|
|
1554
|
+
verifier.environmentMode(environmentMode);
|
|
1553
1555
|
}
|
|
1554
1556
|
const result = await verifier.verify();
|
|
1555
1557
|
perProperty.set(property, result);
|
|
@@ -2921,6 +2923,7 @@ var IncrementalMatcher = class {
|
|
|
2921
2923
|
this.requireds = requireds;
|
|
2922
2924
|
this.ts = requireds.map(() => /* @__PURE__ */ new Map());
|
|
2923
2925
|
}
|
|
2926
|
+
requireds;
|
|
2924
2927
|
ts;
|
|
2925
2928
|
/** Monotonic fast path: ascending `(rep_ts, name)`; `fifo[fifoHead]` (after
|
|
2926
2929
|
* `cleanTop`) is the min. Active while `!heaped`. Advance `fifoHead` instead of
|
|
@@ -3960,10 +3963,11 @@ var BitmapNetExecutor = class {
|
|
|
3960
3963
|
promises.push(Promise.race(arr));
|
|
3961
3964
|
}
|
|
3962
3965
|
if (!this.closed) {
|
|
3966
|
+
const timerMs = this.millisUntilNextTimedTransition();
|
|
3967
|
+
if (timerMs === 0 && promises.length === 0) return;
|
|
3963
3968
|
promises.push(new Promise((resolve2) => {
|
|
3964
3969
|
this.wakeUpResolve = resolve2;
|
|
3965
3970
|
}));
|
|
3966
|
-
const timerMs = this.millisUntilNextTimedTransition();
|
|
3967
3971
|
if (timerMs > 0 && timerMs < Infinity) {
|
|
3968
3972
|
promises.push(new Promise((r) => setTimeout(r, timerMs)));
|
|
3969
3973
|
}
|
|
@@ -5462,10 +5466,11 @@ var PrecompiledNetExecutor = class {
|
|
|
5462
5466
|
}
|
|
5463
5467
|
}
|
|
5464
5468
|
if (!this.closed) {
|
|
5469
|
+
const timerMs = this.millisUntilNextTimedTransition();
|
|
5470
|
+
if (timerMs === 0 && promises.length === 0) return;
|
|
5465
5471
|
promises.push(new Promise((resolve2) => {
|
|
5466
5472
|
this.wakeUpResolve = resolve2;
|
|
5467
5473
|
}));
|
|
5468
|
-
const timerMs = this.millisUntilNextTimedTransition();
|
|
5469
5474
|
if (timerMs > 0 && timerMs < Infinity) {
|
|
5470
5475
|
promises.push(new Promise((r) => setTimeout(r, timerMs)));
|
|
5471
5476
|
}
|