Stack

Stack is available as:

This model illustrates a stack, thus demonstrating that PN is Turing complete with only boolean data types, SampleDelay, LogicFunction, BooleanSwitch, and BooleanSelect. This model does the following sequence of operations on the stack, resulting in the shown outputs:

 operation     output
 -------       -----
 push(0)
 push(1)
 push(2)
 pop               2
 pop               1
 pop               0
 pop
 push(3)
 push(4)
 pop               4
 push(5)
 pop               5
 pop               3