Fix a nondeterministic behavior of the degeneralization algorithm.
Reported by Tomáš Babiak <xbabiak@fi.muni.cz>. * src/tgba/tgbatba.cc (tgba_tba_proxy): Replace the std::map used to record outgoing transitions by an Sgi::hash_map, and keep the order of these transitions in a separate list. * src/tgbatest/degendet.test: New file. * src/tgbatest/Makefile.am (TESTS): Add it. * THANKS: Add Tomáš and convert to utf8.
This commit is contained in:
parent
7760b459e7
commit
03aabf9a3a
5 changed files with 104 additions and 20 deletions
39
src/tgbatest/degendet.test
Executable file
39
src/tgbatest/degendet.test
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) 2011 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 2 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 Spot; see the file COPYING. If not, write to the Free
|
||||
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
|
||||
. ./defs
|
||||
|
||||
set -e
|
||||
|
||||
# The following command, reported by Tomáš Babiak, used to output many
|
||||
# different automata, because state addresses were used to order the
|
||||
# successors in the degeneralization.
|
||||
|
||||
# Make sure all these runs output the same automaton.
|
||||
|
||||
# With valgrind
|
||||
run 0 ../ltl2tgba -r7 -x -R3 -N "XF(Gp2 | F(p0 U (p1 & (! p4 | p3))))" > out1
|
||||
# Without valgrind
|
||||
for i in 2 3 4 5; do
|
||||
../ltl2tgba -r7 -x -R3 -N "XF(Gp2 | F(p0 U (p1 & (! p4 | p3))))" > out
|
||||
cmp out out1 || exit 1
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue