From a828662be6b4b3751bdebc96491fe477ee608340 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 20 Mar 2014 09:30:01 +0100 Subject: [PATCH] Fix a regression in tgbamask.cc, reported by Alexandre Lewkowicz. * src/tgba/tgbamask.cc (recycle): Clear the transition list. * src/tgbatest/dra2dba.test: New file. * src/tgbatest/Makefile.am: Add it. --- src/tgba/tgbamask.cc | 1 + src/tgbatest/Makefile.am | 10 +- src/tgbatest/dra2dba.test | 333 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 340 insertions(+), 4 deletions(-) create mode 100755 src/tgbatest/dra2dba.test diff --git a/src/tgba/tgbamask.cc b/src/tgba/tgbamask.cc index cef84d23b..1cbdf066e 100644 --- a/src/tgba/tgbamask.cc +++ b/src/tgba/tgbamask.cc @@ -145,6 +145,7 @@ namespace spot if (iter_cache_) { res = down_cast(iter_cache_); + res->trans_.clear(); iter_cache_ = nullptr; } else diff --git a/src/tgbatest/Makefile.am b/src/tgbatest/Makefile.am index 7866d0060..ab8edbd56 100644 --- a/src/tgbatest/Makefile.am +++ b/src/tgbatest/Makefile.am @@ -1,8 +1,9 @@ -## Copyright (C) 2009, 2010, 2011, 2012, 2013 Laboratoire de Recherche et -## Développement de l'Epita (LRDE). +## -*- coding: utf-8 -*- +## Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Laboratoire de +## Recherche et Développement de l'Epita (LRDE). ## Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de -## Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC), -## Université Pierre et Marie Curie. +## Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC), +## Université Pierre et Marie Curie. ## ## This file is part of Spot, a model checking library. ## @@ -115,6 +116,7 @@ TESTS = \ wdba.test \ wdba2.test \ babiak.test \ + dra2dba.test \ ltlcross4.test \ ltl2dstar.test \ ltl2dstar2.test \ diff --git a/src/tgbatest/dra2dba.test b/src/tgbatest/dra2dba.test new file mode 100755 index 000000000..104a21590 --- /dev/null +++ b/src/tgbatest/dra2dba.test @@ -0,0 +1,333 @@ +#!/bin/sh +# -*- coding: utf-8 -*- +# Copyright (C) 2014 Laboratoire de Recherche et Développement de +# 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 . + +. ./defs + +set -e + +# This failure to produce a deterministic automaton was noticed by +# Alexandre Lewkowicz. + +# The following is the output of +# ltlfilt -f 'G(F!a | (Fb U c))' -l | +# ltl2dstar --ltl2nba=spin:$HOME/usr/bin/ltl2tgba@-s - - + +cat > in.dra <