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:
Thomas Badie 2012-09-26 17:09:43 +02:00 committed by Alexandre Duret-Lutz
parent f01d30eb91
commit 467bf378a8
3 changed files with 70 additions and 1 deletions

58
src/tgbatest/renault.test Executable file
View 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