code wiki / _hdl_build / nx_teacher_trainer_gate.nx
nx_teacher_trainer_gate.nx
buildroot/runtime/_hdl_build/nx_teacher_trainer_gate.nx
about
nx_teacher_trainer_gate.nx -- proves the TRAINER: spaced-retrieval scheduling + the coverage meter,
over a hermetic /tmp capability store. Time is passed explicitly so spacing is testable.
T1 all-new-due: 3 fresh insights -> due=3
T2 zero-coverage: nothing practiced -> covered=0
T3 practice records reps=1, interval=1 (first practice -> 1-day spacing)
T4 not-due-within-interval: just-practiced I1 is NOT due at T (due=T+1day)
T5 coverage rises: covered=1 after practicing I1
T6 due-resurfaces: at T+2days I1 is due again (spacing elapsed) -> due=3
T7 spacing-grows: second success doubles interval (1 -> 2)
T8[neg] only-practiced-counts: I2/I3 never practiced -> coverage stays 1 (no fake coverage)
T9 full: practice I2,I3 -> coverage=3 and due=0 (all freshly scheduled into the future)
GREEN iff all. Sovereign: imports nx_teacher_trainer + nx_syscalls. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_teacher_trainer.nxnx_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
| 17 | func gt_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != 0 as u8 { n = n + 1 } sys_write(1, s, n); return 0 } |
| 18 | func gt_putn(v: i64) -> i64 |
| 27 | func gt_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 } |
| 28 | func gt_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 36 | func gt_join(out: *u8, a: *u8, b: *u8) -> i64 { var o: i64 = gt_cat(out, 0, a); o = gt_cat(out, o, b); out[o] = 0 as u8; return o } |
| 37 | func gt_mkdir(path: *u8) -> i64 { return sys_mkdir(path, 0x1ed) } |
| 38 | func gt_write(path: *u8, content: *u8) -> i64 |
| 44 | func gt_assert(label: *u8, cond: i64) -> i64 |
| 49 | func main() -> i64 |