move set_generalized_buchi and set_buchi to tgba
* src/tgba/tgbagraph.hh (set_generalized_buchi, set_buchi): Move... * src/tgba/tgba.hh: ... here.
This commit is contained in:
parent
47d9a2d57c
commit
d2f11e4075
2 changed files with 26 additions and 26 deletions
|
|
@ -638,6 +638,16 @@ namespace spot
|
||||||
protected:
|
protected:
|
||||||
acc_cond acc_;
|
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:
|
public:
|
||||||
const acc_cond::acc_code& get_acceptance() const
|
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)
|
void set_acceptance(unsigned num, const acc_cond::acc_code& c)
|
||||||
{
|
{
|
||||||
if (num < acc_.num_sets())
|
set_num_sets_(num);
|
||||||
{
|
|
||||||
acc_.~acc_cond();
|
|
||||||
new (&acc_) acc_cond;
|
|
||||||
}
|
|
||||||
acc_.add_sets(num - acc_.num_sets());
|
|
||||||
acc_.set_acceptance(c);
|
acc_.set_acceptance(c);
|
||||||
prop_single_acc_set(!acc_.uses_fin_acceptance() && num == 1);
|
prop_single_acc_set(!acc_.uses_fin_acceptance() && num == 1);
|
||||||
if (num == 0)
|
if (num == 0)
|
||||||
|
|
@ -673,6 +678,21 @@ namespace spot
|
||||||
get_dict()->register_all_propositions_of(a, this);
|
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:
|
protected:
|
||||||
/// Do the actual computation of tgba::support_conditions().
|
/// Do the actual computation of tgba::support_conditions().
|
||||||
virtual bdd compute_support_conditions(const state* state) const = 0;
|
virtual bdd compute_support_conditions(const state* state) const = 0;
|
||||||
|
|
|
||||||
|
|
@ -334,26 +334,6 @@ namespace spot
|
||||||
return g_.trans_data(t);
|
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)
|
trans_storage_t& trans_storage(const tgba_succ_iterator* it)
|
||||||
{
|
{
|
||||||
auto* i = down_cast<const tgba_digraph_succ_iterator<graph_t>*>(it);
|
auto* i = down_cast<const tgba_digraph_succ_iterator<graph_t>*>(it);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue