Skip to content

Commit c15bb68

Browse files
committed
no longer expand X_ok
1 parent 13b6792 commit c15bb68

File tree

10 files changed

+21
-12
lines changed

10 files changed

+21
-12
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
KNOWNBUG
1+
CORE
22
cstring_is_memory_safe2.c
33
--safety
4-
^EXIT=10$
4+
^EXIT=0$
55
^SIGNAL=0$
66
^\[main\.pointer\.1\] line \d+ pointer safe: SUCCESS$
77
--

regression/cprover/cstrings/cstring_is_not_null.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
KNOWNBUG
22
cstring_is_not_null.c
33

44
^EXIT=0$

regression/cprover/safety/array_bounds2.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
KNOWNBUG
22
array_bounds2.c
33
--safety
44
^EXIT=10$

regression/cprover/safety/r_ok2.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
KNOWNBUG
22
r_ok2.c
33
--no-inline --safety
44
^EXIT=10$

regression/cprover/safety/r_ok3.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
KNOWNBUG
22
r_ok3.c
33

44
^EXIT=0$

regression/cprover/safety/r_ok4.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
KNOWNBUG
22
r_ok4.c
33

44
^EXIT=0$

regression/cprover/safety/r_ok5.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
KNOWNBUG
22
r_ok5.c
33

44
^EXIT=0$

regression/cprover/safety/simple_equality1.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
KNOWNBUG
22
simple_equality1.c
33
--safety
44
^EXIT=10$

src/cprover/axioms.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,17 @@ void axiomst::node(const exprt &src, decision_proceduret &dest)
145145
is_cstring_expr.address(),
146146
from_integer(1, size_type()),
147147
bool_typet());
148+
149+
auto instance1 = replace(implies_exprt(src, ok_expr));
150+
std::cout << "AXIOMa1: " << format(instance1) << "\n";
151+
dest << instance1;
152+
148153
auto ok_simplified = simplify_state_expr(ok_expr, address_taken, ns);
149154
ok_simplified.visit_pre(
150155
[&dest, this](const exprt &src) { node(src, dest); });
151-
auto instance = replace(implies_exprt(src, ok_simplified));
152-
std::cout << "AXIOMa: " << format(instance) << "\n";
153-
dest << instance;
156+
auto instance2 = replace(implies_exprt(src, ok_simplified));
157+
std::cout << "AXIOMa2: " << format(instance2) << "\n";
158+
dest << instance2;
154159
}
155160

156161
{

src/cprover/simplify_state_expr.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ exprt simplify_ok_expr(
208208
const std::unordered_set<symbol_exprt, irep_hash> &address_taken,
209209
const namespacet &ns)
210210
{
211+
#if 0
211212
const auto &state = src.op0();
212213
const auto &pointer = src.op1();
213214
const auto &size = src.op2();
@@ -232,6 +233,9 @@ exprt simplify_ok_expr(
232233
plus_exprt(offset_simplified, size_casted), ID_le, object_size_simplified);
233234

234235
return and_exprt(live_object_simplified, lower, upper);
236+
#else
237+
return src;
238+
#endif
235239

236240
#if 0
237241
// A store does not affect the result.

0 commit comments

Comments
 (0)