Commit 073a6e81 authored by Thomas Medioni's avatar Thomas Medioni
Browse files

dtwa_complement: replace code with call to dualize

* NEWS: Mention of this modification
* spot/twaalgos/ Replace dtwa_complement with a call
  to dualize
parent c9d8d41f
......@@ -23,6 +23,8 @@ New in spot (not yet released)
- spot::dualize() implements the dual of any alternating automaton.
- spot::dtwa_complement now simply returns the result of dualize()
Bug fixes:
- In "lenient" mode the parser would fail to recover from
......@@ -18,9 +18,9 @@
// along with this program. If not, see <>.
#include <spot/twaalgos/complement.hh>
#include <spot/twaalgos/dualize.hh>
#include <spot/twaalgos/isdet.hh>
#include <spot/twaalgos/complete.hh>
#include <spot/twaalgos/cleanacc.hh>
namespace spot
......@@ -31,15 +31,6 @@ namespace spot
std::runtime_error("dtwa_complement() requires a deterministic input");
// Simply complete the automaton, and complement its acceptance.
auto res = cleanup_acceptance_here(complete(aut));
res->set_acceptance(res->num_sets(), res->get_acceptance().complement());
// Complementing the acceptance is likely to break the terminal
// property, but not weakness. We make a useless call to
// prop_keep() just so we remember to update it in the future if a
// new argument is added.
res->prop_keep({true, true, true, true, true, true});
return res;
return dualize(aut);
Supports Markdown
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