#!/bin/sh # -*- coding: utf-8 -*- # Copyright (C) 2013, 2015-2018 Laboratoire de Recherche et # Developpement de l'Epita # # 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 f in 'Ga' \ 'Ga | Gb' \ 'Ga | GFb' \ 'Ga | FGb' \ 'F(Ga | Gb)' \ 'XFGa | GFb | Gc' \ '(Ga -> Gb) W c' \ 'F(a & !b & (!c W b))' \ 'G({{1;1}*}<>->a)' do ltl2tgba -UH "$f" | autfilt -q --is-unambiguous ltl2tgba -UH "!($f)" | autfilt -q --is-unambiguous ltl2tgba -BUH "$f" | autfilt -q --is-unambiguous ltl2tgba -BUH "!($f)" | autfilt -q --is-unambiguous ltl2tgba -UH "$f" | autfilt --check | grep -E 'properties:.* (unambiguous|deterministic)' ltl2tgba -UH "!($f)" | autfilt --check | grep -E 'properties:.* (unambiguous|deterministic)' done for f in FGa '{[*1..4]}<>-> (p1 & (p1 U p0))' do ltl2tgba -H "$f" | autfilt -qv --is-unambiguous ltl2tgba -UH "$f" | autfilt -q --is-unambiguous done # All these should be detected as ambiguous automata cat >input< output test `grep -c unambiguous output` = 0 # Check 1000 random PSL formulas randltl --psl -n 1000 3 | ltl2tgba -U -H | autfilt -v --is-unamb --stats=%M && exit 1 cat >input <output cat >expected <ltlcross.res cat >expected <smaller.hoa<sjdb.hoa <ambig.hoa<