TMIDL
Jump to navigation
Jump to search
- This is still a work in progress. It may be changed in the future.
Designed by | User:Luihum |
---|---|
Appeared in | 2021 |
Memory system | cell-based, register-based |
Dimensions | one-dimensional, two-dimensional |
Computational class | Unknown |
Reference implementation | Unimplemented |
File extension(s) | .tmidl |
TMIDL (Turing Machine Instruction Description Language) is a language that describes Turing machine programs, with additional commands (extensions) for video output, registers and 2D operations.
Core interpreter directives
Directive | Description | Example |
---|---|---|
%tmidl <version> |
Program header. This must be the first line in any TMIDL program. | %tmidl 1.1
|
%tapesize <size> |
Defines the tape size. | %tapesize 512
|
%states <state-list> |
Defines all state characters used by the program. | %states ABCDE
|
%symbols <symbol-list> |
Defines all symbol characters used by the program. | %symbols 01234
|
>%tape |
The value to initialize the tape to. The rest of the tape is blank. | %tape 001221020102343
|
%halt <halt-characters> |
Defines the characters that halt the program. Defaults to # . |
%halt H!
|
%include <extension> |
Includes an extension. Read #Extensions for a list of extensions. | %include registers
|
%pos <number> |
Defines the initial position of the head. Defaults to 0. | %pos 5
|
Syntax
Each instruction has two parts, the condition and action. Extensions may have their own syntax, as explained later.
A57LC
||||\------------> next state
|||\-------------> direction to move head: Left or Right
||\--------------> symbol to write (- for none, / for blank)
|\---------------> read symbol condition (- any, / blank)
\----------------> state condition
Comments are made using ~
.
Extensions
The following extensions can be used with the %include
directive.