#!/bin/sh # -*- coding: utf-8 -*- # Copyright (C) 2013, 2015, 2016 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 ltl2tgba=ltl2tgba autfilt=autfilt for f in 'Ga' \ 'Ga | Gb' \ 'Ga | GFb' \ 'Ga | FGb' \ '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 -UH "$f" | $autfilt --check | grep -E 'properties:.* (unambiguous|deterministic)' $ltl2tgba -UH "!($f)" | $autfilt --check | grep -E 'properties:.* (unambiguous|deterministic)' done for f in FGa '(({p1[*0..1]}[]-> 0) R XFp0)' 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 -F- -H | $autfilt -v --is-unamb --stats=%M && exit 1 cat >input <output cat >expected <