You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Variables which are bound by quantified expressions only matter within those expressions, not outside of them.
Actual behavior
Defined symbolic variables can be used as bound variables in quantified expressions. The resulting C code thus declares this variable two times, once in the beginning and once in the loop itself, more precisely as the loop index which is declared and initialized.
Proposed solution
Forbid symbolic variables as bound variables in quantified expressions, i.e., only allow new/fresh variables to be bound by quantifiers.
Alternatively, a new variable could be produced, but I would rather have a clear distinction already in the property editor.
Steps to reproduce the behavior
In the property editor, I specify as symbolic variables a candidate Alice and a voter Bob, with the following precondition:
Note that Bob is declared two times. Apparently, gcc is not picky about this program itself, but it is at least confusing to the reader and I am not too sure whether this is the intended behaviour.
The text was updated successfully, but these errors were encountered:
Expected behavior
Variables which are bound by quantified expressions only matter within those expressions, not outside of them.
Actual behavior
Defined symbolic variables can be used as bound variables in quantified expressions. The resulting C code thus declares this variable two times, once in the beginning and once in the loop itself, more precisely as the loop index which is declared and initialized.
Proposed solution
Forbid symbolic variables as bound variables in quantified expressions, i.e., only allow new/fresh variables to be bound by quantifiers.
Alternatively, a new variable could be produced, but I would rather have a clear distinction already in the property editor.
Steps to reproduce the behavior
In the property editor, I specify as symbolic variables a candidate Alice and a voter Bob, with the following precondition:
and the following postcondition:
Among other code, the following c code is produced:
Note that Bob is declared two times. Apparently, gcc is not picky about this program itself, but it is at least confusing to the reader and I am not too sure whether this is the intended behaviour.
The text was updated successfully, but these errors were encountered: