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

Expression trackers in algorithms body lead to confusing (albeit correct) semantics #235

Open
sylefeb opened this issue Nov 1, 2022 · 0 comments

Comments

@sylefeb
Copy link
Owner

sylefeb commented Nov 1, 2022

Expression trackers were previously allowed in the body of algorithms, however their semantics refers either to previous cycle (<::) or to variable as modified within current cycle (<:). This led to confusing situations which, albeit could be understood, were very unnatural.

In addition, careful inspection of the repository of projects showed that in most cases trackers were used in the body, this was due to a lack of variable initialization from expression, e.g. writing:

uint8 a <:: b+1;

when really one meant

uint8 a = b+1;

using b in its current state, while the tracker would use either b from previous cycle or as it was being modified (which was precisely leading to confusion, and getting much worse within pipelines).

Initializing from expressions is now possible, and thus the trackers can be restricted to a unit body or algorithm preamble only. They remain useful in some cases, but this requires some further investigation.

(to be expanded)

sylefeb added a commit that referenced this issue Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant