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
......@@ -432,7 +432,7 @@ namespace spot
std::ostream&
hoa_reachable(std::ostream& os,
const const_tgba_ptr& aut,
const const_twa_ptr& aut,
const char* opt)
{
......
......@@ -37,6 +37,6 @@ namespace spot
/// single-line output.
SPOT_API std::ostream&
hoa_reachable(std::ostream& os,
const const_tgba_ptr& g,
const const_twa_ptr& g,
const char* opt);
}
......@@ -38,7 +38,7 @@ namespace spot
class lbtt_bfs : public tgba_reachable_iterator_breadth_first
{
public:
lbtt_bfs(const const_tgba_ptr& a, std::ostream& os, bool sba_format)
lbtt_bfs(const const_twa_ptr& a, std::ostream& os, bool sba_format)
: tgba_reachable_iterator_breadth_first(a),
os_(os),
sba_format_(sba_format),
......@@ -133,7 +133,7 @@ namespace spot
}
std::ostream&
lbtt_reachable(std::ostream& os, const const_tgba_ptr& g, bool sba)
lbtt_reachable(std::ostream& os, const const_twa_ptr& g, bool sba)
{
if (!g->acc().is_generalized_buchi())
throw std::runtime_error
......
......@@ -35,5 +35,5 @@ namespace spot
/// \param sba Assume \a g is an SBA and use LBTT's state-based
/// acceptance format (similar to LBT's format).
SPOT_API std::ostream&
lbtt_reachable(std::ostream& os, const const_tgba_ptr& g, bool sba = false);
lbtt_reachable(std::ostream& os, const const_twa_ptr& g, bool sba = false);
}
......@@ -54,7 +54,7 @@ namespace spot
///
/// \pre The automaton \a a must have at most one acceptance
/// condition (i.e. it is a TBA).
magic_search_(const const_tgba_ptr& a, size_t size,
magic_search_(const const_twa_ptr& a, size_t size,
option_map o = option_map())
: emptiness_check(a, o),
h(size)
......@@ -584,20 +584,20 @@ namespace spot
} // anonymous
emptiness_check_ptr
explicit_magic_search(const const_tgba_ptr& a, option_map o)
explicit_magic_search(const const_twa_ptr& a, option_map o)
{
return std::make_shared<magic_search_<explicit_magic_search_heap>>(a, 0, o);
}
emptiness_check_ptr
bit_state_hashing_magic_search(const const_tgba_ptr& a,
bit_state_hashing_magic_search(const const_twa_ptr& a,
size_t size, option_map o)
{
return std::make_shared<magic_search_<bsh_magic_search_heap>>(a, size, o);
}
emptiness_check_ptr
magic_search(const const_tgba_ptr& a, option_map o)
magic_search(const const_twa_ptr& a, option_map o)
{
size_t size = o.get("bsh");
if (size)
......
......@@ -96,7 +96,7 @@ namespace spot
/// \bug The name is misleading. Magic-search is the algorithm
/// from \c godefroid.93.pstv, not \c courcoubetis.92.fmsd.
SPOT_API emptiness_check_ptr
explicit_magic_search(const const_tgba_ptr& a,
explicit_magic_search(const const_twa_ptr& a,
option_map o = option_map());
/// \brief Returns an emptiness checker on the spot::tgba automaton \a a.
......@@ -127,7 +127,7 @@ namespace spot
/// \sa spot::explicit_magic_search
///
SPOT_API emptiness_check_ptr
bit_state_hashing_magic_search(const const_tgba_ptr& a, size_t size,
bit_state_hashing_magic_search(const const_twa_ptr& a, size_t size,
option_map o = option_map());
/// \brief Wrapper for the two magic_search implementations.
......@@ -137,7 +137,7 @@ namespace spot
/// in the \c option_map. If \c "bsh" is set and non null, its value
/// is used as the size of the hash map.
SPOT_API emptiness_check_ptr
magic_search(const const_tgba_ptr& a, option_map o = option_map());
magic_search(const const_twa_ptr& a, option_map o = option_map());
/// @}
}
......@@ -60,7 +60,7 @@ namespace spot
{
static std::ostream&
dump_hash_set(const hash_set* hs,
const const_tgba_ptr& aut,
const const_twa_ptr& aut,
std::ostream& out)
{
out << '{';
......@@ -75,7 +75,7 @@ namespace spot
}
static std::string
format_hash_set(const hash_set* hs, const_tgba_ptr aut)
format_hash_set(const hash_set* hs, const_twa_ptr aut)
{
std::ostringstream s;
dump_hash_set(hs, aut, s);
......@@ -84,7 +84,7 @@ namespace spot
}
// Find all states of an automaton.
void build_state_set(const const_tgba_ptr& a, hash_set* seen)
void build_state_set(const const_twa_ptr& a, hash_set* seen)
{
std::queue<const state*> tovisit;
// Perform breadth-first traversal.
......@@ -114,7 +114,7 @@ namespace spot
// From the base automaton and the list of sets, build the minimal
// resulting automaton
twa_graph_ptr build_result(const const_tgba_ptr& a,
twa_graph_ptr build_result(const const_twa_ptr& a,
std::list<hash_set*>& sets,
hash_set* final)
{
......@@ -182,7 +182,7 @@ namespace spot
struct wdba_search_acc_loop : public bfs_steps
{
wdba_search_acc_loop(const const_tgba_ptr& det_a,
wdba_search_acc_loop(const const_twa_ptr& det_a,
unsigned scc_n, scc_info& sm,
power_map& pm, const state* dest)
: bfs_steps(det_a), scc_n(scc_n), sm(sm), pm(pm), dest(dest)
......
......@@ -229,7 +229,7 @@ namespace spot
typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> state_set;
void clean(const const_tgba_ptr& a, stack_type& st1,
void clean(const const_twa_ptr& a, stack_type& st1,
state_set& seen, state_set& dead)
{
while (!st1.empty())
......@@ -372,7 +372,7 @@ namespace spot
{
public:
test_path(ars_statistics* ars,
const const_tgba_ptr& a, const state* t,
const const_twa_ptr& a, const state* t,
const state_set& d, const heap& h)
: bfs_steps(a), ars(ars), target(t), dead(d), h(h)
{
......@@ -467,7 +467,7 @@ namespace spot
{
public:
min_path(ars_statistics* ars,
const const_tgba_ptr& a,
const const_twa_ptr& a,
const m_source_trans& target, const heap& h)
: bfs_steps(a), ars(ars), target(target), h(h)
{
......
......@@ -201,7 +201,7 @@ namespace spot
} // anonymous namespace
std::ostream&
never_claim_reachable(std::ostream& os, const const_tgba_ptr& g,
never_claim_reachable(std::ostream& os, const const_twa_ptr& g,
const char* options)
{
if (!(g->acc().is_buchi() || g->acc().is_true()))
......
......@@ -40,6 +40,6 @@ namespace spot
/// \param opt a string of option: 'c' to comment each state
SPOT_API std::ostream&
never_claim_reachable(std::ostream& os,
const const_tgba_ptr& g,
const const_twa_ptr& g,
const char* opt = nullptr);
}
......@@ -28,8 +28,8 @@ namespace spot
{
tgba_run_ptr
project_tgba_run(const const_tgba_ptr& a_run,
const const_tgba_ptr& a_proj,
project_tgba_run(const const_twa_ptr& a_run,
const const_twa_ptr& a_proj,
const const_tgba_run_ptr& run)
{
auto res = std::make_shared<tgba_run>();
......
......@@ -42,7 +42,7 @@ namespace spot
/// \param a_proj the automata on which to project the run
/// \return true iff the run could be completed
SPOT_API tgba_run_ptr
project_tgba_run(const const_tgba_ptr& a_run,
const const_tgba_ptr& a_proj,
project_tgba_run(const const_twa_ptr& a_run,
const const_twa_ptr& a_proj,
const const_tgba_run_ptr& run);
}
......@@ -28,7 +28,7 @@ namespace spot
// tgba_reachable_iterator
//////////////////////////////////////////////////////////////////////
tgba_reachable_iterator::tgba_reachable_iterator(const const_tgba_ptr& a)
tgba_reachable_iterator::tgba_reachable_iterator(const const_twa_ptr& a)
: aut_(a)
{
}
......@@ -122,7 +122,7 @@ namespace spot
//////////////////////////////////////////////////////////////////////
tgba_reachable_iterator_breadth_first::
tgba_reachable_iterator_breadth_first(const const_tgba_ptr& a)
tgba_reachable_iterator_breadth_first(const const_twa_ptr& a)
: tgba_reachable_iterator(a)
{
}
......@@ -147,7 +147,7 @@ namespace spot
//////////////////////////////////////////////////////////////////////
tgba_reachable_iterator_depth_first::
tgba_reachable_iterator_depth_first(const const_tgba_ptr& a)
tgba_reachable_iterator_depth_first(const const_twa_ptr& a)
: aut_(a)
{
}
......@@ -273,7 +273,7 @@ namespace spot
tgba_reachable_iterator_depth_first_stack::
tgba_reachable_iterator_depth_first_stack(const const_tgba_ptr& a)
tgba_reachable_iterator_depth_first_stack(const const_twa_ptr& a)
: tgba_reachable_iterator_depth_first(a)
{
}
......
......@@ -34,7 +34,7 @@ namespace spot
class SPOT_API tgba_reachable_iterator
{
public:
tgba_reachable_iterator(const const_tgba_ptr& a);
tgba_reachable_iterator(const const_twa_ptr& a);
virtual ~tgba_reachable_iterator();
/// \brief Iterate over all reachable states of a spot::tgba.
......@@ -88,7 +88,7 @@ namespace spot
const twa_succ_iterator* si);
protected:
const_tgba_ptr aut_; ///< The spot::tgba to explore.
const_twa_ptr aut_; ///< The spot::tgba to explore.
typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> seen_map;
......@@ -102,7 +102,7 @@ namespace spot
public tgba_reachable_iterator
{
public:
tgba_reachable_iterator_breadth_first(const const_tgba_ptr& a);
tgba_reachable_iterator_breadth_first(const const_twa_ptr& a);
virtual void add_state(const state* s);
virtual const state* next_state();
......@@ -116,7 +116,7 @@ namespace spot
class SPOT_API tgba_reachable_iterator_depth_first
{
public:
tgba_reachable_iterator_depth_first(const const_tgba_ptr& a);
tgba_reachable_iterator_depth_first(const const_twa_ptr& a);
virtual ~tgba_reachable_iterator_depth_first();
/// \brief Iterate over all reachable states of a spot::tgba.
......@@ -158,7 +158,7 @@ namespace spot
const twa_succ_iterator* si);
protected:
const_tgba_ptr aut_; ///< The spot::tgba to explore.
const_twa_ptr aut_; ///< The spot::tgba to explore.
typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> seen_map;
......@@ -186,7 +186,7 @@ namespace spot
: public tgba_reachable_iterator_depth_first
{
public:
tgba_reachable_iterator_depth_first_stack(const const_tgba_ptr& a);
tgba_reachable_iterator_depth_first_stack(const const_twa_ptr& a);
/// \brief Whether state sn is on the DFS stack.
///
/// Note the destination state of a transition is only pushed to
......
......@@ -33,7 +33,7 @@ namespace spot
class shortest_path: public bfs_steps
{
public:
shortest_path(const const_tgba_ptr& a)
shortest_path(const const_twa_ptr& a)
: bfs_steps(a), target(0)
{
}
......@@ -88,7 +88,7 @@ namespace spot
}
tgba_run_ptr
reduce_run(const const_tgba_ptr& a, const const_tgba_run_ptr& org)
reduce_run(const const_twa_ptr& a, const const_tgba_run_ptr& org)
{
auto res = std::make_shared<tgba_run>();
state_set ss;
......
......@@ -34,5 +34,5 @@ namespace spot
/// Return a run which is accepting for \a a and that is no longer
/// than \a org.
SPOT_API tgba_run_ptr
reduce_run(const const_tgba_ptr& a, const const_tgba_run_ptr& org);
reduce_run(const const_twa_ptr& a, const const_tgba_run_ptr& org);
}
......@@ -33,7 +33,7 @@ namespace spot
{
void
print_annotation(std::ostream& os,
const const_tgba_ptr& a,
const const_twa_ptr& a,
const twa_succ_iterator* i)
{
std::string s = a->transition_annotation(i);
......@@ -44,7 +44,7 @@ namespace spot
}
bool
replay_tgba_run(std::ostream& os, const const_tgba_ptr& a,
replay_tgba_run(std::ostream& os, const const_twa_ptr& a,
const const_tgba_run_ptr& run, bool debug)
{
const state* s = a->get_init_state();
......
......@@ -48,7 +48,7 @@ namespace spot
/// \return true iff the run could be completed
SPOT_API bool
replay_tgba_run(std::ostream& os,
const const_tgba_ptr& a,
const const_twa_ptr& a,
const const_tgba_run_ptr& run,
bool debug = false);
}
......@@ -27,7 +27,7 @@
namespace spot
{
scc_map::scc_map(const const_tgba_ptr& aut)
scc_map::scc_map(const const_twa_ptr& aut)
: aut_(aut)
{
}
......@@ -76,7 +76,7 @@ namespace spot
return aut_->acc().accepting(acc_set_of(n));
}
const_tgba_ptr
const_twa_ptr
scc_map::get_aut() const
{
return aut_;
......@@ -443,7 +443,7 @@ namespace spot
}
std::ostream&
dump_scc_dot(const const_tgba_ptr& a, std::ostream& out, bool verbose)
dump_scc_dot(const const_twa_ptr& a, std::ostream& out, bool verbose)
{
scc_map m(a);
m.build_map();
......
......@@ -41,7 +41,7 @@ namespace spot
///
/// This will note compute the map initially. You should call
/// build_map() to do so.
scc_map(const const_tgba_ptr& aut);
scc_map(const const_twa_ptr& aut);
~scc_map();
......@@ -49,7 +49,7 @@ namespace spot
void build_map();
/// Get the automaton for which the map has been constructed.
const_tgba_ptr get_aut() const;
const_twa_ptr get_aut() const;
/// \brief Get the number of SCC in the automaton.
///
......@@ -171,7 +171,7 @@ namespace spot
std::set<acc_cond::mark_t> useful_acc;
};
const_tgba_ptr aut_; // Automata to decompose.
const_twa_ptr aut_; // Automata to decompose.
typedef std::list<scc> stack_type;
stack_type root_; // Stack of SCC roots.
std::stack<acc_cond::mark_t> arc_acc_; // A stack of acceptance conditions
......@@ -203,7 +203,7 @@ namespace spot
};
SPOT_API std::ostream&
dump_scc_dot(const const_tgba_ptr& a,
dump_scc_dot(const const_twa_ptr& a,
std::ostream& out, bool verbose = false);
SPOT_API std::ostream&
dump_scc_dot(const scc_map& m, std::ostream& out, bool verbose = false);
......
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