From: Brian Norris Date: Tue, 4 Sep 2012 17:59:47 +0000 (-0700) Subject: action: print '?' for unknown read-from-future X-Git-Tag: pldi2013~243 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=672a04a0620a9fbad1c01965cab4089c58b8e581 action: print '?' for unknown read-from-future To provide more informative debugging traces, use a placeholder '?' as the "Rf" value when printing a 'read' ModelAction that has no reads-from value. This helps, for instance, when manually identifying problem points in an infeasible execution. --- diff --git a/action.cc b/action.cc index a321a85..692d14c 100644 --- a/action.cc +++ b/action.cc @@ -265,8 +265,12 @@ void ModelAction::print(void) const printf("(%3d) Thread: %-2d Action: %-13s MO: %7s Loc: %14p Value: %-12" PRIu64, seq_number, id_to_int(tid), type_str, mo_str, location, valuetoprint); - if (reads_from) - printf(" Rf: %d", reads_from->get_seq_number()); + if (is_read()) { + if (reads_from) + printf(" Rf: %d", reads_from->get_seq_number()); + else + printf(" Rf: ?"); + } if (cv) { printf("\t"); cv->print();