code wiki / _hdl_build / nx_sim_risk_cou_gate.nx
nx_sim_risk_cou_gate.nx
buildroot/runtime/_hdl_build/nx_sim_risk_cou_gate.nx
about
nx_sim_risk_cou_gate.nx -- the RISK-INFORMED CREDIBILITY framework (ASME V&V 40-2018 + FDA 2023 CM&S guidance),
the structural credibility axis our census flagged ABSENT. Grounded in deep-research (verified 3-0 vs ASME/FDA
primary sources): MODEL RISK = model influence x decision consequence; credibility must be COMMENSURATE with
model risk; a Context of Use (COU) + Question of Interest (QOI) anchor the assessment; for each credibility
factor a GRADATION of rigor is defined and a credibility GOAL is chosen commensurate with risk (a goal below
the risk-commensurate level requires a documented rationale). The decisive honest insight: credibility is
COU-RELATIVE -- the SAME sim is credible-enough for a LOW-risk COU yet falls short for a HIGH-risk COU. This
organ grades 3 COUs of our orbit sim, computes risk->goal->achieved->verdict, encodes the FDA 9-step process +
8 evidence categories, and liar-kills any claim that a high-risk COU is met on low evidence. GREEN iff 6/6.
license_tier: ORIGINAL
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
| none |
functions
| 13 | func g_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 14 | func g_n(v: i64) -> i64 { var m: i64=v; if m<0{g_w("-");m=0-m} let t:*u8=sys_mmap(24); var k:i64=0; if m==0{t[0]=48 as u8;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i:i64=0; let o:*u8=sys_mmap(24); while i<k{o[i]=t[k-1-i];i=i+1}; sys_write(1,o,k); return 0 } |
| 15 | func g_row(id: *u8, ok: i64, pass: *i64) -> i64 { g_w(" "); g_w(id); g_w(": "); if ok==1 { g_w("OK\n"); pass[0]=pass[0]+1 } else { g_w("FAIL\n") } return 0 } |
| 16 | func riskname(r: i64) -> *u8 { if r==1 { return "LOW " as *u8 } if r==2 { return "MED " as *u8 } return "HIGH" as *u8 } called by 1: main |
| 18 | func model_risk(inf: i64, cons: i64) -> i64 { let s: i64=inf+cons; if s<=2 { return 1 } if s>=5 { return 3 } return 2 } called by 1: main |
| 20 | func goal_for(risk: i64) -> i64 { return risk } called by 1: main |
| 22 | func main() -> i64 |