Expand description
The bytecode debugger bridge — drives the LOGOS VM one op at a time for the
Studio debug drawer, with breakpoints, step-over / step-out, and time-travel
(step backwards through executed ops). Single-task, bytecode tier (tier: None)
so granularity is exactly one op and behaviour is identical to a normal run.
ZERO production cost: nothing here is on the execution path. The stepping rides
the VM’s STEPPED = true monomorphization (the default run_until_block is
byte-for-byte the old hot loop), and this whole module dead-strips from any
binary that never constructs a Debugger.
Time-travel falls out of the architecture for free: the debugger owns the
CompiledProgram and rebuilds a fresh VM each step from a saved state
snapshot, so it keeps the full snapshot history — stepping back is just
dropping the last snapshot.
Structs§
- Assertion
Result - The result of asserting a predicate at the cursor — the dual lens the debugger is
built for: what is true now (concrete, from live values) and what is proven
for every run (from the Oracle’s static facts, kernel-style interval entailment, no
Z3).
nowisNonewhen a term has no live integer value; the verdict isUnknownwhen a term has no proven range. - Causal
Node - A node in a causal provenance tree — the exact op that produced a value, and (recursively) the ops that produced its inputs. Because execution is deterministic and fully recorded, this lineage is exact, not heuristic: the answer to “why is this value here?” with no guessing.
- Debug
Frame - One call frame’s registers.
functionisNonefor Main;baseis the frame’s start address in the linear register file (its stack base), for the Stack view. - Debug
Reg - One register in a
DebugFrame.nameis the source variable when known (filled by the compiler’s debug-info pass;None⇒ showR{index}). - Debug
Snapshot - A complete picture of the paused VM for the debug drawer (serde for the UI).
- Debugger
- A self-contained stepping debugger over one compiled program.
- Heap
Object - One heap object for the Heap view: a list / map / set / struct / text reachable
from a variable or global.
referenced_bylists every root that points at it, soshared(more than one) makes aliasing visible — the thing assembly debuggers can’t show because they only have raw bytes, not typed objects. - Proven
Facts - A variable’s program-wide proven facts (from the Oracle’s static abstract
interpretation): a finite integer range, non-negativity, a concrete scalar type.
Every field is a sound guarantee that holds on every run — the static companion
to
VarInsight’s observed-this-run facts. - Proven
Insight - One variable’s proven invariants, pre-rendered for the UI (mirrors
VarInsight). - Timeline
Point - One sample on a
VarTrace: the variable’s display value at a single step, and whether it just changed (the waveform “edge”). - VarInsight
- One variable’s observed invariants — facts that held over the recorded run (constant, monotonic, range, distinct count). Dynamic likely-invariants, labelled as observed (not proven), the empirical companion to the Oracle’s static facts.
- VarTimeline
- A logic-analyzer view of the run: every Main-frame variable’s value across the recorded history, with a playhead at the time-travel cursor. Deterministic replay makes this exact — it is the program’s entire observable past, not a sample.
- VarTrace
- One variable’s value over the whole recorded execution — a trace on the
VarTimelineoscilloscope.points[i]is the value at explored steptimeline.start + i.
Enums§
- Proof
Verdict - The verdict of a live proof at a breakpoint — whether a predicate is statically
guaranteed across every run (
ProvenTrue), statically refuted (ProvenFalse), or undecided from the proven facts (Unknown, where only the concrete check speaks).