postproc: Add the new simulation in do_simul()
* spot/twaalgos/postproc.hh, spot/twaalgos/postproc.cc: Add the new simulation in do_simul(). * bin/man/spot-x.x, bin/spot-x.cc: Add documentation for SPOT_SIMULATION_REDUCTION environnement variable and the simul-method fine tunning option. * NEWS: Mention the changes.
This commit is contained in:
parent
fb066ada0a
commit
b082df201f
5 changed files with 44 additions and 3 deletions
9
NEWS
9
NEWS
|
|
@ -182,6 +182,15 @@ New in spot 2.9.6.dev (not yet released)
|
||||||
outgoing edge of some state. It can be used together with
|
outgoing edge of some state. It can be used together with
|
||||||
purge_dead_states() to remove selected states.
|
purge_dead_states() to remove selected states.
|
||||||
|
|
||||||
|
- Add reduce_direct_sim(), reduce_direct_cosim() and reduce_iterated()
|
||||||
|
(and their state based acceptance version, reduce_direct_sim_sba(),
|
||||||
|
reduce_direct_cosim_sba() and reduce_iterated_sba()), a new reduction
|
||||||
|
based simulation using a matrix-based implementation. This new version
|
||||||
|
should be faster than the signature-based BDD implementation in most
|
||||||
|
cases. By default, the old one is used. This behavior can be changed by
|
||||||
|
setting SPOT_SIMULATION_REDUCTION environment variable or using the
|
||||||
|
"-x simul-method=..." option (see spot-x(7)).
|
||||||
|
|
||||||
Python:
|
Python:
|
||||||
|
|
||||||
- Bindings for functions related to games.
|
- Bindings for functions related to games.
|
||||||
|
|
|
||||||
|
|
@ -234,6 +234,12 @@ This variable is used by the \fB--check=stutter-invariance\fR and
|
||||||
\fB--stutter-invariant\fR options, but it is ignored by
|
\fB--stutter-invariant\fR options, but it is ignored by
|
||||||
\fB--check=stutter-sensitive-example\fR.
|
\fB--check=stutter-sensitive-example\fR.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fBSPOT_SIMULATION_REDUCTION\fR
|
||||||
|
Choose which simulation based reduction to use: 1 force signature-based
|
||||||
|
BDD implementation, 2 force matrix-based implementation and 0 is default, a
|
||||||
|
heuristic is used to choose which implementation to use.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fBSPOT_TMPDIR\fR, \fBTMPDIR\fR
|
\fBSPOT_TMPDIR\fR, \fBTMPDIR\fR
|
||||||
These variables control in which directory temporary files (e.g.,
|
These variables control in which directory temporary files (e.g.,
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,11 @@ sets sat-minimize to 1 if not set differently.") },
|
||||||
"Set to 1 to instruct the SAT-minimization procedure to produce \
|
"Set to 1 to instruct the SAT-minimization procedure to produce \
|
||||||
a TGBA where all outgoing transition of a state have the same acceptance \
|
a TGBA where all outgoing transition of a state have the same acceptance \
|
||||||
sets. By default this is only enabled when option -B is used.") },
|
sets. By default this is only enabled when option -B is used.") },
|
||||||
{ nullptr, 0, nullptr, 0, nullptr, 0 }
|
{ DOC("simul-method",
|
||||||
|
"Chose which simulation based reduction to use: 1 force the \
|
||||||
|
signature-based BDD implementation, 2 force matrix-based and 0, the default, \
|
||||||
|
is a heristic wich choose which implementation to use.") },
|
||||||
|
{ nullptr, 0, nullptr, 0, nullptr, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct argp_child children[] =
|
const struct argp_child children[] =
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ namespace spot
|
||||||
det_max_states_ = opt->get("det-max-states", -1);
|
det_max_states_ = opt->get("det-max-states", -1);
|
||||||
det_max_edges_ = opt->get("det-max-edges", -1);
|
det_max_edges_ = opt->get("det-max-edges", -1);
|
||||||
simul_ = opt->get("simul", -1);
|
simul_ = opt->get("simul", -1);
|
||||||
|
simul_method_ = opt->get("simul-method", -1);
|
||||||
scc_filter_ = opt->get("scc-filter", -1);
|
scc_filter_ = opt->get("scc-filter", -1);
|
||||||
ba_simul_ = opt->get("ba-simul", -1);
|
ba_simul_ = opt->get("ba-simul", -1);
|
||||||
tba_determinisation_ = opt->get("tba-det", 0);
|
tba_determinisation_ = opt->get("tba-det", 0);
|
||||||
|
|
@ -115,19 +116,39 @@ namespace spot
|
||||||
if (simul_max_ > 0 && static_cast<unsigned>(simul_max_) < a->num_states())
|
if (simul_max_ > 0 && static_cast<unsigned>(simul_max_) < a->num_states())
|
||||||
return a;
|
return a;
|
||||||
|
|
||||||
|
if (opt == 0)
|
||||||
|
return a;
|
||||||
|
|
||||||
|
static unsigned sim = [&]()
|
||||||
|
{
|
||||||
|
if (simul_method_ != -1)
|
||||||
|
return simul_method_;
|
||||||
|
|
||||||
|
char* s = getenv("SPOT_SIMULATION_REDUCTION");
|
||||||
|
return s ? *s - '0' : 0;
|
||||||
|
}();
|
||||||
|
|
||||||
|
if (sim == 2)
|
||||||
|
opt += 3;
|
||||||
|
|
||||||
// FIXME: simulation-based reduction how have work-arounds for
|
// FIXME: simulation-based reduction how have work-arounds for
|
||||||
// non-separated sets, so we can probably try them.
|
// non-separated sets, so we can probably try them.
|
||||||
if (!has_separate_sets(a))
|
if (!has_separate_sets(a))
|
||||||
return a;
|
return a;
|
||||||
switch (opt)
|
switch (opt)
|
||||||
{
|
{
|
||||||
case 0:
|
|
||||||
return a;
|
|
||||||
case 1:
|
case 1:
|
||||||
return simulation(a);
|
return simulation(a);
|
||||||
case 2:
|
case 2:
|
||||||
return cosimulation(a);
|
return cosimulation(a);
|
||||||
case 3:
|
case 3:
|
||||||
|
return iterated_simulations(a);
|
||||||
|
case 4:
|
||||||
|
return reduce_direct_sim(a);
|
||||||
|
case 5:
|
||||||
|
return reduce_direct_cosim(a);
|
||||||
|
case 6:
|
||||||
|
return reduce_iterated(a);
|
||||||
default:
|
default:
|
||||||
return iterated_simulations(a);
|
return iterated_simulations(a);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -252,6 +252,7 @@ namespace spot
|
||||||
int det_max_states_ = -1;
|
int det_max_states_ = -1;
|
||||||
int det_max_edges_ = -1;
|
int det_max_edges_ = -1;
|
||||||
int simul_ = -1;
|
int simul_ = -1;
|
||||||
|
int simul_method_ = -1;
|
||||||
int scc_filter_ = -1;
|
int scc_filter_ = -1;
|
||||||
int ba_simul_ = -1;
|
int ba_simul_ = -1;
|
||||||
bool tba_determinisation_ = false;
|
bool tba_determinisation_ = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue