code wiki / _hdl_build / nx_ale_suite.nx

nx_ale_suite.nx

buildroot/runtime/_hdl_build/nx_ale_suite.nx

9803 B207 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic ale
docsdependenciesstructsconstsfunctions

about

nx_ale_suite.nx -- ALE-R4: the sovereign ALE SEED-TASK SUITE runner. Reads a manifest (one task spec path per line, '#' comments skipped) and MEASURES each task end-to-end via _offc/ nx_ale_harness.elf (the ALE-R1 measure: run agent -> INDEPENDENT deterministic grade -> [0,1]), collecting the per-task milli-scores and aggregating (n_tasks / n_scored / min / mean). The benchmark layer over the measure -- "author N code-graded tasks + measure them" -> one suite verdict + a per-task score breakdown. Reuses the harness (DRY): no duplicated agent/grade logic. args mode: nx_ale_suite <manifest> -> measure that manifest, print SUITE + per-task scores. no-arg: SELF-GATE on the real seed manifest (knowledge/specs/ale_suite.manifest) -> POS all tasks scored + bounded + >=4 tasks -> mean; NEG baked control (a manifest with a BROKEN task -> harness fails -> that task UNSCORED -> all_scored=0) proves the suite DETECTS unsolved (no vacuous green). SUITEGATE verdict=GREEN/RED to knowledge/status/ale_suite.log + stdout. Landmines: nested ifs (no &&/||), flat exprs, <=6 args/func, no empty-string literal, strings via Write. license_tier: ORIGINAL module: nishi-core.ale.suite depends: nishi-core.sys.syscalls capability: ALE_SEED_TASK_SUITE

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_ale_suite.nx

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

main sys_mmap su_p sys_write su_run_suite sys_mmap ↻ su_read sys_openat_rd sys_read sys_close su_idx_path sys_mmap ↻ sys_mkdir su_unlink su_run_harness sys_fork sys_openat_wr sys_dup3 sys_mmap ↻ sys_execve sys_exit sys_wait4 su_score_of sys_mmap ↻ su_read ↻ su_p ↻ su_fn sys_mmap ↻ sys_write ↻ su_fn ↻ sys_exit ↻ su_write_file su_unlink ↻ sys_openat_wr ↻ sys_write ↻ sys_close ↻ sys_openat_append su_fp sys_write ↻ sys_now_realtime_sec

structs

none

consts

19const K_MAGIC_65536: i64 = 65536
20const K_MAGIC_1000001: i64 = 1000001
21const K_MAGIC_2048: i64 = 2048
22const K_MAGIC_2047: i64 = 2047

functions

24func su_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: su_run_suitemain calls 1: sys_write
25func su_fp(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 1: main calls 1: sys_write
26func su_fn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64 = v; if m < 0 { m = 0 - m; sys_write(fd, "-" as *u8, 1) }; let t: *u8 = sys_mmap(28); var k: i64 = 0; if m == 0 { t[0] = 48; k = 1 }; while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 }; var i: i64 = 0; while i < k { bb[i] = t[k - 1 - i]; i = i + 1 }; sys_write(fd, bb, k); return 0 }
called by 2: su_run_suitemain calls 2: sys_mmapsys_write
27func su_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
30func su_read(path: *u8, buf: *u8, cap: i64) -> i64
44func su_score_of(path: *u8) -> i64
called by 1: su_run_suite calls 2: sys_mmapsu_read
53func su_write_file(path: *u8, buf: *u8, n: i64) -> i64
63func su_idx_path(dst: *u8, prefix: *u8, idx: i64) -> i64
called by 1: su_run_suite calls 1: sys_mmap
79func su_run_harness(task: *u8, sb: *u8, out: *u8, score: *u8) -> i64
102func su_run_suite(manifestpath: *u8, res: *i64, verbose: i64) -> i64
148func main(argc: i64, argv: *i64) -> i64