Commit 2648ea17 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

rename tgba_graph_state and tgba_graph_trans_data as twa_...

Automatic mass renaming.

* src/tgba/tgbagraph.hh, src/tgbaalgos/powerset.cc: Rename
tgba_graph_state and tgba_graph_trans_data as twa_graph_state and
twa_graph_trans_data.
parent 8520c4c3
...@@ -30,21 +30,21 @@ ...@@ -30,21 +30,21 @@
namespace spot namespace spot
{ {
struct SPOT_API tgba_graph_state: public spot::state struct SPOT_API twa_graph_state: public spot::state
{ {
public: public:
tgba_graph_state(): twa_graph_state():
spot::state() spot::state()
{ {
} }
virtual ~tgba_graph_state() noexcept virtual ~twa_graph_state() noexcept
{ {
} }
virtual int compare(const spot::state* other) const virtual int compare(const spot::state* other) const
{ {
auto o = down_cast<const tgba_graph_state*>(other); auto o = down_cast<const twa_graph_state*>(other);
assert(o); assert(o);
// Do not simply return "other - this", it might not fit in an int. // Do not simply return "other - this", it might not fit in an int.
...@@ -61,10 +61,10 @@ namespace spot ...@@ -61,10 +61,10 @@ namespace spot
reinterpret_cast<const char*>(this) - static_cast<const char*>(nullptr); reinterpret_cast<const char*>(this) - static_cast<const char*>(nullptr);
} }
virtual tgba_graph_state* virtual twa_graph_state*
clone() const clone() const
{ {
return const_cast<tgba_graph_state*>(this); return const_cast<twa_graph_state*>(this);
} }
virtual void destroy() const virtual void destroy() const
...@@ -72,22 +72,22 @@ namespace spot ...@@ -72,22 +72,22 @@ namespace spot
} }
}; };
struct SPOT_API tgba_graph_trans_data struct SPOT_API twa_graph_trans_data
{ {
bdd cond; bdd cond;
acc_cond::mark_t acc; acc_cond::mark_t acc;
explicit tgba_graph_trans_data() explicit twa_graph_trans_data()
: cond(bddfalse), acc(0) : cond(bddfalse), acc(0)
{ {
} }
tgba_graph_trans_data(bdd cond, acc_cond::mark_t acc = 0U) twa_graph_trans_data(bdd cond, acc_cond::mark_t acc = 0U)
: cond(cond), acc(acc) : cond(cond), acc(acc)
{ {
} }
bool operator<(const tgba_graph_trans_data& other) const bool operator<(const twa_graph_trans_data& other) const
{ {
if (cond.id() < other.cond.id()) if (cond.id() < other.cond.id())
return true; return true;
...@@ -96,7 +96,7 @@ namespace spot ...@@ -96,7 +96,7 @@ namespace spot
return acc < other.acc; return acc < other.acc;
} }
bool operator==(const tgba_graph_trans_data& other) const bool operator==(const twa_graph_trans_data& other) const
{ {
return cond.id() == other.cond.id() && return cond.id() == other.cond.id() &&
acc == other.acc; acc == other.acc;
...@@ -143,10 +143,10 @@ namespace spot ...@@ -143,10 +143,10 @@ namespace spot
return !p_; return !p_;
} }
virtual tgba_graph_state* current_state() const virtual twa_graph_state* current_state() const
{ {
assert(!done()); assert(!done());
return const_cast<tgba_graph_state*> return const_cast<twa_graph_state*>
(&g_->state_data(g_->trans_storage(p_).dst)); (&g_->state_data(g_->trans_storage(p_).dst));
} }
...@@ -172,7 +172,7 @@ namespace spot ...@@ -172,7 +172,7 @@ namespace spot
class SPOT_API twa_graph final: public twa class SPOT_API twa_graph final: public twa
{ {
public: public:
typedef digraph<tgba_graph_state, tgba_graph_trans_data> graph_t; typedef digraph<twa_graph_state, twa_graph_trans_data> graph_t;
typedef graph_t::trans_storage_t trans_storage_t; typedef graph_t::trans_storage_t trans_storage_t;
protected: protected:
...@@ -261,11 +261,11 @@ namespace spot ...@@ -261,11 +261,11 @@ namespace spot
} }
// FIXME: The return type ought to be const. // FIXME: The return type ought to be const.
virtual tgba_graph_state* get_init_state() const virtual twa_graph_state* get_init_state() const
{ {
if (num_states() == 0) if (num_states() == 0)
const_cast<graph_t&>(g_).new_state(); const_cast<graph_t&>(g_).new_state();
return const_cast<tgba_graph_state*>(state_from_number(init_number_)); return const_cast<twa_graph_state*>(state_from_number(init_number_));
} }
virtual twa_succ_iterator* virtual twa_succ_iterator*
...@@ -294,7 +294,7 @@ namespace spot ...@@ -294,7 +294,7 @@ namespace spot
return s - &g_.state_storage(0); return s - &g_.state_storage(0);
} }
const tgba_graph_state* const twa_graph_state*
state_from_number(graph_t::state n) const state_from_number(graph_t::state n) const
{ {
return &g_.state_data(n); return &g_.state_data(n);
...@@ -312,24 +312,24 @@ namespace spot ...@@ -312,24 +312,24 @@ namespace spot
return format_state(state_number(st)); return format_state(state_number(st));
} }
tgba_graph_trans_data& trans_data(const twa_succ_iterator* it) twa_graph_trans_data& trans_data(const twa_succ_iterator* it)
{ {
auto* i = down_cast<const twa_graph_succ_iterator<graph_t>*>(it); auto* i = down_cast<const twa_graph_succ_iterator<graph_t>*>(it);
return g_.trans_data(i->pos()); return g_.trans_data(i->pos());
} }
tgba_graph_trans_data& trans_data(unsigned t) twa_graph_trans_data& trans_data(unsigned t)
{ {
return g_.trans_data(t); return g_.trans_data(t);
} }
const tgba_graph_trans_data& trans_data(const twa_succ_iterator* it) const const twa_graph_trans_data& trans_data(const twa_succ_iterator* it) const
{ {
auto* i = down_cast<const twa_graph_succ_iterator<graph_t>*>(it); auto* i = down_cast<const twa_graph_succ_iterator<graph_t>*>(it);
return g_.trans_data(i->pos()); return g_.trans_data(i->pos());
} }
const tgba_graph_trans_data& trans_data(unsigned t) const const twa_graph_trans_data& trans_data(unsigned t) const
{ {
return g_.trans_data(t); return g_.trans_data(t);
} }
......
...@@ -232,7 +232,7 @@ namespace spot ...@@ -232,7 +232,7 @@ namespace spot
{ {
public: public:
typedef dfs_stack::const_iterator cycle_iter; typedef dfs_stack::const_iterator cycle_iter;
typedef tgba_graph_trans_data trans; typedef twa_graph_trans_data trans;
typedef std::set<trans*> trans_set; typedef std::set<trans*> trans_set;
typedef std::vector<trans_set> set_set; typedef std::vector<trans_set> set_set;
protected: protected:
......
Supports Markdown
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