Skip to content
Mirror-C HelpA notional machine for C
06 / Reference

Reference

Everything in this chapter is also reachable by exploring the interface. It is here so you do not have to.

Keyboard shortcuts

KeysAction
RLoad
or .Step
or ,Back
SpacePlay / pause
Ctrl + NNew workspace
Ctrl + OOpen…
Ctrl + SSave workspace
Ctrl + EnterApply the Code tab's text back to the blocks
Ctrl + ZUndo one block edit
Ctrl + Shift + PCommand palette — every command by name
EscClose whatever is currently open

Ctrl+N/O/S are suppressed while the Code tab's text editor has focus — there, those keys belong to the editor. Arrow keys also move focus between inspector tabs and along a resizer handle once it has focus.

Command palette

Ctrl+Shift+P, searchable by name and grouped by category:

GroupCommands
FileNew workspace · Open… · Save workspace · Export C source… · Save screenshot… · Restore autosave
MachineRun (Load + Play) · Load · Step · Back · Play / Pause · Run to end
ViewToggle light/dark theme · Toggle block palette · Toggle code panel · Toggle machine dock · Toggle maximize inspector · Toggle maximize machine dock
CodeCopy program as C text
ExamplesOne command per example, loading it by name
MenuContents
FileNew · Open… (.m_c) · Save workspace · Import C source… (.c/.txt) · Export C source… · Save screenshot… · Restore autosave
ExamplesTwenty-six programs grouped Simple / Intermediate / Advanced. Hovering previews the one-line description in Overview § The example library; loading over existing blocks asks first.
ViewToggle theme (default light) · show/hide the block palette, code panel and machine dock · autosave interval (1–20 minutes) · perspective picker · maximize inspector · maximize machine dock

Open and Import are deliberately separate doors: Open takes only a Mirror-C workspace, Import takes only C or plain text into the Code tab, and each names the other if you hand it the wrong kind of file.

Perspectives & layout

A perspective is a named preset of which panels are open, not a mode with state of its own. It reads each panel's current collapse state and clicks only the ones that disagree with the preset — so toggling any one panel by hand afterwards demotes the current perspective to Custom rather than leaving a label on screen that no longer describes the layout.

PerspectiveShows
PresentationBlocks and the machine dock; the palette and inspector step away, and the canvas zooms in.
EditAll four regions, for building a program.
DebugAll four regions, tuned toward stepping and the machine dock.
CustomWhatever you have arranged by hand.

The layout is responsive at five widths: below 1260px the side panels' widths cap; below 1100px they become overlay drawers opened from the workspace title bar and dismissed by the scrim or Esc; below 900px the menu bar collapses behind a single Menu toggle; below 700px the chrome grows to touch size and the machine dock becomes a bottom sheet; at 480px the toolbar thins to essentials. The machine dock also has its own maximize button, independent of the inspector's, for a deep stack or a large heap that the resizer alone cannot make room for.

The machine dock maximized, taking most of the window height while the code panel shrinks to a strip above it, with the workspace still visible in a narrow band.
Fig. 1 The machine dock maximized — the workspace stays visible in a narrow band rather than being covered outright.

File formats

FormatHolds
.m_cA workspace, saved as a JSON envelope carrying a format tag and a version. A file that does not match either is refused with a message rather than half-loaded.
C textNot a saved format of its own, but Export C source writes your program as plain .c, and Import C source reads one back into the Code tab, applying it at once if it parses.
Local storageThe rolling autosave, plus your layout, theme, perspective and autosave interval. Autosave never restores itself on load — you bring it back with Restore autosave, so a silent auto-restore can never race the application's own boot demo.

If you are in a research session, a separate, much narrower record is also kept — see If you are in a study session for exactly what that contains.

Glossary

TermMeans
SF-CESKThe abstract machine: store, control, environment, expression and statement kontinuations, and a frame stack. Mirror-C's own configuration adds an output component on top, for printf.
CellOne unit of storage in the store. Its drawn width is its type's sizeof.
Edge / arrowHow a pointer value is drawn — a line to the cell it points at, never a numeric address.
FrameOne live function call's box in the Stack region, holding its own cells.
ReasonThe closed, twelve-member label a stuck configuration carries. See Semantics.
Dead cellA cell whose frame returned or was freed. Stays drawn, greyed, and its address is never reused.
PerspectiveA named panel-visibility preset, applied only where it disagrees with the current layout.
Divergence corpusTwelve programs, one per stuck reason, each recording what gcc, clang and Mirror-C do with it.

Mirror-C is developed at L-Workshop. This help was written against the build running at m-c.l-workshop.my.id.