diff --git a/NEWS b/NEWS index e4ca683c7..374fad926 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,8 @@ New in spot 1.0a (not released): FG(a&Gb) = FG(a&b) - The on-line version of ltl2tgba now displays edge and transition counts, just as the ltlcross tool. + - ltlcross will display the number of timeouts at the end + of its execution. * Pruning: - lbtt has been removed from the distribution. A copy of the last version we distributed is still available at diff --git a/src/bin/ltlcross.cc b/src/bin/ltlcross.cc index e5b1d9953..58d5aba1d 100644 --- a/src/bin/ltlcross.cc +++ b/src/bin/ltlcross.cc @@ -323,6 +323,7 @@ create_tmpfile(char c, unsigned int n, std::string& name) static volatile bool timed_out = false; +unsigned timeout_count = 0; #if ENABLE_TIMEOUT static volatile int alarm_on = 0; @@ -575,6 +576,7 @@ namespace { // This is not considered to be a global error. std::cerr << "warning: timeout during execution of command\n"; + ++timeout_count; } else if (WIFSIGNALED(es)) { @@ -1108,12 +1110,25 @@ main(int argc, char** argv) else { if (global_error_flag) - std::cerr - << ("error: some error was detected during the above runs,\n" - " please search for 'error:' messages in the above trace.") - << std::endl; - else - std::cerr << "no problem detected" << std::endl; + { + std::cerr + << ("error: some error was detected during the above runs,\n" + " please search for 'error:' messages in the above " + "trace.") + << std::endl; + if (timeout_count == 1) + std::cerr << "Additionally, 1 timeout occurred." << std::endl; + else if (timeout_count > 1) + std::cerr << "Additionally, " + << timeout_count << " timeouts occurred." << std::endl; + } + else if (timeout_count == 0) + std::cerr << "No problem detected." << std::endl; + else if (timeout_count == 1) + std::cerr << "1 timeout, but no other problem detected." << std::endl; + else + std::cerr << timeout_count + << " timeouts, but no other problem detected." << std::endl; } if (json_output)