code wiki / _hdl_build / nx_ale_suite.nx
nx_ale_suite.nx
buildroot/runtime/_hdl_build/nx_ale_suite.nx
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
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
| 19 | const K_MAGIC_65536: i64 = 65536 |
| 20 | const K_MAGIC_1000001: i64 = 1000001 |
| 21 | const K_MAGIC_2048: i64 = 2048 |
| 22 | const K_MAGIC_2047: i64 = 2047 |
functions
| 24 | func 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 } |
| 25 | func 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 } |
| 26 | func 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 } |
| 27 | func su_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 28 | func su_unlink(path: *u8) -> i64 { return __syscall(263, AT_FDCWD, path, 0, 0, 0, 0) } |
| 30 | func su_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 44 | func su_score_of(path: *u8) -> i64 |
| 53 | func su_write_file(path: *u8, buf: *u8, n: i64) -> i64 |
| 63 | func su_idx_path(dst: *u8, prefix: *u8, idx: i64) -> i64 |
| 79 | func su_run_harness(task: *u8, sb: *u8, out: *u8, score: *u8) -> i64 |
| 102 | func su_run_suite(manifestpath: *u8, res: *i64, verbose: i64) -> i64 |
| 148 | func main(argc: i64, argv: *i64) -> i64 |