Skip to content

Commit 042cc2c

Browse files
committed
Retrace show default choice as Retrace*
1 parent d1ca502 commit 042cc2c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/goto-symex/symex_goto.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ renamedt<exprt, L2> try_evaluate_pointer_comparisons(
227227
return condition;
228228
}
229229

230-
231230
void goto_symext::symex_goto(statet &state)
232231
{
233232
PRECONDITION(state.reachable);
@@ -648,15 +647,18 @@ void goto_symext::symex_goto_retrace(statet &state)
648647

649648
// goto or next depends on input trace from user
650649
bool choose_goto;
650+
bool default_choice;
651651
static int retrace_index = 0;
652652
if (retrace_index < static_cast<int>(symex_config.retrace_input.size()))
653653
{
654654
choose_goto = symex_config.retrace_input[retrace_index] == '1';
655+
default_choice = false;
655656
retrace_index++;
656657
}
657658
else
658659
{
659-
choose_goto = false; // default
660+
choose_goto = false;
661+
default_choice = true;
660662
}
661663

662664
// print goto choice
@@ -685,12 +687,13 @@ void goto_symext::symex_goto_retrace(statet &state)
685687
auto nt_line = nt_dest.get_line();
686688
if(nt_line.empty()) nt_line = "?";
687689

690+
std::string mode = default_choice ? "Retrace* " : "Retrace ";
688691
std::string desc = choose_goto ? "1/GOTO" : "0/NEXT";
689692

690693
std::string padding_1 = std::string(abs(3-cur_line.size()), ' ');
691694
std::string padding_2 = std::string(abs(3-t_line.size()), ' ');
692695

693-
log.status() << "Retrace " << desc
696+
log.status() << mode << desc
694697
<< " at " << cur_file << ":" << cur_line << padding_1
695698
<< " to " << t_file << ":" << t_line << padding_2
696699
<< " (not " << nt_file << ":" << nt_line << ")"
@@ -782,7 +785,6 @@ void goto_symext::symex_goto_retrace(statet &state)
782785
return;
783786
}
784787

785-
786788
bool goto_symext::check_break(const irep_idt &loop_id, unsigned unwind)
787789
{
788790
// dummy implementation

0 commit comments

Comments
 (0)