From 618146c15760f3adc5774cb278f22d9e4d897977 Mon Sep 17 00:00:00 2001 From: Ala-Eddine Ben-Salem Date: Wed, 11 Apr 2012 11:15:19 +0200 Subject: [PATCH] Changes to pass sanity tests * src/ta/taexplicit.hh, src/ta/taexplicit.cc, src/taalgos/minimize.cc, src/taalgos/tgba2ta.cc, src/tgbatest/ltl2tgba.cc: correct the code style in order to respect the sanity rules --- src/ta/taexplicit.cc | 6 +++--- src/ta/taexplicit.hh | 2 +- src/taalgos/minimize.cc | 20 ++++++++++---------- src/taalgos/tgba2ta.cc | 2 +- src/tgbatest/ltl2tgba.cc | 10 ++++++---- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/ta/taexplicit.cc b/src/ta/taexplicit.cc index 651866316..240697e77 100644 --- a/src/ta/taexplicit.cc +++ b/src/ta/taexplicit.cc @@ -311,12 +311,12 @@ namespace spot && (!dest_is_livelock_accepting))) { get_transitions((*it_trans)->condition)->remove(*it_trans); - delete (*it_trans); + delete *it_trans; it_trans = trans->erase(it_trans); } else { - it_trans++; + ++it_trans; } } @@ -536,7 +536,7 @@ namespace spot } else { - it_trans++; + ++it_trans; } } } diff --git a/src/ta/taexplicit.hh b/src/ta/taexplicit.hh index 42f5d16f0..5e68a0812 100644 --- a/src/ta/taexplicit.hh +++ b/src/ta/taexplicit.hh @@ -127,7 +127,7 @@ namespace spot bdd all_acceptance_conditions() const { - return all_acceptance_conditions_;; + return all_acceptance_conditions_; } private: diff --git a/src/taalgos/minimize.cc b/src/taalgos/minimize.cc index 6e435c81c..7e2415196 100644 --- a/src/taalgos/minimize.cc +++ b/src/taalgos/minimize.cc @@ -264,7 +264,7 @@ namespace spot used_var[set_num] = 1; free_var.erase(set_num); state_set_map[*i] = set_num; - set_num++; + ++set_num; } @@ -275,7 +275,7 @@ namespace spot { unsigned s = G->size(); unsigned num = set_num; - set_num++; + ++set_num; used_var[num] = s; free_var.erase(num); if (s > 1) @@ -293,7 +293,7 @@ namespace spot { unsigned s = F->size(); unsigned num = set_num; - set_num++; + ++set_num; used_var[num] = s; free_var.erase(num); if (s > 1) @@ -310,7 +310,7 @@ namespace spot { unsigned s = G_F->size(); unsigned num = set_num; - set_num++; + ++set_num; used_var[num] = s; free_var.erase(num); if (s > 1) @@ -327,7 +327,7 @@ namespace spot { unsigned s = S->size(); unsigned num = set_num; - set_num++; + ++set_num; used_var[num] = s; free_var.erase(num); if (s > 1) @@ -346,7 +346,7 @@ namespace spot bool did_split = true; unsigned num = set_num; - set_num++; + ++set_num; used_var[num] = 1; free_var.erase(num); bdd bdd_false_acceptance_condition = bdd_ithvar(num); @@ -388,21 +388,21 @@ namespace spot trace << "+f: " << bdd_format_accset(ta_->get_dict(), f) << std::endl; - ; + trace << " -bdd_ithvar(i->second): " << bdd_format_accset( ta_->get_dict(), bdd_ithvar(i->second)) << std::endl; - ; + trace << " -si->current_condition(): " << bdd_format_accset(ta_->get_dict(), si->current_condition()) << std::endl; - ; + trace << " -current_acceptance_conditions: " << bdd_format_accset(ta_->get_dict(), current_acceptance_conditions) << std::endl; - ; + } delete si; diff --git a/src/taalgos/tgba2ta.cc b/src/taalgos/tgba2ta.cc index dc76d1359..18959ff2e 100644 --- a/src/taalgos/tgba2ta.cc +++ b/src/taalgos/tgba2ta.cc @@ -114,7 +114,7 @@ namespace spot } - it_trans++; + ++it_trans; } diff --git a/src/tgbatest/ltl2tgba.cc b/src/tgbatest/ltl2tgba.cc index da9da4581..a9f89ffb7 100644 --- a/src/tgbatest/ltl2tgba.cc +++ b/src/tgbatest/ltl2tgba.cc @@ -1100,7 +1100,7 @@ main(int argc, char** argv) //TA spot::ltl::atomic_prop_set* aps = atomic_prop_collect(f, 0); - bdd atomic_props_set_bdd = bdd_true(); + bdd atomic_props_set_bdd = bdd_true; for (spot::ltl::atomic_prop_set::const_iterator i = aps->begin(); i != aps->end(); ++i) { @@ -1123,10 +1123,11 @@ main(int argc, char** argv) opt_with_artificial_livelock); spot::ta* testing_automata_nm = 0; - if (opt_minimize) { + if (opt_minimize) + { testing_automata_nm = testing_automata; testing_automata = minimize_ta(testing_automata); - } + } if (output != -1) { @@ -1150,7 +1151,8 @@ main(int argc, char** argv) delete testing_automata; a = 0; degeneralized = 0; - if (degeneralize_opt != DegenSBA) to_free = 0; + if (degeneralize_opt != DegenSBA) + to_free = 0; aut_red = 0; output = -1;