spot/src/tests/safra.test
Alexandre Lewkowicz d0d42f86f9 safra: Use sub-transitions during determinization
* src/tests/safra.cc, src/tests/safra.test:  Update results.
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: The use of transitions
resulted in non deterministic automata.  By using sub-transitions the
problem is solved.
2016-02-12 14:07:28 +01:00

115 lines
2.3 KiB
Bash
Executable file

#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
. ./defs
set -e
cat >double_a.hoa << EOF
HOA: v1
name: "F\"x > 1\""
States: 2
Start: 0
AP: 2 "a" "b"
acc-name: Buchi
Acceptance: 1 Inf(0)
--BODY--
State: 0
[0] 0 {0}
[0] 1
State: 1
[1] 1
[0] 0
--END--
EOF
cat >out.exp << EOF
digraph G {
rankdir=LR
node [shape="circle"]
I [label="", style=invis, width=0]
I -> 0
0 [label="0"]
0 -> 1 [label="a"]
1 [label="1"]
1 -> 2 [label="a\n{0}"]
1 -> 3 [label="!a & b\n{3}"]
2 [label="2"]
2 -> 1 [label="a"]
2 -> 3 [label="!a & b"]
3 [label="3"]
3 -> 0 [label="a & !b"]
3 -> 2 [label="a & b"]
3 -> 3 [label="!a & b"]
}
EOF
run 0 ../safra --hoa double_a.hoa > out.dot
diff out.dot out.exp
cat >double_b.hoa << EOF
HOA: v1
name: "F\"x > 1\""
States: 2
Start: 0
AP: 2 "a" "b"
acc-name: Buchi
Acceptance: 1 Inf(0)
--BODY--
State: 0
[0] 0
[0] 1
State: 1
[1] 1 {0}
[0] 0
--END--
EOF
cat >out.exp << EOF
digraph G {
rankdir=LR
node [shape="circle"]
I [label="", style=invis, width=0]
I -> 0
0 [label="0"]
0 -> 1 [label="a"]
1 [label="1"]
1 -> 1 [label="a & !b"]
1 -> 2 [label="a & b"]
1 -> 3 [label="!a & b\n{0}"]
2 [label="2"]
2 -> 3 [label="!a & b\n{0}"]
2 -> 4 [label="a & !b"]
2 -> 5 [label="a & b"]
3 [label="3"]
3 -> 0 [label="a & !b"]
3 -> 2 [label="a & b"]
3 -> 3 [label="!a & b\n{0}"]
4 [label="4"]
4 -> 1 [label="a\n{0}"]
4 -> 3 [label="!a & b\n{0}"]
5 [label="5"]
5 -> 1 [label="a\n{0}"]
5 -> 3 [label="!a & b\n{0}"]
}
EOF
run 0 ../safra --hoa double_b.hoa > out.dot
diff out.dot out.exp