{
char buf[200];
+ model_print("---- BEGIN PROGRAM OUTPUT ----\n");
+
/* Gather all program output */
fflush(stdout);
ret -= res;
}
}
+
+ model_print("---- END PROGRAM OUTPUT ----\n");
}
#endif /* ! CONFIG_DEBUG */
if (promises.size() != 0)
ptr += sprintf(ptr, "[unresolved promise]");
if (ptr != buf)
- model_print("%s: %s\n", prefix ? prefix : "Infeasible", buf);
+ model_print("%s: %s", prefix ? prefix : "Infeasible", buf);
}
/**
dumpGraph(buffername);
#endif
- model_print("Execution %d:", get_execution_number());
+ model_print("Execution trace %d:", get_execution_number());
if (isfeasibleprefix()) {
if (is_yieldblocked())
model_print(" YIELD BLOCKED");
if (scheduler->all_threads_sleeping())
model_print(" SLEEP-SET REDUNDANT");
- model_print("\n");
+ if (have_bug_reports())
+ model_print(" DETECTED BUG(S)");
} else
print_infeasibility(" INFEASIBLE");
+ model_print("\n");
+
print_list(&action_trace);
model_print("\n");
+
if (!promises.empty()) {
model_print("Pending promises:\n");
for (unsigned int i = 0; i < promises.size(); i++) {
/** @brief Print bug report listing for this execution (if any bugs exist) */
void ModelChecker::print_bugs() const
{
- if (execution->have_bug_reports()) {
- SnapVector<bug_message *> *bugs = execution->get_bugs();
-
- model_print("Bug report: %zu bug%s detected\n",
- bugs->size(),
- bugs->size() > 1 ? "s" : "");
- for (unsigned int i = 0; i < bugs->size(); i++)
- (*bugs)[i]->print();
- }
+ SnapVector<bug_message *> *bugs = execution->get_bugs();
+
+ model_print("Bug report: %zu bug%s detected\n",
+ bugs->size(),
+ bugs->size() > 1 ? "s" : "");
+ for (unsigned int i = 0; i < bugs->size(); i++)
+ (*bugs)[i]->print();
}
/**
*/
void ModelChecker::print_execution(bool printbugs) const
{
+ model_print("Program output from execution %d:\n",
+ get_execution_number());
print_program_output();
if (params.verbose >= 2) {
- model_print("Earliest divergence point since last feasible execution:\n");
+ model_print("\nEarliest divergence point since last feasible execution:\n");
if (earliest_diverge)
earliest_diverge->print();
else
}
/* Don't print invalid bugs */
- if (printbugs)
+ if (printbugs && execution->have_bug_reports()) {
+ model_print("\n");
print_bugs();
+ }
model_print("\n");
execution->print_summary();