libpetri 3.0.1 → 4.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.
@@ -1,4 +1,4 @@
1
- import { T as Token } from './petri-net-WSScMyDL.js';
1
+ import { T as Token } from './petri-net-hduM6tJf.js';
2
2
 
3
3
  /**
4
4
  * Events emitted during Petri Net execution.
@@ -1,4 +1,4 @@
1
- import { P as PetriNet } from '../petri-net-WSScMyDL.js';
1
+ import { P as PetriNet } from '../petri-net-hduM6tJf.js';
2
2
 
3
3
  /**
4
4
  * Format-agnostic typed graph model.
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-WSScMyDL.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-WSScMyDL.js';
3
- import { E as EventStore } from './event-store-BFX_yJ8I.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-BFX_yJ8I.js';
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-hduM6tJf.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-hduM6tJf.js';
3
+ import { E as EventStore } from './event-store-2FOAeUyh.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-2FOAeUyh.js';
5
5
 
6
6
  /**
7
7
  * Discriminated sum-type abstraction over Petri nets, distinguishing **closed**
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  withTimeout,
28
28
  xor,
29
29
  xorPlaces
30
- } from "./chunk-JZIEWVAV.js";
30
+ } from "./chunk-WYCGGQAW.js";
31
31
  import {
32
32
  eventTransitionName,
33
33
  isFailureEvent
@@ -2921,6 +2921,7 @@ var IncrementalMatcher = class {
2921
2921
  this.requireds = requireds;
2922
2922
  this.ts = requireds.map(() => /* @__PURE__ */ new Map());
2923
2923
  }
2924
+ requireds;
2924
2925
  ts;
2925
2926
  /** Monotonic fast path: ascending `(rep_ts, name)`; `fifo[fifoHead]` (after
2926
2927
  * `cleanTop`) is the min. Active while `!heaped`. Advance `fifoHead` instead of
@@ -3960,10 +3961,11 @@ var BitmapNetExecutor = class {
3960
3961
  promises.push(Promise.race(arr));
3961
3962
  }
3962
3963
  if (!this.closed) {
3964
+ const timerMs = this.millisUntilNextTimedTransition();
3965
+ if (timerMs === 0 && promises.length === 0) return;
3963
3966
  promises.push(new Promise((resolve2) => {
3964
3967
  this.wakeUpResolve = resolve2;
3965
3968
  }));
3966
- const timerMs = this.millisUntilNextTimedTransition();
3967
3969
  if (timerMs > 0 && timerMs < Infinity) {
3968
3970
  promises.push(new Promise((r) => setTimeout(r, timerMs)));
3969
3971
  }
@@ -5462,10 +5464,11 @@ var PrecompiledNetExecutor = class {
5462
5464
  }
5463
5465
  }
5464
5466
  if (!this.closed) {
5467
+ const timerMs = this.millisUntilNextTimedTransition();
5468
+ if (timerMs === 0 && promises.length === 0) return;
5465
5469
  promises.push(new Promise((resolve2) => {
5466
5470
  this.wakeUpResolve = resolve2;
5467
5471
  }));
5468
- const timerMs = this.millisUntilNextTimedTransition();
5469
5472
  if (timerMs > 0 && timerMs < Infinity) {
5470
5473
  promises.push(new Promise((r) => setTimeout(r, timerMs)));
5471
5474
  }