The S language is a theoretical programming language proposed by Martin Davids in his book Computability, Complexity and Languages. It is composed by labels, variables, and 4 basic instructions, which are:
V++;
: Increments the variable VV--;
: Decrements the variable VV;
: Does nothingV?L;
: If V is different to 0, goes to label LLabels are written between brackets and can be one of A, B, C, D, E
with a subindex.
There are 3 types of variables:
X
with a subindex, are input variablesZ
with a subindex, are auxiliary variablesY
is the output variableThis language can be used to prove that there are some natural functions which can't be computed. Which is awesome. For more information, check Github's README. On the other side, a full example of a little program written in Slang is as follows:
[A1] X1++; X1--; X1?A1;