Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion regression/cbmc/trace-values/unbounded_array.desc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CORE broken-smt-backend no-new-smt
CORE broken-smt-backend
unbounded_array.c
--trace
\{ \[0u?l?l?\]=1, \[1u?l?l?\]=2, \[\d+u?l?l?\]=42 \}
Expand Down
25 changes: 22 additions & 3 deletions src/goto-symex/build_goto_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,28 @@ void build_goto_trace(

if(SSA_step.ssa_full_lhs.is_not_nil())
{
goto_trace_step.full_lhs_value =
decision_procedure.get(SSA_step.ssa_full_lhs);
simplify(goto_trace_step.full_lhs_value, ns);
if(
SSA_step.ssa_full_lhs.id() == ID_byte_extract_little_endian ||
SSA_step.ssa_full_lhs.id() == ID_byte_extract_big_endian)
{
// Preserve the byte_extract structure by resolving
// operands individually rather than simplifying the
// entire expression, which would evaluate away the
// byte_extract.
byte_extract_exprt be = to_byte_extract_expr(SSA_step.ssa_full_lhs);
be.op() = decision_procedure.get(be.op());
simplify(be.op(), ns);
replace_nondet_in_type(be.op(), decision_procedure);
be.offset() = decision_procedure.get(be.offset());
simplify(be.offset(), ns);
goto_trace_step.full_lhs_value = std::move(be);
}
else
{
goto_trace_step.full_lhs_value =
decision_procedure.get(SSA_step.ssa_full_lhs);
simplify(goto_trace_step.full_lhs_value, ns);
}
replace_nondet_in_type(
goto_trace_step.full_lhs_value, decision_procedure);
}
Expand Down
Loading