Seribund

From Esolang
Jump to navigation Jump to search

Seribund is a one-instruction esolanguage designed by User:Keymaker in 2014.

Description

A program is a list of instructions. Each instruction is executed the number of times the previous instruction modified a register's value to. Initially, for the very first instruction to be executed in the program, this number is 1. Each instruction modifies a register. Registers may hold any integer, but assigning a negative value to one causes the execution-number for the next instruction to be negative, which means the program will terminate (successfully). If the execution-number is 0, the next instruction will not be executed, and the instruction after it will be executed with the execution-number 1. Program flow moves from one instruction to the next, skipping to the first one after the last one.

An example

(a1+1)

On the first cycle increases a1-register (initially 0) to 1. The execution-number for the next instruction is thus 1. This one instruction being the only one in this program, it will be executed again. Now a1 has 1, so it will become 1+1=2. The execution-number is now 2 for the next instruction. Now, (a1+1) will be executed twice. First 2+1=3, then 3+1=4. Now the execution-number is 4 for the next. 4+1=5, 5+1=6, 6+1=7, 7+1=8: a1 is now 8 and the next instruction will be executed 8 times... This goes on infinitely.

Computational class

The language is Turing-complete. There is a way for translating Minsky machine to it. A tool can be found here: http://yiap.nfshost.com/esoteric/seribund/mmtoser.py While proving the Turing-completeness of it, translating Minsky Machine does not as such take much advantage of Seribund's features. An eventual plan by the author is to create a more expressive language that compiles to (slightly more) efficient Seribund code.

External resources