#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2017, 2019 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
# This make sure that the degeneralize fonction does not create
# new SCCs.
#
# The following cases were found with
#
# % randltl -n -1 3 | ltl2tgba | autfilt --acc-sets=3.. |
# autfilt -Bx'!degen-remscc' --stats='%C,%c,%M' |
# awk -F, '{ if ($1 < $2) { print $0; } }'
cat >input < test.sh
sh -x -e test.sh
# Make sure that this degen-remscc optimizition is actually doing something.
# The following test could fail in the future if we improve the translation
# of some of these formulas. In that case, regenerate the list of test
# formula using the command displayed above.
ltl2tgba < input |
autfilt -Bx'!degen-remscc' --stats=": '%M'; test %C -lt %c" > test.sh
sh -x -e test.sh
# We also want to make sure those degeneralized automata are correct
ltlcross -F input ltl2tgba 'ltl2tgba -B' 'ltl2tgba %f | autfilt -B > %O'