Repository navigation
v0.3.0
This release adds text models: you can write a Coloured Petri Net as plain JSON plus CPN ML, keep it in version control, and still edit and simulate it in the CPN IDE canvas. Simulation is also much faster.
New
- Text models. A net can be written as two files:
NAME.petri.jsonfor pages, places, transitions and arcs, andNAME.smlfor the CPN ML declarations (colour sets, variables, functions). They compile to CPN Tools XML and support subpages with port/socket assignments, fusion places, guards, time, priorities, code segments and real-valued time ("realtime": true). Positions are optional: nodes without one are laid out automatically. The standard declarations (UNIT,BOOL,INT,STRING,P_HIGH, ...) are added for you. A JSON schema (schema/petri.schema.json) gives completion and validation while you type. - Edit text models in the canvas. Opening a
.petri.jsonshows the net in CPN IDE. Saving there writes the changes back to the JSON and leaves the.smluntouched unless the declarations changed. - Live reload and diagnostics. The canvas reloads when the
.petri.jsonor.smlchanges on disk. Compile errors (unknown nodes, bad references, ...) appear in the Problems panel at the right line. When the backend is running and no CPN IDE tab is open, saved models are also type-checked by the simulator. - CPN IDE: Convert to Text Model turns an existing
.cpninto.petri.json+.sml. Graphics and monitors are dropped, with a warning. A converted model validates with the same initial marking as the original. - CPN IDE: Export .cpn writes the compiled
.cpnof a text model, for use in CPN Tools or the standalone CPN IDE. - CPN IDE: Run Simulation (No UI) simulates a
.cpnor.petri.jsonfor a number of steps directly on the backend and prints the step count, time and final markings. - New example
04-hierarchy: a Worker subpage behind a substitution transition, with a fusion place shared by both pages. All examples are now generated from text sources. - Marketplace listing with an extension icon. Releases can be published to the VS Code Marketplace and Open VSX.
Improved
- Faster simulation. The bundled UI waited a fixed 500 ms between the steps of a multi-step run. The delay is now a setting,
cpnIde.simulation.stepDelayMs(default 100 ms, 0 for full speed), and the token animation can be turned off withcpnIde.simulation.animate. (#46) - Quieter UI. CPN IDE's verbose console output (full request and response payloads) is silenced unless
cpnIde.debugis on.
Fixed
- Validating two nets at the same time, for example from two CPN IDE tabs, could hang the backend. Net creation now goes through a small local proxy that runs one at a time.
- After a backend stop, a new simulator could fail to start because the old connections on its port were still closing. The extension now waits for every closing connection, not only TIME-WAIT.
- Simulator processes could outlive VS Code or a test run. Stopping the backend now kills Java, the simulator daemon and every simulator process right away.
What's Changed
- Back-merge main (v0.2.0) into develop by @AleFire99 in #41
- feat: text model (.petri.json + .sml) and compiler to CPN XML by @AleFire99 in #47
- feat: convert .cpn models to the text format by @AleFire99 in #49
- feat: graphical editor for .petri.json, live reload and diagnostics by @AleFire99 in #51
- feat: configurable simulation speed, quiet console, headless run by @AleFire99 in #48
- fix(runtime): serialize backend net inits through a local proxy (#50) by @AleFire99 in #53
- fix(runtime): stop simulator processes synchronously with the backend (#52) by @AleFire99 in #54
- Pre-release cleanup by @AleFire99 in #56
- Release 0.3.0 by @AleFire99 in #57
Full Changelog: v0.2.0...v0.3.0