Commit 8520c4c3 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

rename tgba_ptr into twa_ptr

Automatic mass renaming.

* iface/ltsmin/modelcheck.cc, src/dstarparse/dra2ba.cc,
src/dstarparse/nra2nba.cc, src/ltlvisit/apcollect.cc,
src/ltlvisit/apcollect.hh, src/ta/taexplicit.cc, src/ta/taexplicit.hh,
src/ta/tgtaexplicit.cc, src/ta/tgtaexplicit.hh, src/ta/tgtaproduct.hh,
src/taalgos/tgba2ta.cc, src/taalgos/tgba2ta.hh, src/tgba/fwd.hh,
src/tgba/tgba.cc, src/tgba/tgba.hh, src/tgba/tgbagraph.hh,
src/tgba/tgbamask.cc, src/tgba/tgbamask.hh, src/tgba/tgbaproduct.cc,
src/tgba/tgbaproduct.hh, src/tgba/tgbaproxy.cc, src/tgba/tgbaproxy.hh,
src/tgbaalgos/bfssteps.cc, src/tgbaalgos/bfssteps.hh,
src/tgbaalgos/complete.cc, src/tgbaalgos/complete.hh,
src/tgbaalgos/compsusp.cc, src/tgbaalgos/dotty.cc,
src/tgbaalgos/dotty.hh, src/tgbaalgos/dtgbasat.cc,
src/tgbaalgos/dupexp.cc, src/tgbaalgos/dupexp.hh,
src/tgbaalgos/emptiness.cc, src/tgbaalgos/emptiness.hh,
src/tgbaalgos/gtec/gtec.cc, src/tgbaalgos/gtec/gtec.hh,
src/tgbaalgos/gtec/status.cc, src/tgbaalgos/gtec/status.hh,
src/tgbaalgos/gv04.cc, src/tgbaalgos/gv04.hh, src/tgbaalgos/hoa.cc,
src/tgbaalgos/hoa.hh, src/tgbaalgos/lbtt.cc, src/tgbaalgos/lbtt.hh,
src/tgbaalgos/magic.cc, src/tgbaalgos/magic.hh,
src/tgbaalgos/minimize.cc, src/tgbaalgos/ndfs_result.hxx,
src/tgbaalgos/neverclaim.cc, src/tgbaalgos/neverclaim.hh,
src/tgbaalgos/projrun.cc, src/tgbaalgos/projrun.hh,
src/tgbaalgos/reachiter.cc, src/tgbaalgos/reachiter.hh,
src/tgbaalgos/reducerun.cc, src/tgbaalgos/reducerun.hh,
src/tgbaalgos/replayrun.cc, src/tgbaalgos/replayrun.hh,
src/tgbaalgos/scc.cc, src/tgbaalgos/scc.hh, src/tgbaalgos/se05.cc,
src/tgbaalgos/se05.hh, src/tgbaalgos/stats.cc, src/tgbaalgos/stats.hh,
src/tgbaalgos/stutter.cc, src/tgbaalgos/tau03.cc,
src/tgbaalgos/tau03.hh, src/tgbaalgos/tau03opt.cc,
src/tgbaalgos/tau03opt.hh, src/tgbatest/checkta.cc,
src/tgbatest/complementation.cc, src/tgbatest/emptchk.cc,
src/tgbatest/ltl2tgba.cc, wrap/python/spot_impl.i: Rename tgba_ptr as
twa_ptr.
parent 5d977847
......@@ -158,8 +158,8 @@ checked_main(int argc, char **argv)
spot::ltl::atomic_prop_set ap;
auto dict = spot::make_bdd_dict();
spot::const_kripke_ptr model = nullptr;
spot::const_tgba_ptr prop = nullptr;
spot::const_tgba_ptr product = nullptr;
spot::const_twa_ptr prop = nullptr;
spot::const_twa_ptr product = nullptr;
spot::emptiness_check_instantiator_ptr echeck_inst = nullptr;
int exit_code = 0;
spot::postprocessor post;
......
......@@ -50,7 +50,7 @@ namespace spot
// This function is defined in nra2nba.cc, and used only here.
SPOT_LOCAL
twa_graph_ptr nra_to_nba(const const_dstar_aut_ptr& nra,
const const_tgba_ptr& aut);
const const_twa_ptr& aut);
namespace
{
......@@ -65,14 +65,14 @@ namespace spot
// retrive acceptances.
static bool
filter_states(const const_tgba_ptr& aut,
filter_states(const const_twa_ptr& aut,
const const_dstar_aut_ptr& dra,
const state_list& sl,
state_list& final,
state_list& nonfinal);
static bool
filter_scc(const const_tgba_ptr& aut,
filter_scc(const const_twa_ptr& aut,
const const_dstar_aut_ptr& dra,
state_list& final,
state_list& nonfinal)
......@@ -99,7 +99,7 @@ namespace spot
}
static bool
filter_states(const const_tgba_ptr& aut,
filter_states(const const_twa_ptr& aut,
const const_dstar_aut_ptr& dra,
const state_list& sl,
state_list& final,
......
......@@ -38,7 +38,7 @@ namespace spot
// AUT is the automaton we iterate on, while A is the automaton
// we read the acceptance conditions from. Separating the two
// makes its possible to mask AUT, as needed in dra_to_ba().
nra_to_nba_worker(const const_dstar_aut_ptr& a, const_tgba_ptr aut):
nra_to_nba_worker(const const_dstar_aut_ptr& a, const_twa_ptr aut):
tgba_reachable_iterator_depth_first(aut),
out_(make_twa_graph(aut->get_dict())),
d_(a),
......@@ -116,7 +116,7 @@ namespace spot
// that is a masked version of nra->aut.
SPOT_LOCAL
twa_graph_ptr nra_to_nba(const const_dstar_aut_ptr& nra,
const const_tgba_ptr& aut)
const const_twa_ptr& aut)
{
assert(nra->type == Rabin);
nra_to_nba_worker w(nra, aut);
......
......@@ -85,7 +85,7 @@ namespace spot
}
bdd
atomic_prop_collect_as_bdd(const formula* f, const const_tgba_ptr& a)
atomic_prop_collect_as_bdd(const formula* f, const const_twa_ptr& a)
{
spot::ltl::atomic_prop_set aps;
atomic_prop_collect(f, &aps);
......
......@@ -68,7 +68,7 @@ namespace spot
/// \return A conjunction the atomic propositions.
SPOT_API bdd
atomic_prop_collect_as_bdd(const formula* f,
const const_tgba_ptr& a);
const const_twa_ptr& a);
/// @}
}
......
......@@ -350,7 +350,7 @@ namespace spot
// ta_explicit
ta_explicit::ta_explicit(const const_tgba_ptr& tgba,
ta_explicit::ta_explicit(const const_twa_ptr& tgba,
unsigned n_acc,
state_ta_explicit* artificial_initial_state):
ta(tgba->get_dict()),
......@@ -495,7 +495,7 @@ namespace spot
return tgba_->get_dict();
}
const_tgba_ptr
const_twa_ptr
ta_explicit::get_tgba() const
{
return tgba_;
......
......@@ -40,11 +40,11 @@ namespace spot
class SPOT_API ta_explicit : public ta
{
public:
ta_explicit(const const_tgba_ptr& tgba,
ta_explicit(const const_twa_ptr& tgba,
unsigned n_acc,
state_ta_explicit* artificial_initial_state = 0);
const_tgba_ptr
const_twa_ptr
get_tgba() const;
state_ta_explicit*
......@@ -121,7 +121,7 @@ namespace spot
ta_explicit(const ta_explicit& other) SPOT_DELETED;
ta_explicit& operator=(const ta_explicit& other) SPOT_DELETED;
const_tgba_ptr tgba_;
const_twa_ptr tgba_;
state_ta_explicit* artificial_initial_state_;
ta::states_set_t states_set_;
ta::states_set_t initial_states_set_;
......@@ -252,7 +252,7 @@ namespace spot
typedef std::shared_ptr<ta_explicit> ta_explicit_ptr;
typedef std::shared_ptr<const ta_explicit> const_ta_explicit_ptr;
inline ta_explicit_ptr make_ta_explicit(const const_tgba_ptr& tgba,
inline ta_explicit_ptr make_ta_explicit(const const_twa_ptr& tgba,
unsigned n_acc,
state_ta_explicit*
artificial_initial_state = 0)
......
......@@ -28,7 +28,7 @@
namespace spot
{
tgta_explicit::tgta_explicit(const const_tgba_ptr& tgba,
tgta_explicit::tgta_explicit(const const_twa_ptr& tgba,
unsigned n_acc,
state_ta_explicit* artificial_initial_state) :
tgta(tgba->get_dict()),
......
......@@ -37,7 +37,7 @@ namespace spot
class SPOT_API tgta_explicit : public tgta
{
public:
tgta_explicit(const const_tgba_ptr& tgba,
tgta_explicit(const const_twa_ptr& tgba,
unsigned n_acc,
state_ta_explicit* artificial_initial_state);
......@@ -66,7 +66,7 @@ namespace spot
typedef std::shared_ptr<tgta_explicit> tgta_explicit_ptr;
typedef std::shared_ptr<const tgta_explicit> const_tgta_explicit_ptr;
inline tgta_explicit_ptr make_tgta_explicit(const const_tgba_ptr& tgba,
inline tgta_explicit_ptr make_tgta_explicit(const const_twa_ptr& tgba,
unsigned n_acc,
state_ta_explicit*
artificial_initial_state = 0)
......
......@@ -42,7 +42,7 @@ namespace spot
succ_iter(const state* local_state) const;
};
inline tgba_ptr product(const const_kripke_ptr& left,
inline twa_ptr product(const const_kripke_ptr& left,
const const_tgta_ptr& right)
{
return std::make_shared<tgta_product>(left, right);
......
......@@ -415,7 +415,7 @@ namespace spot
{
std::stack<state_ta_explicit*> todo;
const_tgba_ptr tgba_ = ta->get_tgba();
const_twa_ptr tgba_ = ta->get_tgba();
// build Initial states set:
state* tgba_init_state = tgba_->get_init_state();
......@@ -544,7 +544,7 @@ namespace spot
}
ta_explicit_ptr
tgba_to_ta(const const_tgba_ptr& tgba_, bdd atomic_propositions_set_,
tgba_to_ta(const const_twa_ptr& tgba_, bdd atomic_propositions_set_,
bool degeneralized, bool artificial_initial_state_mode,
bool single_pass_emptiness_check,
bool artificial_livelock_state_mode,
......@@ -601,7 +601,7 @@ namespace spot
}
tgta_explicit_ptr
tgba_to_tgta(const const_tgba_ptr& tgba_, bdd atomic_propositions_set_)
tgba_to_tgta(const const_twa_ptr& tgba_, bdd atomic_propositions_set_)
{
state* tgba_init_state = tgba_->get_init_state();
auto artificial_init_state = new state_ta_explicit(tgba_init_state->clone(),
......
......@@ -82,7 +82,7 @@ namespace spot
/// \return A spot::ta_explicit that recognizes the same language as the
/// TGBA \a tgba_to_convert.
SPOT_API ta_explicit_ptr
tgba_to_ta(const const_tgba_ptr& tgba_to_convert, bdd atomic_propositions_set,
tgba_to_ta(const const_twa_ptr& tgba_to_convert, bdd atomic_propositions_set,
bool degeneralized = true,
bool artificial_initial_state_mode = true,
bool single_pass_emptiness_check = false,
......@@ -99,6 +99,6 @@ namespace spot
/// \return A spot::tgta_explicit (spot::tgta) that recognizes the same
/// language as the TGBA \a tgba_to_convert.
SPOT_API tgta_explicit_ptr
tgba_to_tgta(const const_tgba_ptr& tgba_to_convert,
tgba_to_tgta(const const_twa_ptr& tgba_to_convert,
bdd atomic_propositions_set);
}
......@@ -24,8 +24,8 @@
namespace spot
{
class twa;
typedef std::shared_ptr<twa> tgba_ptr;
typedef std::shared_ptr<const twa> const_tgba_ptr;
typedef std::shared_ptr<twa> twa_ptr;
typedef std::shared_ptr<const twa> const_twa_ptr;
class twa_graph;
typedef std::shared_ptr<const twa_graph> const_twa_graph_ptr;
......
......@@ -60,7 +60,7 @@ namespace spot
state*
twa::project_state(const state* s,
const const_tgba_ptr& t) const
const const_twa_ptr& t) const
{
if (t.get() == this)
return s->clone();
......
......@@ -629,7 +629,7 @@ namespace spot
/// or a new \c state* (the projected state) that must be
/// destroyed by the caller.
virtual state* project_state(const state* s,
const const_tgba_ptr& t) const;
const const_twa_ptr& t) const;
const acc_cond& acc() const
......@@ -672,7 +672,7 @@ namespace spot
}
/// \brief Copy the acceptance condition of another tgba.
void copy_acceptance_of(const const_tgba_ptr& a)
void copy_acceptance_of(const const_twa_ptr& a)
{
acc_ = a->acc();
unsigned num = acc_.num_sets();
......@@ -680,7 +680,7 @@ namespace spot
prop_state_based_acc();
}
void copy_ap_of(const const_tgba_ptr& a)
void copy_ap_of(const const_twa_ptr& a)
{
get_dict()->register_all_propositions_of(a, this);
}
......@@ -821,7 +821,7 @@ namespace spot
// There is no default value here on purpose. This way any time we
// add a new property we have to update every call to prop_copy().
void prop_copy(const const_tgba_ptr& other, prop_set p)
void prop_copy(const const_twa_ptr& other, prop_set p)
{
if (p.state_based)
prop_state_based_acc(other->has_state_based_acc());
......
......@@ -470,7 +470,7 @@ namespace spot
return std::make_shared<twa_graph>(aut, p);
}
inline twa_graph_ptr make_twa_graph(const const_tgba_ptr& aut,
inline twa_graph_ptr make_twa_graph(const const_twa_ptr& aut,
twa::prop_set p)
{
auto a = std::dynamic_pointer_cast<const twa_graph>(aut);
......
......@@ -91,7 +91,7 @@ namespace spot
/// \param masked The automaton to mask
/// \param init Any state to use as initial state. This state will be
/// destroyed by the destructor.
tgba_mask(const const_tgba_ptr& masked, const state* init = 0):
tgba_mask(const const_twa_ptr& masked, const state* init = 0):
tgba_proxy(masked),
init_(init)
{
......@@ -150,7 +150,7 @@ namespace spot
{
const state_set& mask_;
public:
tgba_mask_keep(const const_tgba_ptr& masked,
tgba_mask_keep(const const_twa_ptr& masked,
const state_set& mask,
const state* init)
: tgba_mask(masked, init),
......@@ -169,7 +169,7 @@ namespace spot
{
const state_set& mask_;
public:
tgba_mask_ignore(const const_tgba_ptr& masked,
tgba_mask_ignore(const const_twa_ptr& masked,
const state_set& mask,
const state* init)
: tgba_mask(masked, init),
......@@ -188,7 +188,7 @@ namespace spot
{
unsigned mask_;
public:
tgba_mask_acc_ignore(const const_tgba_ptr& masked,
tgba_mask_acc_ignore(const const_twa_ptr& masked,
unsigned mask,
const state* init)
: tgba_mask(masked, init),
......@@ -204,24 +204,24 @@ namespace spot
}
const_tgba_ptr
build_tgba_mask_keep(const const_tgba_ptr& to_mask,
const_twa_ptr
build_tgba_mask_keep(const const_twa_ptr& to_mask,
const state_set& to_keep,
const state* init)
{
return std::make_shared<tgba_mask_keep>(to_mask, to_keep, init);
}
const_tgba_ptr
build_tgba_mask_ignore(const const_tgba_ptr& to_mask,
const_twa_ptr
build_tgba_mask_ignore(const const_twa_ptr& to_mask,
const state_set& to_ignore,
const state* init)
{
return std::make_shared<tgba_mask_ignore>(to_mask, to_ignore, init);
}
const_tgba_ptr
build_tgba_mask_acc_ignore(const const_tgba_ptr& to_mask,
const_twa_ptr
build_tgba_mask_acc_ignore(const const_twa_ptr& to_mask,
unsigned to_ignore,
const state* init)
{
......
......@@ -31,8 +31,8 @@ namespace spot
/// Mask the TGBA \a to_mask, keeping only the
/// states from \a to_keep. The initial state
/// can optionally be reset to \a init.
SPOT_API const_tgba_ptr
build_tgba_mask_keep(const const_tgba_ptr& to_mask,
SPOT_API const_twa_ptr
build_tgba_mask_keep(const const_twa_ptr& to_mask,
const state_set& to_keep,
const state* init = 0);
......@@ -42,8 +42,8 @@ namespace spot
/// Mask the TGBA \a to_mask, keeping only the states that are not
/// in \a to_ignore. The initial state can optionally be reset to
/// \a init.
SPOT_API const_tgba_ptr
build_tgba_mask_ignore(const const_tgba_ptr& to_mask,
SPOT_API const_twa_ptr
build_tgba_mask_ignore(const const_twa_ptr& to_mask,
const state_set& to_ignore,
const state* init = 0);
......@@ -59,8 +59,8 @@ namespace spot
/// set of all acceptance set) is not changed, because so far this
/// function is only needed in graph algorithms that do not call
/// all_acceptance_conditions().
SPOT_API const_tgba_ptr
build_tgba_mask_acc_ignore(const const_tgba_ptr& to_mask,
SPOT_API const_twa_ptr
build_tgba_mask_acc_ignore(const const_twa_ptr& to_mask,
unsigned to_ignore,
const state* init = 0);
}
......@@ -90,8 +90,8 @@ namespace spot
{
}
void recycle(const const_tgba_ptr& l, twa_succ_iterator* left,
const_tgba_ptr r, twa_succ_iterator* right)
void recycle(const const_twa_ptr& l, twa_succ_iterator* left,
const_twa_ptr r, twa_succ_iterator* right)
{
l->release_iter(left_);
left_ = left;
......@@ -282,8 +282,8 @@ namespace spot
////////////////////////////////////////////////////////////
// twa_product
twa_product::twa_product(const const_tgba_ptr& left,
const const_tgba_ptr& right)
twa_product::twa_product(const const_twa_ptr& left,
const const_twa_ptr& right)
: twa(left->get_dict()), left_(left), right_(right),
pool_(sizeof(state_product))
{
......@@ -393,7 +393,7 @@ namespace spot
}
state*
twa_product::project_state(const state* s, const const_tgba_ptr& t) const
twa_product::project_state(const state* s, const const_twa_ptr& t) const
{
const state_product* s2 = down_cast<const state_product*>(s);
assert(s2);
......@@ -423,8 +423,8 @@ namespace spot
//////////////////////////////////////////////////////////////////////
// twa_product_init
twa_product_init::twa_product_init(const const_tgba_ptr& left,
const const_tgba_ptr& right,
twa_product_init::twa_product_init(const const_twa_ptr& left,
const const_twa_ptr& right,
const state* left_init,
const state* right_init)
: twa_product(left, right),
......
......@@ -84,7 +84,7 @@ namespace spot
/// \param left The left automata in the product.
/// \param right The right automata in the product.
/// Do not be fooled by these arguments: a product is commutative.
twa_product(const const_tgba_ptr& left, const const_tgba_ptr& right);
twa_product(const const_twa_ptr& left, const const_twa_ptr& right);
virtual ~twa_product();
......@@ -98,7 +98,7 @@ namespace spot
virtual std::string
transition_annotation(const twa_succ_iterator* t) const;
virtual state* project_state(const state* s, const const_tgba_ptr& t) const;
virtual state* project_state(const state* s, const const_twa_ptr& t) const;
const acc_cond& left_acc() const;
const acc_cond& right_acc() const;
......@@ -107,8 +107,8 @@ namespace spot
virtual bdd compute_support_conditions(const state* state) const;
protected:
const_tgba_ptr left_;
const_tgba_ptr right_;
const_twa_ptr left_;
const_twa_ptr right_;
bool left_kripke_;
fixed_size_pool pool_;
......@@ -122,7 +122,7 @@ namespace spot
class SPOT_API twa_product_init final: public twa_product
{
public:
twa_product_init(const const_tgba_ptr& left, const const_tgba_ptr& right,
twa_product_init(const const_twa_ptr& left, const const_twa_ptr& right,
const state* left_init, const state* right_init);
virtual state* get_init_state() const;
protected:
......@@ -131,15 +131,15 @@ namespace spot
};
/// \brief on-the-fly TGBA product
inline twa_product_ptr otf_product(const const_tgba_ptr& left,
const const_tgba_ptr& right)
inline twa_product_ptr otf_product(const const_twa_ptr& left,
const const_twa_ptr& right)
{
return std::make_shared<twa_product>(left, right);
}
/// \brief on-the-fly TGBA product with forced initial states
inline twa_product_ptr otf_product_at(const const_tgba_ptr& left,
const const_tgba_ptr& right,
inline twa_product_ptr otf_product_at(const const_twa_ptr& left,
const const_twa_ptr& right,
const state* left_init,
const state* right_init)
{
......
Markdown is supported
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