diff --git a/NEWS b/NEWS
index 538b84f7b..827a300df 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,8 @@ New in spot 2.3.2.dev (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
diff --git a/spot/twaalgos/complement.cc b/spot/twaalgos/complement.cc
index 348b43406..2ac33d058 100644
--- a/spot/twaalgos/complement.cc
+++ b/spot/twaalgos/complement.cc
@@ -18,9 +18,9 @@
// along with this program. If not, see .
#include
+#include
#include
-#include
-#include
+
namespace spot
{
@@ -31,15 +31,6 @@ namespace spot
throw
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});
- res->prop_terminal(trival::maybe());
- return res;
+ return dualize(aut);
}
}