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
Verisol seems to incorrectly reason about the initialization of multi-dimensional mappings, leading to generating false positives.
Minimal example
In the following example, two contracts MapInitTest1 and MapInitTest2 are similar except the dimension of the mapping involved (i.e., the former uses a single-dimensional mapping, while the latter uses a multi-dimensional mapping). However, Verisol proves the former, but refutes the latter with a counter example, which is a false positive.
In the generated boogie file, we have the initialization of the single-dimensional mapping recoverMap1, as follows,
var recoverMap1_MapInitTest1: [Ref]Ref;
implementation MapInitTest1_MapInitTest1_NoBaseCtor(...)
{
var __var_1: Ref;
// start of initialization
...
// Make array/mapping vars distinct for recoverMap1
call __var_1 := FreshRefGenerator();
recoverMap1_MapInitTest1[this] := __var_1;
// Initialize Integer mapping recoverMap1
assume (forall __i__0_0:int :: ((M_int_int[recoverMap1_MapInitTest1[this]][__i__0_0]) == (0)));
// end of initialization
...
}
but we do NOT have any initialization for the multi-dimensional mapping recoverMap2 as follows:
var recoverMap2_MapInitTest2: [Ref]Ref;
implementation MapInitTest2_MapInitTest2_NoBaseCtor(...)
{
var __var_2: Ref;
// start of initialization
...
// Make array/mapping vars distinct for recoverMap2
call __var_2 := FreshRefGenerator();
recoverMap2_MapInitTest2[this] := __var_2;
// end of initialization
...
}
The text was updated successfully, but these errors were encountered:
daejunpark
changed the title
multi-dimensional mappings are not zero-initialized
Multi-dimensional mappings are not zero-initialized
Sep 23, 2019
Summary
Verisol seems to incorrectly reason about the initialization of multi-dimensional mappings, leading to generating false positives.
Minimal example
In the following example, two contracts
MapInitTest1
andMapInitTest2
are similar except the dimension of the mapping involved (i.e., the former uses a single-dimensional mapping, while the latter uses a multi-dimensional mapping). However, Verisol proves the former, but refutes the latter with a counter example, which is a false positive.To reproduce, run Verisol with the following commands:
Details
In the generated boogie file, we have the initialization of the single-dimensional mapping
recoverMap1
, as follows,but we do NOT have any initialization for the multi-dimensional mapping
recoverMap2
as follows:The text was updated successfully, but these errors were encountered: