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

Assume at end of if clause attaches to subsequent statement #20

Open
jaylorch opened this issue Mar 25, 2021 · 0 comments
Open

Assume at end of if clause attaches to subsequent statement #20

jaylorch opened this issue Mar 25, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@jaylorch
Copy link
Member

If an if statement has no else clause, and its then clause ends in an assume statement, then the enabling condition is attached to the first statement following the if. In other words, that if-following statement will block on the condition whether or not the then branch was taken. This is non-intuitive and thus likely to be surprising and unexpected to developers.

Similarly, if an if statement has an else clause, and that else clause ends in an assume statement, the enabling condition is attached to the first statement following the if. This is also non-intuitive.

For these reasons, it seems useful to ensure that there's always a PC at the end of each then and else clause that's distinct from the PC of the subsequent instruction. That will require adding some extra steps that do nothing other than advance the PC from the clause-ending PC to the subsequent one.

@jaylorch jaylorch added the enhancement New feature or request label Mar 25, 2021
@jaylorch jaylorch changed the title Assume at end of then clause attaches to subsequent statement Assume at end of if clause attaches to subsequent statement Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant