Skip to content

Commit fff2256

Browse files
committed
debugging
1 parent e078976 commit fff2256

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

src/goto-symex/build_goto_trace.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Author: Daniel Kroening
1313

1414
#include "build_goto_trace.h"
1515

16+
#include <iostream>
1617
#include <cassert>
1718

1819
#include <util/arith_tools.h>

src/goto-symex/goto_symex_state.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ void goto_symex_statet::assignment(
240240
value_set.output(ns, std::cout);
241241
std::cout << "**********************\n";
242242
#endif
243+
std::cerr << "LHS: " << lhs.pretty() << std::endl;
244+
std::cerr << "RHS: " << rhs.pretty() << std::endl;
243245
}
244246

245247
void goto_symex_statet::set_l0_indices(

src/goto-symex/symex_assign.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// Symbolic Execution
1111

12+
#include <iostream>
13+
#include <util/format_expr.h>
14+
1215
#include "goto_symex.h"
1316

1417
#include <util/byte_operators.h>
@@ -235,8 +238,11 @@ void goto_symext::symex_assign_symbol(
235238
// TODO: done via rename
236239
// field_sensitivityt::apply(ns, ssa_rhs, false);
237240

241+
std::cerr << "ssa_rhs before rename: " << format(ssa_rhs) << std::endl;
238242
state.rename(ssa_rhs, ns);
243+
std::cerr << "ssa_rhs after rename: " << format(ssa_rhs) << std::endl;
239244

245+
std::cerr << "lhs before mods: " << format(lhs) << std::endl;
240246
ssa_exprt lhs_mod = lhs;
241247

242248
if(
@@ -331,7 +337,10 @@ void goto_symext::symex_assign_symbol(
331337
}
332338
#endif
333339

340+
std::cerr << "lhs after mods: " << format(lhs) << std::endl;
341+
std::cerr << "lhs_mod after mods: " << format(lhs_mod) << std::endl;
334342
do_simplify(ssa_rhs);
343+
std::cerr << "ssa_rhs after simp: " << format(ssa_rhs) << std::endl;
335344

336345
ssa_exprt ssa_lhs = lhs_mod;
337346
state.assignment(

src/solvers/flattening/boolbv_index.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Author: Daniel Kroening, [email protected]
99
#include "boolbv.h"
1010

1111
#include <algorithm>
12+
#include <iostream>
13+
#include <util/format_expr.h>
14+
#include <util/format_type.h>
1215

1316
#include <util/arith_tools.h>
1417
#include <util/cprover_prefix.h>
@@ -129,6 +132,7 @@ bvt boolbvt::convert_index(const index_exprt &expr)
129132
if((array.id()==ID_constant || array.id()==ID_array) &&
130133
prop.has_set_to())
131134
{
135+
std::cerr << "HACK: " << array.id() << std::endl;
132136
#ifdef CONSTANT_ARRAY_HACK
133137
// TODO : Compile the whole array into a single relation
134138
#endif
@@ -139,6 +143,7 @@ bvt boolbvt::convert_index(const index_exprt &expr)
139143
const std::string identifier = CPROVER_PREFIX "internal_actual_array_" +
140144
std::to_string(actual_array_counter++);
141145

146+
std::cerr << "expr.type() = " << format(expr.type()) << std::endl;
142147
symbol_exprt result(identifier, expr.type());
143148
bv = convert_bv(result);
144149

@@ -170,6 +175,8 @@ bvt boolbvt::convert_index(const index_exprt &expr)
170175
value_equality.rhs()=*it++;
171176

172177
// Cache comparisons and equalities
178+
std::cerr << "imp: " << format(implies_exprt(index_equality,
179+
value_equality)) << std::endl;
173180
prop.l_set_to_true(convert(implies_exprt(index_equality,
174181
value_equality)));
175182
}

0 commit comments

Comments
 (0)