Commit 81af8359 authored by Alexandre GBAGUIDI AISSE's avatar Alexandre GBAGUIDI AISSE
Browse files

twaalgos/cobuchi: Optimize aug. subset construction when aut. is det

* spot/twaalgos/cobuchi.cc: Avoid the product of an automaton A and its
power construction Pow(A) when A is deterministic.
parent ebe3a15d
......@@ -32,7 +32,6 @@
#include <spot/twaalgos/isdet.hh>
#include <spot/twaalgos/strength.hh>
#include <spot/twaalgos/sbacc.hh> // For issue #317
#include <stack>
#include <unordered_map>
......@@ -69,7 +68,22 @@ namespace spot
bool named_states,
struct power_map& pmap)
{
twa_graph_ptr res = product(aut_prod, tgba_powerset(aut_power, pmap));
twa_graph_ptr res = nullptr;
if (is_deterministic(aut_prod))
{
res = make_twa_graph(aut_prod, twa::prop_set::all());
auto v = new product_states;
res->set_named_prop("product-states", v);
for (unsigned s = 0; s < aut_power->num_states(); ++s)
v->emplace_back(s, s);
for (unsigned s = 0; s < aut_power->num_states(); ++s)
pmap.map_.push_back({s});
}
else
{
res = product(aut_prod, tgba_powerset(aut_power, pmap));
}
if (named_states)
{
......
Supports Markdown
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