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: bare builtin name silently shadows a same-named variable #681
Owner decision: keep the current rule with no warning, or warn when a bare builtin name is also a declared variable.
A bare inf, pi, time or dt in an equation means the builtin, even when the model declares a variable with that name; the quoted form "inf" reads the variable.
Everything the engine writes follows the rule (the MDL importer quotes such references, and rename keeps the quotes), and tests pin it (#1073).
The silent case is a person writing the bare name: hand-written XMILE, or the editor, which allows a variable named pi (only clock names are refused).
Fix
Recommended: a warning on a bare zero-argument builtin name that the model also declares as a variable, e.g. "pi here is the builtin; write "pi" to read the variable" (S).
Alternative: close and accept the rule as documented (ast::needs_quoting).
changed the title [-]engine: variable named 'inf' (or other zero-arity builtin name) collides with the Inf builtin and silently reads +infinity[/-][+]engine: a bare reference to a variable named inf reads the builtin[/+]on Oct 12, 2026
changed the title [-]engine: a bare reference to a variable named inf reads the builtin[/-][+]engine: bare builtin name silently shadows a same-named variable[/+]on Oct 12, 2026
Activity
[-]engine: variable named 'inf' (or other zero-arity builtin name) collides with the Inf builtin and silently reads +infinity[/-][+]engine: a bare reference to a variable named inf reads the builtin[/+][-]engine: a bare reference to a variable named inf reads the builtin[/-][+]engine: bare builtin name silently shadows a same-named variable[/+]