simulation: Fix a bug reported by Étienne Renault.
* src/tgbatest/renault.test: New file. * src/tgbatest/Makefile.am: Add it. * src/tgbaalgos/simulation.cc: Fix the bug.
This commit is contained in:
parent
f01d30eb91
commit
467bf378a8
3 changed files with 70 additions and 1 deletions
|
|
@ -394,7 +394,17 @@ namespace spot
|
|||
free_var_.pop();
|
||||
}
|
||||
|
||||
assert(bdd_lstate_.size() == used_var_.size());
|
||||
for (int i = 0; i > nb_new_color; --i)
|
||||
{
|
||||
assert(!used_var_.empty());
|
||||
free_var_.push(bdd_var(used_var_.front()));
|
||||
used_var_.pop_front();
|
||||
}
|
||||
|
||||
|
||||
assert((bdd_lstate_.size() == used_var_.size())
|
||||
|| (bdd_lstate_.find(bddfalse) != bdd_lstate_.end()
|
||||
&& bdd_lstate_.size() == used_var_.size() + 1));
|
||||
|
||||
// Now we make a temporary hash_table which links the tuple
|
||||
// "C^(i-1), N^(i-1)" to the new class coloring. If we
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ TESTS = \
|
|||
explicit2.test \
|
||||
taatgba.test \
|
||||
tgbaread.test \
|
||||
renault.test \
|
||||
neverclaimread.test \
|
||||
readsave.test \
|
||||
ltl2tgba.test \
|
||||
|
|
|
|||
58
src/tgbatest/renault.test
Executable file
58
src/tgbatest/renault.test
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
#!/bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2012 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
|
||||
|
||||
cat >file <<EOF
|
||||
acc = "IOP.clear_interrupts";
|
||||
"1", "2", "a & b",;
|
||||
"1", "3", "(!a & !b & !c) | (c & a)",;
|
||||
"1", "1", "(!a & !b & !c) | (c & a)", "IOP.clear_interrupts";
|
||||
"1", "4", "!a & !c",;
|
||||
"1", "5", "!a & !c", "IOP.clear_interrupts";
|
||||
"1", "6", "a & b",;
|
||||
"2", "2", "a & b",;
|
||||
"2", "3", "c & a",;
|
||||
"2", "1", "c & a", "IOP.clear_interrupts";
|
||||
"2", "6", "a & b",;
|
||||
"3", "8", "1",;
|
||||
"4", "10", "!c",;
|
||||
"4", "8", "!b & !c",;
|
||||
"5", "3", "!a & !b & !c",;
|
||||
"5", "1", "!a & !b & !c", "IOP.clear_interrupts";
|
||||
"5", "4", "!a & !c",;
|
||||
"5", "5", "!a & !c", "IOP.clear_interrupts";
|
||||
"6", "7", "b",;
|
||||
"6", "8", "c",;
|
||||
"7", "9", "b & !c & !d",;
|
||||
"9", "9", "b & !c",;
|
||||
EOF
|
||||
|
||||
cat >outexp <<EOF
|
||||
transitions: 12
|
||||
states: 6
|
||||
EOF
|
||||
|
||||
run 0 ../ltl2tgba -X -ks -RDS file > out
|
||||
|
||||
cmp out outexp
|
||||
Loading…
Add table
Add a link
Reference in a new issue