Flipfractal

From Esolang
Jump to navigation Jump to search

Flipfractal is an experimental variant of Memfractal, which was created by User:Zzo38. It takes ideas from BackFlip and the Memfractal specifications by User:Camto.

Specification

The program has an unlimited space and does not have to be bordered, but it has to have all of:

^ V < >

each occurring exactly once in the program, they are the entry points and exit points.

'#' (without quotes) is a reflector which reflects the IP back.

+ is the same as Memfractal, the program enters itself recursively with a separate copy.

/ and \ are the same as in BackFlip, they are flipping mirrors.

Programs can either be surrounded by '#'s, or, if the IP goes out of bounds, it will loop back around to the other side. Aka, the program takes place on a torus.

Examples

Truth-machine:

#V##
#/+<
>X #
#^##

if 1, X = / otherwise 0, X = \, come in from left

Alternative Truth Machine Design:

  1
 #V##
0>\+<1
 #^##
  0

Entry of program from 0 locations instantly halts. Entry of program from 1 locations loops forever.

Program showcasing tree stack memory and highly complex behavior:

#V###
#+++#
>/\\<
#^###

Extended Machine & Extended Machine Alternative?

#V##...###                  #V####...####
#+++...++#    and variant:  #?????...???#
>???...??<                  #+++++...+++#
#^##...###                  >?????...???<
                            #^####...####

where ? is either / or \ (or even include ' 's as well, if needed for NOPs (?))

The right-most machine variant appears to be the same machine, and the top part does not appear to effect it in any way.

(make it it's own language ?)

Multi-threaded Variant

Additional Commands | and -:

>|

and

V
-

splits IP into 2 IPs, and

Multiple entrances/exits are allowed:

 VVVV
>    <
 ^##^

However, there must be a minimum of one on each side, otherwise what will occur is undefined.

Halt/End Thread Instruction

 V 
B-<

B, the black hole, stops an IP and ends it. (The Black Hole is not necessary but does make certain programs easier to write. However, if someone wishes to exclude it from the specification because it makes things too unrestricted, that still counts, hence it is an optional instruction.)

Computational class

Unsure, based on my test programs it is (i think) at least as powerful as a Tree Stack Automaton, which is more powerful than a Push Down Automaton. I believe that it actually is a Tree Stack Automaton, in some sense, but I can't prove this just yet. There are two variants of Tree Stack Automata, restricted and unrestricted. Since the language here allows infinite nesting, it would count as unrestricted, therefore making it Turing Complete, however, this language still needs proof of being equivalent to a Tree Stack Automaton, and proof that the unrestricted part is usable.