Commit 5d977847 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

rename tgba_succ_iterator as twa_succ_iterator

Automatic mass renaming.

* src/dstarparse/dra2ba.cc, src/dstarparse/nra2nba.cc,
src/kripke/fairkripke.hh, src/kripke/kripke.hh,
src/kripke/kripkeprint.cc, src/ta/ta.hh, src/ta/taproduct.hh,
src/ta/tgta.hh, src/ta/tgtaexplicit.cc, src/ta/tgtaexplicit.hh,
src/ta/tgtaproduct.cc, src/ta/tgtaproduct.hh,
src/taalgos/emptinessta.cc, src/taalgos/reachiter.hh,
src/taalgos/tgba2ta.cc, src/tgba/taatgba.cc, src/tgba/taatgba.hh,
src/tgba/tgba.cc, src/tgba/tgba.hh, src/tgba/tgbagraph.hh,
src/tgba/tgbamask.cc, src/tgba/tgbaproduct.cc, src/tgba/tgbaproduct.hh,
src/tgba/tgbaproxy.cc, src/tgba/tgbaproxy.hh,
src/tgba/tgbasafracomplement.cc, src/tgba/tgbasafracomplement.hh,
src/tgbaalgos/bfssteps.hh, src/tgbaalgos/compsusp.cc,
src/tgbaalgos/dupexp.cc, src/tgbaalgos/gtec/gtec.cc,
src/tgbaalgos/gtec/gtec.hh, src/tgbaalgos/gv04.cc,
src/tgbaalgos/lbtt.cc, src/tgbaalgos/magic.cc,
src/tgbaalgos/ndfs_result.hxx, src/tgbaalgos/reachiter.cc,
src/tgbaalgos/reachiter.hh, src/tgbaalgos/replayrun.cc,
src/tgbaalgos/scc.cc, src/tgbaalgos/scc.hh, src/tgbaalgos/se05.cc,
src/tgbaalgos/stats.cc, src/tgbaalgos/stutter.cc,
src/tgbaalgos/tau03.cc, src/tgbaalgos/tau03opt.cc: Rename
tgba_succ_iterator as twa_succ_iterator.
parent c8569330
...@@ -240,7 +240,7 @@ namespace spot ...@@ -240,7 +240,7 @@ namespace spot
void void
process_link(const state* sin, int, process_link(const state* sin, int,
const state* sout, int, const state* sout, int,
const tgba_succ_iterator* si) const twa_succ_iterator* si)
{ {
int in = in_->aut->state_number(sin); int in = in_->aut->state_number(sin);
int out = in_->aut->state_number(sout); int out = in_->aut->state_number(sout);
......
...@@ -64,7 +64,7 @@ namespace spot ...@@ -64,7 +64,7 @@ namespace spot
void void
process_link(const state* sin, int, process_link(const state* sin, int,
const state* sout, int, const state* sout, int,
const tgba_succ_iterator* si) const twa_succ_iterator* si)
{ {
int in = d_->aut->state_number(sin); int in = d_->aut->state_number(sin);
int out = d_->aut->state_number(sout); int out = d_->aut->state_number(sout);
......
...@@ -43,7 +43,7 @@ namespace spot ...@@ -43,7 +43,7 @@ namespace spot
/// ///
/// This class implements fair_kripke_succ_iterator::current_condition(), /// This class implements fair_kripke_succ_iterator::current_condition(),
/// and fair_kripke_succ_iterator::current_acceptance_conditions(). /// and fair_kripke_succ_iterator::current_acceptance_conditions().
class SPOT_API fair_kripke_succ_iterator : public tgba_succ_iterator class SPOT_API fair_kripke_succ_iterator : public twa_succ_iterator
{ {
public: public:
/// \brief Constructor /// \brief Constructor
......
...@@ -40,7 +40,7 @@ namespace spot ...@@ -40,7 +40,7 @@ namespace spot
/// ///
/// This class implements kripke_succ_iterator::current_condition(), /// This class implements kripke_succ_iterator::current_condition(),
/// and kripke_succ_iterator::current_acceptance_conditions(). /// and kripke_succ_iterator::current_acceptance_conditions().
class SPOT_API kripke_succ_iterator : public tgba_succ_iterator class SPOT_API kripke_succ_iterator : public twa_succ_iterator
{ {
public: public:
/// \brief Constructor /// \brief Constructor
......
...@@ -39,7 +39,7 @@ namespace spot ...@@ -39,7 +39,7 @@ namespace spot
{ {
} }
void process_state(const state* s, int, tgba_succ_iterator* si) void process_state(const state* s, int, twa_succ_iterator* si)
{ {
const bdd_dict_ptr d = aut_->get_dict(); const bdd_dict_ptr d = aut_->get_dict();
os_ << '"'; os_ << '"';
...@@ -80,7 +80,7 @@ namespace spot ...@@ -80,7 +80,7 @@ namespace spot
lastsuccs.str(""); lastsuccs.str("");
} }
void process_state(const state* s, int in_s, tgba_succ_iterator*) void process_state(const state* s, int in_s, twa_succ_iterator*)
{ {
if (notfirst) if (notfirst)
finish_state(); finish_state();
...@@ -98,7 +98,7 @@ namespace spot ...@@ -98,7 +98,7 @@ namespace spot
void void
process_link(const state*, int, const state*, int d, process_link(const state*, int, const state*, int d,
const tgba_succ_iterator*) const twa_succ_iterator*)
{ {
lastsuccs << " S" << d; lastsuccs << " S" << d;
} }
......
...@@ -193,7 +193,7 @@ namespace spot ...@@ -193,7 +193,7 @@ namespace spot
/// transition labels. Because transitions are never explicitely /// transition labels. Because transitions are never explicitely
/// encoded, labels (conditions and acceptance conditions) can only /// encoded, labels (conditions and acceptance conditions) can only
/// be queried while iterating over the successors. /// be queried while iterating over the successors.
class ta_succ_iterator : public tgba_succ_iterator class ta_succ_iterator : public twa_succ_iterator
{ {
public: public:
virtual virtual
......
...@@ -116,7 +116,7 @@ namespace spot ...@@ -116,7 +116,7 @@ namespace spot
const ta* ta_; const ta* ta_;
const kripke* kripke_; const kripke* kripke_;
ta_succ_iterator* ta_succ_it_; ta_succ_iterator* ta_succ_it_;
tgba_succ_iterator* kripke_succ_it_; twa_succ_iterator* kripke_succ_it_;
state_ta_product* current_state_; state_ta_product* current_state_;
bdd current_condition_; bdd current_condition_;
acc_cond::mark_t current_acceptance_conditions_; acc_cond::mark_t current_acceptance_conditions_;
......
...@@ -74,7 +74,7 @@ namespace spot ...@@ -74,7 +74,7 @@ namespace spot
/// responsability of the caller to \c delete it when no /// responsability of the caller to \c delete it when no
/// longer needed. /// longer needed.
/// ///
virtual tgba_succ_iterator* virtual twa_succ_iterator*
succ_iter_by_changeset(const spot::state* s, bdd change_set) const =0; succ_iter_by_changeset(const spot::state* s, bdd change_set) const =0;
}; };
......
...@@ -42,7 +42,7 @@ namespace spot ...@@ -42,7 +42,7 @@ namespace spot
return ta_->get_artificial_initial_state(); return ta_->get_artificial_initial_state();
} }
tgba_succ_iterator* twa_succ_iterator*
tgta_explicit::succ_iter(const spot::state* state) const tgta_explicit::succ_iter(const spot::state* state) const
{ {
return ta_->succ_iter(state); return ta_->succ_iter(state);
...@@ -68,7 +68,7 @@ namespace spot ...@@ -68,7 +68,7 @@ namespace spot
return ta_->format_state(s); return ta_->format_state(s);
} }
spot::tgba_succ_iterator* spot::twa_succ_iterator*
tgta_explicit::succ_iter_by_changeset(const spot::state* s, bdd chngset) const tgta_explicit::succ_iter_by_changeset(const spot::state* s, bdd chngset) const
{ {
return ta_->succ_iter(s, chngset); return ta_->succ_iter(s, chngset);
......
...@@ -44,7 +44,7 @@ namespace spot ...@@ -44,7 +44,7 @@ namespace spot
// tgba interface // tgba interface
virtual spot::state* get_init_state() const; virtual spot::state* get_init_state() const;
virtual tgba_succ_iterator* virtual twa_succ_iterator*
succ_iter(const spot::state* local_state) const; succ_iter(const spot::state* local_state) const;
virtual bdd_dict_ptr virtual bdd_dict_ptr
...@@ -55,7 +55,7 @@ namespace spot ...@@ -55,7 +55,7 @@ namespace spot
virtual std::string format_state(const spot::state* s) const; virtual std::string format_state(const spot::state* s) const;
virtual tgba_succ_iterator* virtual twa_succ_iterator*
succ_iter_by_changeset(const spot::state* s, bdd change_set) const; succ_iter_by_changeset(const spot::state* s, bdd change_set) const;
protected: protected:
virtual bdd compute_support_conditions(const spot::state* state) const; virtual bdd compute_support_conditions(const spot::state* state) const;
......
...@@ -57,7 +57,7 @@ namespace spot ...@@ -57,7 +57,7 @@ namespace spot
right_->get_init_state(), p); right_->get_init_state(), p);
} }
tgba_succ_iterator* twa_succ_iterator*
tgta_product::succ_iter(const state* state) const tgta_product::succ_iter(const state* state) const
{ {
const state_product* s = down_cast<const state_product*> (state); const state_product* s = down_cast<const state_product*> (state);
......
...@@ -38,7 +38,7 @@ namespace spot ...@@ -38,7 +38,7 @@ namespace spot
virtual state* virtual state*
get_init_state() const; get_init_state() const;
virtual tgba_succ_iterator* virtual twa_succ_iterator*
succ_iter(const state* local_state) const; succ_iter(const state* local_state) const;
}; };
...@@ -49,7 +49,7 @@ namespace spot ...@@ -49,7 +49,7 @@ namespace spot
} }
/// \brief Iterate over the successors of a product computed on the fly. /// \brief Iterate over the successors of a product computed on the fly.
class SPOT_API tgta_succ_iterator_product : public tgba_succ_iterator class SPOT_API tgta_succ_iterator_product : public twa_succ_iterator
{ {
public: public:
tgta_succ_iterator_product(const state_product* s, tgta_succ_iterator_product(const state_product* s,
...@@ -91,8 +91,8 @@ namespace spot ...@@ -91,8 +91,8 @@ namespace spot
const_tgta_ptr tgta_; const_tgta_ptr tgta_;
const_kripke_ptr kripke_; const_kripke_ptr kripke_;
fixed_size_pool* pool_; fixed_size_pool* pool_;
tgba_succ_iterator* tgta_succ_it_; twa_succ_iterator* tgta_succ_it_;
tgba_succ_iterator* kripke_succ_it_; twa_succ_iterator* kripke_succ_it_;
state_product* current_state_; state_product* current_state_;
bdd current_condition_; bdd current_condition_;
acc_cond::mark_t current_acceptance_conditions_; acc_cond::mark_t current_acceptance_conditions_;
......
...@@ -392,7 +392,7 @@ namespace spot ...@@ -392,7 +392,7 @@ namespace spot
int num = 0; int num = 0;
// * todo: the depth-first search stack. This holds pairs of the // * todo: the depth-first search stack. This holds pairs of the
// form (STATE, ITERATOR) where ITERATOR is a tgba_succ_iterator // form (STATE, ITERATOR) where ITERATOR is a twa_succ_iterator
// over the successors of STATE. In our use, ITERATOR should // over the successors of STATE. In our use, ITERATOR should
// always be freed when TODO is popped, but STATE should not because // always be freed when TODO is popped, but STATE should not because
// it is also used as a key in H. // it is also used as a key in H.
......
...@@ -79,7 +79,7 @@ namespace spot ...@@ -79,7 +79,7 @@ namespace spot
/// ///
/// \param in The source state number. /// \param in The source state number.
/// \param out The destination state number. /// \param out The destination state number.
/// \param si The spot::tgba_succ_iterator positionned on the current /// \param si The spot::twa_succ_iterator positionned on the current
/// transition. /// transition.
virtual void virtual void
process_link(int in, int out, const ta_succ_iterator* si); process_link(int in, int out, const ta_succ_iterator* si);
......
...@@ -45,7 +45,7 @@ namespace spot ...@@ -45,7 +45,7 @@ namespace spot
namespace namespace
{ {
typedef std::pair<spot::state*, tgba_succ_iterator*> pair_state_iter; typedef std::pair<spot::state*, twa_succ_iterator*> pair_state_iter;
static void static void
transform_to_single_pass_automaton transform_to_single_pass_automaton
...@@ -171,7 +171,7 @@ namespace spot ...@@ -171,7 +171,7 @@ namespace spot
int num = 0; int num = 0;
// * todo: the depth-first search stack. This holds pairs of the // * todo: the depth-first search stack. This holds pairs of the
// form (STATE, ITERATOR) where ITERATOR is a tgba_succ_iterator // form (STATE, ITERATOR) where ITERATOR is a twa_succ_iterator
// over the successors of STATE. In our use, ITERATOR should // over the successors of STATE. In our use, ITERATOR should
// always be freed when TODO is popped, but STATE should not because // always be freed when TODO is popped, but STATE should not because
// it is also used as a key in H. // it is also used as a key in H.
...@@ -202,7 +202,7 @@ namespace spot ...@@ -202,7 +202,7 @@ namespace spot
arc.push(0U); arc.push(0U);
sscc.top().is_accepting sscc.top().is_accepting
= testing_aut->is_accepting_state(init); = testing_aut->is_accepting_state(init);
tgba_succ_iterator* iter = testing_aut->succ_iter(init); twa_succ_iterator* iter = testing_aut->succ_iter(init);
iter->first(); iter->first();
todo.emplace(init, iter); todo.emplace(init, iter);
} }
...@@ -220,7 +220,7 @@ namespace spot ...@@ -220,7 +220,7 @@ namespace spot
} }
// We are looking at the next successor in SUCC. // We are looking at the next successor in SUCC.
tgba_succ_iterator* succ = todo.top().second; twa_succ_iterator* succ = todo.top().second;
// If there is no more successor, backtrack. // If there is no more successor, backtrack.
if (succ->done()) if (succ->done())
...@@ -322,7 +322,7 @@ namespace spot ...@@ -322,7 +322,7 @@ namespace spot
sscc.top().is_accepting = sscc.top().is_accepting =
testing_aut->is_accepting_state(dest); testing_aut->is_accepting_state(dest);
tgba_succ_iterator* iter = testing_aut->succ_iter(dest); twa_succ_iterator* iter = testing_aut->succ_iter(dest);
iter->first(); iter->first();
todo.emplace(dest, iter); todo.emplace(dest, iter);
continue; continue;
...@@ -425,7 +425,7 @@ namespace spot ...@@ -425,7 +425,7 @@ namespace spot
bool is_acc = false; bool is_acc = false;
if (degeneralized) if (degeneralized)
{ {
tgba_succ_iterator* it = tgba_->succ_iter(tgba_init_state); twa_succ_iterator* it = tgba_->succ_iter(tgba_init_state);
it->first(); it->first();
if (!it->done()) if (!it->done())
is_acc = it->current_acceptance_conditions() != 0U; is_acc = it->current_acceptance_conditions() != 0U;
...@@ -454,7 +454,7 @@ namespace spot ...@@ -454,7 +454,7 @@ namespace spot
state_ta_explicit* source = todo.top(); state_ta_explicit* source = todo.top();
todo.pop(); todo.pop();
tgba_succ_iterator* tgba_succ_it = twa_succ_iterator* tgba_succ_it =
tgba_->succ_iter(source->get_tgba_state()); tgba_->succ_iter(source->get_tgba_state());
for (tgba_succ_it->first(); !tgba_succ_it->done(); for (tgba_succ_it->first(); !tgba_succ_it->done();
tgba_succ_it->next()) tgba_succ_it->next())
...@@ -477,7 +477,7 @@ namespace spot ...@@ -477,7 +477,7 @@ namespace spot
bool is_acc = false; bool is_acc = false;
if (degeneralized) if (degeneralized)
{ {
tgba_succ_iterator* it = tgba_->succ_iter(tgba_state); twa_succ_iterator* it = tgba_->succ_iter(tgba_state);
it->first(); it->first();
if (!it->done()) if (!it->done())
is_acc = it->current_acceptance_conditions() != 0U; is_acc = it->current_acceptance_conditions() != 0U;
...@@ -621,7 +621,7 @@ namespace spot ...@@ -621,7 +621,7 @@ namespace spot
// adapt a ta automata to build tgta automata : // adapt a ta automata to build tgta automata :
ta::states_set_t states_set = ta->get_states_set(); ta::states_set_t states_set = ta->get_states_set();
ta::states_set_t::iterator it; ta::states_set_t::iterator it;
tgba_succ_iterator* initial_states_iter = twa_succ_iterator* initial_states_iter =
ta->succ_iter(ta->get_artificial_initial_state()); ta->succ_iter(ta->get_artificial_initial_state());
initial_states_iter->first(); initial_states_iter->first();
if (initial_states_iter->done()) if (initial_states_iter->done())
......
...@@ -60,7 +60,7 @@ namespace spot ...@@ -60,7 +60,7 @@ namespace spot
return new spot::set_state(init_); return new spot::set_state(init_);
} }
tgba_succ_iterator* twa_succ_iterator*
taa_tgba::succ_iter(const spot::state* state) const taa_tgba::succ_iter(const spot::state* state) const
{ {
const spot::set_state* s = down_cast<const spot::set_state*>(state); const spot::set_state* s = down_cast<const spot::set_state*>(state);
......
...@@ -55,7 +55,7 @@ namespace spot ...@@ -55,7 +55,7 @@ namespace spot
/// TGBA interface. /// TGBA interface.
virtual ~taa_tgba(); virtual ~taa_tgba();
virtual spot::state* get_init_state() const final; virtual spot::state* get_init_state() const final;
virtual tgba_succ_iterator* succ_iter(const spot::state* state) const final; virtual twa_succ_iterator* succ_iter(const spot::state* state) const final;
virtual std::string format_state(const spot::state* state) const = 0; virtual std::string format_state(const spot::state* state) const = 0;
protected: protected:
...@@ -101,7 +101,7 @@ namespace spot ...@@ -101,7 +101,7 @@ namespace spot
bool delete_me_; bool delete_me_;
}; };
class SPOT_API taa_succ_iterator final: public tgba_succ_iterator class SPOT_API taa_succ_iterator final: public twa_succ_iterator
{ {
public: public:
taa_succ_iterator(const taa_tgba::state_set* s, const acc_cond& acc); taa_succ_iterator(const taa_tgba::state_set* s, const acc_cond& acc);
......
...@@ -68,7 +68,7 @@ namespace spot ...@@ -68,7 +68,7 @@ namespace spot
} }
std::string std::string
twa::transition_annotation(const tgba_succ_iterator*) const twa::transition_annotation(const twa_succ_iterator*) const
{ {
return ""; return "";
} }
......
...@@ -78,7 +78,7 @@ namespace spot ...@@ -78,7 +78,7 @@ namespace spot
/// \brief Release a state. /// \brief Release a state.
/// ///
/// Methods from the tgba or tgba_succ_iterator always return a /// Methods from the tgba or twa_succ_iterator always return a
/// new state that you should deallocate with this function. /// new state that you should deallocate with this function.
/// Before Spot 0.7, you had to "delete" your state directly. /// Before Spot 0.7, you had to "delete" your state directly.
/// Starting with Spot 0.7, you should update your code to use /// Starting with Spot 0.7, you should update your code to use
...@@ -326,11 +326,11 @@ namespace spot ...@@ -326,11 +326,11 @@ namespace spot
/// transition labels. Because transitions are never explicitely /// transition labels. Because transitions are never explicitely
/// encoded, labels (conditions and acceptance conditions) can only /// encoded, labels (conditions and acceptance conditions) can only
/// be queried while iterating over the successors. /// be queried while iterating over the successors.
class SPOT_API tgba_succ_iterator class SPOT_API twa_succ_iterator
{ {
public: public:
virtual virtual
~tgba_succ_iterator() ~twa_succ_iterator()
{ {
} }
...@@ -400,10 +400,10 @@ namespace spot ...@@ -400,10 +400,10 @@ namespace spot
struct SPOT_API succ_iterator struct SPOT_API succ_iterator
{ {
protected: protected:
tgba_succ_iterator* it_; twa_succ_iterator* it_;
public: public:
succ_iterator(tgba_succ_iterator* it): succ_iterator(twa_succ_iterator* it):
it_(it) it_(it)
{ {
} }
...@@ -418,7 +418,7 @@ namespace spot ...@@ -418,7 +418,7 @@ namespace spot
return it_ != o.it_; return it_ != o.it_;
} }
const tgba_succ_iterator* operator*() const const twa_succ_iterator* operator*() const
{ {
return it_; return it_;
} }
...@@ -482,7 +482,7 @@ namespace spot ...@@ -482,7 +482,7 @@ namespace spot
protected: protected:
twa(const bdd_dict_ptr& d); twa(const bdd_dict_ptr& d);
// Any iterator returned via release_iter. // Any iterator returned via release_iter.
mutable tgba_succ_iterator* iter_cache_; mutable twa_succ_iterator* iter_cache_;
bdd_dict_ptr dict_; bdd_dict_ptr dict_;
public: public:
...@@ -491,9 +491,9 @@ namespace spot ...@@ -491,9 +491,9 @@ namespace spot
{ {
protected: protected:
const twa* aut_; const twa* aut_;
tgba_succ_iterator* it_; twa_succ_iterator* it_;
public: public:
succ_iterable(const twa* aut, tgba_succ_iterator* it) succ_iterable(const twa* aut, twa_succ_iterator* it)
: aut_(aut), it_(it) : aut_(aut), it_(it)
{ {
} }
...@@ -536,7 +536,7 @@ namespace spot ...@@ -536,7 +536,7 @@ namespace spot
/// The iterator has been allocated with \c new. It is the /// The iterator has been allocated with \c new. It is the
/// responsability of the caller to \c delete it when no /// responsability of the caller to \c delete it when no
/// longer needed. /// longer needed.
virtual tgba_succ_iterator* virtual twa_succ_iterator*
succ_iter(const state* local_state) const = 0; succ_iter(const state* local_state) const = 0;
#ifndef SWIG #ifndef SWIG
...@@ -555,7 +555,7 @@ namespace spot ...@@ -555,7 +555,7 @@ namespace spot
/// ///
/// This iterator can then be reused by succ_iter() to avoid /// This iterator can then be reused by succ_iter() to avoid
/// memory allocation. /// memory allocation.
void release_iter(tgba_succ_iterator* i) const void release_iter(twa_succ_iterator* i) const
{ {
if (iter_cache_) if (iter_cache_)
delete i; delete i;
...@@ -611,9 +611,9 @@ namespace spot ...@@ -611,9 +611,9 @@ namespace spot
/// This method is used for instance in dotty_reachable(), /// This method is used for instance in dotty_reachable(),
/// and replay_tgba_run(). /// and replay_tgba_run().
/// ///
/// \param t a non-done tgba_succ_iterator for this automaton /// \param t a non-done twa_succ_iterator for this automaton
virtual std::string virtual std::string
transition_annotation(const tgba_succ_iterator* t) const; transition_annotation(const twa_succ_iterator* t) const;
/// \brief Project a state on an automaton. /// \brief Project a state on an automaton.
/// ///
......
...@@ -106,7 +106,7 @@ namespace spot ...@@ -106,7 +106,7 @@ namespace spot
template<class Graph> template<class Graph>
class SPOT_API twa_graph_succ_iterator final: class SPOT_API twa_graph_succ_iterator final:
public tgba_succ_iterator