sccinfo: stop keeping track of conditions between SCCs
They are unused. * src/twaalgos/sccinfo.cc, src/twaalgos/sccinfo.hh: Do not keep track of conditions between two SCCs. * src/twaalgos/minimize.cc, src/twaalgos/ltl2tgba_fm.cc: Adjust.
This commit is contained in:
parent
e540eaeee1
commit
c8cf86b081
4 changed files with 14 additions and 37 deletions
|
|
@ -1198,8 +1198,8 @@ namespace spot
|
||||||
if (!coacc)
|
if (!coacc)
|
||||||
{
|
{
|
||||||
// ... or if any of its successors is coaccessible.
|
// ... or if any of its successors is coaccessible.
|
||||||
for (auto& i: sm->succ(n))
|
for (unsigned i: sm->succ(n))
|
||||||
if (coaccessible[i.dst])
|
if (coaccessible[i])
|
||||||
{
|
{
|
||||||
coacc = true;
|
coacc = true;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -545,10 +545,10 @@ namespace spot
|
||||||
// Also SCCs are useless if all their successor are
|
// Also SCCs are useless if all their successor are
|
||||||
// useless.
|
// useless.
|
||||||
unsigned l = k;
|
unsigned l = k;
|
||||||
for (auto& j: succ)
|
for (unsigned j: succ)
|
||||||
{
|
{
|
||||||
is_useless &= useless[j.dst];
|
is_useless &= useless[j];
|
||||||
unsigned dj = d[j.dst];
|
unsigned dj = d[j];
|
||||||
if (dj < l)
|
if (dj < l)
|
||||||
l = dj;
|
l = dj;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ namespace spot
|
||||||
// Record the transition between the SCC being popped
|
// Record the transition between the SCC being popped
|
||||||
// and the previous SCC.
|
// and the previous SCC.
|
||||||
if (!root_.empty())
|
if (!root_.empty())
|
||||||
root_.front().node.succ_.emplace_back(cond, num);
|
root_.front().node.succ_.emplace_back(num);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -162,15 +162,10 @@ namespace spot
|
||||||
// Record that there is a transition from this SCC to the
|
// Record that there is a transition from this SCC to the
|
||||||
// dest SCC labelled with cond.
|
// dest SCC labelled with cond.
|
||||||
auto& succ = root_.front().node.succ_;
|
auto& succ = root_.front().node.succ_;
|
||||||
scc_succs::iterator i = std::find_if(succ.begin(), succ.end(),
|
scc_succs::iterator i =
|
||||||
[spi](const scc_trans& x) {
|
std::find(succ.begin(), succ.end(), (unsigned) spi);
|
||||||
return (x.dst ==
|
|
||||||
(unsigned) spi);
|
|
||||||
});
|
|
||||||
if (i == succ.end())
|
if (i == succ.end())
|
||||||
succ.emplace_back(cond, spi);
|
succ.emplace_back(spi);
|
||||||
else
|
|
||||||
i->cond |= cond;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -243,8 +238,8 @@ namespace spot
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
node_[i].useful_ = false;
|
node_[i].useful_ = false;
|
||||||
for (auto j: node_[i].succ())
|
for (unsigned j: node_[i].succ())
|
||||||
if (node_[j.dst].is_useful())
|
if (node_[j].is_useful())
|
||||||
{
|
{
|
||||||
node_[i].useful_ = true;
|
node_[i].useful_ = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -358,19 +353,11 @@ namespace spot
|
||||||
}
|
}
|
||||||
out << "\"]\n";
|
out << "\"]\n";
|
||||||
|
|
||||||
for (auto& i: m->succ(state))
|
for (unsigned dest: m->succ(state))
|
||||||
{
|
{
|
||||||
int dest = i.dst;
|
out << " " << state << " -> " << dest << '\n';
|
||||||
bdd label = i.cond;
|
|
||||||
|
|
||||||
out << " " << state << " -> " << dest
|
|
||||||
<< " [label=\"";
|
|
||||||
escape_str(out, bdd_format_formula(aut->get_dict(), label));
|
|
||||||
out << "\"]\n";
|
|
||||||
|
|
||||||
if (seen[dest])
|
if (seen[dest])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
seen[dest] = true;
|
seen[dest] = true;
|
||||||
q.push(dest);
|
q.push(dest);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,17 +27,7 @@ namespace spot
|
||||||
class SPOT_API scc_info
|
class SPOT_API scc_info
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct scc_trans
|
typedef std::vector<unsigned> scc_succs;
|
||||||
{
|
|
||||||
scc_trans(bdd cond, unsigned dst)
|
|
||||||
: cond(cond), dst(dst)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
bdd cond;
|
|
||||||
unsigned dst;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef std::vector<scc_trans> scc_succs;
|
|
||||||
|
|
||||||
class scc_node
|
class scc_node
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue