model: pad the digits in exec#.dot filenames
authorBrian Norris <banorris@uci.edu>
Thu, 20 Sep 2012 17:45:39 +0000 (10:45 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 20 Sep 2012 21:09:58 +0000 (14:09 -0700)
The generated .dot files can't be sorted alphabetically once we have double
digit executions. Make the filename use a 4-digit number, padded with zeros.

model.cc

index 8aaa3b5b264303fc2b5313d5280d59c6fa3c4a16..a7c99af24b7b05633183e9f96494e873e9e3a5b3 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -1509,7 +1509,7 @@ void ModelChecker::print_summary()
 #if SUPPORT_MOD_ORDER_DUMP
        scheduler->print();
        char buffername[100];
-       sprintf(buffername, "exec%u",num_executions);
+       sprintf(buffername, "exec%04u", num_executions);
        mo_graph->dumpGraphToFile(buffername);
 #endif