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

twa_succ_iterator: rename accessors

* src/twa/twa.hh, src/ta/ta.hh (current_state,
current_acceptance_conditions, current_condition): Rename as...
(dst, acc, cond): ... these.
* iface/ltsmin/ltsmin.cc, src/kripke/fairkripke.cc,
src/kripke/fairkripke.hh, src/kripke/kripke.cc,
src/kripke/kripke.hh, src/kripke/kripkeexplicit.cc,
src/kripke/kripkeexplicit.hh, src/kripke/kripkeprint.cc,
src/ta/taexplicit.cc, src/ta/taexplicit.hh, src/ta/taproduct.cc,
src/ta/taproduct.hh, src/ta/tgtaproduct.cc, src/ta/tgtaproduct.hh,
src/taalgos/dot.cc, src/taalgos/emptinessta.cc,
src/taalgos/minimize.cc, src/taalgos/reachiter.cc,
src/taalgos/tgba2ta.cc, src/twa/taatgba.cc, src/twa/taatgba.hh,
src/twa/twagraph.hh, src/twa/twaproduct.cc,
src/twa/twasafracomplement.cc, src/twaalgos/bfssteps.cc,
src/twaalgos/bfssteps.hh, src/twaalgos/compsusp.cc,
src/twaalgos/copy.cc, src/twaalgos/emptiness.cc,
src/twaalgos/gtec/gtec.cc, src/twaalgos/gv04.cc,
src/twaalgos/lbtt.cc, src/twaalgos/ltl2tgba_fm.cc,
src/twaalgos/magic.cc, src/twaalgos/minimize.cc,
src/twaalgos/ndfs_result.hxx, src/twaalgos/reachiter.cc,
src/twaalgos/se05.cc, src/twaalgos/stats.cc,
src/twaalgos/stutter.cc, src/twaalgos/tau03.cc,
src/twaalgos/tau03opt.cc, wrap/python/tests/interdep.py: Adjust.
* NEWS: Mention the renamings.
parent 1b5b9e4a
......@@ -64,6 +64,12 @@ New in spot 1.99.4a (not yet released)
print_tgba_run -> operator<<
tgba_run_to_tgba -> twa_run::as_twa
format_parse_aut_errors -> parsed_aut::format_errors
twa_succ_iterator::current_state -> twa_succ_iterator::dst
twa_succ_iterator::current_condition -> twa_succ_iterator::cond
twa_succ_iterator::current_acceptance_conditions -> twa_succ_iterator::acc
ta_succ_iterator::current_state -> ta_succ_iterator::dst
ta_succ_iterator::current_condition -> ta_succ_iterator::cond
ta_succ_iterator::current_acceptance_conditions -> ta_succ_iterator::acc
Python:
......
......@@ -289,7 +289,7 @@ namespace spot
}
virtual
state* current_state() const
state* dst() const
{
return (*it_)->clone();
}
......
......@@ -33,7 +33,7 @@ namespace spot
}
bdd
fair_kripke_succ_iterator::current_condition() const
fair_kripke_succ_iterator::cond() const
{
// Do not assert(!done()) here. It is OK to call
// this function on a state without successor.
......@@ -41,7 +41,7 @@ namespace spot
}
acc_cond::mark_t
fair_kripke_succ_iterator::current_acceptance_conditions() const
fair_kripke_succ_iterator::acc() const
{
// Do not assert(!done()) here. It is OK to call
// this function on a state without successor.
......
......@@ -39,23 +39,23 @@ namespace spot
/// - fair_kripke_succ_iterator::first()
/// - fair_kripke_succ_iterator::next()
/// - fair_kripke_succ_iterator::done()
/// - fair_kripke_succ_iterator::current_state()
/// - fair_kripke_succ_iterator::dst()
///
/// This class implements fair_kripke_succ_iterator::current_condition(),
/// and fair_kripke_succ_iterator::current_acceptance_conditions().
/// This class implements fair_kripke_succ_iterator::cond(),
/// and fair_kripke_succ_iterator::acc().
class SPOT_API fair_kripke_succ_iterator : public twa_succ_iterator
{
public:
/// \brief Constructor
///
/// The \a cond and \a acc_cond arguments will be those returned
/// by fair_kripke_succ_iterator::current_condition(),
/// and fair_kripke_succ_iterator::current_acceptance_conditions().
/// by fair_kripke_succ_iterator::cond(),
/// and fair_kripke_succ_iterator::acc().
fair_kripke_succ_iterator(const bdd& cond, acc_cond::mark_t acc_cond);
virtual ~fair_kripke_succ_iterator();
virtual bdd current_condition() const;
virtual acc_cond::mark_t current_acceptance_conditions() const;
virtual bdd cond() const;
virtual acc_cond::mark_t acc() const;
protected:
bdd cond_;
acc_cond::mark_t acc_cond_;
......
......@@ -27,7 +27,7 @@ namespace spot
}
bdd
kripke_succ_iterator::current_condition() const
kripke_succ_iterator::cond() const
{
// Do not assert(!done()) here. It is OK to call
// this function on a state without successor.
......@@ -35,7 +35,7 @@ namespace spot
}
acc_cond::mark_t
kripke_succ_iterator::current_acceptance_conditions() const
kripke_succ_iterator::acc() const
{
// Do not assert(!done()) here. It is OK to call
// this function on a state without successor.
......
......@@ -36,17 +36,17 @@ namespace spot
/// - kripke_succ_iterator::first()
/// - kripke_succ_iterator::next()
/// - kripke_succ_iterator::done()
/// - kripke_succ_iterator::current_state()
/// - kripke_succ_iterator::dst()
///
/// This class implements kripke_succ_iterator::current_condition(),
/// and kripke_succ_iterator::current_acceptance_conditions().
/// This class implements kripke_succ_iterator::cond(),
/// and kripke_succ_iterator::acc().
class SPOT_API kripke_succ_iterator : public twa_succ_iterator
{
public:
/// \brief Constructor
///
/// The \a cond argument will be the one returned
/// by kripke_succ_iterator::current_condition().
/// by kripke_succ_iterator::cond().
kripke_succ_iterator(const bdd& cond)
: cond_(cond)
{
......@@ -59,8 +59,8 @@ namespace spot
virtual ~kripke_succ_iterator();
virtual bdd current_condition() const;
virtual acc_cond::mark_t current_acceptance_conditions() const;
virtual bdd cond() const;
virtual acc_cond::mark_t acc() const;
protected:
bdd cond_;
};
......
......@@ -116,7 +116,7 @@ namespace spot
return it_ == s_->get_succ().end();
}
state_kripke* kripke_explicit_succ_iterator::current_state() const
state_kripke* kripke_explicit_succ_iterator::dst() const
{
assert(!done());
return *it_;
......
......@@ -99,7 +99,7 @@ namespace spot
virtual bool next();
virtual bool done() const;
virtual state_kripke* current_state() const;
virtual state_kripke* dst() const;
private:
const state_kripke* s_;
......
......@@ -52,7 +52,7 @@ namespace spot
os_ << "\",";
for (si->first(); !si->done(); si->next())
{
state* dest = si->current_state();
state* dest = si->dst();
os_ << " \"";
escape_str(os_, aut_->format_state(dest));
os_ << '"';
......
......@@ -206,16 +206,16 @@ namespace spot
virtual bool done() const = 0;
virtual state*
current_state() const = 0;
dst() const = 0;
/// \brief Get the changeset on the transition leading to current successor.
///
/// This is a boolean function of atomic propositions.
virtual bdd
current_condition() const = 0;
cond() const = 0;
acc_cond::mark_t
current_acceptance_conditions() const = 0;
acc() const = 0;
};
......
......@@ -72,28 +72,28 @@ namespace spot
}
state*
ta_explicit_succ_iterator::current_state() const
ta_explicit_succ_iterator::dst() const
{
trace
<< "***ta_explicit_succ_iterator::current_state() if(done()) =***"
<< "***ta_explicit_succ_iterator::dst() if(done()) =***"
<< done() << std::endl;
assert(!done());
trace
<< "***ta_explicit_succ_iterator::current_state() (*i_)->condition =***"
<< "***ta_explicit_succ_iterator::dst() (*i_)->condition =***"
<< (*i_)->condition << std::endl;
state_ta_explicit* s = (*i_)->dest;
return s;
}
bdd
ta_explicit_succ_iterator::current_condition() const
ta_explicit_succ_iterator::cond() const
{
assert(!done());
return (*i_)->condition;
}
acc_cond::mark_t
ta_explicit_succ_iterator::current_acceptance_conditions() const
ta_explicit_succ_iterator::acc() const
{
assert(!done());
return (*i_)->acceptance_conditions;
......
......@@ -239,12 +239,12 @@ namespace spot
virtual bool done() const;
virtual state*
current_state() const;
dst() const;
virtual bdd
current_condition() const;
cond() const;
virtual acc_cond::mark_t
current_acceptance_conditions() const;
acc() const;
private:
state_ta_explicit::transitions* transitions_;
......
......@@ -130,7 +130,7 @@ namespace spot
return;
}
kripke_current_dest_state = kripke_succ_it_->current_state();
kripke_current_dest_state = kripke_succ_it_->dst();
bdd kripke_current_dest_condition = kripke_->state_condition(
kripke_current_dest_state);
is_stuttering_transition_ = (kripke_source_condition
......@@ -196,10 +196,10 @@ namespace spot
if (!ta_succ_it_->done())
{
current_state_ = new state_ta_product(ta_succ_it_->current_state(),
current_state_ = new state_ta_product(ta_succ_it_->dst(),
kripke_current_dest_state->clone());
current_acceptance_conditions_
= ta_succ_it_->current_acceptance_conditions();
= ta_succ_it_->acc();
return true;
}
......@@ -215,7 +215,7 @@ namespace spot
}
state_ta_product*
ta_succ_iterator_product::current_state() const
ta_succ_iterator_product::dst() const
{
return current_state_->clone();
}
......@@ -227,13 +227,13 @@ namespace spot
}
bdd
ta_succ_iterator_product::current_condition() const
ta_succ_iterator_product::cond() const
{
return current_condition_;
}
acc_cond::mark_t
ta_succ_iterator_product::current_acceptance_conditions() const
ta_succ_iterator_product::acc() const
{
return current_acceptance_conditions_;
}
......@@ -281,7 +281,7 @@ namespace spot
artificial_initial_state, kripke_init_state_condition);
for (ta_init_it_->first(); !ta_init_it_->done(); ta_init_it_->next())
{
ta_init_states_set.insert(ta_init_it_->current_state());
ta_init_states_set.insert(ta_init_it_->dst());
}
delete ta_init_it_;
......@@ -444,7 +444,7 @@ namespace spot
return;
}
kripke_current_dest_state = kripke_succ_it_->current_state();
kripke_current_dest_state = kripke_succ_it_->dst();
bdd kripke_current_dest_condition = kripke_->state_condition(
kripke_current_dest_state);
......
......@@ -88,12 +88,12 @@ namespace spot
// inspection
state_ta_product*
current_state() const;
dst() const;
bdd
current_condition() const;
cond() const;
acc_cond::mark_t
current_acceptance_conditions() const;
acc() const;
/// \brief Return true if the changeset of the current transition is empty
bool
......
......@@ -162,7 +162,7 @@ namespace spot
return;
}
kripke_current_dest_state = kripke_succ_it_->current_state();
kripke_current_dest_state = kripke_succ_it_->dst();
bdd kripke_current_dest_condition = kripke_->state_condition(
kripke_current_dest_state);
......@@ -205,9 +205,9 @@ namespace spot
{
current_state_ = new (pool_->allocate()) state_product(
kripke_current_dest_state->clone(),
tgta_succ_it_->current_state(), pool_);
tgta_succ_it_->dst(), pool_);
current_acceptance_conditions_
= tgta_succ_it_->current_acceptance_conditions();
= tgta_succ_it_->acc();
return true;
}
......@@ -231,21 +231,21 @@ namespace spot
}
state_product*
tgta_succ_iterator_product::current_state() const
tgta_succ_iterator_product::dst() const
{
trace
<< "*** current_state() .... if(done()) = ***" << done() << std::endl;
<< "*** dst() .... if(done()) = ***" << done() << std::endl;
return current_state_->clone();
}
bdd
tgta_succ_iterator_product::current_condition() const
tgta_succ_iterator_product::cond() const
{
return current_condition_;
}
acc_cond::mark_t
tgta_succ_iterator_product::current_acceptance_conditions() const
tgta_succ_iterator_product::acc() const
{
return current_acceptance_conditions_;
}
......
......@@ -67,12 +67,12 @@ namespace spot
// inspection
state_product*
current_state() const;
dst() const;
bdd
current_condition() const;
cond() const;
acc_cond::mark_t
current_acceptance_conditions() const;
acc() const;
private:
//@{
......
......@@ -203,8 +203,8 @@ namespace spot
bdd_dict_ptr d = t_automata_->get_dict();
std::string label =
((in == 1 && artificial_initial_state_)
? bdd_format_formula(d, si->current_condition())
: bdd_format_accset(d, si->current_condition()));
? bdd_format_formula(d, si->cond())
: bdd_format_accset(d, si->cond()));
if (label.empty())
label = "{}";
......@@ -213,7 +213,7 @@ namespace spot
{
label += "\n";
label += t_automata_->acc().
format(si->current_acceptance_conditions());
format(si->acc());
}
os_ << " " << in << " -> " << out << " [label=\"";
......
......@@ -101,7 +101,7 @@ namespace spot
{
state_ta_product* init = new state_ta_product(
(ta_init_it_->current_state()), kripke_init_state->clone());
(ta_init_it_->dst()), kripke_init_state->clone());
if (!h.emplace(init, num + 1).second)
{
......@@ -188,9 +188,9 @@ namespace spot
inc_transitions();
trace << "PASS 1: transition\n";
// Fetch the values destination state we are interested in...
state* dest = succ->current_state();
state* dest = succ->dst();
auto acc_cond = succ->current_acceptance_conditions();
auto acc_cond = succ->acc();
bool curr_is_livelock_hole_state_in_ta_component =
(a_->is_hole_state_in_ta_component(curr))
......@@ -472,7 +472,7 @@ namespace spot
inc_transitions();
trace << "PASS 2 : transition\n";
// Fetch the values destination state we are interested in...
state* dest = succ->current_state();
state* dest = succ->dst();
bool is_stuttering_transition = succ->is_stuttering_transition();
// ... and point the iterator to the next successor, for
......
......@@ -138,7 +138,7 @@ namespace spot
for (succit->first(); !succit->done(); succit->next())
{
const state* dst = succit->current_state();
const state* dst = succit->dst();
hash_map::const_iterator i = state_num.find(dst);
if (i == state_num.end()) // Ignore useless destinations.
......@@ -175,8 +175,8 @@ namespace spot
result->add_to_initial_states_set(new_dst);
result->create_transition
(ta_src, succit->current_condition(),
succit->current_acceptance_conditions(),
(ta_src, succit->cond(),
succit->acc(),
ta_dst);
}
delete succit;
......@@ -390,24 +390,24 @@ namespace spot
trace << "+src: " << src << std::endl;
for (si->first(); !si->done(); si->next())
{
const state* dst = si->current_state();
const state* dst = si->dst();
hash_map::const_iterator i = state_set_map.find(dst);
assert(i != state_set_map.end());
auto curacc =
mark_to_bdd(si->current_acceptance_conditions());
mark_to_bdd(si->acc());
f |= (bdd_ithvar(i->second)
& si->current_condition() & curacc);
& si->cond() & curacc);
trace
<< "+f: " << bdd_format_accset(ta_->get_dict(), f)
<< "\n -bdd_ithvar(i->second): "
<< bdd_format_accset(ta_->get_dict(),
bdd_ithvar(i->second))
<< "\n -si->current_condition(): "
<< "\n -si->cond(): "
<< bdd_format_accset(ta_->get_dict(),
si->current_condition())
si->cond())
<< "\n -current_acceptance_conditions: "
<< si->current_acceptance_conditions()
<< si->acc()
<< std::endl;
}
delete si;
......
......@@ -84,7 +84,7 @@ namespace spot
process_state(t, tn);
for (si->first(); !si->done(); si->next())
{
const state* current = si->current_state();
const state* current = si->dst();
seen_map::const_iterator s = seen.find(current);
bool ws = want_state(current);
if (s == seen.end())
......
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