libpetri 2.6.0 → 2.7.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/debug/index.d.ts +2 -2
- package/dist/doclet/index.d.ts +1 -1
- package/dist/{event-store-E_ahsEc9.d.ts → event-store-8XkpYUeU.d.ts} +1 -1
- package/dist/export/index.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +108 -20
- package/dist/index.js.map +1 -1
- package/dist/{petri-net-C3asscb4.d.ts → petri-net-D73-PO6d.d.ts} +33 -2
- package/dist/verification/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -363,7 +363,18 @@ declare class TransitionContext {
|
|
|
363
363
|
private readonly _transitionName;
|
|
364
364
|
private readonly executionCtx;
|
|
365
365
|
private readonly _logFn?;
|
|
366
|
-
|
|
366
|
+
private readonly placeAlias;
|
|
367
|
+
constructor(transitionName: string, rawInput: TokenInput, rawOutput: TokenOutput, inputPlaces: ReadonlySet<Place<any>>, readPlaces: ReadonlySet<Place<any>>, outputPlaces: ReadonlySet<Place<any>>, executionContext?: Map<string, unknown>, logFn?: LogFn, placeAlias?: ReadonlyMap<string, Place<any>>);
|
|
368
|
+
/**
|
|
369
|
+
* Resolves a place key through the transition's declared→actual place
|
|
370
|
+
* correspondence (per **MOD-031**). For a hand-written or directly-composed
|
|
371
|
+
* transition the correspondence is the identity, so this returns `place`
|
|
372
|
+
* unchanged; after instancing / port binding it maps a *declared* place
|
|
373
|
+
* constant the action hardcodes to the *actual* composed place. The result
|
|
374
|
+
* feeds both the declared-set check and the token-store access (both keyed by
|
|
375
|
+
* `place.name`), so `inputPlaces()`/`outputPlaces()` discovery is unaffected.
|
|
376
|
+
*/
|
|
377
|
+
private resolve;
|
|
367
378
|
/** Get single consumed input value. Throws if place not declared or multiple tokens. */
|
|
368
379
|
input<T>(place: Place<T>): T;
|
|
369
380
|
/** Get all consumed input values for a place. */
|
|
@@ -492,11 +503,23 @@ declare class Transition {
|
|
|
492
503
|
readonly actionTimeout: OutTimeout | null;
|
|
493
504
|
readonly action: TransitionAction;
|
|
494
505
|
readonly priority: number;
|
|
506
|
+
/**
|
|
507
|
+
* Per-transition **declared → actual** place correspondence (per
|
|
508
|
+
* **MOD-031**), keyed by the author-original declared place **name** →
|
|
509
|
+
* actual composed place. Empty for a hand-written or directly-composed
|
|
510
|
+
* ([MOD-025]) transition (identity). Populated by the subnet rewriter after
|
|
511
|
+
* instantiation ([MOD-010]) / port binding ([MOD-020]) so an action that
|
|
512
|
+
* hardcodes a declared place constant resolves to the composed place via
|
|
513
|
+
* {@link import('./transition-context.js').TransitionContext}. Consumed only
|
|
514
|
+
* by the action-facing context I/O — never by enablement, firing, the
|
|
515
|
+
* verifier, the exporter, or events (so [MOD-023] is unaffected).
|
|
516
|
+
*/
|
|
517
|
+
readonly placeAlias: ReadonlyMap<string, Place<any>>;
|
|
495
518
|
private readonly _inputPlaces;
|
|
496
519
|
private readonly _readPlaces;
|
|
497
520
|
private readonly _outputPlaces;
|
|
498
521
|
/** @internal Use {@link Transition.builder} to create instances. */
|
|
499
|
-
constructor(key: symbol, name: string, inputSpecs: readonly In[], outputSpec: Out | null, inhibitors: readonly ArcInhibitor[], reads: readonly ArcRead[], resets: readonly ArcReset[], timing: Timing, action: TransitionAction, priority: number);
|
|
522
|
+
constructor(key: symbol, name: string, inputSpecs: readonly In[], outputSpec: Out | null, inhibitors: readonly ArcInhibitor[], reads: readonly ArcRead[], resets: readonly ArcReset[], timing: Timing, action: TransitionAction, priority: number, placeAlias?: ReadonlyMap<string, Place<any>>);
|
|
500
523
|
/** Returns set of input places — consumed tokens. */
|
|
501
524
|
inputPlaces(): ReadonlySet<Place<any>>;
|
|
502
525
|
/** Returns set of read places — context tokens, not consumed. */
|
|
@@ -518,6 +541,7 @@ declare class TransitionBuilder {
|
|
|
518
541
|
private _timing;
|
|
519
542
|
private _action;
|
|
520
543
|
private _priority;
|
|
544
|
+
private _placeAlias;
|
|
521
545
|
constructor(name: string);
|
|
522
546
|
/** Add input specifications with cardinality. */
|
|
523
547
|
inputs(...specs: In[]): this;
|
|
@@ -541,6 +565,13 @@ declare class TransitionBuilder {
|
|
|
541
565
|
action(action: TransitionAction): this;
|
|
542
566
|
/** Set the priority (higher fires first). */
|
|
543
567
|
priority(priority: number): this;
|
|
568
|
+
/**
|
|
569
|
+
* Sets the per-transition declared→actual place correspondence (per
|
|
570
|
+
* **MOD-031**). Populated by the subnet rewriter during the compose-time
|
|
571
|
+
* rewrite; not normally called by hand-written nets, whose correspondence is
|
|
572
|
+
* the identity (empty map).
|
|
573
|
+
*/
|
|
574
|
+
placeAlias(alias: ReadonlyMap<string, Place<any>>): this;
|
|
544
575
|
build(): Transition;
|
|
545
576
|
}
|
|
546
577
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as Transition, a as Place, P as PetriNet, E as EnvironmentPlace, aG as MarkingState, aH as PInvariant, aI as MarkingStateBuilder, aJ as SmtProperty, aK as SmtVerificationResult } from '../petri-net-
|
|
2
|
-
export { aL as DeadlockFree, aM as MutualExclusion, aN as PlaceBound, aO as Proven, aP as SmtStatistics, aQ as TokenSupplier, aR as Unknown, aS as Unreachable, aT as Verdict, X as VerificationHarness, Y as VerificationResult, aU as Violated, aV as deadlockFree, aW as isProven, aX as isViolated, aY as mutualExclusion, aZ as pInvariant, a_ as pInvariantToString, a$ as placeBound, b0 as propertyDescription, b1 as unreachable } from '../petri-net-
|
|
1
|
+
import { b as Transition, a as Place, P as PetriNet, E as EnvironmentPlace, aG as MarkingState, aH as PInvariant, aI as MarkingStateBuilder, aJ as SmtProperty, aK as SmtVerificationResult } from '../petri-net-D73-PO6d.js';
|
|
2
|
+
export { aL as DeadlockFree, aM as MutualExclusion, aN as PlaceBound, aO as Proven, aP as SmtStatistics, aQ as TokenSupplier, aR as Unknown, aS as Unreachable, aT as Verdict, X as VerificationHarness, Y as VerificationResult, aU as Violated, aV as deadlockFree, aW as isProven, aX as isViolated, aY as mutualExclusion, aZ as pInvariant, a_ as pInvariantToString, a$ as placeBound, b0 as propertyDescription, b1 as unreachable } from '../petri-net-D73-PO6d.js';
|
|
3
3
|
import { Expr, init, Bool, FuncDecl } from 'z3-solver';
|
|
4
4
|
|
|
5
5
|
/**
|