libpetri 2.3.2 → 2.4.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.
@@ -1363,6 +1363,40 @@ declare class PetriNetBuilder {
1363
1363
  compose(instance: Instance<unknown>): this;
1364
1364
  compose(instance: Instance<unknown>, portMappings: ReadonlyMap<string, Place<unknown>> | Record<string, Place<unknown>>): this;
1365
1365
  compose(instance: Instance<unknown>, bind: (b: ComposeBindings) => void): this;
1366
+ compose(def: SubnetDef<unknown>): this;
1367
+ /**
1368
+ * Composes a subnet {@link SubnetDef} **directly** into this builder per
1369
+ * **MOD-025** — **without instantiation**, and without the prefix-renaming
1370
+ * of {@link SubnetDef.instantiate}.
1371
+ *
1372
+ * Every body place and transition is added under its **original**
1373
+ * (un-prefixed) name. Places merge into this builder by name: a body place
1374
+ * whose name equals an enclosing-net place *is* that place in the composed
1375
+ * flat net. This is the mode for wiring a subnet in as a single shared copy.
1376
+ *
1377
+ * Direct composition is **order-independent**: composing the same set of
1378
+ * subnets in any order yields the same flat net, because merging is by
1379
+ * place name and not by a probe of the builder's place set at call time —
1380
+ * contrast the no-interface body-inference branch of {@link composeAuto}
1381
+ * (MOD-024), which is order-sensitive.
1382
+ *
1383
+ * For multiple *independent* copies — each with isolated per-instance state
1384
+ * per [MOD-012] — use {@link SubnetDef.instantiate} + the `compose(instance)`
1385
+ * overload instead.
1386
+ *
1387
+ * Rejections: a body transition whose name already exists in this builder
1388
+ * (use `instantiate(prefix)` for independent copies); a subnet whose
1389
+ * interface declares any channel (direct composition does not bind
1390
+ * channels — use `instantiate` + the channel-binding `compose` overload).
1391
+ *
1392
+ * Token-type conflicts on a same-named place cannot be detected: TS
1393
+ * {@link Place} equality is name-only at runtime (the documented carve-out,
1394
+ * same as MOD-024).
1395
+ *
1396
+ * @throws when the subnet declares channels, or a body transition name
1397
+ * collides with a transition already in this builder.
1398
+ */
1399
+ private composeDirect;
1366
1400
  /**
1367
1401
  * Identity-default auto-compose per **MOD-024**.
1368
1402
  *
@@ -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-CKZYPOsL.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-CKZYPOsL.js';
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-RpZxG0Io.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-RpZxG0Io.js';
3
3
  import { Expr, init, Bool, FuncDecl } from 'z3-solver';
4
4
 
5
5
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libpetri",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "description": "Coloured Time Petri Net engine — TypeScript port",
5
5
  "homepage": "https://libpetri.org",
6
6
  "repository": {