Use clearer names for three methods of spot::scc_info
scc_info::used_acc() and spot::info::used_acc_of() have been renamed to scc_info::marks() and scc_info::marks_of(). scc_info::acc() has been renamed to (the already existing and redundant) scc_info::acc_sets_of(). Old names have been deprecated. * spot/twaalgos/sccinfo.hh, spot/twaalgos/sccinfo.cc: implement it. * spot/twaalgos/dtwasat.cc, spot/twaalgos/isweakscc.cc, spot/twaalgos/remfin.cc, spot/twaalgos/sccfilter.cc: update names. * NEWS: documentate it.
This commit is contained in:
parent
7eb50bc1f8
commit
bd5c6920b1
7 changed files with 56 additions and 27 deletions
26
NEWS
26
NEWS
|
|
@ -9,6 +9,20 @@ New in spot 2.4.0.dev (not yet released)
|
|||
--ms-phi-r=RANGE (FGa{n}&GFb{n})|((FGa{n-1}|GFb{n-1})&(...))
|
||||
--ms-phi-s=RANGE (FGa{n}|GFb{n})&((FGa{n-1}&GFb{n-1})|(...))
|
||||
|
||||
Library:
|
||||
|
||||
- Rename three methods of spot::scc_info. New names are clearer. The
|
||||
old names have been deprecated.
|
||||
|
||||
Deprecation notices:
|
||||
|
||||
(These functions still work but compilers emit warnings.)
|
||||
|
||||
- spot::scc_info::used_acc(), spot::scc_info::used_acc_of() and
|
||||
spot::scc_info::acc() are deprecated. They have been renamed
|
||||
spot::scc_info::marks(), spot::scc_info::marks_of() and
|
||||
spot::scc_info::acc_sets_of() respectively.
|
||||
|
||||
New in spot 2.4 (2017-09-06)
|
||||
|
||||
Build:
|
||||
|
|
@ -285,23 +299,23 @@ New in spot 2.4 (2017-09-06)
|
|||
from 9 to 16 colors. While the first 8 colors are similar, they
|
||||
are a bit more saturated now.
|
||||
|
||||
Deprecation notices:
|
||||
deprecation notices:
|
||||
|
||||
(These functions still work but compilers emit warnings.)
|
||||
(these functions still work but compilers emit warnings.)
|
||||
|
||||
- spot::decompose_strength() is deprecated, it has been renamed
|
||||
to spot::decompose_scc().
|
||||
|
||||
- spot::dtwa_complement() is deprecated. Prefer the more generic
|
||||
- spot::dtwa_complement() is deprecated. prefer the more generic
|
||||
spot::dualize() instead.
|
||||
|
||||
- The spot::twa::prop_deterministic() methods have been renamed to
|
||||
- the spot::twa::prop_deterministic() methods have been renamed to
|
||||
spot::twa::prop_universal() for consistency with the change to
|
||||
is_deterministic() listed above. We have kept
|
||||
is_deterministic() listed above. we have kept
|
||||
spot::twa::prop_deterministic() as a deprecated synonym for
|
||||
spot::twa::prop_universal() to help backward compatibility.
|
||||
|
||||
- The spot::copy() function is deprecated. Use
|
||||
- the spot::copy() function is deprecated. use
|
||||
spot::make_twa_graph() instead.
|
||||
|
||||
New in spot 2.3.5 (2017-06-22)
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ namespace spot
|
|||
d.is_weak_scc = sm.weak_sccs();
|
||||
unsigned scccount = sm.scc_count();
|
||||
{
|
||||
auto tmp = sm.used_acc();
|
||||
auto tmp = sm.marks();
|
||||
d.scc_marks.reserve(scccount);
|
||||
for (auto& v: tmp)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ namespace spot
|
|||
if (map.is_rejecting_scc(scc))
|
||||
return true;
|
||||
// If all transitions use the same acceptance set, the SCC is weak.
|
||||
return map.used_acc_of(scc).size() == 1;
|
||||
return map.marks_of(scc).size() == 1;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -117,7 +117,7 @@ namespace spot
|
|||
|
||||
// If all transitions use all acceptance conditions, the SCC is weak.
|
||||
return (map.is_accepting_scc(scc)
|
||||
&& map.used_acc_of(scc).size() == 1
|
||||
&& map.marks_of(scc).size() == 1
|
||||
&& is_complete_scc(map, scc));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ namespace spot
|
|||
// The main copy is only accepting for inf_alone
|
||||
// and for all Inf sets that have no matching Fin
|
||||
// sets in this SCC.
|
||||
auto scc_pairs = rs_pairs_view(pairs, si.acc(scc));
|
||||
auto scc_pairs = rs_pairs_view(pairs, si.acc_sets_of(scc));
|
||||
auto scc_infs_alone = scc_pairs.infs_alone();
|
||||
|
||||
for (const auto& e: si.edges_of(scc))
|
||||
|
|
@ -676,7 +676,7 @@ namespace spot
|
|||
std::vector<unsigned> state_map(nst);
|
||||
for (unsigned n = 0; n < nscc; ++n)
|
||||
{
|
||||
auto m = si.acc(n);
|
||||
auto m = si.acc_sets_of(n);
|
||||
auto states = si.states_of(n);
|
||||
trace << "SCC #" << n << " uses " << m << '\n';
|
||||
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ namespace spot
|
|||
"generalized Büchi acceptance");
|
||||
|
||||
unsigned scc_count = this->si->scc_count();
|
||||
auto used_acc = this->si->used_acc();
|
||||
auto used_acc = this->si->marks();
|
||||
assert(used_acc.size() == scc_count);
|
||||
strip_.resize(scc_count);
|
||||
std::vector<unsigned> cnt(scc_count); // # of useful sets in each SCC
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ namespace spot
|
|||
}
|
||||
|
||||
|
||||
std::set<acc_cond::mark_t> scc_info::used_acc_of(unsigned scc) const
|
||||
std::set<acc_cond::mark_t> scc_info::marks_of(unsigned scc) const
|
||||
{
|
||||
std::set<acc_cond::mark_t> res;
|
||||
for (auto& t: inner_edges_of(scc))
|
||||
|
|
@ -326,7 +326,7 @@ namespace spot
|
|||
return res;
|
||||
}
|
||||
|
||||
std::vector<std::set<acc_cond::mark_t>> scc_info::used_acc() const
|
||||
std::vector<std::set<acc_cond::mark_t>> scc_info::marks() const
|
||||
{
|
||||
unsigned n = aut_->num_states();
|
||||
std::vector<std::set<acc_cond::mark_t>> result(scc_count());
|
||||
|
|
@ -351,7 +351,7 @@ namespace spot
|
|||
{
|
||||
unsigned n = scc_count();
|
||||
std::vector<bool> result(scc_count());
|
||||
auto acc = used_acc();
|
||||
auto acc = marks();
|
||||
for (unsigned s = 0; s < n; ++s)
|
||||
result[s] = is_rejecting_scc(s) || acc[s].size() == 1;
|
||||
return result;
|
||||
|
|
@ -413,7 +413,8 @@ namespace spot
|
|||
q.pop();
|
||||
|
||||
out << " " << state << " [shape=box,"
|
||||
<< (aut->acc().accepting(m->acc(state)) ? "style=bold," : "")
|
||||
<< (aut->acc().accepting(m->acc_sets_of(state)) ?
|
||||
"style=bold," : "")
|
||||
<< "label=\"" << state;
|
||||
{
|
||||
size_t n = m->states_of(state).size();
|
||||
|
|
|
|||
|
|
@ -476,9 +476,10 @@ namespace spot
|
|||
return node(scc).is_trivial();
|
||||
}
|
||||
|
||||
SPOT_DEPRECATED("use acc_sets_of() instead")
|
||||
acc_cond::mark_t acc(unsigned scc) const
|
||||
{
|
||||
return node(scc).acc_marks();
|
||||
return acc_sets_of(scc);
|
||||
}
|
||||
|
||||
bool is_accepting_scc(unsigned scc) const
|
||||
|
|
@ -505,20 +506,33 @@ namespace spot
|
|||
return reachable_state(st) && node(scc_of(st)).is_useful();
|
||||
}
|
||||
|
||||
/// \brief Return the set of all used acceptance combinations, for
|
||||
/// each accepting SCC.
|
||||
std::vector<std::set<acc_cond::mark_t>> used_acc() const;
|
||||
/// \brief Returns, for each accepting SCC, the set of all marks appearing
|
||||
/// in it.
|
||||
std::vector<std::set<acc_cond::mark_t>> marks() const;
|
||||
std::set<acc_cond::mark_t> marks_of(unsigned scc) const;
|
||||
|
||||
std::set<acc_cond::mark_t> used_acc_of(unsigned scc) const;
|
||||
|
||||
/// sets that contain at least one transition of the SCC
|
||||
acc_cond::mark_t acc_sets_of(unsigned scc) const
|
||||
// Same as above, with old names.
|
||||
SPOT_DEPRECATED("use marks() instead")
|
||||
std::vector<std::set<acc_cond::mark_t>> used_acc() const
|
||||
{
|
||||
// FIXME: Why do we have two name for this method?
|
||||
return acc(scc);
|
||||
return marks();
|
||||
}
|
||||
SPOT_DEPRECATED("use marks_of() instead")
|
||||
std::set<acc_cond::mark_t> used_acc_of(unsigned scc) const
|
||||
{
|
||||
return marks_of(scc);
|
||||
}
|
||||
|
||||
/// sets that contain the entire SCC
|
||||
/// \brief Returns, for a given SCC, the set of all colors appearing in it.
|
||||
/// It is the set of colors that appear in some mark among those returned by
|
||||
/// marks_of().
|
||||
acc_cond::mark_t acc_sets_of(unsigned scc) const
|
||||
{
|
||||
return node(scc).acc_marks();
|
||||
}
|
||||
|
||||
/// Returns, for a given SCC, the set of colors that appear on all of its
|
||||
/// transitions.
|
||||
acc_cond::mark_t common_sets_of(unsigned scc) const
|
||||
{
|
||||
return node(scc).common_marks();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue