A guard is a condition that can prevent a transition from firing, even when its bindings have found matching tokens.

Bindings determine which tokens are structurally eligible to participate in a transition. Guards evaluate whether the transition should actually fire for a particular set of bound tokens. If the guard fails, the transition doesn't fire and the tokens stay where they are.

In the claim demo, both approve and reject consume from the pending place. What determines which one fires? A guard: approve checks that the item's category is a gadget; reject checks that it isn't. Same input place, different paths depending on token data.

This is data-dependent routing. The net's topology creates the possible paths, and guards select among them based on values.

The binding–guard spectrum

Not all conditions can be expressed as bindings. Bindings handle relationships between token fields — structural eligibility. Guards handle value-dependent logic: "is this item a gadget?", "does this user have sufficient balance?", "has the cooldown period elapsed?"

The distinction matters because bindings are visible to the system. The net can analyze them, determine which transitions are possible for a given state, and guarantee completeness. Guards are more opaque — the system knows a guard exists but can't always reason about what it checks.

The design principle is to push conditions into bindings wherever possible. Bindings decide if; guard logic computes what. A guard that rejects tokens is often a signal that the condition could be a binding — or better yet, a separate place. A token representing approval status or user role makes the condition structural rather than checked per-firing.

This echoes the broader additive vs. subtractive pattern: bindings are additive (defining valid combinations), while guards are subtractive (excluding specific cases from an already-bound set).

In practice

Guards are where domain logic lives that can't be expressed as token relationships. In a well-designed net they tend to be thin — most of the interesting work happens in bindings and transition topology. When a guard grows complex, it's often pointing at a missing place.

See also