libpetri 4.0.0 → 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.
- package/dist/{chunk-WYCGGQAW.js → chunk-FD3S4TZM.js} +73 -32
- package/dist/chunk-FD3S4TZM.js.map +1 -0
- package/dist/{chunk-KO6TSB47.js → chunk-GJAHGHGT.js} +2 -2
- package/dist/debug/index.d.ts +2 -2
- package/dist/doclet/index.d.ts +1 -1
- package/dist/doclet/resources/petrinet-diagrams.js +1 -1
- package/dist/{event-store-2FOAeUyh.d.ts → event-store-B3ppVTpO.d.ts} +1 -1
- package/dist/export/index.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/{petri-net-hduM6tJf.d.ts → petri-net-p0ONpSAO.d.ts} +32 -2
- package/dist/render-dom/index.js +1 -1
- package/dist/verification/index.d.ts +36 -47
- package/dist/verification/index.js +1 -1
- package/dist/viewer/index.js +1 -1
- package/dist/viewer/viewer.iife.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-WYCGGQAW.js.map +0 -1
- /package/dist/{chunk-KO6TSB47.js.map → chunk-GJAHGHGT.js.map} +0 -0
|
@@ -762,7 +762,7 @@ function stripClusterEdgeAttrs(line) {
|
|
|
762
762
|
}
|
|
763
763
|
|
|
764
764
|
// src/viewer/version.ts
|
|
765
|
-
var VERSION = true ? "4.
|
|
765
|
+
var VERSION = true ? "4.1.0" : "0.0.0-dev";
|
|
766
766
|
|
|
767
767
|
// src/viewer/index.ts
|
|
768
768
|
async function mount(dotSource, container, opts = {}) {
|
|
@@ -1013,4 +1013,4 @@ export {
|
|
|
1013
1013
|
VERSION,
|
|
1014
1014
|
mount
|
|
1015
1015
|
};
|
|
1016
|
-
//# sourceMappingURL=chunk-
|
|
1016
|
+
//# sourceMappingURL=chunk-GJAHGHGT.js.map
|
package/dist/debug/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Writable } from 'node:stream';
|
|
2
|
-
import { P as PetriNet, b as Transition, T as Token } from '../petri-net-
|
|
3
|
-
import { E as EventStore, N as NetEvent } from '../event-store-
|
|
2
|
+
import { P as PetriNet, b as Transition, T as Token } from '../petri-net-p0ONpSAO.js';
|
|
3
|
+
import { E as EventStore, N as NetEvent } from '../event-store-B3ppVTpO.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Commands sent from debug UI client to server via WebSocket.
|
package/dist/doclet/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Application } from 'typedoc';
|
|
2
|
-
import { P as PetriNet, S as SubnetDef, o as Instance } from '../petri-net-
|
|
2
|
+
import { P as PetriNet, S as SubnetDef, o as Instance } from '../petri-net-p0ONpSAO.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* TypeDoc plugin for `@petrinet` and `@subnet` tags — auto-generates
|
|
@@ -6358,7 +6358,7 @@ textContent??"").replace(/^cluster_/,"");Mn.classList.toggle("is-hidden",!N.has(
|
|
|
6358
6358
|
en",!bn.has(v))}if(!Q)for(let Mn of Array.from(P.querySelectorAll("g.node.petri-replica")))Mn.classList.add("is-hidden");let Sn=new Map;for(let Mn of Array.from(P.querySelectorAll("g.node"))){let v=Mn.getAttribute("data-id");v&&Sn.set(v,Mn)}for(let Mn of Array.from(P.querySelectorAll("g.edge"))){let v=Mn.getAttribute("data-src")??"",Vn=Mn.getAttribute("data-dst")??"",te=Sn.get(v)?.classList.contains(
|
|
6359
6359
|
"is-hidden")??!1,pe=Sn.get(Vn)?.classList.contains("is-hidden")??!1;Mn.classList.toggle("is-hidden",te||pe)}}var Pfe=["--lpv-bg","--lpv-header-bg","--lpv-border","--lpv-text","--lpv-muted","--lpv-cluster-bg","--lpv-cluster-bg-collapsed","--lpv-cluster-stroke-width","--lpv-cluster-stroke-dash","--lpv-cluster-fill-tint","--lpv-dim-opacity","--lpv-active-filter-outline","--lpv-legend-bg","--lpv-chip-bg","--lpv-chip-active-bg","--lpv-sidebar-bg","--lpv-sidebar-border","--lpv-sidebar-text","--lpv-sidebar-mute\
|
|
6360
6360
|
d","--lpv-sidebar-chip-bg","--lpv-sidebar-chip-hover-bg","--lpv-sidebar-chip-off-opacity","--lpv-shared-glyph-color","--lpv-replica-fill","--lpv-replica-stroke","--lpv-highlight-stroke","--lpv-highlight-glow","--lpv-neighbor-stroke","--lpv-faded-node-opacity","--lpv-faded-edge-opacity","--lpv-faded-cluster-opacity"];var zPe=/^\s*subgraph\s+cluster_[A-Za-z0-9_]+\s*\{\s*$/,KPe=/^\s*\}\s*$/;function Cfe(P){let O=P.split("\n"),N=[],Q=0;for(let bn of O){if(zPe.test(bn)){Q++;continue}if(Q>0){if(KPe.test(bn)){Q--;continue}(bn.includes("[")||bn.includes("->"))&&N.push(_fe(bn));continue}if(bn.includes("->")&&(bn.includes("ltail=")||bn.includes("lhead="))){N.push(_fe(bn));continue}N.push(bn)}return N.join("\n")}function _fe(P){
|
|
6361
|
-
return P.replace(/,\s*ltail="cluster_[^"]*"/g,"").replace(/,\s*lhead="cluster_[^"]*"/g,"").replace(/\[\s*ltail="cluster_[^"]*"\s*,\s*/g,"[").replace(/\[\s*lhead="cluster_[^"]*"\s*,\s*/g,"[").replace(/\[\s*ltail="cluster_[^"]*"\s*\]/g,"[]").replace(/\[\s*lhead="cluster_[^"]*"\s*\]/g,"[]")}var Ofe="4.
|
|
6361
|
+
return P.replace(/,\s*ltail="cluster_[^"]*"/g,"").replace(/,\s*lhead="cluster_[^"]*"/g,"").replace(/\[\s*ltail="cluster_[^"]*"\s*,\s*/g,"[").replace(/\[\s*lhead="cluster_[^"]*"\s*,\s*/g,"[").replace(/\[\s*ltail="cluster_[^"]*"\s*\]/g,"[]").replace(/\[\s*lhead="cluster_[^"]*"\s*\]/g,"[]")}var Ofe="4.1.0";async function ale(P,O,N={}){let Q=N.previousHandle??null,bn=Q?new Set(Q.collapsedPrefixes):new Set,Sn=Q?.activeFilter??null,Mn=N.subnets??Q?.subnets??"show";Q&&Q.dispose();let v=await Promise.resolve().then(()=>(lle(),fle)),Vn=(N.layout??"elk")==="elk",te=Mn==="hide"?Cfe(P):P,pe={clusterLayout:N.clusterLayout,leafPacking:N.leafPacking},$e=Vn?await v.renderDotToSvgWithElkLayout(te,pe):await v.renderDotToSvg(
|
|
6362
6362
|
te);O.innerHTML="",O.appendChild($e),O.classList.add("libpetri-viewer");let ft=mfe($e,N.panzoom),gt=z0n($e);Ffe(gt);let $t=N.layout??"elk";$t==="elk"&&(xfe($e),vz($e));let Be=new Set,dt=null,Ie=null,_t=!1,We=null,Pn=null,Bt=!0;function It(){if(!N.chrome||We&&We.parentNode===O)return;We=document.createElement("div"),We.className="libpetri-viewer-chrome",We.style.position="absolute",We.style.inset="\
|
|
6363
6363
|
0",We.style.pointerEvents="none";let Rt=document.createElement("div");Rt.className="diagram-controls",Rt.style.pointerEvents="auto";let or=document.createElement("button");or.type="button",or.className="diagram-btn btn-reset",or.title="Reset view",or.textContent="Reset",or.addEventListener("click",()=>Ir.fit());let ui=document.createElement("button");ui.type="button",ui.className="diagram-btn btn-\
|
|
6364
6364
|
fullscreen",ui.title="Toggle fullscreen",ui.textContent="Fullscreen",ui.addEventListener("click",()=>Yr(O,ui));let wr=document.createElement("button");wr.type="button",wr.className="diagram-btn btn-subnets",wr.title=Mn==="show"?"Hide subnet groupings":"Show subnet groupings",wr.textContent=Mn==="show"?"Flat view":"Subnets view",wr.addEventListener("click",()=>{Ir.toggleSubnets()}),Rt.appendChild(wr),
|
package/dist/export/index.d.ts
CHANGED
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-
|
|
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-
|
|
3
|
-
import { E as EventStore } from './event-store-
|
|
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-
|
|
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-
|
|
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);
|