model: cosmetic output improvements
[cdsspec-compiler.git] / execution.cc
index 4496b9c63deeca6fa8198ec086425ba8fa1d6932..07866fe804a308054c716ae4eb92ba146cd53e15 100644 (file)
@@ -1389,7 +1389,7 @@ void ModelExecution::print_infeasibility(const char *prefix) const
        if (promises.size() != 0)
                ptr += sprintf(ptr, "[unresolved promise]");
        if (ptr != buf)
        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);
 }
 
 /**
 }
 
 /**
@@ -2630,7 +2630,9 @@ static void print_list(const action_list_t *list)
 {
        action_list_t::const_iterator it;
 
 {
        action_list_t::const_iterator it;
 
-       model_print("---------------------------------------------------------------------\n");
+       model_print("------------------------------------------------------------------------------------\n");
+       model_print("#    t    Action type     MO       Location         Value               Rf  CV\n");
+       model_print("------------------------------------------------------------------------------------\n");
 
        unsigned int hash = 0;
 
 
        unsigned int hash = 0;
 
@@ -2641,7 +2643,7 @@ static void print_list(const action_list_t *list)
                hash = hash^(hash<<3)^((*it)->hash());
        }
        model_print("HASH %u\n", hash);
                hash = hash^(hash<<3)^((*it)->hash());
        }
        model_print("HASH %u\n", hash);
-       model_print("---------------------------------------------------------------------\n");
+       model_print("------------------------------------------------------------------------------------\n");
 }
 
 #if SUPPORT_MOD_ORDER_DUMP
 }
 
 #if SUPPORT_MOD_ORDER_DUMP
@@ -2695,17 +2697,21 @@ void ModelExecution::print_summary() const
        dumpGraph(buffername);
 #endif
 
        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");
        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");
        } else
                print_infeasibility(" INFEASIBLE");
+       model_print("\n");
+
        print_list(&action_trace);
        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++) {
        if (!promises.empty()) {
                model_print("Pending promises:\n");
                for (unsigned int i = 0; i < promises.size(); i++) {