We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Talk:Integer Stack Machine
Decidability of Simple
I think Simple can be compiled to a PDA. The PDA stack would be made of three distinct elements which will be represented as 0, 1, and 2. An integer k on the integer stack would be represented on the PDA (from bottom to top) as a 0, abs(k) 1's, with the last one being replaced with a 2 if k is negative (e.g. 0 is represented as 0, 5 is represented as 01111, and -3 is represented as 0112). Then:
0pushes a0.-pops one element. If it's0, another0is pushed back on. If it's1, a2is pushed. If it's2, a1is pushed.;pops one element. If it's0or1, it's pushed back on, and a1is pushed on top of it. If it's2, another element is popped. If that element is0, another0is pushed, while if that element is1, a2is pushed.!pops until it hits a0.[pops one element. If it's a0it jumps to the next state, but if it's a1or2it jumps to the state just after the matching]. In any case, the element is also pushed back on immediately.]pops one element. If it's a1or2it jumps to the next state, but if it's a0it jumps to the state just after the matching[. In any case, the element is also pushed back on immediately.
Unfortunately, I don't think this trick works with Affine. Also, I tried doing something similar to the proof sketch Duplicative, but I couldn't figure out division or anything else that would emulate decrementing. –PkmnQ (talk) 13:57, 25 August 2026 (UTC)