code wiki / _hdl_build / nx_editor_canvas_gate.nx

nx_editor_canvas_gate.nx

buildroot/runtime/_hdl_build/nx_editor_canvas_gate.nx

18224 B298 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic editor
docsdependenciesstructsconstsfunctions

about

nx_editor_canvas_gate.nx -- the editor engine: snap/align/distribute/nudge, the ORIGINAL one-deep snapshot undo, and the OPERATION-STACK adoption that gives the canvas real multi-level undo, redo, bit-exact replay and re-evaluation at depth. PART A IS A REGRESSION GUARD AND IS DELIBERATELY UNCHANGED. T1..T6 are the six assertions this gate already made, on the same fixtures with the same expected numbers, exercising ec_snap_all / ec_align / ec_distribute_h / ec_nudge / ec_save / ec_undo through the ORIGINAL direct-call path. They are also the POSITIVE CONTROL for part B: if adopting the stack had broken the engine underneath, or if the new guards refused work they should allow, these six would go red. PART B PROVES THE ADOPTION, and its anti-vacuity tooth is T11. A one-deep snapshot passes a single undo -- T9 alone cannot tell the two designs apart. Only undo-undo-undo followed by redo-redo-redo separates a log from a snapshot, because the snapshot holds exactly one state and has nothing to return to on the second call. T17 is the second anti-vacuity tooth: it proves the canvas the caller renders IS the stack's own memory rather than a copy kept in step by hand. 100% sovereign. No hardware writes (Rule 26). expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_editstack_lib.nx nx_editor_canvas.nx nx_editor_canvas_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_editstack_lib.nxnx_editor_canvas.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ put ec_snap_all bs_snap pv gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_check gv_puts ↻ eq ec_align ec_distribute_h ec_nudge ec_save ec_undo ecs_new es_new

structs

none

consts

none

functions

23func eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 }
called by 1: main
24func ne(a: i64, b: i64) -> i64 { if a != b { return 1 } return 0 }
called by 1: main
25func put(c: *i64, i: i64, x: i64, y: i64, w: i64, h: i64) -> i64 { c[i*5+0]=0; c[i*5+1]=x; c[i*5+2]=y; c[i*5+3]=w; c[i*5+4]=h; return 0 }
called by 1: main
26func pv(label: *u8, v: i64) -> i64 { gv_puts(label); gv_num(v); gv_puts("\n" as *u8); return 0 }
called by 1: main calls 2: gv_putsgv_num
27func streq(a: *u8, b: *u8) -> i64
called by 1: main
34func main() -> i64