code wiki / _hdl_build / nx_depcycle.nx
nx_depcycle.nx
buildroot/runtime/_hdl_build/nx_depcycle.nx
about
nx_depcycle.nx -- ACYCLIC DEPENDENCIES PRINCIPLE checker (industry SOTA, grounded in nishi research:
corpus confirms Coupling / Cohesion / Dependency-inversion / Clean-architecture as the canon). Reads
the ecosystem IMPORT GRAPH (the atlas edges) and finds circular dependencies: A imports B imports ...
imports A. Cycles are the top structural smell -- organs in a cycle can't be built / understood / tested
/ reused independently, blocking modular OO design (Robert Martin, "Clean Architecture", ADP). Uses
KAHN topological reduction (iterative, no recursion): repeatedly remove zero-in-degree nodes; whatever
remains with in-degree>0 is trapped in a cycle = the ADP-violation set. Deterministic.
argv: <dir> [dir2...]
Report: CYCLENODE <basename> (each node still trapped after reduction), then
NX-DEPCYCLE nodes=N edges=E cyclic=C verdict=ACYCLIC|CYCLIC-C
exit 0 = ran. license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_seat_drive_lib.nxnx_deploy_lib.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
| 15 | const DC_MAGIC_262144: i64 = 262144 |
| 16 | const DC_MAGIC_1024: i64 = 1024 |
| 18 | const DC_MAXN: i64 = 30000 |
| 19 | const DC_MAXE: i64 = 200000 |
| 20 | const DC_NB: i64 = 65536 |
| 21 | const DC_NAMEBUF: i64 = 3145728 |
| 22 | const DC_FILECAP: i64 = 2097152 |
| 23 | const DC_FNV_OFF: i64 = 1469598103934665603 |
| 24 | const DC_FNV_PRIME: i64 = 1099511628211 |
functions
| 26 | func dc_isid(c: i64) -> i64 |
| 34 | func dc_ends_nx(nm: *u8) -> i64 called by 1: main |
| 41 | func dc_fnv(buf: *u8, s: i64, e: i64) -> i64 |
| 57 | func dc_streq(buf: *u8, s: i64, l: i64, name: *u8, no: i64, nl: i64) -> i64 |
| 64 | func dc_intern(src: *u8, s: i64, e: i64) -> i64 |
| 89 | func dc_find(src: *u8, s: i64, e: i64) -> i64 |
| 101 | func main(argc: i64, argv: *i64) -> i64 |