Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$n is sometimes incorrectly tagged as constant #56

Open
frothga opened this issue Jan 23, 2018 · 0 comments
Open

$n is sometimes incorrectly tagged as constant #56

frothga opened this issue Jan 23, 2018 · 0 comments
Labels

Comments

@frothga
Copy link
Collaborator

frothga commented Jan 23, 2018

$n may be expressed as a constant (eg: $n=17) or initOnly, but actually change due to structural dynamics, such as from $p or $type. This becomes a problem if other equations depend on the current value of $n. (If $n has no users, it doesn't matter.) The simplest solution is to always assume $n is dynamic, but this is inefficient.

The difficulty is that constants are analyzed early, before $p and $type. Yet we need to know about $p and $type to determine if $n is a constant (and thus whether equations that depend on $n are constants).

Notes on EquationSet:
need to retag $n as early as possible in analysis
depends on resolveRHS(), findDeath() and canGrow()
canGrow() has no dependencies, and resolveRHS() is early
need to move findDeath() as early as possible

@frothga frothga added the bug label Jan 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant