From 2648ea170f870dd03244cebecfce37621b76cc1a Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 21 Apr 2015 19:41:09 +0200 Subject: [PATCH] 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. --- src/tgba/tgbagraph.hh | 42 +++++++++++++++++++-------------------- src/tgbaalgos/powerset.cc | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/tgba/tgbagraph.hh b/src/tgba/tgbagraph.hh index 87b6c4153..2818fe842 100644 --- a/src/tgba/tgbagraph.hh +++ b/src/tgba/tgbagraph.hh @@ -30,21 +30,21 @@ namespace spot { - struct SPOT_API tgba_graph_state: public spot::state + struct SPOT_API twa_graph_state: public spot::state { public: - tgba_graph_state(): + twa_graph_state(): spot::state() { } - virtual ~tgba_graph_state() noexcept + virtual ~twa_graph_state() noexcept { } virtual int compare(const spot::state* other) const { - auto o = down_cast(other); + auto o = down_cast(other); assert(o); // Do not simply return "other - this", it might not fit in an int. @@ -61,10 +61,10 @@ namespace spot reinterpret_cast(this) - static_cast(nullptr); } - virtual tgba_graph_state* + virtual twa_graph_state* clone() const { - return const_cast(this); + return const_cast(this); } virtual void destroy() const @@ -72,22 +72,22 @@ namespace spot } }; - struct SPOT_API tgba_graph_trans_data + struct SPOT_API twa_graph_trans_data { bdd cond; acc_cond::mark_t acc; - explicit tgba_graph_trans_data() + explicit twa_graph_trans_data() : 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) { } - bool operator<(const tgba_graph_trans_data& other) const + bool operator<(const twa_graph_trans_data& other) const { if (cond.id() < other.cond.id()) return true; @@ -96,7 +96,7 @@ namespace spot 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() && acc == other.acc; @@ -143,10 +143,10 @@ namespace spot return !p_; } - virtual tgba_graph_state* current_state() const + virtual twa_graph_state* current_state() const { assert(!done()); - return const_cast + return const_cast (&g_->state_data(g_->trans_storage(p_).dst)); } @@ -172,7 +172,7 @@ namespace spot class SPOT_API twa_graph final: public twa { public: - typedef digraph graph_t; + typedef digraph graph_t; typedef graph_t::trans_storage_t trans_storage_t; protected: @@ -261,11 +261,11 @@ namespace spot } // 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) const_cast(g_).new_state(); - return const_cast(state_from_number(init_number_)); + return const_cast(state_from_number(init_number_)); } virtual twa_succ_iterator* @@ -294,7 +294,7 @@ namespace spot return s - &g_.state_storage(0); } - const tgba_graph_state* + const twa_graph_state* state_from_number(graph_t::state n) const { return &g_.state_data(n); @@ -312,24 +312,24 @@ namespace spot 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*>(it); 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); } - 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*>(it); 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); } diff --git a/src/tgbaalgos/powerset.cc b/src/tgbaalgos/powerset.cc index 3c8549702..97569e856 100644 --- a/src/tgbaalgos/powerset.cc +++ b/src/tgbaalgos/powerset.cc @@ -232,7 +232,7 @@ namespace spot { public: typedef dfs_stack::const_iterator cycle_iter; - typedef tgba_graph_trans_data trans; + typedef twa_graph_trans_data trans; typedef std::set trans_set; typedef std::vector set_set; protected: