safra: Add stutter-invarience optimisation

* spot/twaalgos/safra.cc, spot/twaalgos/safra.hh: Here.
* tests/core/safra.cc: Add option.
This commit is contained in:
Alexandre Lewkowicz 2016-02-05 15:42:22 +01:00 committed by Alexandre Duret-Lutz
parent 1d68decaca
commit cd71286fb5
3 changed files with 61 additions and 11 deletions

View file

@ -41,6 +41,9 @@ int help()
std::cerr << "\t-H\toutput hoa format\n";
std::cerr << "\t-b\treduce result using bisimulation\n";
std::cerr << "\t--scc_opt\tUse an SCC-based Safra\n";
std::cerr << "\t--bisim_opt\tUse Simulation info to reduce macro-states "
"size\n";
std::cerr << "\t--stutter\tStutter-invarience optimisation\n";
return 1;
}
@ -55,6 +58,7 @@ int main(int argc, char* argv[])
bool out_hoa = false;
bool pretty_print = false;
bool complete = false;
bool use_stutter = false;
char* input = nullptr;
if (argc <= 2)
@ -90,6 +94,8 @@ int main(int argc, char* argv[])
scc_opt = true;
else if (!strncmp(argv[i], "--bisim_opt", 10))
use_bisim = true;
else if (!strncmp(argv[i], "--stutter", 9))
use_stutter = true;
else
{
std::cerr << "Warning: " << argv[i] << " not used\n";
@ -112,7 +118,7 @@ int main(int argc, char* argv[])
trans.set_pref(spot::postprocessor::Deterministic);
auto tmp = trans.run(f);
res = spot::tgba_determinisation(tmp, sim, pretty_print, scc_opt,
use_bisim, complete);
use_bisim, complete, use_stutter);
}
else if (in_hoa)
{
@ -120,7 +126,7 @@ int main(int argc, char* argv[])
if (aut->format_errors(std::cerr))
return 2;
res = tgba_determinisation(aut->aut, sim, pretty_print, scc_opt,
use_bisim, complete);
use_bisim, complete, use_stutter);
}
res->merge_edges();