Commit d2f11e40 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

move set_generalized_buchi and set_buchi to tgba

* src/tgba/tgbagraph.hh (set_generalized_buchi, set_buchi): Move...
* src/tgba/tgba.hh: ... here.
parent 47d9a2d5
......@@ -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;
......
......@@ -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<const tgba_digraph_succ_iterator<graph_t>*>(it);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment