rename tgba_run as twa_run

Part of #113.

* src/twaalgos/emptiness.cc, src/twaalgos/emptiness.hh (tgba_run):
Rename as ...
(twa_run): ... this.
* NEWS: Mention it.
* iface/ltsmin/modelcheck.cc, src/tests/complementation.cc,
src/tests/emptchk.cc, src/tests/ikwiad.cc, src/tests/randtgba.cc,
src/twa/twa.hh, src/twaalgos/bfssteps.cc, src/twaalgos/bfssteps.hh,
src/twaalgos/gtec/ce.cc, src/twaalgos/gtec/ce.hh,
src/twaalgos/gv04.cc, src/twaalgos/magic.cc, src/twaalgos/minimize.cc,
src/twaalgos/ndfs_result.hxx, src/twaalgos/projrun.cc,
src/twaalgos/projrun.hh, src/twaalgos/reducerun.cc,
src/twaalgos/reducerun.hh, src/twaalgos/replayrun.cc,
src/twaalgos/replayrun.hh, src/twaalgos/se05.cc, src/twaalgos/word.cc,
src/twaalgos/word.hh, wrap/python/ajax/spotcgi.in,
wrap/python/spot_impl.i: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2015-10-24 17:20:30 +02:00
parent 4a91fccc33
commit 4221e68d44
28 changed files with 147 additions and 146 deletions

1
NEWS
View file

@ -52,6 +52,7 @@ New in spot 1.99.4a (not yet released)
ltl_simplifier -> tl_simplifier
tgba_statistics::transitions -> twa_statistics::edges
tgba_sub_statistics::sub_transitions -> twa_sub_statistics::transitions
tgba_run -> twa_run
Python:

View file

@ -314,7 +314,7 @@ checked_main(int argc, char **argv)
else if (accepting_run)
{
spot::tgba_run_ptr run;
spot::twa_run_ptr run;
tm.start("computing accepting run");
try
{
@ -340,7 +340,7 @@ checked_main(int argc, char **argv)
tm.stop("reducing accepting run");
tm.start("printing accepting run");
spot::print_tgba_run(std::cout, product, run);
spot::print_twa_run(std::cout, product, run);
tm.stop("printing accepting run");
}
}

View file

@ -248,7 +248,7 @@ int main(int argc, char* argv[])
if (auto run = res->accepting_run())
{
spot::print_dot(std::cout, ec->automaton());
spot::print_tgba_run(std::cout, ec->automaton(), run);
spot::print_twa_run(std::cout, ec->automaton(), run);
}
}
else

View file

@ -161,7 +161,7 @@ main(int argc, char** argv)
std::cout << ce_found << " counterexample found\n";
if (auto run = res->accepting_run())
{
auto ar = spot::tgba_run_to_tgba(a, run);
auto ar = spot::twa_run_to_tgba(a, run);
spot::print_dot(std::cout, ar);
}
std::cout << '\n';

View file

@ -1586,7 +1586,7 @@ checked_main(int argc, char** argv)
if (accepting_run_replay)
{
tm.start("replaying acc. run");
if (!spot::replay_tgba_run(std::cout, a,
if (!spot::replay_twa_run(std::cout, a,
run, true))
exit_code = 1;
tm.stop("replaying acc. run");
@ -1596,12 +1596,12 @@ checked_main(int argc, char** argv)
tm.start("printing accepting run");
if (graph_run_tgba_opt)
{
auto ar = spot::tgba_run_to_tgba(a, run);
auto ar = spot::twa_run_to_tgba(a, run);
spot::print_dot(std::cout, ar);
}
else
{
spot::print_tgba_run(std::cout, a, run);
spot::print_twa_run(std::cout, a, run);
}
tm.stop("printing accepting run");
}

View file

@ -379,7 +379,7 @@ struct ar_stat
}
void
count(const spot::const_tgba_run_ptr& run)
count(const spot::const_twa_run_ptr& run)
{
int p = run->prefix.size();
int c = run->cycle.size();
@ -986,7 +986,7 @@ main(int argc, char** argv)
++n_non_empty;
if (opt_replay)
{
spot::tgba_run_ptr run;
spot::twa_run_ptr run;
bool done = false;
tm_ar.start(algo);
for (int count = opt_R;;)
@ -1026,7 +1026,7 @@ main(int argc, char** argv)
{
tm_ar.stop(algo);
std::ostringstream s;
if (!spot::replay_tgba_run(s,
if (!spot::replay_twa_run(s,
res->automaton(),
run))
{
@ -1051,7 +1051,7 @@ main(int argc, char** argv)
{
auto redrun =
spot::reduce_run(res->automaton(), run);
if (!spot::replay_tgba_run(s,
if (!spot::replay_twa_run(s,
res
->automaton(),
redrun))

View file

@ -642,7 +642,7 @@ namespace spot
/// is the empty string.
///
/// This method is used for instance in print_dot(),
/// and replay_tgba_run().
/// and replay_twa_run().
///
/// \param t a non-done twa_succ_iterator for this automaton
virtual std::string

View file

@ -38,20 +38,20 @@ namespace spot
}
void
bfs_steps::finalize(const std::map<const state*, tgba_run::step,
state_ptr_less_than>& father, const tgba_run::step& s,
const state* start, tgba_run::steps& l)
bfs_steps::finalize(const std::map<const state*, twa_run::step,
state_ptr_less_than>& father, const twa_run::step& s,
const state* start, twa_run::steps& l)
{
tgba_run::steps p;
tgba_run::step current = s;
twa_run::steps p;
twa_run::step current = s;
for (;;)
{
tgba_run::step tmp = current;
twa_run::step tmp = current;
tmp.s = tmp.s->clone();
p.push_front(tmp);
if (current.s == start)
break;
std::map<const state*, tgba_run::step,
std::map<const state*, twa_run::step,
state_ptr_less_than>::const_iterator it = father.find(current.s);
assert(it != father.end());
current = it->second;
@ -60,11 +60,11 @@ namespace spot
}
const state*
bfs_steps::search(const state* start, tgba_run::steps& l)
bfs_steps::search(const state* start, twa_run::steps& l)
{
// Records backlinks to parent state during the BFS.
// (This also stores the propositions of this link.)
std::map<const state*, tgba_run::step,
std::map<const state*, twa_run::step,
state_ptr_less_than> father;
// BFS queue.
std::deque<const state*> todo;
@ -84,7 +84,7 @@ namespace spot
bdd cond = i->current_condition();
acc_cond::mark_t acc = i->current_acceptance_conditions();
tgba_run::step s = { src, cond, acc };
twa_run::step s = { src, cond, acc };
if (match(s, dest))
{

View file

@ -28,7 +28,7 @@
namespace spot
{
/// \ingroup twa_misc
/// \brief Make a BFS in a spot::tgba to compute a tgba_run::steps.
/// \brief Make a BFS in a spot::tgba to compute a twa_run::steps.
///
/// This class should be used to compute the shortest path
/// between a state of a spot::tgba and the first transition or
@ -48,7 +48,7 @@ namespace spot
///
/// \return the destination state of the last step (not included
/// in \a l) if a matching path was found, or 0 otherwise.
const state* search(const state* start, tgba_run::steps& l);
const state* search(const state* start, twa_run::steps& l);
/// \brief Return a state* that is unique for \a a.
///
@ -82,7 +82,7 @@ namespace spot
/// and when this happens the list argument of search() is be
/// augmented with the shortest past that ends with this
/// transition.
virtual bool match(tgba_run::step& step, const state* dest) = 0;
virtual bool match(twa_run::step& step, const state* dest) = 0;
/// \brief Append the resulting path to the resulting run.
///
@ -90,11 +90,11 @@ namespace spot
/// resulting path to \a l. This seldom needs to be overridden,
/// unless you do not want \a l to be updated (in which case an empty
/// finalize() will do).
virtual void finalize(const std::map<const state*, tgba_run::step,
virtual void finalize(const std::map<const state*, twa_run::step,
state_ptr_less_than>& father,
const tgba_run::step& s,
const twa_run::step& s,
const state* start,
tgba_run::steps& l);
twa_run::steps& l);
protected:
const_twa_ptr a_; ///< The spot::tgba we are searching into.

View file

@ -34,10 +34,10 @@
namespace spot
{
// tgba_run
// twa_run
//////////////////////////////////////////////////////////////////////
tgba_run::~tgba_run()
twa_run::~twa_run()
{
for (auto i : prefix)
i.s->destroy();
@ -45,7 +45,7 @@ namespace spot
i.s->destroy();
}
tgba_run::tgba_run(const tgba_run& run)
twa_run::twa_run(const twa_run& run)
{
for (steps::const_iterator i = run.prefix.begin();
i != run.prefix.end(); ++i)
@ -61,28 +61,28 @@ namespace spot
}
}
tgba_run&
tgba_run::operator=(const tgba_run& run)
twa_run&
twa_run::operator=(const twa_run& run)
{
if (&run != this)
{
this->~tgba_run();
new(this) tgba_run(run);
this->~twa_run();
new(this) twa_run(run);
}
return *this;
}
// print_tgba_run
// print_twa_run
//////////////////////////////////////////////////////////////////////
std::ostream&
print_tgba_run(std::ostream& os,
print_twa_run(std::ostream& os,
const const_twa_ptr& a,
const const_tgba_run_ptr& run)
const const_twa_run_ptr& run)
{
bdd_dict_ptr d = a->get_dict();
os << "Prefix:" << std::endl;
for (tgba_run::steps::const_iterator i = run->prefix.begin();
for (twa_run::steps::const_iterator i = run->prefix.begin();
i != run->prefix.end(); ++i)
{
os << " " << a->format_state(i->s) << std::endl;
@ -93,7 +93,7 @@ namespace spot
os << std::endl;
}
os << "Cycle:" << std::endl;
for (tgba_run::steps::const_iterator i = run->cycle.begin();
for (twa_run::steps::const_iterator i = run->cycle.begin();
i != run->cycle.end(); ++i)
{
os << " " << a->format_state(i->s) << std::endl;
@ -109,7 +109,7 @@ namespace spot
// emptiness_check_result
//////////////////////////////////////////////////////////////////////
tgba_run_ptr
twa_run_ptr
emptiness_check_result::accepting_run()
{
return nullptr;
@ -287,11 +287,11 @@ namespace spot
return nullptr;
}
// tgba_run_to_tgba
// twa_run_to_tgba
//////////////////////////////////////////////////////////////////////
twa_graph_ptr
tgba_run_to_tgba(const const_twa_ptr& a, const const_tgba_run_ptr& run)
twa_run_to_tgba(const const_twa_ptr& a, const const_twa_run_ptr& run)
{
auto d = a->get_dict();
auto res = make_twa_graph(d);
@ -301,7 +301,7 @@ namespace spot
const state* s = a->get_init_state();
unsigned src;
unsigned dst;
const tgba_run::steps* l;
const twa_run::steps* l;
acc_cond::mark_t seen_acc = 0U;
typedef std::unordered_map<const state*, unsigned,
@ -313,7 +313,7 @@ namespace spot
else
l = &run->prefix;
tgba_run::steps::const_iterator i = l->begin();
twa_run::steps::const_iterator i = l->begin();
assert(s->compare(i->s) == 0);
src = res->new_state();

View file

@ -32,9 +32,9 @@
namespace spot
{
struct tgba_run;
typedef std::shared_ptr<tgba_run> tgba_run_ptr;
typedef std::shared_ptr<const tgba_run> const_tgba_run_ptr;
struct twa_run;
typedef std::shared_ptr<twa_run> twa_run_ptr;
typedef std::shared_ptr<const twa_run> const_twa_run_ptr;
/// \addtogroup emptiness_check Emptiness-checks
/// \ingroup twa_algorithms
@ -64,7 +64,7 @@ namespace spot
///
/// The acceptance run returned by
/// spot::emptiness_check_result::accepting_run(), if any, is of
/// type spot::tgba_run. \ref tgba_run "This page" gathers existing
/// type spot::twa_run. \ref twa_run "This page" gathers existing
/// operations on these objects.
///
/// @{
@ -100,7 +100,7 @@ namespace spot
/// cannot produce a counter example (that does not mean there
/// is no counter-example; the mere existence of an instance of
/// this class asserts the existence of a counter-example).
virtual tgba_run_ptr accepting_run();
virtual twa_run_ptr accepting_run();
/// The automaton on which an accepting_run() was found.
const const_twa_ptr&
@ -263,7 +263,7 @@ namespace spot
/// @{
/// An accepted run, for a tgba.
struct SPOT_API tgba_run
struct SPOT_API twa_run
{
struct step {
const state* s;
@ -284,39 +284,39 @@ namespace spot
steps prefix;
steps cycle;
~tgba_run();
tgba_run()
~twa_run();
twa_run()
{
};
tgba_run(const tgba_run& run);
tgba_run& operator=(const tgba_run& run);
twa_run(const twa_run& run);
twa_run& operator=(const twa_run& run);
};
/// \brief Display a tgba_run.
/// \brief Display a twa_run.
///
/// Output the prefix and cycle parts of the tgba_run \a run on \a os.
/// Output the prefix and cycle parts of the twa_run \a run on \a os.
///
/// The automaton \a a is used only to format the states, and
/// to know how to print the BDDs describing the conditions and
/// acceptance conditions of the run; it is <b>not</b> used to
/// replay the run. In other words this function will work even if
/// the tgba_run you are trying to print appears to connect states
/// the twa_run you are trying to print appears to connect states
/// of \a a that are not connected.
///
/// This is unlike replay_tgba_run(), which will ensure the run
/// This is unlike replay_twa_run(), which will ensure the run
/// actually exists in the automaton (and will also display any
/// transition annotation).
SPOT_API std::ostream&
print_tgba_run(std::ostream& os,
print_twa_run(std::ostream& os,
const const_twa_ptr& a,
const const_tgba_run_ptr& run);
const const_twa_run_ptr& run);
/// \brief Return an explicit_tgba corresponding to \a run (i.e. comparable
/// states are merged).
///
/// \pre \a run must correspond to an actual run of the automaton \a a.
SPOT_API twa_graph_ptr
tgba_run_to_tgba(const const_twa_ptr& a, const const_tgba_run_ptr& run);
twa_run_to_tgba(const const_twa_ptr& a, const const_twa_run_ptr& run);
/// @}

View file

@ -39,7 +39,7 @@ namespace spot
}
const state*
search(const state* start, tgba_run::steps& l)
search(const state* start, twa_run::steps& l)
{
return this->bfs_steps::search(filter(start), l);
}
@ -60,7 +60,7 @@ namespace spot
}
bool
match(tgba_run::step&, const state* dest)
match(twa_run::step&, const state* dest)
{
return target->find(dest) != target->end();
}
@ -91,10 +91,10 @@ namespace spot
return count;
}
tgba_run_ptr
twa_run_ptr
couvreur99_check_result::accepting_run()
{
run_ = std::make_shared<tgba_run>();
run_ = std::make_shared<twa_run>();
assert(!ecs_->root.empty());
@ -106,7 +106,7 @@ namespace spot
// Register all states from the cycle as target of the BFS.
state_set ss;
for (tgba_run::steps::const_iterator i = run_->cycle.begin();
for (twa_run::steps::const_iterator i = run_->cycle.begin();
i != run_->cycle.end(); ++i)
ss.insert(i->s);
shortest_path shpath(&ss, ecs_, this);
@ -132,7 +132,7 @@ namespace spot
}
// Locate cycle_entry_point on the cycle.
tgba_run::steps::iterator cycle_ep_it;
twa_run::steps::iterator cycle_ep_it;
for (cycle_ep_it = run_->cycle.begin();
cycle_ep_it != run_->cycle.end()
&& cycle_entry_point->compare(cycle_ep_it->s); ++cycle_ep_it)
@ -201,7 +201,7 @@ namespace spot
}
virtual bool
match(tgba_run::step& st, const state* s)
match(twa_run::step& st, const state* s)
{
acc_cond::mark_t less_acc =
acc_to_traverse - st.acc;

View file

@ -38,7 +38,7 @@ namespace spot
std::shared_ptr<const couvreur99_check_status>& ecs,
option_map o = option_map());
virtual tgba_run_ptr accepting_run();
virtual twa_run_ptr accepting_run();
void print_stats(std::ostream& os) const;
@ -51,6 +51,6 @@ namespace spot
private:
std::shared_ptr<const couvreur99_check_status> ecs_;
tgba_run_ptr run_;
twa_run_ptr run_;
};
}

View file

@ -284,10 +284,10 @@ namespace spot
return s;
}
virtual tgba_run_ptr
virtual twa_run_ptr
accepting_run()
{
auto res = std::make_shared<tgba_run>();
auto res = std::make_shared<twa_run>();
update_lowlinks();
#ifdef TRACE
@ -309,7 +309,7 @@ namespace spot
int father = data.stack[scc_root].pre;
while (father >= 0)
{
tgba_run::step st =
twa_run::step st =
{
data.stack[father].s->clone(),
data.stack[father].lasttr->current_condition(),
@ -360,7 +360,7 @@ namespace spot
}
virtual bool
match(tgba_run::step& step, const state*)
match(twa_run::step& step, const state*)
{
return step.acc != 0U;
}
@ -375,7 +375,7 @@ namespace spot
}
virtual bool
match(tgba_run::step&, const state* s)
match(twa_run::step&, const state* s)
{
return s == target;
}

View file

@ -328,15 +328,15 @@ namespace spot
{
}
virtual tgba_run_ptr accepting_run()
virtual twa_run_ptr accepting_run()
{
assert(!ms_->st_blue.empty());
assert(!ms_->st_red.empty());
auto run = std::make_shared<tgba_run>();
auto run = std::make_shared<twa_run>();
typename stack_type::const_reverse_iterator i, j, end;
tgba_run::steps* l;
twa_run::steps* l;
l = &run->prefix;
@ -345,21 +345,21 @@ namespace spot
j = i; ++j;
for (; i != end; ++i, ++j)
{
tgba_run::step s = { i->s->clone(), j->label, j->acc };
twa_run::step s = { i->s->clone(), j->label, j->acc };
l->push_back(s);
}
l = &run->cycle;
j = ms_->st_red.rbegin();
tgba_run::step s = { i->s->clone(), j->label, j->acc };
twa_run::step s = { i->s->clone(), j->label, j->acc };
l->push_back(s);
i = j; ++j;
end = ms_->st_red.rend(); --end;
for (; i != end; ++i, ++j)
{
tgba_run::step s = { i->s->clone(), j->label, j->acc };
twa_run::step s = { i->s->clone(), j->label, j->acc };
l->push_back(s);
}
@ -408,7 +408,7 @@ namespace spot
delete computer;
}
virtual tgba_run_ptr accepting_run()
virtual twa_run_ptr accepting_run()
{
return computer->accepting_run();
}

View file

@ -197,7 +197,7 @@ namespace spot
}
virtual bool
match(tgba_run::step&, const state* to)
match(twa_run::step&, const state* to)
{
return to == dest;
}
@ -220,14 +220,14 @@ namespace spot
// Find a loop around START in SCC #n.
wdba_search_acc_loop wsal(det_a, scc_n, sm, pm, start);
tgba_run::steps loop;
twa_run::steps loop;
const state* reached = wsal.search(start, loop);
assert(reached == start);
(void)reached;
// Build an automaton representing this loop.
auto loop_a = make_twa_graph(det_a->get_dict());
tgba_run::steps::const_iterator i;
twa_run::steps::const_iterator i;
int loop_size = loop.size();
loop_a->new_states(loop_size);
int n;

View file

@ -104,7 +104,7 @@ namespace spot
{
}
virtual tgba_run_ptr accepting_run()
virtual twa_run_ptr accepting_run()
{
const stack_type& stb = ms_->get_st_blue();
const stack_type& str = ms_->get_st_red();
@ -194,7 +194,7 @@ namespace spot
assert(!acc_trans.empty());
auto run = std::make_shared<tgba_run>();
auto run = std::make_shared<twa_run>();
// construct run->cycle from acc_trans.
construct_cycle(run, acc_trans);
// construct run->prefix (a minimal path from the initial state to any
@ -389,7 +389,7 @@ namespace spot
}
}
const state* search(const state* start, tgba_run::steps& l)
const state* search(const state* start, twa_run::steps& l)
{
const state* s = filter(start);
if (s)
@ -412,9 +412,9 @@ namespace spot
return s;
}
void finalize(const std::map<const state*, tgba_run::step,
void finalize(const std::map<const state*, twa_run::step,
state_ptr_less_than>&,
const tgba_run::step&, const state*, tgba_run::steps&)
const twa_run::step&, const state*, twa_run::steps&)
{
}
@ -423,7 +423,7 @@ namespace spot
return seen;
}
bool match(tgba_run::step&, const state* dest)
bool match(twa_run::step&, const state* dest)
{
return target->compare(dest) == 0;
}
@ -438,7 +438,7 @@ namespace spot
bool search(const state* start, const state* target, state_set& dead)
{
tgba_run::steps path;
twa_run::steps path;
if (start->compare(target) == 0)
return true;
@ -484,7 +484,7 @@ namespace spot
}
}
const state* search(const state* start, tgba_run::steps& l)
const state* search(const state* start, twa_run::steps& l)
{
const state* s = filter(start);
if (s)
@ -514,7 +514,7 @@ namespace spot
return s;
}
bool match(tgba_run::step&, const state* dest)
bool match(twa_run::step&, const state* dest)
{
ndfsr_trace << "match: " << a_->format_state(dest)
<< std::endl;
@ -528,7 +528,7 @@ namespace spot
const heap& h;
};
void construct_cycle(tgba_run_ptr run,
void construct_cycle(twa_run_ptr run,
const accepting_transitions_list& acc_trans)
{
assert(!acc_trans.empty());
@ -551,7 +551,7 @@ namespace spot
ndfsr_trace << "(self loop " << a_->format_state(i->source)
<< " -> " << a_->format_state(i->dest)
<< " ignored) ";
tgba_run::step st = { i->source->clone(), i->label, i->acc };
twa_run::step st = { i->source->clone(), i->label, i->acc };
run->cycle.push_back(st);
}
else
@ -563,7 +563,7 @@ namespace spot
}
ndfsr_trace << std::endl;
tgba_run::step st = { current.source->clone(), current.label,
twa_run::step st = { current.source->clone(), current.label,
current.acc };
run->cycle.push_back(st);
@ -590,7 +590,7 @@ namespace spot
}
current = i->second;
// complete the path with the corresponding transition
tgba_run::step st = { current.source->clone(), current.label,
twa_run::step st = { current.source->clone(), current.label,
current.acc };
run->cycle.push_back(st);
// remove this source state of target
@ -617,7 +617,7 @@ namespace spot
}
}
void construct_prefix(tgba_run_ptr run)
void construct_prefix(twa_run_ptr run)
{
m_source_trans target;
transition tmp;
@ -625,7 +625,7 @@ namespace spot
tmp.acc = 0U;
// Register all states from the cycle as target of the BFS.
for (tgba_run::steps::const_iterator i = run->cycle.begin();
for (twa_run::steps::const_iterator i = run->cycle.begin();
i != run->cycle.end(); ++i)
target.emplace(i->s, tmp);
@ -653,7 +653,7 @@ namespace spot
}
// Locate cycle_entry_point on the cycle.
tgba_run::steps::iterator cycle_ep_it;
twa_run::steps::iterator cycle_ep_it;
for (cycle_ep_it = run->cycle.begin();
cycle_ep_it != run->cycle.end()
&& cycle_entry_point->compare(cycle_ep_it->s); ++cycle_ep_it)

View file

@ -27,12 +27,12 @@
namespace spot
{
tgba_run_ptr
project_tgba_run(const const_twa_ptr& a_run,
twa_run_ptr
project_twa_run(const const_twa_ptr& a_run,
const const_twa_ptr& a_proj,
const const_tgba_run_ptr& run)
const const_twa_run_ptr& run)
{
auto res = std::make_shared<tgba_run>();
auto res = std::make_shared<twa_run>();
for (auto& i: run->prefix)
res->prefix.emplace_back(a_run->project_state(i.s, a_proj),
i.label, i.acc);

View file

@ -29,20 +29,20 @@
namespace spot
{
struct tgba_run;
struct twa_run;
/// \ingroup twa_run
/// \brief Project a tgba_run on a tgba.
/// \brief Project a twa_run on a tgba.
///
/// If a tgba_run has been generated on a product, or any other
/// If a twa_run has been generated on a product, or any other
/// on-the-fly algorithm with tgba operands,
///
/// \param run the run to replay
/// \param a_run the automata on which the run was generated
/// \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_twa_ptr& a_run,
SPOT_API twa_run_ptr
project_twa_run(const const_twa_ptr& a_run,
const const_twa_ptr& a_proj,
const const_tgba_run_ptr& run);
const const_twa_run_ptr& run);
}

View file

@ -56,7 +56,7 @@ namespace spot
}
const state*
search(const state* start, tgba_run::steps& l)
search(const state* start, twa_run::steps& l)
{
return this->bfs_steps::search(filter(start), l);
}
@ -76,7 +76,7 @@ namespace spot
}
bool
match(tgba_run::step&, const state* dest)
match(twa_run::step&, const state* dest)
{
return target->find(dest) != target->end();
}
@ -87,10 +87,10 @@ namespace spot
};
}
tgba_run_ptr
reduce_run(const const_twa_ptr& a, const const_tgba_run_ptr& org)
twa_run_ptr
reduce_run(const const_twa_ptr& a, const const_twa_run_ptr& org)
{
auto res = std::make_shared<tgba_run>();
auto res = std::make_shared<twa_run>();
state_set ss;
shortest_path shpath(a);
shpath.set_target(&ss);
@ -104,7 +104,7 @@ namespace spot
// Start from the end of the original cycle, and rewind until all
// acceptance sets have been seen.
acc_cond::mark_t seen_acc = 0U;
tgba_run::steps::const_iterator seg = org->cycle.end();
twa_run::steps::const_iterator seg = org->cycle.end();
do
{
assert(seg != org->cycle.begin());
@ -122,7 +122,7 @@ namespace spot
assert(seg != org->cycle.end());
seen_acc |= seg->acc;
tgba_run::step st = { seg->s->clone(), seg->label, seg->acc };
twa_run::step st = { seg->s->clone(), seg->label, seg->acc };
res->cycle.push_back(st);
++seg;
@ -145,7 +145,7 @@ namespace spot
// state of the automata to any state of the cycle.
// Register all states from the cycle as target of the BFS.
for (tgba_run::steps::const_iterator i = res->cycle.begin();
for (twa_run::steps::const_iterator i = res->cycle.begin();
i != res->cycle.end(); ++i)
ss.insert(i->s);
@ -170,7 +170,7 @@ namespace spot
}
// Locate cycle_entry_point on the cycle.
tgba_run::steps::iterator cycle_ep_it;
twa_run::steps::iterator cycle_ep_it;
for (cycle_ep_it = res->cycle.begin();
cycle_ep_it != res->cycle.end()
&& cycle_entry_point->compare(cycle_ep_it->s); ++cycle_ep_it)

View file

@ -33,6 +33,6 @@ 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_twa_ptr& a, const const_tgba_run_ptr& org);
SPOT_API twa_run_ptr
reduce_run(const const_twa_ptr& a, const const_twa_run_ptr& org);
}

View file

@ -44,12 +44,12 @@ namespace spot
}
bool
replay_tgba_run(std::ostream& os, const const_twa_ptr& a,
const const_tgba_run_ptr& run, bool debug)
replay_twa_run(std::ostream& os, const const_twa_ptr& a,
const const_twa_run_ptr& run, bool debug)
{
const state* s = a->get_init_state();
int serial = 1;
const tgba_run::steps* l;
const twa_run::steps* l;
std::string in;
acc_cond::mark_t all_acc = 0U;
bool all_acc_seen = false;
@ -72,7 +72,7 @@ namespace spot
os << "Prefix:\n";
}
tgba_run::steps::const_iterator i = l->begin();
twa_run::steps::const_iterator i = l->begin();
if (s->compare(i->s))
{

View file

@ -29,12 +29,12 @@
namespace spot
{
struct tgba_run;
struct twa_run;
/// \ingroup twa_run
/// \brief Replay a tgba_run on a tgba.
/// \brief Replay a twa_run on a tgba.
///
/// This is similar to print_tgba_run(), except that the run is
/// This is similar to print_twa_run(), except that the run is
/// actually replayed on the automaton while it is printed. Doing
/// so makes it possible to display transition annotations (returned
/// by spot::tgba::transition_annotation()). The output will stop
@ -47,8 +47,8 @@ namespace spot
/// debugging informations will be output on failure
/// \return true iff the run could be completed
SPOT_API bool
replay_tgba_run(std::ostream& os,
replay_twa_run(std::ostream& os,
const const_twa_ptr& a,
const const_tgba_run_ptr& run,
const const_twa_run_ptr& run,
bool debug = false);
}

View file

@ -334,15 +334,15 @@ namespace spot
{
}
virtual tgba_run_ptr accepting_run()
virtual twa_run_ptr accepting_run()
{
assert(!ms_->st_blue.empty());
assert(!ms_->st_red.empty());
auto run = std::make_shared<tgba_run>();
auto run = std::make_shared<twa_run>();
typename stack_type::const_reverse_iterator i, j, end;
tgba_run::steps* l;
twa_run::steps* l;
const state* target = ms_->st_red.front().s;
@ -355,7 +355,7 @@ namespace spot
{
if (l == &run->prefix && i->s->compare(target) == 0)
l = &run->cycle;
tgba_run::step s = { i->s->clone(), j->label, j->acc };
twa_run::step s = { i->s->clone(), j->label, j->acc };
l->push_back(s);
}
@ -364,14 +364,14 @@ namespace spot
assert(l == &run->cycle);
j = ms_->st_red.rbegin();
tgba_run::step s = { i->s->clone(), j->label, j->acc };
twa_run::step s = { i->s->clone(), j->label, j->acc };
l->push_back(s);
i = j; ++j;
end = ms_->st_red.rend(); --end;
for (; i != end; ++i, ++j)
{
tgba_run::step s = { i->s->clone(), j->label, j->acc };
twa_run::step s = { i->s->clone(), j->label, j->acc };
l->push_back(s);
}
@ -420,7 +420,7 @@ namespace spot
delete computer;
}
virtual tgba_run_ptr accepting_run()
virtual twa_run_ptr accepting_run()
{
return computer->accepting_run();
}

View file

@ -23,12 +23,12 @@
namespace spot
{
tgba_word::tgba_word(const tgba_run_ptr run)
tgba_word::tgba_word(const twa_run_ptr run)
{
for (tgba_run::steps::const_iterator i = run->prefix.begin();
for (twa_run::steps::const_iterator i = run->prefix.begin();
i != run->prefix.end(); ++i)
prefix.push_back(i->label);
for (tgba_run::steps::const_iterator i = run->cycle.begin();
for (twa_run::steps::const_iterator i = run->cycle.begin();
i != run->cycle.end(); ++i)
cycle.push_back(i->label);
}

View file

@ -28,7 +28,7 @@ namespace spot
/// \brief An infinite word stored as a lasso.
struct SPOT_API tgba_word
{
tgba_word(const tgba_run_ptr run);
tgba_word(const twa_run_ptr run);
void simplify();
std::ostream& print(std::ostream& os, const bdd_dict_ptr& d) const;

View file

@ -841,12 +841,12 @@ if output_type == 'r':
if ec_run:
if print_acc_run:
s = spot.ostringstream()
spot.print_tgba_run(s, ec_a, ec_run)
spot.print_twa_run(s, ec_a, ec_run)
unbufprint('<div class="accrun">%s</div>' %
cgi.escape(s.str()))
del s
if draw_acc_run:
render_automaton(spot.tgba_run_to_tgba(ec_a, ec_run), False)
render_automaton(spot.twa_run_to_tgba(ec_a, ec_run), False)
del ec_run
del ec_res
unbufprint('</div>')

View file

@ -60,7 +60,7 @@
%shared_ptr(spot::taa_tgba_string)
%shared_ptr(spot::taa_tgba_formula)
%shared_ptr(spot::twa_safra_complement)
%shared_ptr(spot::tgba_run)
%shared_ptr(spot::twa_run)
%shared_ptr(spot::emptiness_check_result)
%shared_ptr(spot::emptiness_check)
%shared_ptr(spot::emptiness_check_instantiator)