diff --git a/reactics-bdd/mc.cc b/reactics-bdd/mc.cc index 76f1128..09a8f1c 100644 --- a/reactics-bdd/mc.cc +++ b/reactics-bdd/mc.cc @@ -198,7 +198,14 @@ void ModelChecker::printReachWithSucc(void) while (!unproc.IsZero()) { BDD t; t = unproc.PickOneMinterm(*pv); - cout << "Successors of " << srs->decodedRctSysStateToStr(t) << ":" << endl; + if (opts->backend_mode) + { + cout << "G " << srs->decodedRctSysStateToStr(t) << endl; + } + else + { + cout << "Successors of " << srs->decodedRctSysStateToStr(t) << ":" << endl; + } srs->printDecodedRctSysStates(getSucc(t)); unproc -= t; } diff --git a/reactics-bdd/options.hh b/reactics-bdd/options.hh index e33af84..2c05c49 100644 --- a/reactics-bdd/options.hh +++ b/reactics-bdd/options.hh @@ -11,6 +11,7 @@ class Options bool part_tr_rel; bool reorder_reach; bool reorder_trans; + bool backend_mode; double enc_time; double enc_mem; @@ -28,6 +29,8 @@ class Options reorder_reach = false; reorder_trans = false; + backend_mode = false; + enc_time = 0; enc_mem = 0; ver_time = 0; diff --git a/reactics-bdd/reactics.cc b/reactics-bdd/reactics.cc index bab9681..6b1a3bd 100644 --- a/reactics-bdd/reactics.cc +++ b/reactics-bdd/reactics.cc @@ -31,7 +31,7 @@ int main(int argc, char **argv) int c; int option_index = 0; - while ((c = getopt_long(argc, argv, "c:bBmpPrsStTvxzh", long_options, + while ((c = getopt_long(argc, argv, "c:bBmpPrsStTvxzXh", long_options, &option_index)) != -1) { switch (c) { case 0: @@ -106,6 +106,10 @@ int main(int argc, char **argv) opts->reorder_trans = true; break; + case 'X': + opts->backend_mode = true; + break; + case 'h': dump_help_message = true; break; @@ -259,6 +263,8 @@ void print_help(std::string path_str) endl << " -p -- show progress (where possible)" << endl << endl + << " -X -- backend mode (makes output parsing easier)" << endl + << endl << " Benchmarking options:" << endl << " -m -- measure and display time and memory usage" << endl << " -B -- display an easy to parse summary (enables -m)" << endl diff --git a/reactics-bdd/symrs.cc b/reactics-bdd/symrs.cc index c7476c6..98726e3 100644 --- a/reactics-bdd/symrs.cc +++ b/reactics-bdd/symrs.cc @@ -573,7 +573,14 @@ void SymRS::printDecodedRctSysStates(const BDD &states) while (!unproc.IsZero()) { BDD t = unproc.PickOneMinterm(*pv_drs_flat); - cout << decodedRctSysStateToStr(t) << endl; + if (opts->backend_mode) + { + cout << "s " << decodedRctSysStateToStr(t) << endl; + } + else + { + cout << decodedRctSysStateToStr(t) << endl; + } if (opts->verbose > 9) { BDD_PRINT(t);