correct handling of --stats=%P
Fixes #236. * bin/common_aoutput.cc: Fix it. * tests/core/format.test: Improve test cases. * NEWS: Mention the bug.
This commit is contained in:
parent
d2e9515c10
commit
68ad391948
3 changed files with 17 additions and 6 deletions
3
NEWS
3
NEWS
|
|
@ -11,6 +11,9 @@ New in spot 2.3.1.dev (not yet released)
|
||||||
- The tests using LTSmin's patched version of divine would fail
|
- The tests using LTSmin's patched version of divine would fail
|
||||||
if the current (non-patched) version of divine was installed.
|
if the current (non-patched) version of divine was installed.
|
||||||
|
|
||||||
|
- Because of a typo, the output of --stats='...%P...' was correct
|
||||||
|
only if %p was used as well.
|
||||||
|
|
||||||
New in spot 2.3.1 (2017-02-20)
|
New in spot 2.3.1 (2017-02-20)
|
||||||
|
|
||||||
Tools:
|
Tools:
|
||||||
|
|
|
||||||
|
|
@ -453,7 +453,7 @@ hoa_stat_printer::print(const spot::const_parsed_aut_ptr& haut,
|
||||||
haut_deterministic_ = is_deterministic(haut->aut);
|
haut_deterministic_ = is_deterministic(haut->aut);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (has('p'))
|
if (has('P'))
|
||||||
haut_complete_ = is_complete(haut->aut);
|
haut_complete_ = is_complete(haut->aut);
|
||||||
|
|
||||||
if (has('G'))
|
if (has('G'))
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (C) 2016 Laboratoire de Recherche et Développement de
|
# Copyright (C) 2016, 2017 Laboratoire de Recherche et Développement de
|
||||||
# l'Epita (LRDE).
|
# l'Epita (LRDE).
|
||||||
#
|
#
|
||||||
# This file is part of Spot, a model checking library.
|
# This file is part of Spot, a model checking library.
|
||||||
|
|
@ -51,11 +51,19 @@ for i in 1 2 3 4 5 6; do
|
||||||
cmp ap-$i.ltl ap-$i.ltl2 || exit 1
|
cmp ap-$i.ltl ap-$i.ltl2 || exit 1
|
||||||
done
|
done
|
||||||
|
|
||||||
out=`ltl2tgba -f 'GFa' | autfilt --stats='%W,%w' --complement`
|
ltl2tgba GFa > GFa
|
||||||
|
out=`<GFa autfilt --stats='%W,%w' --complement`
|
||||||
test "$out" = "cycle{a},cycle{!a}"
|
test "$out" = "cycle{a},cycle{!a}"
|
||||||
test "0,1,0,1" = "`ltl2tgba FGa | autfilt -D --stats='%D,%d,%P,%p'`"
|
ltl2tgba FGa > FGa
|
||||||
test "0,0,0,1" = "`ltl2tgba FGa | autfilt -C --stats='%D,%d,%P,%p'`"
|
test "0,1,0,1" = "`<FGa autfilt -D --stats='%D,%d,%P,%p'`"
|
||||||
test "1,0" = "`ltl2tgba FGa | autfilt -D --stats='%N,%n'`"
|
test "0,0,0,1" = "`<FGa autfilt -C --stats='%D,%d,%P,%p'`"
|
||||||
|
# We had some issues in the pase where %P was set only if %p was used
|
||||||
|
# as well. So we make separate tests for this.
|
||||||
|
test "0,0" = "`<FGa autfilt -C --stats='%D,%P'`"
|
||||||
|
test "1,1" = "`<GFa autfilt -C --stats='%D,%P'`"
|
||||||
|
test "0,1" = "`<FGa autfilt -C --stats='%d,%p'`"
|
||||||
|
test "1,1" = "`<GFa autfilt -C --stats='%d,%p'`"
|
||||||
|
test "1,0" = "`<FGa autfilt -D --stats='%N,%n'`"
|
||||||
|
|
||||||
test "4" = "`ltl2tgba '(Ga -> Gb)W c' --stats=%c`"
|
test "4" = "`ltl2tgba '(Ga -> Gb)W c' --stats=%c`"
|
||||||
test "4,5" = "`ltl2tgba '(Ga -> Gb)W c' | autfilt -C --stats=%C,%c`"
|
test "4,5" = "`ltl2tgba '(Ga -> Gb)W c' | autfilt -C --stats=%C,%c`"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue