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.
@@ -1,4 +1,4 @@
1
- import { T as Token } from './petri-net-WSScMyDL.js';
1
+ import { T as Token } from './petri-net-p0ONpSAO.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-p0ONpSAO.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-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-JZIEWVAV.js";
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
  }