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

[Civl] Fixed bug in typechecking of yielding loops #877

Merged
merged 1 commit into from
Apr 25, 2024
Merged

Conversation

shazqadeer
Copy link
Contributor

@shazqadeer shazqadeer commented Apr 25, 2024

Each loop in a yield procedure is allowed to yield up to a yielding layer that is bounded by the disappearance layer of the enclosing yield procedure. This yielding layer N is either specified directly in an annotation on the loop header that looks like

invariant {:yields} {:layer N} true;

or it is inferred.

The inference is done separately for each loop.

The bug was that the result of the inference for one loop was polluting the result for another. The problem is fixed by moving the yieldingLayer variable inside the iteration.

@shazqadeer shazqadeer merged commit fa6624e into master Apr 25, 2024
4 of 5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants