#!/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 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 >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
