Skip to content

Commit 1f914e7

Browse files
committed
Print (at debug level) the size of assignments during symex
1 parent f51cd39 commit 1f914e7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/goto-symex/symex_assign.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Author: Daniel Kroening, [email protected]
1212
#include "goto_symex.h"
1313

1414
#include <util/byte_operators.h>
15-
#include <util/cprover_prefix.h>
16-
1715
#include <util/c_types.h>
16+
#include <util/cprover_prefix.h>
17+
#include <util/pointer_offset_size.h>
1818

1919
#include "goto_symex_state.h"
2020

@@ -249,6 +249,9 @@ void goto_symext::symex_assign_symbol(
249249
if(symbol.is_auxiliary)
250250
assignment_type=symex_targett::assignment_typet::HIDDEN;
251251

252+
log.debug() << "Assignment to " << ssa_lhs.get_identifier()
253+
<< " [" << pointer_offset_bits(ssa_lhs.type(), ns) << " bits]"
254+
<< messaget::eom;
252255
target.assignment(
253256
tmp_guard.as_expr(),
254257
ssa_lhs,

src/goto-symex/symex_goto.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Author: Daniel Kroening, [email protected]
1414
#include <algorithm>
1515

1616
#include <util/invariant.h>
17+
#include <util/pointer_offset_size.h>
1718
#include <util/std_expr.h>
1819

1920
#include <analyses/dirty.h>
@@ -247,6 +248,9 @@ void goto_symext::symex_goto(statet &state)
247248

248249
guardt guard;
249250

251+
log.debug() << "Assignment to " << new_lhs.get_identifier()
252+
<< " [" << pointer_offset_bits(new_lhs.type(), ns) << " bits]"
253+
<< messaget::eom;
250254
target.assignment(
251255
guard.as_expr(),
252256
new_lhs, new_lhs, guard_symbol_expr,
@@ -471,6 +475,9 @@ void goto_symext::phi_function(
471475
dest_state.assignment(new_lhs, rhs, ns, true, true);
472476
dest_state.record_events=record_events;
473477

478+
log.debug() << "Assignment to " << new_lhs.get_identifier()
479+
<< " [" << pointer_offset_bits(new_lhs.type(), ns) << " bits]"
480+
<< messaget::eom;
474481
target.assignment(
475482
true_exprt(),
476483
new_lhs, new_lhs, new_lhs.get_original_expr(),

0 commit comments

Comments
 (0)