nx_quality_grade_test.nx
buildroot/runtime/nx_quality_grade_test.nx
about
nx_quality_grade_test.nx -- smoke: synthesize a tiny Module IR and
grade it via every Layer-0 rule. Asserts:
license_tier: ORIGINAL
1. Sealed-enum validity predicates accept all in-range values and
reject out-of-range.
2. A clean synthetic Module (1 main function, 0 BR_COND, 5 instrs,
no dead funcs) grades A.
3. A messy synthetic Module (1 function with CCN > 25, 1 dead
function) grades D or worse.
4. The grader correctly counts findings per category.
We hand-build Module + Function structs in mmap'd memory instead of
running the self-host parser. This isolates the grader logic from
any parser bugs and lets the smoke run in milliseconds.
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_runtime.nxnx_types.nxnx_tier.nxnx_quality_grade.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
| 26 | func _build_function(name: *u8, name_len: nx_int, |
| 70 | func _build_module_1fn(f0: *Function) -> *Module |
| 94 | func _build_module_2fns(f0: *Function, f1: *Function) -> *Module |
| 111 | func main() -> nx_int |