diff --git a/src/tgba/tgba.hh b/src/tgba/tgba.hh index ce3150932..69b2f55e2 100644 --- a/src/tgba/tgba.hh +++ b/src/tgba/tgba.hh @@ -638,6 +638,16 @@ namespace spot protected: acc_cond acc_; + void set_num_sets_(unsigned num) + { + if (num < acc_.num_sets()) + { + acc_.~acc_cond(); + new (&acc_) acc_cond; + } + acc_.add_sets(num - acc_.num_sets()); + } + public: const acc_cond::acc_code& get_acceptance() const { @@ -646,12 +656,7 @@ namespace spot void set_acceptance(unsigned num, const acc_cond::acc_code& c) { - if (num < acc_.num_sets()) - { - acc_.~acc_cond(); - new (&acc_) acc_cond; - } - acc_.add_sets(num - acc_.num_sets()); + set_num_sets_(num); acc_.set_acceptance(c); prop_single_acc_set(!acc_.uses_fin_acceptance() && num == 1); if (num == 0) @@ -673,6 +678,21 @@ namespace spot get_dict()->register_all_propositions_of(a, this); } + void set_generalized_buchi(unsigned num) + { + set_num_sets_(num); + acc_.set_generalized_buchi(); + prop_single_acc_set(num == 1); + if (num == 0) + prop_state_based_acc(); + } + + acc_cond::mark_t set_buchi() + { + set_generalized_buchi(1); + return acc_.mark(0); + } + protected: /// Do the actual computation of tgba::support_conditions(). virtual bdd compute_support_conditions(const state* state) const = 0; diff --git a/src/tgba/tgbagraph.hh b/src/tgba/tgbagraph.hh index 4c00b9108..321b225c3 100644 --- a/src/tgba/tgbagraph.hh +++ b/src/tgba/tgbagraph.hh @@ -334,26 +334,6 @@ namespace spot return g_.trans_data(t); } - void set_generalized_buchi(unsigned num) - { - if (num < acc_.num_sets()) - { - acc_.~acc_cond(); - new (&acc_) acc_cond; - } - acc_.add_sets(num - acc_.num_sets()); - prop_single_acc_set(!acc_.uses_fin_acceptance() && num == 1); - if (num == 0) - prop_state_based_acc(); - acc_.set_generalized_buchi(); - } - - acc_cond::mark_t set_buchi() - { - set_generalized_buchi(1); - return acc_.mark(0); - } - trans_storage_t& trans_storage(const tgba_succ_iterator* it) { auto* i = down_cast*>(it);