code wiki / _hdl_build / nx_biotwin_board.nx

nx_biotwin_board.nx

buildroot/runtime/_hdl_build/nx_biotwin_board.nx

21290 B327 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic biotwin
docsdependenciesstructsconstsfunctions

about

nx_biotwin_board.nx -- THE DIGITAL-HUMAN-TWIN CAPABILITY BOARD: how far is the ecosystem from a credible human body twin, graded by the REGULATOR'S OWN RULER instead of one we invented? RULER = ASME V&V 40-2018 + FDA 2023 final guidance "Assessing the Credibility of Computational Modeling and Simulation in Medical Device Submissions" -- already ingested and adversarially verified 3-0 against PRIMARY ASME/FDA sources in our own corpus (cid 6199859983256447418). We did not author this ruler and cannot bend it. Its central law: REQUIRED CREDIBILITY IS COMMENSURATE WITH MODEL RISK, where model risk = model INFLUENCE x DECISION CONSEQUENCE, anchored to a declared Question of Interest (QOI) and Context of Use (COU). A model credible for visualisation is NOT credible for a clinical decision, and saying otherwise is the exact failure the guidance exists to stop. HONEST BY CONSTRUCTION: - coverage is COMPUTED from the axis rows, never hand-written; - every HAVE names an evidence artifact; nx_biotwin_board_gate stats each one on disk and liar-kills any verdict whose artifact does not exist; - readiness is reported PER QOI at its own COU tier, so a high visualisation score can never be quoted as clinical readiness -- the number is bound to the claim it is allowed to support; - the GAP QUEUE is demand-ranked (an axis blocking N questions outranks one blocking 1). That queue IS the build order. ***THE FENCE (rule-26 never-brick, applied to bodies instead of hardware)*** CLAUDE.md rule 26 forbids any capability that can brick hardware, and demands it be proven MECHANICALLY rather than promised. The same construction is applied here to the two COU tiers where a wrong answer injures a person instead of a device: FENCE 1 (COU-3 clinical): an axis cannot score above GAP without in-vivo + population validation evidence, which does not exist and cannot be faked past the gate. FENCE 2 (COU-4 molecular/actuation): genomic target inference, edit/vector design emission, and any wet-lab or patient actuation are OUT OF SCOPE BY LAW. This stack designs and simulates; it never actuates on tissue or a person. The fence is a CLAMP, not a comment: axclaim[] holds what anyone asserted, axv[] holds what the board computes, and the clamp forces axv=GAP on every fenced axis. Axis 21 ships a DELIBERATE PLANTED LIE (axclaim=HAVE) as a PERMANENT runtime neg-control -- if fence_blocked ever reads 0 the fence is dead and the gate goes RED. The safety property is therefore re-proven on every single run, not asserted. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_biotwin_board.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 mk bit hasbit bit ↻ ocat onum sys_mmap ↻ vstr fstr sys_write

structs

none

consts

36const K_MAGIC_262144: i64 = 262144

functions

48func ocat(o: *u8, at: i64, s: *u8) -> i64 { var i: i64=0; var a: i64=at; while s[i]!=(0 as u8){o[a]=s[i]; a=a+1; i=i+1} return a }
called by 1: main
49func onum(o: *u8, at: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
59func bit(i: i64) -> i64 { var v: i64=1; var k: i64=0; while k<i { v=v*2; k=k+1 } return v }
called by 2: hasbitmk
60func hasbit(mask: i64, i: i64) -> i64 { let b: i64=bit(i); if (mask/b)%2==1 { return 1 } return 0 }
called by 1: main calls 1: bit
61func mk(a: i64,b: i64,c: i64,d: i64,e: i64,f: i64,g: i64,h: i64,i: i64,j: i64) -> i64
called by 1: main calls 1: bit
75func vstr(v: i64) -> *u8 { if v==2 { return "HAVE" as *u8 } if v==1 { return "PARTIAL" as *u8 } return "GAP" as *u8 }
called by 1: main
76func fstr(f: i64) -> *u8
called by 1: main
82func main() -> i64