diff --git a/NEWS b/NEWS index 4959d9a22..6961859db 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,8 @@ New in spot 1.1a (not yet released): * Bug fixes: - genltl --gh-r generated the wrong formulas due to a typo. + - ltlfilt --eventual and --universal were not handled properly. + - ltlfilt --stutter-invariant would trigger an assert on PSL formulas. New in spot 1.1 (2013-04-28): diff --git a/src/bin/ltlfilt.cc b/src/bin/ltlfilt.cc index 856121037..d610be2ec 100644 --- a/src/bin/ltlfilt.cc +++ b/src/bin/ltlfilt.cc @@ -273,6 +273,9 @@ parse_opt(int key, char* arg, struct argp_state*) equivalent_to = parse_formula_arg(arg); break; } + case OPT_EVENTUAL: + eventual = true; + break; case OPT_GUARANTEE: guarantee = obligation = true; break; @@ -349,6 +352,9 @@ parse_opt(int key, char* arg, struct argp_state*) case OPT_SYNTACTIC_PERSISTENCE: syntactic_persistence = true; break; + case OPT_UNIVERSAL: + universal = true; + break; default: return ARGP_ERR_UNKNOWN; } @@ -495,7 +501,8 @@ namespace matched &= !implied_by || simpl.implication(implied_by, f); matched &= !imply || simpl.implication(f, imply); matched &= !equivalent_to || simpl.are_equivalent(f, equivalent_to); - matched &= !stutter_insensitive || is_stutter_insensitive(f); + matched &= !stutter_insensitive || (f->is_ltl_formula() + && is_stutter_insensitive(f)); // Match obligations and subclasses using WDBA minimization. // Because this is costly, we compute it later, so that we don't diff --git a/src/ltltest/Makefile.am b/src/ltltest/Makefile.am index 57b36b5f7..f034d4f83 100644 --- a/src/ltltest/Makefile.am +++ b/src/ltltest/Makefile.am @@ -94,6 +94,7 @@ TESTS = \ consterm.test \ kind.test \ remove_x.test \ + ltlfilt.test \ lbt.test \ lenient.test \ isop.test \ diff --git a/src/ltltest/ltlfilt.test b/src/ltltest/ltlfilt.test new file mode 100755 index 000000000..a3b346c1e --- /dev/null +++ b/src/ltltest/ltlfilt.test @@ -0,0 +1,138 @@ +#! /bin/sh +# Copyright (C) 2013 Laboratoire de Recherche et Developement to +# l'Epita (LRDE). +# +# This file is part of Spot, a model checking library. +# +# Spot is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Spot is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# Check several options of ltlfilt + +. ./defs || exit 1 + +set -e + +checkopt() +{ + cat >exp + run 0 ../../bin/ltlfilt "$@" formulas > out + diff exp out +} + + +cat >formulas <