libpetri 2.12.1 → 2.13.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/{chunk-V3WTQRHC.js → chunk-7VJ5CYUU.js} +104 -2
- package/dist/chunk-7VJ5CYUU.js.map +1 -0
- package/dist/debug/index.d.ts +2 -2
- package/dist/doclet/index.d.ts +1 -1
- package/dist/{event-store--nMbAO1v.d.ts → event-store-DKTenPbC.d.ts} +1 -1
- package/dist/export/index.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +17 -76
- package/dist/index.js.map +1 -1
- package/dist/{petri-net-Byc3gSgJ.d.ts → petri-net-C3LSY-vm.d.ts} +16 -8
- package/dist/verification/index.d.ts +9 -3
- package/dist/verification/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-V3WTQRHC.js.map +0 -1
|
@@ -577,15 +577,19 @@ declare class TransitionContext {
|
|
|
577
577
|
type TransitionAction = (ctx: TransitionContext) => Promise<void>;
|
|
578
578
|
/**
|
|
579
579
|
* Identity action: produces no outputs.
|
|
580
|
+
* For transitions that only consume tokens without producing any.
|
|
580
581
|
*
|
|
581
|
-
* Returns a stable singleton reference (
|
|
582
|
-
*
|
|
583
|
-
* .composeActions} during channel composition (MOD-021) to short-circuit a
|
|
584
|
-
* passthrough-on-both-sides merge to passthrough — saving a microtask hop
|
|
585
|
-
* and matching the Java implementation's behaviour where both transitions'
|
|
586
|
-
* default actions collapse to the builder's own passthrough default.
|
|
582
|
+
* Returns a stable singleton reference (CORE-051), so {@link isPassthrough}
|
|
583
|
+
* can recognise it.
|
|
587
584
|
*/
|
|
588
585
|
declare function passthrough(): TransitionAction;
|
|
586
|
+
/**
|
|
587
|
+
* Whether `action` is the built-in {@link passthrough} — i.e. provably produces
|
|
588
|
+
* no output tokens. Identity-based, so a hand-written no-op is not claimed.
|
|
589
|
+
*
|
|
590
|
+
* @param action the action to test; `null` / `undefined` is not passthrough
|
|
591
|
+
*/
|
|
592
|
+
declare function isPassthrough(action: TransitionAction | null | undefined): boolean;
|
|
589
593
|
/**
|
|
590
594
|
* Transform action: applies function to context, copies result to ALL output places.
|
|
591
595
|
*
|
|
@@ -1539,8 +1543,12 @@ declare class PetriNet {
|
|
|
1539
1543
|
bindActions(actionBindings: Map<string, TransitionAction> | Record<string, TransitionAction>): PetriNet;
|
|
1540
1544
|
/**
|
|
1541
1545
|
* Creates a new PetriNet with actions bound via a resolver function.
|
|
1546
|
+
*
|
|
1547
|
+
* The resolver is called once per transition with its name. Returning `null`
|
|
1548
|
+
* defers that transition — it keeps whatever action it already carries — which
|
|
1549
|
+
* is what makes staged binding (**MOD-024** AC7) work.
|
|
1542
1550
|
*/
|
|
1543
|
-
bindActionsWithResolver(actionResolver: (name: string) => TransitionAction): PetriNet;
|
|
1551
|
+
bindActionsWithResolver(actionResolver: (name: string) => TransitionAction | null): PetriNet;
|
|
1544
1552
|
static builder(name: string): PetriNetBuilder;
|
|
1545
1553
|
}
|
|
1546
1554
|
declare class PetriNetBuilder {
|
|
@@ -1774,4 +1782,4 @@ declare class PetriNetBuilder {
|
|
|
1774
1782
|
private buildWithFusion;
|
|
1775
1783
|
}
|
|
1776
1784
|
|
|
1777
|
-
export { type VerificationHarness as $, type Arc as A, type Port as B, type Channel as C, type PortDirection as D, type EnvironmentPlace as E, FusionSet as F, SubnetDefBuilder as G, type SubnetInstance as H, type In as I, type Timing as J, type KeyFn as K, type LogFn as L, MAX_DURATION_MS as M, type NameId as N, type Out as O, PetriNet as P, type TimingDeadline as Q, type TimingDelayed as R, SubnetDef as S, type Token as T, type TimingExact as U, type TimingImmediate as V, type TimingWindow as W, TokenInput as X, TokenOutput as Y, type TransitionAction as Z, TransitionBuilder as _, type Place as a, type
|
|
1785
|
+
export { type VerificationHarness as $, type Arc as A, type Port as B, type Channel as C, type PortDirection as D, type EnvironmentPlace as E, FusionSet as F, SubnetDefBuilder as G, type SubnetInstance as H, type In as I, type Timing as J, type KeyFn as K, type LogFn as L, MAX_DURATION_MS as M, type NameId as N, type Out as O, PetriNet as P, type TimingDeadline as Q, type TimingDelayed as R, SubnetDef as S, type Token as T, type TimingExact as U, type TimingImmediate as V, type TimingWindow as W, TokenInput as X, TokenOutput as Y, type TransitionAction as Z, TransitionBuilder as _, type Place as a, type SmtStatistics as a$, type VerificationResult as a0, all as a1, allPlaces as a2, and as a3, andPlaces as a4, arcPlace as a5, atLeast as a6, consumptionCount as a7, deadline as a8, delayed as a9, produce as aA, readArc as aB, requiredCount as aC, resetArc as aD, timeout as aE, timeoutPlace as aF, tokenAt as aG, tokenOf as aH, transform as aI, transformAsync as aJ, transformFrom as aK, unitToken as aL, window as aM, withTimeout as aN, xor as aO, xorPlaces as aP, MarkingState as aQ, type PInvariant as aR, MarkingStateBuilder as aS, type SmtProperty as aT, type SmtVerificationResult as aU, type BranchPlaceBound as aV, type DeadlockFree as aW, type JoinedOrDeadLettered as aX, type MutualExclusion as aY, type PlaceBound as aZ, type Proven as a_, earliest as aa, enumerateBranches as ab, environmentPlace as ac, exact as ad, exactly as ae, fork as af, forwardInput as ag, hasDeadline as ah, hasGuard as ai, immediate as aj, inhibitorArc as ak, inputArc as al, isPassthrough as am, isUnit as an, keyForPlace as ao, latest as ap, matchCorrelates as aq, matchKey as ar, matchSpec as as, matchesGuard as at, nameId as au, one as av, outPlace as aw, outputArc as ax, passthrough as ay, place as az, Transition as b, type TokenSupplier as b0, type Unknown as b1, type Unreachable as b2, type Verdict as b3, type Violated as b4, branchPlaceBound as b5, deadlockFree as b6, isProven as b7, isViolated as b8, joinedOrDeadLettered as b9, mutualExclusion as ba, pInvariant as bb, pInvariantToString as bc, placeBound as bd, propertyDescription as be, unreachable as bf, TransitionContext as c, type ArcInhibitor as d, type ArcInput as e, type ArcOutput as f, type ArcRead as g, type ArcReset as h, ComposeBindings as i, FusionSetBuilder as j, type InAll as k, type InAtLeast as l, type InExactly as m, type InOne as n, Instance as o, Interface as p, InterfaceBuilder as q, type MatchKey as r, type MatchSpec as s, type OutAnd as t, type OutForwardInput as u, type OutPlace as v, type OutTimeout as w, type OutXor as x, type OutputEntry as y, PetriNetBuilder as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as Transition, a as Place, P as PetriNet, E as EnvironmentPlace,
|
|
2
|
-
export {
|
|
1
|
+
import { b as Transition, a as Place, P as PetriNet, E as EnvironmentPlace, aQ as MarkingState, aR as PInvariant, aS as MarkingStateBuilder, aT as SmtProperty, aU as SmtVerificationResult } from '../petri-net-C3LSY-vm.js';
|
|
2
|
+
export { aV as BranchPlaceBound, aW as DeadlockFree, aX as JoinedOrDeadLettered, aY as MutualExclusion, aZ as PlaceBound, a_ as Proven, a$ as SmtStatistics, b0 as TokenSupplier, b1 as Unknown, b2 as Unreachable, b3 as Verdict, $ as VerificationHarness, a0 as VerificationResult, b4 as Violated, b5 as branchPlaceBound, b6 as deadlockFree, b7 as isProven, b8 as isViolated, b9 as joinedOrDeadLettered, ba as mutualExclusion, bb as pInvariant, bc as pInvariantToString, bd as placeBound, be as propertyDescription, bf as unreachable } from '../petri-net-C3LSY-vm.js';
|
|
3
3
|
import { Expr, init, Bool, FuncDecl } from 'z3-solver';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -426,6 +426,8 @@ declare class SmtVerifier {
|
|
|
426
426
|
prioritySemantics(semantics: PrioritySemantics): this;
|
|
427
427
|
/**
|
|
428
428
|
* Runs the verification pipeline.
|
|
429
|
+
*
|
|
430
|
+
* @throws Error if the net violates CORE-043 — verification rejects the same nets execution rejects.
|
|
429
431
|
*/
|
|
430
432
|
verify(): Promise<SmtVerificationResult>;
|
|
431
433
|
/**
|
|
@@ -646,7 +648,11 @@ declare class StateClassGraph {
|
|
|
646
648
|
private readonly _predecessors;
|
|
647
649
|
private readonly _complete;
|
|
648
650
|
private constructor();
|
|
649
|
-
/**
|
|
651
|
+
/**
|
|
652
|
+
* Builds the state class graph for a Time Petri Net.
|
|
653
|
+
*
|
|
654
|
+
* @throws Error if the net violates CORE-043 — analysis rejects the same nets execution rejects.
|
|
655
|
+
*/
|
|
650
656
|
static build(net: PetriNet, initialMarking: MarkingState, maxClasses: number, environmentPlaces?: Set<EnvironmentPlace<any>>, environmentMode?: EnvironmentAnalysisMode): StateClassGraph;
|
|
651
657
|
stateClasses(): readonly StateClass[];
|
|
652
658
|
size(): number;
|