generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
The semantics say that the following program executes correctly
if B {
init x := 2;
} else {
init x := 3;
}
assert x > 1;
This is because the small-step statement semantics inline the statements of a block when they are reached.
However, everyone I asked declared that this program should not be accepted because x is declared locally.
We need to make sure the semantics capture that.
This will be helpful to support shadowing because otherwise shadowing would not have been possible with this program:
init x := 2;
if B {
init x := 3;
}
assert x == 2;
With shadowing semantics, this program verifies, but if the init of the blocks leaks, then this program no longer verifies.
I checked with many of us and we all agreed the program above, if given a meaning, it should be that x is shadowed, not overwritten.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels