Schematex
petri·Murata 1989 (place/transition net firing rule)·education·complexity 1/3·since v0.6.0

Firing a transition advances the marking

The same three-place net before and after firing — the `fire:` directive replays a transition, so the rendered marking is the state *after* the token moved from P1 to P2, and the engine now highlights T2 as the newly enabled transition.

For the student

Open in Playground →
petri·§
↘ preview
100%
Petri net — After fire: T1 3 places, 2 transitions, 4 arcs. Marking {P2:1}. Enabled: T2. Class: state machine, workflow net. After fire: T1 P1 P2 P3 T1 T2
UTF-8 · LF · 11 lines · 145 chars✓ parsed·1.6 ms·4.1 KB SVG

Most text-to-diagram tools draw a Petri net as static shapes. Schematex runs it.

The firing rule, applied. The net is declared with one token in P1. The fire: T1 directive tells the engine to apply T1's firing — consume one token from each input place (P1), produce one in each output place (P2). What you see rendered is the marking after that step: the token now sits in P2.

Enablement is recomputed. With the token in P2, T1 is now dead (its input P1 is empty) and T2 is the enabled transition (highlighted). Chain more steps — fire: T1, T2 — to walk the net forward and watch the token travel P1 → P2 → P3.

This is the difference between a drawing and a model: the diagram is a function of the computed marking, not something you hand-positioned.

Petri net syntax