From 2dbef514bd3c3687fdde9a4f8633e02826a46d9a Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 18 Mar 2015 20:19:03 +0100 Subject: [PATCH] move copy_acceptance_of and copy_ap_of to tgba.hh Fixes #65. * src/tgba/tgbagraph.hh (copy_acceptance_of, copy_ap_of): Move... * src/tgba/tgba.hh: ... here. --- src/tgba/tgba.hh | 15 +++++++++++++++ src/tgba/tgbagraph.hh | 16 ---------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/tgba/tgba.hh b/src/tgba/tgba.hh index 88b6ca4b6..ce3150932 100644 --- a/src/tgba/tgba.hh +++ b/src/tgba/tgba.hh @@ -658,6 +658,21 @@ namespace spot prop_state_based_acc(); } + /// \brief Copy the acceptance condition of another tgba. + void copy_acceptance_of(const const_tgba_ptr& a) + { + acc_ = a->acc(); + unsigned num = acc_.num_sets(); + prop_single_acc_set(!acc_.uses_fin_acceptance() && num == 1); + if (num == 0) + prop_state_based_acc(); + } + + void copy_ap_of(const const_tgba_ptr& a) + { + get_dict()->register_all_propositions_of(a, this); + } + 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 9b58d3801..510720008 100644 --- a/src/tgba/tgbagraph.hh +++ b/src/tgba/tgbagraph.hh @@ -425,22 +425,6 @@ namespace spot auto is_dead_transition(const graph_t::trans_storage_t& t) const SPOT_RETURN(g_.is_dead_transition(t)); - /// \brief Copy the acceptance conditions of another tgba. - void copy_acceptance_of(const const_tgba_ptr& a) - { - // FIXME: Should rename as copy_acceptance_condition*_of - acc_ = a->acc(); - unsigned num = acc_.num_sets(); - prop_single_acc_set(!acc_.uses_fin_acceptance() && num == 1); - if (num == 0) - prop_state_based_acc(); - } - - void copy_ap_of(const const_tgba_ptr& a) - { - get_dict()->register_all_propositions_of(a, this); - } - virtual bdd compute_support_conditions(const state* s) const { bdd sum = bddfalse;