Petri Nets
Compatible with Native renderer
Concurrency's foundational model — places (circles) hold tokens, transitions (rectangles) fire when their inputs are saturated, arcs connect them. Tiny DSL: `place P1 tokens 2 "Ready"`, `transition T1 "fire"`, `P1 -> T1`. Auto-layout by topological depth, or pin every node with `@ x,y`. Native — no other major platform ships first-class Petri-net rendering.
In the same space
Most users come to Petri Nets from Snoopy, WoPeD or PIPE editor. Glyph runs this engine in the browser — no install, shareable via URL, exportable to PNG / SVG / PDF / source.
Syntax at a glance
place P1 tokens 1
transition T1
P1 -> T1Paste this in the Studio code pane to see Petri Nets render live. The full grammar is at the upstream-docs link above.
Sample templates
All 43 →Bounded buffer between a producer and a consumer — tokens represent buffer slots and items.
Two competing threads share a single mutex token — only one can hold it at a time.
Compact two-philosopher slice of the classic deadlock-prone Petri net — thinking, hungry, eating, with forks as shared resources.
Two processes contending for a single shared resource.
Bounded-buffer producer / consumer with capacity 3.
Two-philosopher version of the dining-philosophers problem.
petri · ← Browse all engines · Quick-start guide