#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2014, 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 .
. ./defs
set -e
for i in 0 1 2; do
randaut a b --seed=$i -Q10 --hoa >iso$i
autfilt iso$i --randomize --hoa >aut$i
done
for i in 3 4 5; do
randaut a b --seed=$i -Q10 -D --hoa >iso$i
autfilt iso$i --randomize --hoa >aut$i
done
cat aut0 aut1 aut2 aut3 aut4 aut5 > all
(for i in 0 1 2 3 4 5; do
run 0 autfilt all --are-isomorphic iso$i --hoa
done) > output
diff all output
# Test if two isomorphic automata with different initial states are detected.
cat >aut1 <aut2 <aut3 <aut4 <out
test 2 = "`cat out`"