code wiki / (root) / nx_spend_analyze_gate.nx

nx_spend_analyze_gate.nx

buildroot/runtime/nx_spend_analyze_gate.nx

3611 B57 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_spend_analyze_gate.nx -- proves the spend analyzer on a hand-computed monthly budget: housing $1500 (need,recurring), groceries $400 (need), dining $300 (want), subscriptions $80 (want,recurring), entertainment $120 (want), savings $200 (save,recurring). Total $2600. Verifies class totals + 50/30/20 percentages, the largest-want cut target, subscription drain (+ annual cost), and the situation-aware "how much to cut from wants to hit a savings goal". Exit 0 iff all pass. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_gate.nx nx_spend_analyze.nx nx_spend_analyze_gate.nx

imports: nx_gate.nxnx_spend_analyze.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main chk gw sys_write gn sys_write ↻ sys_mmap sp_total sp_total_by_class sp_class_pct_bps sp_total ↻ sp_total_by_class ↻ sp_class_gap_bps sp_class_pct_bps ↻ sp_largest_want sp_recurring_total sp_recurring_want_total sp_recurring_want_annual sp_recurring_want_total ↻ sp_potential_savings sp_total_by_class ↻ sp_required_want_cut sp_target_reachable_by_wan gw ↻ gn ↻

structs

none

consts

none

functions

9func chk(name: *u8, got: i64, want: i64, st: *i64) -> i64
called by 1: main calls 2: gwgn
15func main() -> i64