Perform WDBA minimization before degeneralization.
There is no point in degeneralizing an automaton if it can be WDBA minimized. Doing so will only augment the number of states and slow down the powerset construction used by the WDBA minimization. * src/tgbatest/babiak.test: New file. It includes 5 formulae which Tomáš Babiak reported Spot 0.7.1 would take over one hour to translate if degeneralization and WDBA minimization were both requested. * src/tgbatest/Makefile.am (TESTS): Add it. * src/tgbatest/ltl2tgba.cc: Do WDBA minimization before degeneralization. The above formulae are now all translated in a few seconds.
This commit is contained in:
parent
9679032510
commit
e531da8d92
4 changed files with 160 additions and 21 deletions
|
|
@ -934,27 +934,6 @@ main(int argc, char** argv)
|
|||
const spot::tgba_tba_proxy* degeneralized = 0;
|
||||
const spot::tgba_sgba_proxy* state_labeled = 0;
|
||||
|
||||
unsigned int n_acc = a->number_of_acceptance_conditions();
|
||||
if (echeck_inst
|
||||
&& degeneralize_opt == NoDegen
|
||||
&& n_acc > 1
|
||||
&& echeck_inst->max_acceptance_conditions() < n_acc)
|
||||
degeneralize_opt = DegenTBA;
|
||||
|
||||
if (degeneralize_opt == DegenTBA)
|
||||
{
|
||||
a = degeneralized = new spot::tgba_tba_proxy(a);
|
||||
}
|
||||
else if (degeneralize_opt == DegenSBA)
|
||||
{
|
||||
a = degeneralized = new spot::tgba_sba_proxy(a);
|
||||
assume_sba = true;
|
||||
}
|
||||
else if (labeling_opt == StateLabeled)
|
||||
{
|
||||
a = state_labeled = new spot::tgba_sgba_proxy(a);
|
||||
}
|
||||
|
||||
const spot::tgba* minimized = 0;
|
||||
if (opt_minimize)
|
||||
{
|
||||
|
|
@ -983,6 +962,33 @@ main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
unsigned int n_acc = a->number_of_acceptance_conditions();
|
||||
if (echeck_inst
|
||||
&& degeneralize_opt == NoDegen
|
||||
&& n_acc > 1
|
||||
&& echeck_inst->max_acceptance_conditions() < n_acc)
|
||||
{
|
||||
degeneralize_opt = DegenTBA;
|
||||
assume_sba = false;
|
||||
}
|
||||
|
||||
if (!assume_sba && !opt_monitor)
|
||||
{
|
||||
if (degeneralize_opt == DegenTBA)
|
||||
{
|
||||
a = degeneralized = new spot::tgba_tba_proxy(a);
|
||||
}
|
||||
else if (degeneralize_opt == DegenSBA)
|
||||
{
|
||||
a = degeneralized = new spot::tgba_sba_proxy(a);
|
||||
assume_sba = true;
|
||||
}
|
||||
else if (labeling_opt == StateLabeled)
|
||||
{
|
||||
a = state_labeled = new spot::tgba_sgba_proxy(a);
|
||||
}
|
||||
}
|
||||
|
||||
if (opt_monitor)
|
||||
{
|
||||
tm.start("Monitor minimization");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue