Update merge_states
Current implementation of merge_states fails on certain self-loops. Updated implementation to take them into account and use a hashbased implementation to speed up calculations. Moreover, merge_states() is now aware of "state-player", just like defrag_states_ * spot/twa/twagraph.cc: Here * spot/twaalgos/game.cc: Fix odd cycle for sink * spot/twaalgos/synthesis.cc: Adapt split_det pipeline * tests/python/_synthesis.ipynb: Tests
This commit is contained in:
parent
a211bace68
commit
dfb75632ba
4 changed files with 4919 additions and 53 deletions
|
|
@ -896,10 +896,19 @@ namespace spot
|
|||
arena->new_edge(sink_con, sink_env, bddtrue, um.second);
|
||||
arena->new_edge(sink_env, sink_con, bddtrue, um.second);
|
||||
}
|
||||
arena->new_edge(src, sink_con, missing, um.second);
|
||||
arena->new_edge(src, sink_env, missing, um.second);
|
||||
assert(owner->at(src) != owner->at(sink_env));
|
||||
}
|
||||
}
|
||||
|
||||
assert([&]()
|
||||
{
|
||||
for (const auto& e : arena->edges())
|
||||
if (owner->at(e.src) == owner->at(e.dst))
|
||||
return false;
|
||||
return true;
|
||||
}() && "Not alternating");
|
||||
|
||||
arena->set_named_prop("state-player", owner);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -958,6 +958,10 @@ namespace spot
|
|||
*vs << "determinization done\nDPA has "
|
||||
<< dpa->num_states() << " states, "
|
||||
<< dpa->num_sets() << " colors\n";
|
||||
// The named property "state-player" is set in split_2step
|
||||
// but not propagated by ntgba2dpa
|
||||
alternate_players(dpa);
|
||||
// Merge states knows about players
|
||||
dpa->merge_states();
|
||||
if (bv)
|
||||
bv->paritize_time += sw.stop();
|
||||
|
|
@ -966,9 +970,6 @@ namespace spot
|
|||
<< dpa->num_states() << " states\n"
|
||||
<< "determinization and simplification took "
|
||||
<< bv->paritize_time << " seconds\n";
|
||||
// The named property "state-player" is set in split_2step
|
||||
// but not propagated by ntgba2dpa
|
||||
alternate_players(dpa);
|
||||
break;
|
||||
}
|
||||
case algo::ACD:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue