arbor-sim / arbor

The Arbor multi-compartment neural network simulation library.
https://arbor-sim.org
BSD 3-Clause "New" or "Revised" License
108 stars 61 forks source link

🐙 Decline magic variables in `ASSIGNED` #2270

Closed thorstenhater closed 3 months ago

thorstenhater commented 5 months ago

We found that this

ASSIGNED { qt celsius }

INITIAL { qt = 2.3^(celsius - T) }

results in undefined/NaN qt, since modcc generates a new, assignable variable celsius instead of accessing the built-in 'magic' variable.

This PR fixes this miscompilation by reporting an error and overhauls the relevant catalogues.