Skip to content

Commit b0e2c88

Browse files
authored
Merge pull request #4656 from diffblue/revert-4444-value-set-filtering-infeasible-branch
Revert "Symex: resolve pointer comparisons using the value-set"
2 parents bc76446 + b3467f0 commit b0e2c88

File tree

9 files changed

+20
-479
lines changed

9 files changed

+20
-479
lines changed

Diff for: jbmc/regression/jbmc/exception-cleanup/test.desc

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ Test.class
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$
7-
0 remaining after simplification$
7+
1 remaining after simplification$
88
--
99
^warning: ignoring
1010
--
11-
The function "unreachable" should be successfully noted as unreachable by symex.
11+
The function "unreachable" should be successfully noted as unreachable by symex,
12+
but the final uncaught-exception test in __CPROVER__start is not yet decidable
13+
in symex, as it requires symex to note that within a catch block
14+
@inflight_exception is definitely *not* null, which it can't just yet.

Diff for: jbmc/regression/jbmc/exception-cleanup/vccs.desc

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Test.class
33
--function Test.main --show-vcc
44
^EXIT=0$
55
^SIGNAL=0$
6+
file Test\.java line 6 function java::Test.main:\(I\)V
7+
no uncaught exception
68
--
79
file Test\.java line 42 function java::Test\.unreachable:\(\)V bytecode-index 5
810
assertion at file Test\.java line 42 function java::Test\.unreachable:\(\)V bytecode-index 5

Diff for: regression/cbmc/symex_should_evaluate_simple_pointer_conditions/test.c

-181
This file was deleted.

Diff for: regression/cbmc/symex_should_evaluate_simple_pointer_conditions/test.desc

-60
This file was deleted.

Diff for: src/goto-symex/renaming_level.h

-44
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ Author: Romain Brenguier, [email protected]
1515
#include <map>
1616
#include <unordered_set>
1717

18-
#include <util/expr_iterator.h>
1918
#include <util/irep.h>
20-
#include <util/range.h>
2119
#include <util/sharing_map.h>
2220
#include <util/simplify_expr.h>
2321
#include <util/ssa_expr.h>
@@ -89,9 +87,6 @@ class renamedt : private underlyingt
8987
(void)::simplify(value(), ns);
9088
}
9189

92-
using mutator_functiont =
93-
std::function<optionalt<renamedt>(const renamedt &)>;
94-
9590
private:
9691
underlyingt &value()
9792
{
@@ -103,51 +98,12 @@ class renamedt : private underlyingt
10398
friend struct symex_level2t;
10499
friend class goto_symex_statet;
105100

106-
template <levelt make_renamed_level>
107-
friend renamedt<exprt, make_renamed_level>
108-
make_renamed(constant_exprt constant);
109-
110-
template <levelt selectively_mutate_level>
111-
friend void selectively_mutate(
112-
renamedt<exprt, selectively_mutate_level> &renamed,
113-
typename renamedt<exprt, selectively_mutate_level>::mutator_functiont
114-
get_mutated_expr);
115-
116101
/// Only the friend classes can create renamedt objects
117102
explicit renamedt(underlyingt value) : underlyingt(std::move(value))
118103
{
119104
}
120105
};
121106

122-
template <levelt level>
123-
renamedt<exprt, level> make_renamed(constant_exprt constant)
124-
{
125-
return renamedt<exprt, level>(std::move(constant));
126-
}
127-
128-
/// This permits replacing subexpressions of the renamed value, so long as
129-
/// each replacement is consistent with our current renaming level (for
130-
/// example, replacing subexpressions of L2 expressions with ones which are
131-
/// themselves L2 renamed).
132-
/// The passed function will be called with each expression node in preorder
133-
/// (i.e. parent expressions before children), and should return an empty
134-
/// optional to make no change or a renamed expression to make a change.
135-
template <levelt level>
136-
void selectively_mutate(
137-
renamedt<exprt, level> &renamed,
138-
typename renamedt<exprt, level>::mutator_functiont get_mutated_expr)
139-
{
140-
for(auto it = renamed.depth_begin(), itend = renamed.depth_end(); it != itend;
141-
++it)
142-
{
143-
optionalt<renamedt<exprt, level>> replacement =
144-
get_mutated_expr(static_cast<const renamedt<exprt, level> &>(*it));
145-
146-
if(replacement)
147-
it.mutate() = std::move(replacement->value());
148-
}
149-
}
150-
151107
/// Functor to set the level 0 renaming of SSA expressions.
152108
/// Level 0 corresponds to threads.
153109
/// The renaming is built for one particular interleaving.

0 commit comments

Comments
 (0)