autfilt: add --aliases=drop|keep option

* bin/autfilt.cc: Here.
* spot/twaalgos/hoa.cc, spot/twaalgos/hoa.hh: Fix the prototype
of set_aliases so that it is usable.
* tests/core/dualize.test: Add a simple test case.
* NEWS: Mention the new option.
This commit is contained in:
Alexandre Duret-Lutz 2022-02-01 16:35:41 +01:00
parent 95b2e7366f
commit f759697e1c
5 changed files with 85 additions and 5 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2017, 2019, 2021 Laboratoire de Recherche et
# Copyright (C) 2017, 2019, 2021, 2022 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -72,6 +72,10 @@ HOA: v1
States: 10
Start: 0&4
AP: 2 "p0" "p1"
Alias: @a 0&!1
Alias: @b !0&!1
Alias: @c 0&1
Alias: @d !0&1
Acceptance: 2 Inf(0) | Inf(1)
properties: trans-labels explicit-labels trans-acc univ-branch
--BODY--
@ -104,7 +108,8 @@ State: 9
[!0] 9
--END--
EOF
autfilt --dualize <input2 >output2
autfilt --dualize --aliases=drop <input2 >output2
autfilt --dualize <input2 >>output2
cat >expected2<<EOF
HOA: v1
States: 9
@ -140,5 +145,43 @@ State: 8
[!1] 0&6&7
[!0&!1] 0&7
--END--
HOA: v1
States: 9
Start: 8
AP: 2 "p0" "p1"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: trans-labels explicit-labels state-acc univ-branch
Alias: @a 0&!1
Alias: @b !0&!1
Alias: @c 0&1
Alias: @d !@c&!@b&!@a
--BODY--
State: 0
[@a] 0&6&7
[@b] 0&7
State: 1
[@c | @a] 1&2&3
[@d | @b] 1&3
State: 2
[@c | @a] 4
State: 3
[@c | @a] 4
[@d | @b] 5
State: 4
[t] 4
State: 5
[@d | @b] 5
State: 6 {0}
[@d | @b] 4
[@c | @a] 6
State: 7
[@b | @a] 7
State: 8
[t] 1&2&3
[@d | @b] 1&3
[@b | @a] 0&6&7
[@b] 0&7
--END--
EOF
diff output2 expected2