Expand description
Example files for the Studio playground.
These are seeded into the VFS on first launch to give users something to work with immediately.
Structs§
- Example
Spec - One shipped Studio example: where it seeds in the VFS, its mode, its source text (the live const), and the outcome it is locked to.
Enums§
- Expected
- The documented intended outcome an example is locked to. The test harness dispatches on this to the same pipeline the Studio uses for that mode.
- Mode
- Which Studio surface an example belongs to.
Constants§
- ALL_
CODE_ EXAMPLES - The 36 Code-mode examples. Output needles are provisional until the audit run confirms the real interpreter output.
- ALL_
HARDWARE_ SPECS - The 18 Hardware-mode examples, sourced from the four hardware slices. The
deliberately-unsafe demos (
bad-arbiter,traffic-crash,queue-jam,register-alloc-spill) are locked to their intended failure/refutation. - ALL_
LOGIC_ EXAMPLES - The 11 Logic-mode examples.
- ALL_
MATH_ EXAMPLES - The 24 Math-mode examples.
- CODE_
CRDT_ COUNTERS - CODE_
CRDT_ TALLY - CODE_
FIBONACCI - CODE_
HELLO - HARDWARE_
EXAMPLES - Seed only the advanced code examples (for existing installations).
Always overwrites to ensure latest syntax is used.
Hardware-mode examples:
(filename, English spec). Each is a single English hardware specification that the Studio synthesizes to SystemVerilog Assertions and then certifies (in-browser, no Z3) against the spec. Pure spec sentences — the loader feeds the whole file to the synthesizer. Thehardware_examplesintegration test verifies every one of these synthesizes, round-trips as certified-equivalent, and has a reachable trigger. - LOGIC_
BARBER - LOGIC_
LEIBNIZ - LOGIC_
QUANTIFIERS - LOGIC_
SIMPLE - MATH_
AUTO - MATH_
BOOL - MATH_
GODEL_ LITERATE - MATH_
INCOMPLETENESS_ LITERATE - MATH_
NAT - MATH_
PROP_ LOGIC - PIGEONHOLE_
EXAMPLES - Pigeonhole examples:
pigeons: N→ PHP(N),Npigeons intoN-1holes. Opened in Hardware mode;load_hardware_specroutes apigeons:spec to the live solver, which animates the doomed pigeon and emits a certified symmetry-breaking refutation (Hall witness + Heule PR proof, no Z3) — the family every resolution-based solver (Kissat, CaDiCaL, Z3) needs2^Ω(n)steps on. - REGALLOC_
EXAMPLES - Register-allocation examples: a basic block’s variable live ranges + a register budget. Opened
in Hardware mode;
load_hardware_specroutes aregisters:spec to the certified linear-scan allocator and renders the live-range timeline (coloured by register, spill clique flagged red). - RTL_
EXAMPLES - RTL examples:
(filename, Verilog). Synthesizable Verilog the Studio parses into a transition system and bounded-model-checks / k-induction-proves in the browser (no Z3). Verified by thehardware_examplesintegration test. Opened in Hardware mode (they live under/examples/hardware);load_hardware_specroutesmodule … endmodulecontent to the RTL BMC path.
Functions§
- seed_
examples - Seed example files into the VFS if they don’t exist.