autfilt: --complement accepts non-deterministic input

* bin/autfilt.cc: Fix the --help string for --complement, and also
merge edges in the resulting automaton, as suggested by František
Blahoudek.
* tests/core/complement.test: Adjust output and add František's
example.
This commit is contained in:
Alexandre Duret-Lutz 2018-05-16 14:11:32 +02:00
parent 605bcd723d
commit 4d82758726
2 changed files with 24 additions and 6 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2015-2017 Laboratoire de Recherche et Développement de
# Copyright (C) 2015-2018 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -50,7 +50,7 @@ EOF
diff out expected
ltl2tgba -H 'GFa & GFb' Xa Fa | autfilt --complement -H >out
ltl2tgba -H 'GFa & GFb' Xa Fa 'FGa & FGb' | autfilt --complement -H >out
cat >expected <<EOF
HOA: v1
States: 1
@ -63,8 +63,8 @@ properties: deterministic stutter-invariant
--BODY--
State: 0
[!0&!1] 0
[!0&1] 0 {1}
[0&!1] 0 {0}
[!0&1] 0 {1}
[0&1] 0 {0 1}
--END--
HOA: v1
@ -101,6 +101,22 @@ State: 1
[0] 0
[!0] 1
--END--
HOA: v1
States: 2
Start: 0
AP: 2 "a" "b"
acc-name: parity min even 2
Acceptance: 2 Inf(0) | Fin(1)
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic stutter-invariant
--BODY--
State: 0
[!0 | !1] 0
[0&1] 1 {1}
State: 1
[!0 | !1] 0 {0}
[0&1] 1 {1}
--END--
EOF
diff out expected