num_executions++;
- if (isfinalfeasible() || DBG_ENABLED())
- print_summary();
+ bool feasible = isfinalfeasible();
+ if (feasible || DBG_ENABLED())
+ print_summary(feasible);
if ((diverge = model->get_next_backtrack()) == NULL)
return false;
printf("---------------------------------------------------------------------\n");
}
-void ModelChecker::print_summary(void)
+void ModelChecker::print_summary(bool feasible)
{
printf("\n");
printf("Number of executions: %d\n", num_executions);
scheduler->print();
- if (!isfinalfeasible())
+ if (!feasible)
printf("INFEASIBLE EXECUTION!\n");
print_list(action_trace);
printf("\n");
ucontext_t * get_system_context(void) { return system_context; }
void check_current_action(void);
- void print_summary(void);
+
+ /**
+ * Prints an execution summary with trace information.
+ * @param feasible Formats outputting according to whether or not the
+ * current trace is feasible. Defaults to feasible = true.
+ */
+ void print_summary(bool feasible = true);
+
Thread * schedule_next_thread();
int add_thread(Thread *t);