Help
Getting around
- Type a program in the source view, or open one from examples ▾. It compiles as you type, and an error is marked where it is.
- Step it with the step controls: ▶ one step forward, ◀ one step back, ↺ back to step 0, play and pause at the chosen speed. A long run records as much as its budget allows, then offers to keep recording or to continue past its step cap.
- Click a token in the source, a λ token, an rxm or clif instruction or a machine rule, and the other views show the same point of the program.
- The view buttons in the header choose which views are shown: source, λ, TM, rxm and clif. The rxm view shows redextape's register machine, the IR between the source and the Turing machine: its control flow becomes the machine's states, and its registers, stack and heap become the machine's tapes. A software interpreter steps it, and it is not x86, ARM, WebAssembly or LLVM output. The clif view shows Cranelift's IR: what the native backends build from the rxm program, stepped one clif instruction at a time by the rules the compiled program runs by. Its as built and optimised buttons switch between redextape's lowering before Cranelift's passes and Cranelift's output at every opt level from O1 up, the same for every target. Its step cap counts loop iterations, as the compiled program's does, not instructions. In the TM, rxm and clif views, a value, an instruction or a line cut short reads whole in a tooltip while the pointer rests on it. Each combination of views keeps its own arrangement, so views come back where they were left. A window about 640 px wide or narrower, at the browser's usual text size, has no room for the buttons; the workspace menu holds them there, in its show row.
- A view's ⋯ menu has edit a copy: the term, the machine or the rxm program as text you can change and run on its own. copies ▾ lists them.
- share makes a link to the program, the views and where each one stands; the workspace menu (Explorer ▾ at first) switches between the Explorer, Debugger and Stage presets; and settings holds the style, palette, appearance and keymap choices, and whether to format when leaving the editor.
Keys in the editors
| Key | Does | Where |
|---|---|---|
| F12 | go to the definition of the name at the caret | the source, and machine and rxm copies |
| Shift+F12 | go to the next reference to it | the source, and machine and rxm copies |
| F2 | show what the editor knows about the name at the caret | the source, and machine and rxm copies |
| Ctrl+' (⌘+' on a Mac) | link the caret's position to the other views | the source editor |
A λ copy's editor has no definitions or references to go to, so these three do nothing there. Everything else is the editor's default keymap, or vim's when settings sets the keymap to vim.
View keys
Press Ctrl+. and then one of these keys, from anywhere on the page, an editor included. Ctrl may stay held for the second key or not. The key after the prefix acts once; any other key is typed as usual, and Esc, or Ctrl+. again, leaves without doing anything.
| Key | Does |
|---|---|
| ] | the next layout |
| [ | the previous layout |
| 1 | show or hide source |
| 2 | show or hide λ |
| 3 | show or hide TM |
| 4 | show or hide rxm |
| 5 | show or hide clif |
The layouts ] and [ step through are the source beside λ, the source beside TM, the source beside rxm, and all four.
Keys in the views
| Where | Keys |
|---|---|
| the λ term | ↑ ↓ PgUp PgDn Home End move between rows; → opens what is folded on the row and ← folds it again; Enter opens a fold, or links the row when nothing on it is folded |
| the machine's rules, the rxm and clif listings | ↑ ↓ PgUp PgDn Home End move between rows; Enter links the row |
| the state diagram, program level | the same keys move between rows; Enter links the row, or on a row of sub-steps shows its states; ↑ ↓ move between the runtime boxes, and Enter or Space links one |
| the state diagram, local level | ↑ ↓ ← → move between states; Enter or Space links one; + or = zooms in and - out; 0 puts the level back at full size, centred, as pressing local again does |
| any view, outside its editors | Esc clears the link, as a click on empty space in a view does; with a menu or dialog open it closes that instead, and in a TM view's width box it first puts back a width typed there |
| the divider between two views | ← →, or ↑ ↓ when the views are stacked, resize them |
| the boundary between two panels of a view | ↑ ↓ resize them; Enter puts both back to the size they start with. With a pointer, drag the lower panel's header, and double-click it to put them back |
| the Stage layout's tabs | arrow keys, Home and End move between tabs; Enter or Space shows the view |
| a choice in a view's ⋯ menu or a panel's header | arrow keys move the choice — the term map's mode, the state diagram's level and edges, and the like |