You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
engine(vm): scalar SUM(VECTOR ELM MAP(...)) fails VM compilation #367
A scalar reduction over an array-producing builtin fails VM compilation:
result = SUM(VECTOR ELM MAP(source[*], offsets[*]))
Interpreter evaluation succeeds, but VM compilation fails with:
Cannot push view for expression type Discriminant(7) - expected array expression
Repro
Use a simple model with:
source[D] = [10,20,30]
offsets[D] = [2,0,1]
result = SUM(VECTOR ELM MAP(source[*], offsets[*]))
Then run VM compilation (Simulation::compile() path).
Expected
VM should compile and produce result = 60 (matching interpreter).
Actual
VM compilation errors before simulation starts.
Notes
Discovered while working on issue #364 (nested array-producing builtins in A2A context). This appears to be a separate VM/codegen limitation for scalar reductions over array-producing builtin calls.
Activity
engine: hoist nested vector builtins for scalar reducers (#369)