Petri — producer / consumer
Bounded-buffer producer / consumer with capacity 3.
Make it your own.
title "Bounded buffer"
place ready tokens 3 "Empty slots"
place full tokens 0 "Filled slots"
place prod tokens 1 "Producer idle"
place cons tokens 1 "Consumer idle"
transition P "Produce"
transition C "Consume"
prod -> P
ready -> P
P -> full
P -> prod
cons -> C
full -> C
C -> ready
C -> cons