code wiki / (root) / nx_icecream_bench.nx

nx_icecream_bench.nx

buildroot/runtime/nx_icecream_bench.nx

22866 B538 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind bench
docsdependenciesstructsconstsfunctions

about

nx_icecream_bench.nx -- THE RULER. Score a frozen dessert against Ben & Jerry's Vanilla, the declared SOTA reference for this lane. ===== WHY A RULER COMES FIRST ==================================== "Exceed Ben & Jerry's" is not a formulation instruction until something can SCORE both products on the same axes. This organ is that scorer. It holds no ambition and proposes no recipe: it computes what a label implies, what the law actually permits, and where the reference product is structurally weak. The formulator is a separate organ and must be argued WITH this one, never instead of it. ===== THE REFERENCE, FROM THE ACTUAL LABEL ======================= Ben & Jerry's Vanilla, US pint, UPC 076840400058. Ingredient declaration in order: Cream, Skim Milk, Liquid Sugar (Sugar, Water), Water, Egg Yolks, Sugar, Guar Gum, Vanilla Extract, Vanilla Beans, Carrageenan. Nutrition panel, 2/3 cup (143 g) serving: 330 kcal, 21 g fat (14 g sat), 29 g carbohydrate (28 g sugars), 6 g protein, 95 mg cholesterol. Pint = 16 fl oz = 473 mL, 3 servings => 429 g net. The net weight is DERIVED (US frozen dessert is sold by volume; weight is not declared), and bench_net_weight_is_derived says so. **TWO FACTS IN THAT DECLARATION DECIDE THE WHOLE COMPETITIVE PICTURE:** 1. The only hydrocolloids are GUAR (primary) and CARRAGEENAN (secondary). There is no locust bean gum -- which matters because this lane's own gap ledger had named LBG as "how industry slows recrystallisation". The actual competitor does not use it. 2. There is NO ADDED EMULSIFIER. Egg yolk is the entire emulsifier system -- no mono- and diglycerides, no polysorbate 80. That is the exploitable weakness, and it is the reason this organ models meltdown. ===== THE LEGAL FINDING THIS ORGAN CARRIES ======================= 21 CFR 135.110 imposes FOUR floors on anything labelled "ice cream": >=10% milkfat, >=20% total milk solids, >=4.5 lb/gal finished weight, and >=1.6 lb TOTAL FOOD SOLIDS per gallon. nx_icecream enforces the first three. It declares IC_FDA_MIN_FOOD_SOLIDS_Q2 = 160 for the fourth and then never reads it -- a dead constant, so the fourth floor is documented

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_icecream_bench.nx nx_icecream_bench_gate.nx

imports: nx_syscalls.nx

imported by: nx_icecream_bench_gate.nx

structs

114struct BenchProduct

consts

72const BENCH_MAGIC_10000: i64 = 10000
73const BENCH_MAGIC_1000000: i64 = 1000000
77const BENCH_INVALID: i64 = 0 - 1
80const BENCH_FLOOR_NONE: i64 = 0
81const BENCH_FLOOR_WEIGHT: i64 = 1
82const BENCH_FLOOR_SOLIDS: i64 = 2
85const BENCH_EMUL_NONE: i64 = 0
86const BENCH_EMUL_EGG_YOLK: i64 = 1
87const BENCH_EMUL_MONO_DI: i64 = 2
88const BENCH_EMUL_MONO_DI_PS80: i64 = 3
94const BENCH_SV_FAT_Q3: i64 = 1075
95const BENCH_SV_SNF_Q3: i64 = 630
96const BENCH_SV_WATER_Q3: i64 = 1000
98const BENCH_ML_PER_GAL: i64 = 3785
99const BENCH_G_PER_LB: i64 = 454
101const BENCH_FDA_MIN_LB_PER_GAL_Q2: i64 = 450 // 4.5 lb/gal finished weight
102const BENCH_FDA_MIN_FOOD_SOLIDS_Q2: i64 = 160 // 1.6 lb food solids/gal
103const BENCH_FDA_MIN_MILKFAT_PERMIL: i64 = 100
104const BENCH_FDA_MIN_MILK_SOL_PERMIL: i64 = 200
107const BENCH_RACC_TENTH_ML: i64 = 1577
162const BENCH_HD_SERVING_G: i64 = 128
475const BENCH_DRIP_LOW_DESTAB_MIN: i64 = 12
476const BENCH_DRIP_HIGH_DESTAB_MIN: i64 = 18
477const BENCH_MELTRATE_LOW_DESTAB_PERMIL: i64 = 22
478const BENCH_MELTRATE_HIGH_DESTAB_PERMIL: i64 = 10

functions

125func bench_product_new() -> *BenchProduct
140func bench_ref_benjerry() -> *BenchProduct
called by 10: t0t1t2t3t4t5+4 calls 1: bench_product_new
164func bench_hd_density_q3() -> i64
168func bench_hd_composition_is_known() -> i64 { return 0 }
called by 1: t12
174func bench_denser_than_hd_permil(p: *BenchProduct) -> i64
186func bench_density_q3(p: *BenchProduct) -> i64
192func bench_fat_permil(p: *BenchProduct) -> i64
198func bench_total_solids_permil(p: *BenchProduct) -> i64
204func bench_water_permil(p: *BenchProduct) -> i64
called by 1: t1 calls 1: bench_total_solids_permil
212func bench_msnf_permil(p: *BenchProduct) -> i64
218func bench_total_milk_solids_permil(p: *BenchProduct) -> i64
230func bench_mix_density_q3(fat_permil: i64, ts_permil: i64) -> i64
244func bench_mix_density_of(p: *BenchProduct) -> i64
253func bench_overrun_permil(mix_q3: i64, product_q3: i64) -> i64
260func bench_overrun_of(p: *BenchProduct) -> i64
272func bench_air_permil_from_overrun(overrun_permil: i64) -> i64
called by 1: t5
277func bench_air_equals_overrun(overrun_permil: i64) -> i64
called by 1: t5
284func bench_overrun_is_derived() -> i64 { return 1 }
called by 1: t14
285func bench_net_weight_is_derived(p: *BenchProduct) -> i64 { return p.net_weight_derived }
called by 1: t14
290func bench_overrun_band(product_q3: i64, mix_lo_q3: i64, mix_hi_q3: i64, out: *i64) -> i64
301func bench_min_density_weight_q3() -> i64
310func bench_min_density_solids_q3(ts_permil: i64) -> i64
318func bench_binding_floor(ts_permil: i64) -> i64
326func bench_min_density_q3(ts_permil: i64) -> i64
336func bench_floor_crossover_permil() -> i64
called by 1: t7 calls 1: bench_min_density_weight_q3
362func bench_ceiling_weight_permil(mix_q3: i64) -> i64
371func bench_ceiling_solids_permil(mix_q3: i64, ts_permil: i64) -> i64
381func bench_max_overrun_permil(mix_q3: i64, ts_permil: i64) -> i64
392func bench_max_overrun_weight_only_permil(mix_q3: i64) -> i64
398func bench_shipped_law_error_permil(mix_q3: i64, ts_permil: i64) -> i64
408func bench_shipped_law_over_permits(mix_q3: i64, ts_permil: i64) -> i64
called by 2: t8t9 calls 1: bench_shipped_law_error_permil
417func bench_solids_lb_per_gal_q2(product_q3: i64, ts_permil: i64) -> i64
425func bench_weight_lb_per_gal_q2(product_q3: i64) -> i64
433func bench_fda_failures(p: *BenchProduct) -> i64
447func bench_is_ice_cream(p: *BenchProduct) -> i64
called by 2: t10t11 calls 1: bench_fda_failures
482func bench_destab_permil(emul: i64) -> i64
490func bench_first_drip_min(emul: i64) -> i64
called by 1: t13 calls 1: bench_destab_permil
497func bench_melt_rate_permil_min(emul: i64) -> i64
506func bench_meltdown_advantage_q3(ref_emul: i64, challenger_emul: i64) -> i64
called by 1: t13 calls 1: bench_melt_rate_permil_min
521func bench_meltdown_claim_is_inferred() -> i64 { return 1 }
called by 1: t14
522func bench_reference_was_physically_measured() -> i64 { return 0 }
called by 1: t14
532func bench_needs_secondary_colloid(primary_gum_permil: i64) -> i64
537func bench_reference_uses_lbg() -> i64 { return 0 }
called by 1: t14
538func bench_reference_uses_added_emulsifier() -> i64 { return 0 }
called by 1: t14