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
This issue was discovered during the work with PR #13.
The translation into ACSL contracts is unstable. A number of (currently disabled) test cases for the theory-of-heaps contract translation either fails consistently or intermittently, either with "out of memory" or "timeout". (That they fail intermittently seems to be related to the fact that sets are involved, and that they don't guarantee a given order of iteration.) The problem seems to be rooted in the rewriting of the expression in order to figure out valid and separate pointers. Currently disabled tests are
incdec-3 (out of memory)
multadd-2 (out of memory)
multadd-3 (timeout)
truck-1 (out of memory)
More specifically the problem seems to be in the so named swapMap used by EqualitySwapper (postprocessor/EqualitySwapper.scala). The EqualitySwapper tries to rewrite a given expression until a fix point is reached. However, the given swapMap does not guarentee that such a point is reached. The observed behavior is that sometimes the map contains substitutions like
A -> f(A)
...
which esults in "A => f(A) => f(f(A)) => ..." causing the "out of memory" condition. Sometimes the map contains substitutions on the form
f(A) -> f(B)
B -> A
causing the rewriting to alternate between two expressions, f(A) => f(B) => f(A) => f(B) => ... which ends in "timeout" (given that a timeout value has been set).
The swapMap is created from a so called valueSet by calling valueSet.ToExplicitFormMap. However, the valueSet looks strange at times. The following set has been collected when running the get-1.c test case, and using a quantified heap term. The valueSet is of type Set[Set[ITerm]], and :: is used as a separator between elements in the inner set.
The strange thing is the fourth set {getInt(read(_0, _3)) :: 0 :: _7 :: (-1 + getInt(read(_0, counterAddr(_0)))) :: _9 :: _2 :: getInt(read(_0, counterAddr(_0)))}. Apparently it corresponds to the constant value 0 (the second element in the set). Therefore getInt(read(_0, counterAddr(_0)) (the last element) should also correspond to 0. However, since (-1 + getInt(read(_0, counterAddr(_0)))) is also part of the set, this means that -1 + 0 should also correspond to 0. Which seems plain wrong.
The text was updated successfully, but these errors were encountered:
This issue was discovered during the work with PR #13.
The translation into ACSL contracts is unstable. A number of (currently disabled) test cases for the theory-of-heaps contract translation either fails consistently or intermittently, either with "out of memory" or "timeout". (That they fail intermittently seems to be related to the fact that sets are involved, and that they don't guarantee a given order of iteration.) The problem seems to be rooted in the rewriting of the expression in order to figure out valid and separate pointers. Currently disabled tests are
More specifically the problem seems to be in the so named
swapMap
used byEqualitySwapper
(postprocessor/EqualitySwapper.scala
). TheEqualitySwapper
tries to rewrite a given expression until a fix point is reached. However, the givenswapMap
does not guarentee that such a point is reached. The observed behavior is that sometimes the map contains substitutions likewhich esults in "A => f(A) => f(f(A)) => ..." causing the "out of memory" condition. Sometimes the map contains substitutions on the form
causing the rewriting to alternate between two expressions,
f(A) => f(B) => f(A) => f(B) => ...
which ends in "timeout" (given that a timeout value has been set).The
swapMap
is created from a so calledvalueSet
by callingvalueSet.ToExplicitFormMap
. However, thevalueSet
looks strange at times. The following set has been collected when running theget-1.c
test case, and using a quantified heap term. ThevalueSet
is of typeSet[Set[ITerm]]
, and::
is used as a separator between elements in the inner set.The strange thing is the fourth set
{getInt(read(_0, _3)) :: 0 :: _7 :: (-1 + getInt(read(_0, counterAddr(_0)))) :: _9 :: _2 :: getInt(read(_0, counterAddr(_0)))}
. Apparently it corresponds to the constant value0
(the second element in the set). ThereforegetInt(read(_0, counterAddr(_0))
(the last element) should also correspond to0
. However, since(-1 + getInt(read(_0, counterAddr(_0))))
is also part of the set, this means that-1 + 0
should also correspond to0
. Which seems plain wrong.The text was updated successfully, but these errors were encountered: