Commit a965af71 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

postproc: add an scc-filter option

* src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh: Add an
scc-filter option.
* src/bin/man/ltl2tgba.x: Document it.
parent bc7a2865
......@@ -14,6 +14,14 @@ shorthand for \fIKEY\fR=1, and !\fIKEY\fR is a shorthand for
Supported options are:
.TP
\fBscc\-filter\fR
Set to 1 (the default) to enable SCC-pruning and acceptance
simplification at the beginning of post-processing. Transitions that
are outside of accepting SCC are removed from accepting sets, except
those that enter into an accepting SCC. Set to 2 to remove even these
entering transition from the accepting sets. Set to 0 to disable this
SCC-pruning and acceptance simpification pass.
.TP
\fBdegen\-reset\fR
If non-zero (the default), the degeneralization algorithm will reset
its level any time it exits a non-accepting SCC.
......
......@@ -46,7 +46,7 @@ namespace spot
postprocessor::postprocessor(const option_map* opt)
: type_(TGBA), pref_(Small), level_(High),
degen_reset_(true), degen_order_(false), degen_cache_(true),
simul_(-1)
simul_(-1), scc_filter_(-1)
{
if (opt)
{
......@@ -55,6 +55,7 @@ namespace spot
degen_cache_ = opt->get("degen-lcache", 1);
simul_ = opt->get("simul", -1);
simul_limit_ = opt->get("simul-limit", -1);
scc_filter_ = opt->get("scc-filter", -1);
}
}
......@@ -95,10 +96,13 @@ namespace spot
if (simul_ < 0)
simul_ = (level_ == Low) ? 1 : 3;
if (scc_filter_ < 0)
scc_filter_ = 1;
// Remove useless SCCs.
if (scc_filter_ > 0 || type_ == Monitor)
{
const tgba* s = scc_filter(a, simul_ > 3);
const tgba* s = scc_filter(a, scc_filter_ > 1);
delete a;
a = s;
}
......@@ -194,7 +198,7 @@ namespace spot
}
}
if (sim && type_ == TGBA && level_ == High)
if (sim && type_ == TGBA && level_ == High && scc_filter_ != 0)
{
const tgba* s = scc_filter(sim, true);
delete sim;
......
......@@ -102,6 +102,7 @@ namespace spot
bool degen_cache_;
int simul_;
int simul_limit_;
int scc_filter_;
};
/// @}
}
......
Markdown is supported
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