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: C-LEARN cannot simulate because macros are not expanded #349
C-LEARN uses Vensim macros (:MACRO: blocks: SAMPLE UNTIL, SSHAPE, RAMP FROM TO, INIT), and the engine parsed them but did not expand them, so the model could not simulate and simulates_clearn was ignored.
Status
Fixed on main.
Macros are expanded into module instances (MacroRegistry::resolve_call), C-LEARN's four macros import without macro errors, and simulates_clearn runs in the default test suite.
The non-macro compile errors that remained afterwards were #559, also fixed.
changed the title [-]engine: C-LEARN macro expansion blocks 1 simulation test[/-][+]engine: C-LEARN cannot simulate because macros are not expanded[/+]on Oct 12, 2026
Macros are expanded into module instances: the registry is built in src/simlin-engine/src/db/macro_registry.rs and calls are routed by MacroRegistry::resolve_call (src/simlin-engine/src/module_functions.rs:555, read by builtins_visitor.rs:140/843). simulates_clearn (tests/integration/simulate.rs:4011) is a plain #[test] comparing C-LEARN against Ref.vdf, and corpus_clearn_macros_import (simulate.rs:6851) pins the four macros importing cleanly.
Activity
engine: add World3 LTM discovery intractability test
[-]engine: C-LEARN macro expansion blocks 1 simulation test[/-][+]engine: C-LEARN cannot simulate because macros are not expanded[/+]bpowers commentedon Oct 12, 2026
Closing: already fixed on main.
Macros are expanded into module instances: the registry is built in src/simlin-engine/src/db/macro_registry.rs and calls are routed by MacroRegistry::resolve_call (src/simlin-engine/src/module_functions.rs:555, read by builtins_visitor.rs:140/843). simulates_clearn (tests/integration/simulate.rs:4011) is a plain #[test] comparing C-LEARN against Ref.vdf, and corpus_clearn_macros_import (simulate.rs:6851) pins the four macros importing cleanly.