code wiki / _hdl_build / nx_coedit_gate.nx
nx_coedit_gate.nx
buildroot/runtime/_hdl_build/nx_coedit_gate.nx
about
nx_coedit_gate.nx -- gate for the CO-EDITING KERNEL (RGA text CRDT). The rows ARE the CRDT laws:
1 type+apply a session of position-based edits materializes exactly
2 CONVERGENCE merge(A,B) and merge(B,A) apply to the SAME bytes (pinned): concurrent append after
the same char ordered by the (counter,replica) tie-break; a concurrent delete lands
3 tombstone-anchor inserting AFTER a concurrently-DELETED char still places correctly (RGA property)
4 idempotent-remerge merge(AB, A) == AB (byte-equal log; re-applying ops is a no-op)
5 edit-del position-based delete produces the pinned text
6 conflict-loud same op id with DIFFERENT content = LOUD protocol violation (never silent)
7 badref-loud insert after an unknown id = LOUD
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 13 | func eg_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8) { n=n+1 } return n } |
| 14 | func eg_p(s: *u8) -> i64 { sys_write(1, s, eg_slen(s)); return 0 } |
| 15 | func eg_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8) { dst[off+i]=s[i]; i=i+1 } return off+i } called by 1: main |
| 16 | func eg_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 22 | func eg_write(path: *u8, content: *u8) -> i64 |
| 26 | func eg_readall(path: *u8, szout: *i64) -> *u8 |
| 32 | func eg_runv(elf: *u8, args: *i64, outpath: *u8) -> i64 |
| 47 | func eg_has(path: *u8, needle: *u8) -> i64 |
| 54 | func eg_fileis(path: *u8, exact: *u8) -> i64 |
| 62 | func eg_fileeq(p1: *u8, p2: *u8) -> i64 |
| 73 | func eg_args6(a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8, a6: *u8) -> *i64 |
| 78 | func eg_row(name: *u8, pass: i64) -> i64 |
| 82 | func eg_mkempty(path: *u8) -> i64 |
| 87 | func eg_cp(src: *u8, dst: *u8) -> i64 |
| 95 | func main(argc: i64, argv: *i64) -> i64 |