Commit 8e26852a authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

determinize: remove superfluous options

bisimulation and complete just trigger extra algorithms to be called at
the end of this one, so they need not be part of this algorithm.

* spot/twaalgos/determinize.cc, spot/twaalgos/determinize.hh: Reduce
the number of options.
* tests/core/safra.cc: Implement those options here.
parent e0c24525
......@@ -32,7 +32,7 @@
#include <spot/twaalgos/degen.hh>
#include <spot/twaalgos/sccfilter.hh>
#include <spot/twaalgos/simulation.hh>
#include <spot/twaalgos/complete.hh>
namespace spot
{
......@@ -607,9 +607,9 @@ namespace spot
}
twa_graph_ptr
tgba_determinisation(const const_twa_graph_ptr& a, bool bisimulation,
bool pretty_print, bool scc_opt, bool use_bisimulation,
bool complete, bool use_stutter)
tgba_determinisation(const const_twa_graph_ptr& a,
bool pretty_print, bool scc_opt,
bool use_bisimulation, bool use_stutter)
{
// Degeneralize
twa_graph_ptr aut = spot::degeneralize_tba(a);
......@@ -729,12 +729,8 @@ namespace spot
res->prop_deterministic(true);
res->prop_state_acc(false);
if (bisimulation)
res = simulation(res);
if (pretty_print)
res->set_named_prop("state-names", print_debug(seen));
if (complete)
spot::complete_here(res);
return res;
}
}
......@@ -25,10 +25,8 @@ namespace spot
{
SPOT_API twa_graph_ptr
tgba_determinisation(const const_twa_graph_ptr& aut,
bool bisimulation = false,
bool pretty_print = false,
bool scc_opt = false,
bool use_bisimulation = false,
bool complete = false,
bool use_stutter = false);
}
......@@ -20,15 +20,17 @@
#include <iostream>
#include <cstring>
#include "spot/tl/parse.hh" // spot::parse_infix_psl
#include "spot/tl/formula.hh" // spot::formula
#include "spot/parseaut/public.hh"
#include "spot/twa/twagraph.hh"
#include "spot/twaalgos/degen.hh"
#include "spot/twaalgos/dot.hh" // print_dot
#include "spot/twaalgos/hoa.hh" // print_hoa
#include "spot/twaalgos/determinize.hh"
#include "spot/twaalgos/translate.hh"
#include <spot/tl/parse.hh> // spot::parse_infix_psl
#include <spot/tl/formula.hh> // spot::formula
#include <spot/parseaut/public.hh>
#include <spot/twa/twagraph.hh>
#include <spot/twaalgos/degen.hh>
#include <spot/twaalgos/dot.hh> // print_dot
#include <spot/twaalgos/hoa.hh> // print_hoa
#include <spot/twaalgos/determinize.hh>
#include <spot/twaalgos/translate.hh>
#include <spot/twaalgos/complete.hh>
#include <spot/twaalgos/simulation.hh>
int help();
......@@ -117,18 +119,23 @@ int main(int argc, char* argv[])
spot::translator trans(dict);
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_stutter);
res = spot::tgba_determinisation(tmp, pretty_print, scc_opt,
use_bisim, use_stutter);
}
else if (in_hoa)
{
auto aut = spot::parse_aut(input, dict);
if (aut->format_errors(std::cerr))
return 2;
res = tgba_determinisation(aut->aut, sim, pretty_print, scc_opt,
use_bisim, complete, use_stutter);
res = tgba_determinisation(aut->aut, pretty_print, scc_opt,
use_bisim, use_stutter);
}
res->merge_edges();
if (sim)
res = simulation(res);
else
res->merge_edges();
if (complete)
spot::complete_here(res);
if (out_hoa)
{
......
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