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.
This commit is contained in:
parent
1b5b9e4a65
commit
f6af2a84cb
46 changed files with 203 additions and 197 deletions
|
|
@ -77,13 +77,13 @@ namespace spot
|
|||
todo.pop_front();
|
||||
for (auto i: a_->succ(src))
|
||||
{
|
||||
const state* dest = filter(i->current_state());
|
||||
const state* dest = filter(i->dst());
|
||||
|
||||
if (!dest)
|
||||
continue;
|
||||
|
||||
bdd cond = i->current_condition();
|
||||
acc_cond::mark_t acc = i->current_acceptance_conditions();
|
||||
bdd cond = i->cond();
|
||||
acc_cond::mark_t acc = i->acc();
|
||||
twa_run::step s = { src, cond, acc };
|
||||
|
||||
if (match(s, dest))
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace spot
|
|||
/// bfs_steps does not do handle the memory for the states it
|
||||
/// generates, this is the job of filter(). Here \a s is a new
|
||||
/// state* that search() has just allocated (using
|
||||
/// twa_succ_iterator::current_state()), and the return of this
|
||||
/// twa_succ_iterator::dst()), and the return of this
|
||||
/// function should be a state* that does not need to be freed by
|
||||
/// search().
|
||||
///
|
||||
|
|
|
|||
|
|
@ -195,8 +195,8 @@ namespace spot
|
|||
|
||||
for (auto li: left->succ(ls))
|
||||
{
|
||||
state_pair d(li->current_state(), ris);
|
||||
bdd lc = li->current_condition();
|
||||
state_pair d(li->dst(), ris);
|
||||
bdd lc = li->cond();
|
||||
|
||||
twa_succ_iterator* ri = nullptr;
|
||||
// Should we reset the right automaton?
|
||||
|
|
@ -222,15 +222,15 @@ namespace spot
|
|||
acc_cond::mark_t racc = radd;
|
||||
if (ri)
|
||||
{
|
||||
cond = lc & ri->current_condition();
|
||||
cond = lc & ri->cond();
|
||||
// Skip incompatible edges.
|
||||
if (cond == bddfalse)
|
||||
{
|
||||
ri->next();
|
||||
continue;
|
||||
}
|
||||
d.second = ri->current_state();
|
||||
racc = ri->current_acceptance_conditions();
|
||||
d.second = ri->dst();
|
||||
racc = ri->acc();
|
||||
}
|
||||
|
||||
int dest;
|
||||
|
|
@ -247,7 +247,7 @@ namespace spot
|
|||
}
|
||||
|
||||
acc_cond::mark_t a =
|
||||
res->acc().join(la, li->current_acceptance_conditions(),
|
||||
res->acc().join(la, li->acc(),
|
||||
ra, racc);
|
||||
res->new_edge(src, dest, bdd_exist(cond, v), a);
|
||||
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ namespace spot
|
|||
const twa_succ_iterator* si)
|
||||
{
|
||||
out_->new_edge
|
||||
(in - 1, out - 1, si->current_condition(),
|
||||
si->current_acceptance_conditions());
|
||||
(in - 1, out - 1, si->cond(),
|
||||
si->acc());
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -548,11 +548,11 @@ namespace spot
|
|||
if (j->first())
|
||||
do
|
||||
{
|
||||
if (j->current_condition() != label
|
||||
|| j->current_acceptance_conditions() != acc)
|
||||
if (j->cond() != label
|
||||
|| j->acc() != acc)
|
||||
continue;
|
||||
|
||||
const state* s2 = j->current_state();
|
||||
const state* s2 = j->dst();
|
||||
if (s2->compare(next))
|
||||
{
|
||||
s2->destroy();
|
||||
|
|
@ -579,15 +579,15 @@ namespace spot
|
|||
if (j->first())
|
||||
do
|
||||
{
|
||||
const state* s2 = j->current_state();
|
||||
const state* s2 = j->dst();
|
||||
os << " *";
|
||||
print_annotation(os, aut, j);
|
||||
os << " label="
|
||||
<< bdd_format_formula(aut->get_dict(),
|
||||
j->current_condition())
|
||||
j->cond())
|
||||
<< " and acc="
|
||||
<< (aut->acc().format
|
||||
(j->current_acceptance_conditions()))
|
||||
(j->acc()))
|
||||
<< " going to " << aut->format_state(s2) << '\n';
|
||||
s2->destroy();
|
||||
}
|
||||
|
|
@ -717,11 +717,11 @@ namespace spot
|
|||
const state* the_next = nullptr;
|
||||
for (auto j: aut->succ(s))
|
||||
{
|
||||
if (j->current_condition() != label
|
||||
|| j->current_acceptance_conditions() != acc)
|
||||
if (j->cond() != label
|
||||
|| j->acc() != acc)
|
||||
continue;
|
||||
|
||||
const state* s2 = j->current_state();
|
||||
const state* s2 = j->dst();
|
||||
if (s2->compare(next) == 0)
|
||||
{
|
||||
the_next = s2;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ namespace spot
|
|||
{
|
||||
inc_transitions();
|
||||
|
||||
state* s = i->current_state();
|
||||
state* s = i->dst();
|
||||
auto j = ecs_->h.find(s);
|
||||
assert(j != ecs_->h.end());
|
||||
s->destroy();
|
||||
|
|
@ -215,8 +215,8 @@ namespace spot
|
|||
inc_transitions();
|
||||
// Fetch the values (destination state, acceptance conditions
|
||||
// of the arc) we are interested in...
|
||||
const state* dest = succ->current_state();
|
||||
acc_cond::mark_t acc = succ->current_acceptance_conditions();
|
||||
const state* dest = succ->dst();
|
||||
acc_cond::mark_t acc = succ->acc();
|
||||
// ... and point the iterator to the next successor, for
|
||||
// the next iteration.
|
||||
succ->next();
|
||||
|
|
@ -319,8 +319,8 @@ namespace spot
|
|||
{
|
||||
for (auto iter: shy->ecs_->aut->succ(s))
|
||||
{
|
||||
q.emplace_back(iter->current_acceptance_conditions(),
|
||||
iter->current_state());
|
||||
q.emplace_back(iter->acc(),
|
||||
iter->dst());
|
||||
shy->inc_depth();
|
||||
shy->inc_transitions();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,9 +120,9 @@ namespace spot
|
|||
}
|
||||
else
|
||||
{
|
||||
const state* s_prime = iter->current_state();
|
||||
const state* s_prime = iter->dst();
|
||||
bool acc =
|
||||
a_->acc().accepting(iter->current_acceptance_conditions());
|
||||
a_->acc().accepting(iter->acc());
|
||||
inc_transitions();
|
||||
|
||||
trace << " Next successor: s_prime = "
|
||||
|
|
@ -312,8 +312,8 @@ namespace spot
|
|||
twa_run::step st =
|
||||
{
|
||||
data.stack[father].s->clone(),
|
||||
data.stack[father].lasttr->current_condition(),
|
||||
data.stack[father].lasttr->current_acceptance_conditions()
|
||||
data.stack[father].lasttr->cond(),
|
||||
data.stack[father].lasttr->acc()
|
||||
};
|
||||
res->prefix.push_front(st);
|
||||
father = data.stack[father].pre;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace spot
|
|||
twa_succ_iterator* it = aut_->succ_iter(s);
|
||||
if (!it->first())
|
||||
return {};
|
||||
auto res = it->current_acceptance_conditions();
|
||||
auto res = it->acc();
|
||||
aut_->release_iter(it);
|
||||
return res;
|
||||
}
|
||||
|
|
@ -98,11 +98,11 @@ namespace spot
|
|||
body_ << out - 1 << ' ';
|
||||
if (!sba_format_)
|
||||
{
|
||||
for (auto s: aut_->acc().sets(si->current_acceptance_conditions()))
|
||||
for (auto s: aut_->acc().sets(si->acc()))
|
||||
body_ << s << ' ';
|
||||
body_ << "-1 ";
|
||||
}
|
||||
print_lbt_ltl(body_, bdd_to_formula(si->current_condition(),
|
||||
print_lbt_ltl(body_, bdd_to_formula(si->cond(),
|
||||
aut_->get_dict())) << '\n';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1234,8 +1234,8 @@ namespace spot
|
|||
return res;
|
||||
for (auto i: aut->succ(st))
|
||||
{
|
||||
bdd label = i->current_condition();
|
||||
state* s = i->current_state();
|
||||
bdd label = i->cond();
|
||||
state* s = i->dst();
|
||||
formula dest =
|
||||
namer->get_name(aut->state_number(s));
|
||||
|
||||
|
|
@ -1279,8 +1279,8 @@ namespace spot
|
|||
|
||||
for (auto i: aut->succ(st))
|
||||
{
|
||||
bdd label = i->current_condition();
|
||||
state* s = i->current_state();
|
||||
bdd label = i->cond();
|
||||
state* s = i->dst();
|
||||
formula dest = namer->get_name(aut->state_number(s));
|
||||
|
||||
missing -= label;
|
||||
|
|
|
|||
|
|
@ -186,11 +186,11 @@ namespace spot
|
|||
trace << "DFS_BLUE treats: " << a_->format_state(f.s) << std::endl;
|
||||
if (!f.it->done())
|
||||
{
|
||||
const state *s_prime = f.it->current_state();
|
||||
const state *s_prime = f.it->dst();
|
||||
trace << " Visit the successor: "
|
||||
<< a_->format_state(s_prime) << std::endl;
|
||||
bdd label = f.it->current_condition();
|
||||
auto acc = f.it->current_acceptance_conditions();
|
||||
bdd label = f.it->cond();
|
||||
auto acc = f.it->acc();
|
||||
// Go down the edge (f.s, <label, acc>, s_prime)
|
||||
f.it->next();
|
||||
inc_transitions();
|
||||
|
|
@ -273,11 +273,11 @@ namespace spot
|
|||
trace << "DFS_RED treats: " << a_->format_state(f.s) << std::endl;
|
||||
if (!f.it->done())
|
||||
{
|
||||
const state *s_prime = f.it->current_state();
|
||||
const state *s_prime = f.it->dst();
|
||||
trace << " Visit the successor: "
|
||||
<< a_->format_state(s_prime) << std::endl;
|
||||
bdd label = f.it->current_condition();
|
||||
auto acc = f.it->current_acceptance_conditions();
|
||||
bdd label = f.it->cond();
|
||||
auto acc = f.it->acc();
|
||||
// Go down the edge (f.s, <label, acc>, s_prime)
|
||||
f.it->next();
|
||||
inc_transitions();
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ namespace spot
|
|||
|
||||
for (auto sit: a->succ(src))
|
||||
{
|
||||
const state* dst = sit->current_state();
|
||||
const state* dst = sit->dst();
|
||||
// Is it a new state ?
|
||||
if (seen->find(dst) == seen->end())
|
||||
{
|
||||
|
|
@ -156,13 +156,13 @@ namespace spot
|
|||
// Connect it to all destinations.
|
||||
for (auto succit: a->succ(src))
|
||||
{
|
||||
const state* dst = succit->current_state();
|
||||
const state* dst = succit->dst();
|
||||
hash_map::const_iterator i = state_num.find(dst);
|
||||
dst->destroy();
|
||||
if (i == state_num.end()) // Ignore useless destinations.
|
||||
continue;
|
||||
res->new_acc_edge(src_num, i->second,
|
||||
succit->current_condition(), accepting);
|
||||
succit->cond(), accepting);
|
||||
}
|
||||
}
|
||||
res->merge_edges();
|
||||
|
|
@ -354,7 +354,7 @@ namespace spot
|
|||
bdd f = bddfalse;
|
||||
for (auto si: det_a->succ(src))
|
||||
{
|
||||
const state* dst = si->current_state();
|
||||
const state* dst = si->dst();
|
||||
hash_map::const_iterator i = state_set_map.find(dst);
|
||||
dst->destroy();
|
||||
if (i == state_set_map.end())
|
||||
|
|
@ -365,7 +365,7 @@ namespace spot
|
|||
// want to ignore some useless states). Simply
|
||||
// ignore these states here.
|
||||
continue;
|
||||
f |= (bdd_ithvar(i->second) & si->current_condition());
|
||||
f |= (bdd_ithvar(i->second) & si->cond());
|
||||
}
|
||||
|
||||
// Have we already seen this formula ?
|
||||
|
|
|
|||
|
|
@ -272,11 +272,11 @@ namespace spot
|
|||
<< std::endl;
|
||||
if (!f.it->done())
|
||||
{
|
||||
const state *s_prime = f.it->current_state();
|
||||
const state *s_prime = f.it->dst();
|
||||
ndfsr_trace << " Visit the successor: "
|
||||
<< a_->format_state(s_prime) << std::endl;
|
||||
bdd label = f.it->current_condition();
|
||||
auto acc = f.it->current_acceptance_conditions();
|
||||
bdd label = f.it->cond();
|
||||
auto acc = f.it->acc();
|
||||
f.it->next();
|
||||
if (h_.has_been_visited(s_prime))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace spot
|
|||
if (si->first())
|
||||
do
|
||||
{
|
||||
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())
|
||||
|
|
@ -202,7 +202,7 @@ namespace spot
|
|||
continue;
|
||||
}
|
||||
|
||||
dst = si->current_state();
|
||||
dst = si->dst();
|
||||
auto res = seen.emplace(dst, n);
|
||||
if (!res.second)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -183,11 +183,11 @@ namespace spot
|
|||
trace << "DFS_BLUE treats: " << a_->format_state(f.s) << std::endl;
|
||||
if (!f.it->done())
|
||||
{
|
||||
const state *s_prime = f.it->current_state();
|
||||
const state *s_prime = f.it->dst();
|
||||
trace << " Visit the successor: "
|
||||
<< a_->format_state(s_prime) << std::endl;
|
||||
bdd label = f.it->current_condition();
|
||||
auto acc = f.it->current_acceptance_conditions();
|
||||
bdd label = f.it->cond();
|
||||
auto acc = f.it->acc();
|
||||
// Go down the edge (f.s, <label, acc>, s_prime)
|
||||
f.it->next();
|
||||
inc_transitions();
|
||||
|
|
@ -274,11 +274,11 @@ namespace spot
|
|||
trace << "DFS_RED treats: " << a_->format_state(f.s) << std::endl;
|
||||
if (!f.it->done())
|
||||
{
|
||||
const state *s_prime = f.it->current_state();
|
||||
const state *s_prime = f.it->dst();
|
||||
trace << " Visit the successor: "
|
||||
<< a_->format_state(s_prime) << std::endl;
|
||||
bdd label = f.it->current_condition();
|
||||
auto acc = f.it->current_acceptance_conditions();
|
||||
bdd label = f.it->cond();
|
||||
auto acc = f.it->acc();
|
||||
// Go down the edge (f.s, <label, acc>, s_prime)
|
||||
f.it->next();
|
||||
inc_transitions();
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ namespace spot
|
|||
{
|
||||
++s_.edges;
|
||||
|
||||
bdd cond = it->current_condition();
|
||||
bdd cond = it->cond();
|
||||
bdd newvars = bdd_exist(bdd_support(cond), seen_);
|
||||
if (newvars != bddtrue)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ namespace spot
|
|||
need_loop_ = true;
|
||||
if (it_->first())
|
||||
{
|
||||
cond_ = it_->current_condition();
|
||||
cond_ = it_->cond();
|
||||
next_edge();
|
||||
}
|
||||
return true;
|
||||
|
|
@ -142,7 +142,7 @@ namespace spot
|
|||
}
|
||||
else
|
||||
{
|
||||
cond_ = it_->current_condition();
|
||||
cond_ = it_->cond();
|
||||
next_edge();
|
||||
return true;
|
||||
}
|
||||
|
|
@ -157,15 +157,15 @@ namespace spot
|
|||
// inspection
|
||||
|
||||
state_tgbasl*
|
||||
current_state() const
|
||||
dst() const
|
||||
{
|
||||
if (loop_)
|
||||
return new state_tgbasl(state_->real_state(), state_->cond());
|
||||
return new state_tgbasl(it_->current_state(), one_);
|
||||
return new state_tgbasl(it_->dst(), one_);
|
||||
}
|
||||
|
||||
bdd
|
||||
current_condition() const
|
||||
cond() const
|
||||
{
|
||||
if (loop_)
|
||||
return state_->cond();
|
||||
|
|
@ -173,11 +173,11 @@ namespace spot
|
|||
}
|
||||
|
||||
acc_cond::mark_t
|
||||
current_acceptance_conditions() const
|
||||
acc() const
|
||||
{
|
||||
if (loop_)
|
||||
return 0U;
|
||||
return it_->current_acceptance_conditions();
|
||||
return it_->acc();
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
@ -187,7 +187,7 @@ namespace spot
|
|||
one_ = bdd_satoneset(cond_, aps_, bddtrue);
|
||||
cond_ -= one_;
|
||||
if (need_loop_ && (state_->cond() == one_)
|
||||
&& (state_ == it_->current_state()))
|
||||
&& (state_ == it_->dst()))
|
||||
need_loop_ = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,11 +156,11 @@ namespace spot
|
|||
trace << "DFS_BLUE treats: " << a_->format_state(f.s) << std::endl;
|
||||
if (!f.it->done())
|
||||
{
|
||||
const state *s_prime = f.it->current_state();
|
||||
const state *s_prime = f.it->dst();
|
||||
trace << " Visit the successor: "
|
||||
<< a_->format_state(s_prime) << std::endl;
|
||||
bdd label = f.it->current_condition();
|
||||
auto acc = f.it->current_acceptance_conditions();
|
||||
bdd label = f.it->cond();
|
||||
auto acc = f.it->acc();
|
||||
// Go down the edge (f.s, <label, acc>, s_prime)
|
||||
f.it->next();
|
||||
inc_transitions();
|
||||
|
|
@ -190,12 +190,12 @@ namespace spot
|
|||
for (auto i: a_->succ(f.s))
|
||||
{
|
||||
inc_transitions();
|
||||
const state *s_prime = i->current_state();
|
||||
const state *s_prime = i->dst();
|
||||
trace << "DFS_BLUE rescanning the arc from "
|
||||
<< a_->format_state(f.s) << " to "
|
||||
<< a_->format_state(s_prime) << std::endl;
|
||||
bdd label = i->current_condition();
|
||||
auto acc = i->current_acceptance_conditions();
|
||||
bdd label = i->cond();
|
||||
auto acc = i->acc();
|
||||
typename heap::color_ref c_prime = h.get_color_ref(s_prime);
|
||||
assert(!c_prime.is_white());
|
||||
auto acu = acc | c.get_acc();
|
||||
|
|
@ -236,11 +236,11 @@ namespace spot
|
|||
trace << "DFS_RED treats: " << a_->format_state(f.s) << std::endl;
|
||||
if (!f.it->done())
|
||||
{
|
||||
const state *s_prime = f.it->current_state();
|
||||
const state *s_prime = f.it->dst();
|
||||
trace << " Visit the successor: "
|
||||
<< a_->format_state(s_prime) << std::endl;
|
||||
bdd label = f.it->current_condition();
|
||||
auto acc = f.it->current_acceptance_conditions();
|
||||
bdd label = f.it->cond();
|
||||
auto acc = f.it->acc();
|
||||
// Go down the edge (f.s, <label, acc>, s_prime)
|
||||
f.it->next();
|
||||
inc_transitions();
|
||||
|
|
|
|||
|
|
@ -196,11 +196,11 @@ namespace spot
|
|||
trace << "DFS_BLUE treats: " << a_->format_state(f.s) << std::endl;
|
||||
if (!f.it->done())
|
||||
{
|
||||
const state *s_prime = f.it->current_state();
|
||||
const state *s_prime = f.it->dst();
|
||||
trace << " Visit the successor: "
|
||||
<< a_->format_state(s_prime) << std::endl;
|
||||
bdd label = f.it->current_condition();
|
||||
auto acc = f.it->current_acceptance_conditions();
|
||||
bdd label = f.it->cond();
|
||||
auto acc = f.it->acc();
|
||||
// Go down the edge (f.s, <label, acc>, s_prime)
|
||||
f.it->next();
|
||||
inc_transitions();
|
||||
|
|
@ -315,11 +315,11 @@ namespace spot
|
|||
trace << "DFS_RED treats: " << a_->format_state(f.s) << std::endl;
|
||||
if (!f.it->done())
|
||||
{
|
||||
const state *s_prime = f.it->current_state();
|
||||
const state *s_prime = f.it->dst();
|
||||
trace << " Visit the successor: "
|
||||
<< a_->format_state(s_prime) << std::endl;
|
||||
bdd label = f.it->current_condition();
|
||||
auto acc = f.it->current_acceptance_conditions();
|
||||
bdd label = f.it->cond();
|
||||
auto acc = f.it->acc();
|
||||
// Go down the edge (f.s, <label, acc>, s_prime)
|
||||
f.it->next();
|
||||
inc_transitions();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue