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
void
process_link(const state* sin, int,
const state* sout, int,
const tgba_succ_iterator* si)
const twa_succ_iterator* si)
{
int in = in_->aut->state_number(sin);
int out = in_->aut->state_number(sout);
......
......@@ -64,7 +64,7 @@ namespace spot
void
process_link(const state* sin, int,
const state* sout, int,
const tgba_succ_iterator* si)
const twa_succ_iterator* si)
{
int in = d_->aut->state_number(sin);
int out = d_->aut->state_number(sout);
......
......@@ -43,7 +43,7 @@ namespace spot
///
/// This class implements fair_kripke_succ_iterator::current_condition(),
/// 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:
/// \brief Constructor
......
......@@ -40,7 +40,7 @@ namespace spot
///
/// This class implements kripke_succ_iterator::current_condition(),
/// 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:
/// \brief Constructor
......
......@@ -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();
os_ << '"';
......@@ -80,7 +80,7 @@ namespace spot
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)
finish_state();
......@@ -98,7 +98,7 @@ namespace spot
void
process_link(const state*, int, const state*, int d,
const tgba_succ_iterator*)
const twa_succ_iterator*)
{
lastsuccs << " S" << d;
}
......
......@@ -193,7 +193,7 @@ namespace spot
/// transition labels. Because transitions are never explicitely
/// encoded, labels (conditions and acceptance conditions) can only
/// be queried while iterating over the successors.
class ta_succ_iterator : public tgba_succ_iterator
class ta_succ_iterator : public twa_succ_iterator
{
public:
virtual
......
......@@ -116,7 +116,7 @@ namespace spot
const ta* ta_;
const kripke* kripke_;
ta_succ_iterator* ta_succ_it_;
tgba_succ_iterator* kripke_succ_it_;
twa_succ_iterator* kripke_succ_it_;
state_ta_product* current_state_;
bdd current_condition_;
acc_cond::mark_t current_acceptance_conditions_;
......
......@@ -74,7 +74,7 @@ namespace spot
/// responsability of the caller to \c delete it when no
/// longer needed.
///
virtual tgba_succ_iterator*
virtual twa_succ_iterator*
succ_iter_by_changeset(const spot::state* s, bdd change_set) const =0;
};
......
......@@ -42,7 +42,7 @@ namespace spot
return ta_->get_artificial_initial_state();
}
tgba_succ_iterator*
twa_succ_iterator*
tgta_explicit::succ_iter(const spot::state* state) const
{
return ta_->succ_iter(state);
......@@ -68,7 +68,7 @@ namespace spot
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
{
return ta_->succ_iter(s, chngset);
......
......@@ -44,7 +44,7 @@ namespace spot
// tgba interface
virtual spot::state* get_init_state() const;
virtual tgba_succ_iterator*
virtual twa_succ_iterator*
succ_iter(const spot::state* local_state) const;
virtual bdd_dict_ptr
......@@ -55,7 +55,7 @@ namespace spot
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;
protected:
virtual bdd compute_support_conditions(const spot::state* state) const;
......
......@@ -57,7 +57,7 @@ namespace spot
right_->get_init_state(), p);
}
tgba_succ_iterator*
twa_succ_iterator*
tgta_product::succ_iter(const state* state) const
{
const state_product* s = down_cast<const state_product*> (state);
......
......@@ -38,7 +38,7 @@ namespace spot
virtual state*
get_init_state() const;
virtual tgba_succ_iterator*
virtual twa_succ_iterator*
succ_iter(const state* local_state) const;
};
......@@ -49,7 +49,7 @@ namespace spot
}
/// \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:
tgta_succ_iterator_product(const state_product* s,
......@@ -91,8 +91,8 @@ namespace spot
const_tgta_ptr tgta_;
const_kripke_ptr kripke_;
fixed_size_pool* pool_;
tgba_succ_iterator* tgta_succ_it_;
tgba_succ_iterator* kripke_succ_it_;
twa_succ_iterator* tgta_succ_it_;
twa_succ_iterator* kripke_succ_it_;
state_product* current_state_;
bdd current_condition_;
acc_cond::mark_t current_acceptance_conditions_;
......
......@@ -392,7 +392,7 @@ namespace spot
int num = 0;
// * 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
// always be freed when TODO is popped, but STATE should not because
// it is also used as a key in H.
......
......@@ -79,7 +79,7 @@ namespace spot
///
/// \param in The source 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.
virtual void
process_link(int in, int out, const ta_succ_iterator* si);
......
......@@ -45,7 +45,7 @@ namespace spot
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
transform_to_single_pass_automaton
......@@ -171,7 +171,7 @@ namespace spot
int num = 0;
// * 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
// always be freed when TODO is popped, but STATE should not because
// it is also used as a key in H.
......@@ -202,7 +202,7 @@ namespace spot
arc.push(0U);
sscc.top().is_accepting
= 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();
todo.emplace(init, iter);
}
......@@ -220,7 +220,7 @@ namespace spot
}
// 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 (succ->done())
......@@ -322,7 +322,7 @@ namespace spot
sscc.top().is_accepting =
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();
todo.emplace(dest, iter);
continue;
......@@ -425,7 +425,7 @@ namespace spot
bool is_acc = false;
if (degeneralized)
{
tgba_succ_iterator* it = tgba_->succ_iter(tgba_init_state);
twa_succ_iterator* it = tgba_->succ_iter(tgba_init_state);
it->first();
if (!it->done())
is_acc = it->current_acceptance_conditions() != 0U;
......@@ -454,7 +454,7 @@ namespace spot
state_ta_explicit* source = todo.top();
todo.pop();
tgba_succ_iterator* tgba_succ_it =
twa_succ_iterator* tgba_succ_it =
tgba_->succ_iter(source->get_tgba_state());
for (tgba_succ_it->first(); !tgba_succ_it->done();
tgba_succ_it->next())
......@@ -477,7 +477,7 @@ namespace spot
bool is_acc = false;
if (degeneralized)
{
tgba_succ_iterator* it = tgba_->succ_iter(tgba_state);
twa_succ_iterator* it = tgba_->succ_iter(tgba_state);
it->first();
if (!it->done())
is_acc = it->current_acceptance_conditions() != 0U;
......@@ -621,7 +621,7 @@ namespace spot
// adapt a ta automata to build tgta automata :
ta::states_set_t states_set = ta->get_states_set();
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());
initial_states_iter->first();
if (initial_states_iter->done())
......
......@@ -60,7 +60,7 @@ namespace spot
return new spot::set_state(init_);
}
tgba_succ_iterator*
twa_succ_iterator*
taa_tgba::succ_iter(const spot::state* state) const
{
const spot::set_state* s = down_cast<const spot::set_state*>(state);
......
......@@ -55,7 +55,7 @@ namespace spot
/// TGBA interface.
virtual ~taa_tgba();
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;
protected:
......@@ -101,7 +101,7 @@ namespace spot
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:
taa_succ_iterator(const taa_tgba::state_set* s, const acc_cond& acc);
......
......@@ -68,7 +68,7 @@ namespace spot
}
std::string
twa::transition_annotation(const tgba_succ_iterator*) const
twa::transition_annotation(const twa_succ_iterator*) const
{
return "";
}
......
......@@ -78,7 +78,7 @@ namespace spot
/// \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.
/// Before Spot 0.7, you had to "delete" your state directly.
/// Starting with Spot 0.7, you should update your code to use
......@@ -326,11 +326,11 @@ namespace spot
/// transition labels. Because transitions are never explicitely
/// encoded, labels (conditions and acceptance conditions) can only
/// be queried while iterating over the successors.
class SPOT_API tgba_succ_iterator
class SPOT_API twa_succ_iterator
{
public:
virtual
~tgba_succ_iterator()
~twa_succ_iterator()
{
}
......@@ -400,10 +400,10 @@ namespace spot
struct SPOT_API succ_iterator
{
protected:
tgba_succ_iterator* it_;
twa_succ_iterator* it_;
public:
succ_iterator(tgba_succ_iterator* it):
succ_iterator(twa_succ_iterator* it):
it_(it)
{
}
......@@ -418,7 +418,7 @@ namespace spot
return it_ != o.it_;
}
const tgba_succ_iterator* operator*() const
const twa_succ_iterator* operator*() const
{
return it_;
}
......@@ -482,7 +482,7 @@ namespace spot
protected:
twa(const bdd_dict_ptr& d);
// Any iterator returned via release_iter.
mutable tgba_succ_iterator* iter_cache_;
mutable twa_succ_iterator* iter_cache_;
bdd_dict_ptr dict_;
public:
......@@ -491,9 +491,9 @@ namespace spot
{
protected:
const twa* aut_;
tgba_succ_iterator* it_;
twa_succ_iterator* it_;
public:
succ_iterable(const twa* aut, tgba_succ_iterator* it)
succ_iterable(const twa* aut, twa_succ_iterator* it)
: aut_(aut), it_(it)
{
}
......@@ -536,7 +536,7 @@ namespace spot
/// The iterator has been allocated with \c new. It is the
/// responsability of the caller to \c delete it when no
/// longer needed.
virtual tgba_succ_iterator*
virtual twa_succ_iterator*
succ_iter(const state* local_state) const = 0;
#ifndef SWIG
......@@ -555,7 +555,7 @@ namespace spot
///
/// This iterator can then be reused by succ_iter() to avoid
/// memory allocation.
void release_iter(tgba_succ_iterator* i) const
void release_iter(twa_succ_iterator* i) const
{
if (iter_cache_)
delete i;
......@@ -611,9 +611,9 @@ namespace spot
/// This method is used for instance in dotty_reachable(),
/// 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
transition_annotation(const tgba_succ_iterator* t) const;
transition_annotation(const twa_succ_iterator* t) const;
/// \brief Project a state on an automaton.
///
......
......@@ -106,7 +106,7 @@ namespace spot
template<class Graph>
class SPOT_API twa_graph_succ_iterator final:
public tgba_succ_iterator
public twa_succ_iterator
{
private:
typedef typename Graph::transition transition;
......@@ -268,7 +268,7 @@ namespace spot
return const_cast<tgba_graph_state*>(state_from_number(init_number_));
}
virtual tgba_succ_iterator*
virtual twa_succ_iterator*
succ_iter(const state* st) const
{
auto s = down_cast<const typename graph_t::state_storage_t*>(st);
......@@ -312,7 +312,7 @@ namespace spot
return format_state(state_number(st));
}
tgba_graph_trans_data& trans_data(const tgba_succ_iterator* it)
tgba_graph_trans_data& trans_data(const twa_succ_iterator* it)
{
auto* i = down_cast<const twa_graph_succ_iterator<graph_t>*>(it);
return g_.trans_data(i->pos());
......@@ -323,7 +323,7 @@ namespace spot
return g_.trans_data(t);
}
const tgba_graph_trans_data& trans_data(const tgba_succ_iterator* it) const
const tgba_graph_trans_data& trans_data(const twa_succ_iterator* it) const
{
auto* i = down_cast<const twa_graph_succ_iterator<graph_t>*>(it);
return g_.trans_data(i->pos());
......@@ -334,7 +334,7 @@ namespace spot
return g_.trans_data(t);
}
trans_storage_t& trans_storage(const tgba_succ_iterator* it)
trans_storage_t& trans_storage(const twa_succ_iterator* it)
{
auto* i = down_cast<const twa_graph_succ_iterator<graph_t>*>(it);
return g_.trans_storage(i->pos());
......@@ -346,7 +346,7 @@ namespace spot
}
const trans_storage_t
trans_storage(const tgba_succ_iterator* it) const
trans_storage(const twa_succ_iterator* it) const
{
auto* i = down_cast<const twa_graph_succ_iterator<graph_t>*>(it);
return g_.trans_storage(i->pos());
......
......@@ -32,7 +32,7 @@ namespace spot
};
typedef std::vector<transition> transitions;
struct succ_iter_filtered: public tgba_succ_iterator
struct succ_iter_filtered: public twa_succ_iterator
{
~succ_iter_filtered()
{
......@@ -111,7 +111,7 @@ namespace spot
return init_->clone();
}
virtual tgba_succ_iterator*
virtual twa_succ_iterator*
succ_iter(const state* local_state) const
{
succ_iter_filtered* res;
......
......@@ -74,24 +74,24 @@ namespace spot
}
////////////////////////////////////////////////////////////
// tgba_succ_iterator_product
// twa_succ_iterator_product
namespace
{
class tgba_succ_iterator_product_common: public tgba_succ_iterator
class twa_succ_iterator_product_common: public twa_succ_iterator
{
public:
tgba_succ_iterator_product_common(tgba_succ_iterator* left,
tgba_succ_iterator* right,
twa_succ_iterator_product_common(twa_succ_iterator* left,
twa_succ_iterator* right,
const twa_product* prod,
fixed_size_pool* pool)
: left_(left), right_(right), prod_(prod), pool_(pool)
{
}
void recycle(const const_tgba_ptr& l, tgba_succ_iterator* left,
const_tgba_ptr r, tgba_succ_iterator* right)
void recycle(const const_tgba_ptr& l, twa_succ_iterator* left,
const_tgba_ptr r, twa_succ_iterator* right)
{
l->release_iter(left_);
left_ = left;
......@@ -99,7 +99,7 @@ namespace spot
right_ = right;
}
virtual ~tgba_succ_iterator_product_common()
virtual ~twa_succ_iterator_product_common()
{
delete left_;
delete right_;
......@@ -138,8 +138,8 @@ namespace spot
}
protected:
tgba_succ_iterator* left_;
tgba_succ_iterator* right_;
twa_succ_iterator* left_;
twa_succ_iterator* right_;
const twa_product* prod_;
fixed_size_pool* pool_;
friend class spot::twa_product;
......@@ -147,18 +147,18 @@ namespace spot
/// \brief Iterate over the successors of a product computed on the fly.
class tgba_succ_iterator_product: public tgba_succ_iterator_product_common
class twa_succ_iterator_product: public twa_succ_iterator_product_common
{
public:
tgba_succ_iterator_product(tgba_succ_iterator* left,
tgba_succ_iterator* right,
twa_succ_iterator_product(twa_succ_iterator* left,
twa_succ_iterator* right,
const twa_product* prod,
fixed_size_pool* pool)
: tgba_succ_iterator_product_common(left, right, prod, pool)
: twa_succ_iterator_product_common(left, right, prod, pool)
{
}
virtual ~tgba_succ_iterator_product()
virtual ~twa_succ_iterator_product()
{
}
......@@ -216,19 +216,19 @@ namespace spot
/// Iterate over the successors of a product computed on the fly.
/// This one assumes that LEFT is an iterator over a Kripke structure
class tgba_succ_iterator_product_kripke:
public tgba_succ_iterator_product_common
class twa_succ_iterator_product_kripke:
public twa_succ_iterator_product_common
{
public:
tgba_succ_iterator_product_kripke(tgba_succ_iterator* left,
tgba_succ_iterator* right,
twa_succ_iterator_product_kripke(twa_succ_iterator* left,
twa_succ_iterator* right,
const twa_product* prod,
fixed_size_pool* pool)
: tgba_succ_iterator_product_common(left, right, prod, pool)
: twa_succ_iterator_product_common(left, right, prod, pool)
{
}
virtual ~tgba_succ_iterator_product_kripke()
virtual ~twa_succ_iterator_product_kripke()
{
}
......@@ -338,18 +338,18 @@ namespace spot
right_->get_init_state(), p);
}
tgba_succ_iterator*
twa_succ_iterator*
twa_product::succ_iter(const state* state) const
{
const state_product* s = down_cast<const state_product*>(state);
assert(s);
tgba_succ_iterator* li = left_->succ_iter(s->left());
tgba_succ_iterator* ri = right_->succ_iter(s->right());
twa_succ_iterator* li = left_->succ_iter(s->left());
twa_succ_iterator* ri = right_->succ_iter(s->right());
if (iter_cache_)
{
tgba_succ_iterator_product_common* it =
down_cast<tgba_succ_iterator_product_common*>(iter_cache_);
twa_succ_iterator_product_common* it =
down_cast<twa_succ_iterator_product_common*>(iter_cache_);
it->recycle(left_, li, right_, ri);
iter_cache_ = nullptr;
return it;
......@@ -357,9 +357,9 @@ namespace spot
fixed_size_pool* p = const_cast<fixed_size_pool*>(&pool_);
if (left_kripke_)
return new tgba_succ_iterator_product_kripke(li, ri, this, p);
return new twa_succ_iterator_product_kripke(li, ri, this, p);
else
return new tgba_succ_iterator_product(li, ri, this, p);
return new twa_succ_iterator_product(li, ri, this, p);
}
bdd
......@@ -406,10 +406,10 @@ namespace spot
}
std::string
twa_product::transition_annotation(const tgba_succ_iterator* t) const
twa_product::transition_annotation(const twa_succ_iterator* t) const
{
const tgba_succ_iterator_product_common* i =
down_cast<const tgba_succ_iterator_product_common*>(t);
const twa_succ_iterator_product_common* i =
down_cast<const twa_succ_iterator_product_common*>(t);
assert(i);
std::string left = left_->transition_annotation(i->left_);