nx_canon_solver.nx
buildroot/runtime/nx_canon_solver.nx
about
nx_canon_solver.nx -- ★B1a of the published plan (/world/procgen): the CANON → CONSTRAINT bridge, i.e.
the canon's BEAUTY LINTER. Reads a body/face canon (P part headers + R control rings -- field semantics
read FROM nx_body_gen.nx bg_parse_canon, the emitter that owns the format: P <mirror> <rotX> <ox> <oy>
<oz> [mat] [rotZ] [rotY]; R <y> <x0> <z0> <a> <b>. This is the SECOND reader of that format -- extract a
shared canon lib on the THIRD, per the rule of three), emits `part p<i> <ox> <oy> <oz> <r>` rows, appends
a RULES file (an nx_part_solver conf referencing p<i> names: station/inside/clear/band/ratio -- the
anatomical + beauty bands as DATA), solves, and reports per-part TYPED vs SOLVED deltas.
nx_canon_solver <canon.dat> <rules.conf>
Outcomes: exit 0 CLEAN (every delta 0 -- the typed canon already satisfies the rules) | exit 0 ADJUSTED
(SOLVED with deltas>0: each delta is a NAMED lint finding and a writeback candidate) | exit 4
INCONSISTENT (rules unsatisfiable -- worst constraint named, never fabricated) | 3 parse | 1 io | 2 usage.
Bilateral symmetry is BY CONSTRUCTION in the emitter (mirror=1 emits both sides), so the rules carry the
OTHER relations: stations, containment, clearance, φ-band ratios between parts.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_part_solver_lib.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
| 17 | const CS_MAGIC_4096: i64 = 4096 |
| 19 | const CS_MAXP: i64 = 256 |
functions
| 22 | func cs_rdint(b: *u8, pos: *i64, end: i64) -> i64 called by 1: cs_parse |
| 47 | func cs_parse(b: *u8, len: i64, tx: *i64, ty: *i64, tz: *i64, tr: *i64, tm: *i64, nring: *i64) -> i64 |
| 93 | func cs_cats(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var p: i64 = o; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } return p } called by 1: main |
| 94 | func cs_catn(d: *u8, o: i64, v: i64) -> i64 |
| 107 | func main(argc: i64, argv: *i64) -> i64 |