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.

Simple system

From Esolang
Jump to navigation Jump to search

Simple system is a family of simplistic languages by User:Aadenboy.

Additive

There are only two commands. c is a label, while n is an integer.

  • Change c by n
    Add or subtract n from register c.
  • While c is not zero
    If register c is not equal to zero, run the inner contents of the block repeatedly until it is, checking at the end of the block.

Random additive

In the random additive simple system, commands are continually executed in a random order. While blocks now serve as conditionals instead.

A+B

While A is not zero
  Change A by -1
  Change B by 1

A*B

While A is not zero
  Change A by -1
  While B is not zero
    Change Output by 1
    Change B by -1
    Change B2 by 1
  While B2 is not zero
    Change B by 1
    Change B2 by -1

A/B

Change Positive by 1
While A is not zero
  While B is not zero
    While Positive2 is not zero
      Change Positive2 by -1
    While Positive is not zero
      Change A by -1
      While Positive is not zero
        Change Positive by -1
    While A is not zero
      Change A by -1
      Change A2 by 1
      Change Positive by 1
      Change Positive2 by 1
    While A2 is not zero
      Change A by 1
      Change A2 by -1
    Change B by -1
    Change B2 by 1
  While Positive2 is not zero
    Change Output by 1
    While Positive2 is not zero
      Change Positive2 by -1
  While B2 is not zero
    Change B by 1
    Change B2 by -1

Computational class

Additive simple system is Turing complete via translation from ALWCIDFEC:

ALWCIDFEC to additive simple system translation table
ALWCIDFEC +SS
+ Change R1 by 1
- Change R1 by -1
[ While R1 is not zero and increase indentation.
] Decrease indentation.
* Change R2 by 1
/ Change R2 by -1
( While R2 is not zero and increase indentation.
) Decrease indentation.
4 Change R3 by 1
1 Change R3 by -1
{ While R3 is not zero and increase indentation.
} Decrease indentation.

Multiplicative

There are only two commands. n is either an integer or rational fraction.

  • Scale by n
    Multiply or divide the counter by n.
  • While n is a factor
    If dividing the counter by n results in a whole number, run the inner contents of the block repeatedly until it does not, checking at the end of the block.

Random multiplicative

In the random multiplicative simple system, commands are continually executed in a random order. While blocks now serve as conditionals instead.

Computational class

Multiplicative simple system is Turing-complete by translation from FRACTRAN.

Where I is the initial input, the primes F, R, and A are prime numbers that are not used as a factor of the FRACTRAN program, and d/n is a single fraction in the FRACTRAN program:

Scale by I
Scale by F
Scale by R
While R is a factor
  While F is a factor
    While n is a factor
      Scale by 1/n
      Scale by d
      While n is a factor
        Scale by 1/n
        Scale by A
    While A is a factor
      Scale by n
      Scale by 1/A
    Scale by 1/F
  ...
  While F is a factor
    Scale by 1/F
    Scale by 1/R

Multiplicative simple system can also be demonstrated as equivalent to additive simple system:

+SS *SS
Change c by n Scale by cn
While c is not zero While c is a factor

See also