Closed Felalolf closed 1 year ago
This code was generated by Gobra. I will write a fully Viper client producing the error later. For now, I just wanted to document the error so that it is not forgotten.
Apparently the generated code was not ill-formed at all. The issue was that the pretty-printer did not correctly pretty-print some scopes that were required to make it well-defined (see issue #697). That issue was fixed a while ago, which also fixes this issue. The Fix in PR #715 was not required (and actually incorrect) when the actual scopes are taken into account.
For the following Viper code
the
beforeVerify
method ofTerminationPlugin
generates the following Viper method:The code is ill-formed since
a_V1
is both declared as a variable and used in the let binding. The error does not happen without the second let (e.g. without a second conjunct or if the second conjunct is not a let expression).My guess is that the handling of short circuiting is incorrect because it uses the original Viper code as the condition instead of a transformed version.