Commit e0d32918 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

correct handling of --stats=%P

Fixes #236.

* bin/common_aoutput.cc: Fix it.
* tests/core/format.test: Improve test cases.
* NEWS: Mention the bug.
parent 905af904
......@@ -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
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)
Tools:
......
......@@ -453,7 +453,7 @@ hoa_stat_printer::print(const spot::const_parsed_aut_ptr& haut,
haut_deterministic_ = is_deterministic(haut->aut);
}
if (has('p'))
if (has('P'))
haut_complete_ = is_complete(haut->aut);
if (has('G'))
......
#!/bin/sh
# -*- 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).
#
# 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
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 "0,1,0,1" = "`ltl2tgba FGa | autfilt -D --stats='%D,%d,%P,%p'`"
test "0,0,0,1" = "`ltl2tgba FGa | autfilt -C --stats='%D,%d,%P,%p'`"
test "1,0" = "`ltl2tgba FGa | autfilt -D --stats='%N,%n'`"
ltl2tgba FGa > FGa
test "0,1,0,1" = "`<FGa autfilt -D --stats='%D,%d,%P,%p'`"
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,5" = "`ltl2tgba '(Ga -> Gb)W c' | autfilt -C --stats=%C,%c`"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment