From c0bbabc400336eb7870a597e5446a6a154bfe6f7 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 28 Apr 2015 16:12:13 +0200 Subject: [PATCH] autfilt: -uc should count the number of non-isomorphic automata * src/bin/autfilt.cc: Fix it. * src/tests/isomorph.test: Test it. --- src/bin/autfilt.cc | 4 ++-- src/tests/isomorph.test | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bin/autfilt.cc b/src/bin/autfilt.cc index e246a3d07..0b16eeffc 100644 --- a/src/bin/autfilt.cc +++ b/src/bin/autfilt.cc @@ -533,8 +533,6 @@ namespace if (matched == opt_invert) return 0; - ++match_count; - // Postprocessing. if (opt_mask_acc) @@ -583,6 +581,8 @@ namespace return 0; } + ++match_count; + printer.print(aut, nullptr, filename, -1, conversion_time, haut); if (opt_max_count >= 0 && match_count >= opt_max_count) diff --git a/src/tests/isomorph.test b/src/tests/isomorph.test index bb59a5170..e463c872c 100755 --- a/src/tests/isomorph.test +++ b/src/tests/isomorph.test @@ -1,6 +1,6 @@ #!/bin/sh # -*- coding: utf-8 -*- -# Copyright (C) 2014 Laboratoire de Recherche et Développement de +# Copyright (C) 2014, 2015 Laboratoire de Recherche et Développement de # l'Epita (LRDE). # # This file is part of Spot, a model checking library. @@ -106,3 +106,6 @@ EOF run 0 ../../bin/autfilt aut1 --are-isomorphic aut2 run 0 ../../bin/autfilt aut3 --are-isomorphic aut4 + +run 0 ../../bin/autfilt -u aut1 aut2 aut2 aut3 -c >out +test 2 = "`cat out`"