Skip to main content

eval_grid_with_heap

Function eval_grid_with_heap 

Source
pub fn eval_grid_with_heap(g: &Grid, inputs: &[i64]) -> i64
Expand description

Simulate a STATE-PLANE grid — one that carries Mem (heap read/write/alloc) tiles — threading ONE shared heap through the tiles in row-major (= placement = program) order, exactly as the model’s eval_cells threads its heap. Non-Mem tiles evaluate combinationally (eval_cell); a Mem tile touches the heap and drives its result onto its output channel. Returns the primary output. This is how Stage X2 proves collections/structs/text run on the grid: eval_grid_with_heap ≡ the whole-program model ≡ the VM.