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
The loop scope invariant rule introduces variables (usually called h and a that are not within the namespace of the current goal).
In some cases this may even lead to two variables of the same name, but with different types on the sequent.
Reproducible
always
Steps to reproduce
Load the sum and max example from the example browser..
In the proof search strategy set "Loop treatment" to "none".
Set "Arithmetic treatment" to "basic".
Push the green arrow button
On the one open goal apply the rule "loopScopeInvDia".
Navigate to the 2nd open goal
Two things are bad now:
There is an update h := heap, but you cannot perform a cut h = h because h is an unknown name.
There is an update a := _a.length - k assigning an int value to a. However, a is the parameter of the method and an int[] variable.
The rule fails to register the assigned variables in the goal context (in other rules that usually happens by declaring the new names within modalities).
Additional information
Discovered, since this is a deal breaker for research on a scripting engine.
Fix for issue #3158
- The program variable replacer also needs to consider lefthandside's of
elementary updates
- Avoid collisions with names occurring in the namespace (and not only
inside programs)
- Introduce new program variables properly in loop invariant rules
- Minor clean ups
Description
The loop scope invariant rule introduces variables (usually called
h
anda
that are not within the namespace of the current goal).In some cases this may even lead to two variables of the same name, but with different types on the sequent.
Reproducible
always
Steps to reproduce
Two things are bad now:
h := heap
, but you cannot perform a cuth = h
becauseh
is an unknown name.a := _a.length - k
assigning an int value toa
. However,a
is the parameter of the method and anint[]
variable.The rule fails to register the assigned variables in the goal context (in other rules that usually happens by declaring the new names within modalities).
Additional information
Discovered, since this is a deal breaker for research on a scripting engine.
The text was updated successfully, but these errors were encountered: