autfilt: add --remove-unused-ap
Part of #170. * bin/autfilt.cc: Here. * tests/core/remprop.test: Test it. * NEWS: Mention it.
This commit is contained in:
parent
1c2c914d7e
commit
95d16ba009
3 changed files with 53 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2015 Laboratoire de Recherche et Développement de
|
||||
# Copyright (C) 2015, 2016 Laboratoire de Recherche et Développement de
|
||||
# l'Epita (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
|
|
@ -95,3 +95,40 @@ diff out expected
|
|||
|
||||
autfilt -H --remove-ap=a==1 automaton 2>stderr && exit 1
|
||||
grep "autfilt: unexpected '=' at position 2 in 'a==1'" stderr
|
||||
|
||||
|
||||
cat >automaton <<EOF
|
||||
HOA: v1
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 3 "a" "b" "c"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc colored
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0 {0}
|
||||
[1] 0
|
||||
--END--
|
||||
EOF
|
||||
|
||||
autfilt automaton > output
|
||||
diff automaton output
|
||||
|
||||
cat >expect <<EOF
|
||||
HOA: v1
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 1 "b"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc colored
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0 {0}
|
||||
[0] 0
|
||||
--END--
|
||||
EOF
|
||||
|
||||
autfilt --remove-unused-ap automaton > output
|
||||
diff output expect
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue