use reduce_parity in translator and posprocessor
* spot/twaalgos/postproc.cc, spot/twaalgos/translate.cc: Here. * tests/core/genltl.test, tests/core/parity2.test, tests/core/sccsimpl.test, tests/python/twagraph-internals.ipynb: Adjust test cases. * NEWS: Mention it.
This commit is contained in:
parent
ebfa3a377a
commit
eb7b68ad58
7 changed files with 2319 additions and 2034 deletions
|
|
@ -198,8 +198,7 @@ namespace spot
|
|||
tmp = sbacc(tmp);
|
||||
if (want_parity)
|
||||
{
|
||||
if (COLORED_)
|
||||
colorize_parity_here(tmp);
|
||||
reduce_parity_here(tmp, COLORED_);
|
||||
parity_kind kind = parity_kind_any;
|
||||
parity_style style = parity_style_any;
|
||||
if ((type_ & ParityMin) == ParityMin)
|
||||
|
|
@ -241,16 +240,18 @@ namespace spot
|
|||
{
|
||||
if (PREF_ == Any && level_ == Low)
|
||||
return in;
|
||||
if (!(want_parity && in->acc().is_parity()))
|
||||
bool isparity = in->acc().is_parity();
|
||||
if (isparity && in->is_existential()
|
||||
&& (type_ == Generic || want_parity))
|
||||
return reduce_parity(in);
|
||||
if (!(want_parity && isparity))
|
||||
{
|
||||
if (level_ == High)
|
||||
return simplify_acceptance(in);
|
||||
else
|
||||
return cleanup_acceptance(in);
|
||||
}
|
||||
if (level_ == High)
|
||||
return cleanup_parity(in);
|
||||
return in;
|
||||
return cleanup_parity(in);
|
||||
};
|
||||
a = simplify_acc(a);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <spot/twaalgos/isdet.hh>
|
||||
#include <spot/twaalgos/product.hh>
|
||||
#include <spot/twaalgos/sccinfo.hh>
|
||||
#include <spot/twaalgos/hoa.hh>
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
@ -230,7 +231,9 @@ namespace spot
|
|||
om = *opt_;
|
||||
om.set("ltl-split", 0);
|
||||
translator translate_without_split(simpl_, &om);
|
||||
translate_without_split.set_pref(pref_);
|
||||
// Never force colored automata at intermediate steps.
|
||||
// This is best added at the very end.
|
||||
translate_without_split.set_pref(pref_ & ~Colored);
|
||||
translate_without_split.set_level(level_);
|
||||
translate_without_split.set_type(type_);
|
||||
auto transrun = [&](formula f)
|
||||
|
|
@ -302,6 +305,11 @@ namespace spot
|
|||
aut = product_susp(aut, susp_aut);
|
||||
else
|
||||
aut = product_or_susp(aut, susp_aut);
|
||||
//if (aut && susp_aut)
|
||||
// {
|
||||
// print_hoa(std::cerr << "AUT\n", aut) << '\n';
|
||||
// print_hoa(std::cerr << "SUSPAUT\n", susp_aut) << '\n';
|
||||
// }
|
||||
}
|
||||
if (leading_x > 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue