dtwa_complement: replace code with call to dualize
* NEWS: Mention of this modification * spot/twaalgos/complement.cc: Replace dtwa_complement with a call to dualize
This commit is contained in:
parent
c9d8d41fd3
commit
073a6e8198
2 changed files with 5 additions and 12 deletions
2
NEWS
2
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::dualize() implements the dual of any alternating automaton.
|
||||||
|
|
||||||
|
- spot::dtwa_complement now simply returns the result of dualize()
|
||||||
|
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
|
|
||||||
- In "lenient" mode the parser would fail to recover from
|
- In "lenient" mode the parser would fail to recover from
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include <spot/twaalgos/complement.hh>
|
#include <spot/twaalgos/complement.hh>
|
||||||
|
#include <spot/twaalgos/dualize.hh>
|
||||||
#include <spot/twaalgos/isdet.hh>
|
#include <spot/twaalgos/isdet.hh>
|
||||||
#include <spot/twaalgos/complete.hh>
|
|
||||||
#include <spot/twaalgos/cleanacc.hh>
|
|
||||||
|
|
||||||
namespace spot
|
namespace spot
|
||||||
{
|
{
|
||||||
|
|
@ -31,15 +31,6 @@ namespace spot
|
||||||
throw
|
throw
|
||||||
std::runtime_error("dtwa_complement() requires a deterministic input");
|
std::runtime_error("dtwa_complement() requires a deterministic input");
|
||||||
|
|
||||||
// Simply complete the automaton, and complement its acceptance.
|
return dualize(aut);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue