code wiki / _hdl_build / nx_flip_score.nx

nx_flip_score.nx

buildroot/runtime/_hdl_build/nx_flip_score.nx

19228 B405 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind tooltopic flip
docsdependenciesstructsconstsfunctions

about

nx_flip_score.nx -- THE ASSET-AGNOSTIC COMPONENT-LEVEL FLIP ENGINE. Operator: "an engine not me typing every part" -- reads the part list ITSELF from the planes and CHOOSES the repair set component-by-component. Same math for a car, a house, any asset with value-bearing components (class/component/finding are DATA, not code). PER-COMPONENT (all downside-priced): margin_typ=lift_typ-repair_typ ; margin_p10=lift_low-repair_high MANDATORY (cost forced) / FLIPPOINT (margin_p10>=0) / SPECULATIVE (class-gated) / LEAVE. COVERAGE GATE: every MANDATORY catalog component for the class needs a finding, else REFUSED. DEAL GATE: BUY iff profit_p10>=gate_min AND days<=dts_cap. Every threshold from flip-class-. CONVERTED ONTO THE SHARED BASE nx_flip_lib.nx (fx_*); the ~17 private helpers are GONE. Behaviour PROVEN identical by nx_flip_gate staying 16/16 across the swap. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_flip_lib.nx nx_hazard_lib.nx nx_syscalls.nx nx_flip_score.nx

imports: nx_flip_lib.nxnx_hazard_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

main fx_puts sys_write sys_exit fx_atoi sts_mm sys_mmap nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sts_werr sys_write ↻ sys_exit ↻ fx_plane sts_mm ↻ sts_load sts_gen_note sts_pfxhash ss_max_segid sys_mmap ↻ ss_cat ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ss_segid_ok ss_open_cached

structs

none

consts

17const FL_ARGC_MIN: i64 = 10
18const FL_ARG_PFX: i64 = 10
19const FL_CC_GATE: i64 = 2
20const FL_CC_SPEC: i64 = 3
21const FL_CC_DTS: i64 = 4
22const FL_CC_SELLBPS: i64 = 5
23const FL_CC_HOLD: i64 = 6
24const FL_CK_CLASS: i64 = 1
25const FL_CK_MAND: i64 = 3
26const FL_CF_DEAL: i64 = 1
27const FL_CF_COMP: i64 = 2
28const FL_CF_COND: i64 = 3
29const FL_CF_REPLOW: i64 = 4
30const FL_CF_REPTYP: i64 = 5
31const FL_CF_REPHIGH: i64 = 6
32const FL_CF_LIFTLOW: i64 = 7
33const FL_CF_LIFTTYP: i64 = 8
34const FL_A_LEAVE: i64 = 0
35const FL_A_MAND: i64 = 1
36const FL_A_FLIP: i64 = 2
37const FL_A_SPEC: i64 = 3
45const FL_ARG_USAGE: i64 = 11
46const FL_ARG_HOLD: i64 = 12
47const FL_OBS_CLASS: i64 = 1
48const FL_OBS_COMP: i64 = 2
49const FL_OBS_USAGE: i64 = 3
50const FL_CFG_MINOBS: i64 = 1
51const FL_CFG_MINR2: i64 = 2
52const FL_MAXOBS: i64 = 4096
53const FL_HZSLOTS: i64 = 8

functions

67func fl_exposure(bo: *u8, no: i64, min_obs: i64, min_r2: i64, cls: *u8,
103func main(argc: i64, argv: *i64) -> i64