3 ms·
This appears bugged: > A Minsky program that adds register A into register B looks like: > 1. DEC A; if A == 0 goto 3 else goto 2 > 2. INC B; goto 1 > 3. HA
by kingofmen 4mo ago
This appears bugged:
> A Minsky program that adds register A into register B looks like:
> 1. DEC A; if A == 0 goto 3 else goto 2
> 2. INC B; goto 1
> 3. HALT
If A initially equals 1 it will be decremented and hit zero; the conditional triggers, and the program halts without ever incrementing B.
...which suggests that Jira is a Turing tarpit in which even the simplest programs are immensely difficult to implement correctly. Who knew?
- beefburger 4mo agoIndeed. The Jira rules implement test-then-decrement correctly, but the notation was ambiguous. I’ve fixed the pseudocode so that the test explicitly precedes the decrement. Thanks for the careful read!