kind.test 3.83 KB
Newer Older
1
#! /bin/sh
2
# -*- coding: utf-8 -*-
3
# Copyright (C) 2010-2012, 2015, 2017, 2019 Laboratoire de Recherche
4
# et Développement de l'Epita (LRDE).
5 6 7 8 9
#
# 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
10
# the Free Software Foundation; either version 3 of the License, or
11 12 13 14 15 16 17 18
# (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
19
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 21 22 23 24 25 26 27


# Check for the constant_term visitor

. ./defs || exit 1

set -e

28
cat >input<<EOF
29 30 31 32
a,B&!xfLPSFsgopra
a<->b,BxfLPSFsgopra
!a,B&!xfLPSFsgopra
!(a|b),B&xfLPSFsgopra
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
F(a),&!xLPegopra
G(a),&!xLPusopra
a U b,&!xfLPgopra
a U Fb,&!xLPegopra
Ga U b,&!xLPopra
1 U a,&!xfLPegopra
a W b,&!xfLPsopra
a W 0,&!xfLPusopra
a M b,&!xfLPgopra
a M 1,&!xfLPegopra
a R b,&!xfLPsopra
0 R b,&!xfLPusopra
a R (b R (c R d)),&!xfLPsopra
a U (b U (c U d)),&!xfLPgopra
a W (b W (c W d)),&!xfLPsopra
a M (b M (c M d)),&!xfLPgopra
Fa -> Fb,xLPopra
Ga -> Fb,xLPgopra
Fa -> Gb,xLPsopra
(Ga|Fc) -> Fb,xLPopra
(Ga|Fa) -> Gb,xLPopra
{a;c*;b}|->!Xb,&fPsopra
{a;c*;b}|->X!b,&!fPsopra
{a;c*;b}|->!Fb,&Psopra
{a;c*;b}|->G!b,&!Psopra
{a;c*;b}|->!Gb,&Pra
{a;c*;b}|->F!b,&!Pra
{a;c*;b}|->GFa,&!Pra
{a;c*;b}|->FGa,&!Pa
62 63 64 65 66 67 68
{a[+];c[+];b*}|->!Fb,&Psopra
{a*;c[+];b*}|->!Fb,&xPsopra
{a[+];c*;b[+]}|->G!b,&!Psopra
{a*;c[+];b[+]}|->!Gb,&Pra
{a[+];c*;b[+]}|->F!b,&!Pra
{a[+];c[+];b*}|->GFa,&!Pra
{a*;c[+];b[+]}|->FGa,&!Pa
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
{a;c;b|(d;e)}|->!Xb,&fPFsgopra
{a;c;b|(d;e)}|->X!b,&!fPFsgopra
{a;c;b|(d;e)}|->!Fb,&Psopra
{a;c;b|(d;e)}|->G!b,&!Psopra
{a;c;b|(d;e)}|->!Gb,&Pgopra
{a;c;b|(d;e)}|->F!b,&!Pgopra
{a;c;b|(d;e)}|->GFa,&!Pra
{a;c;b|(d;e)}|->FGa,&!Ppa
{a[+] && c[+]}|->!Xb,&fPsopra
{a[+] && c[+]}|->X!b,&!fPsopra
{a[+] && c[+]}|->!Fb,&xPsopra
{a[+] && c[+]}|->G!b,&!xPsopra
{a[+] && c[+]}|->!Gb,&xPra
{a[+] && c[+]}|->F!b,&!xPra
{a[+] && c[+]}|->GFa,&!xPra
{a[+] && c[+]}|->FGa,&!xPa
{a;c*;b}<>->!Gb,&Pgopra
{a;c*;b}<>->F!b,&!Pgopra
{a;c*;b}<>->FGb,&!Ppa
{a;c*;b}<>->!GFb,&Ppa
{a;c*;b}<>->GFb,&!Pa
{a;c*;b}<>->!FGb,&Pa
91
{a*;c[+];b[+]}<>->!FGb,&Pa
92 93 94 95 96 97
{a;c|d;b}<>->!Gb,&Pgopra
{a;c|d;b}<>->G!b,&!Psopra
{a;c|d;b}<>->FGb,&!Ppa
{a;c|d;b}<>->!GFb,&Ppa
{a;c|d;b}<>->GFb,&!Pra
{a;c|d;_b}<>->!FGb,&Pr
98
# Equivalent to a&b&c&d
99 100
{a:b:c:d}!,B&!xfLPSFsgopra
a&b&c&d,B&!xfLPSFsgopra
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
(Xa <-> XXXc) U (b & Fe),LPgopra
(!X(a|X(!b))&(FX(g xor h)))U(!G(a|b)),LPegopra
(!X(a|X(!b))&(GX(g xor h)))R(!F(a|b)),LPusopra
(!X(a|X(!b))&(GX(g xor h)))U(!G(a|b)),LPeopra
(!X(a|X(!b))&(FX(g xor h)))R(!F(a|b)),LPuopra
(!X(a|X(!b))&(GX(g xor h)))U(!F(a|b)),LPpa
(!X(a|X(!b))&(FX(g xor h)))R(!G(a|b)),LPra
(!X(a|GXF(!b))&(FGX(g xor h)))U(!F(a|b)),LPpa
(!X(a|GXF(!b))&(FGX(g xor h)))R(!F(a|b)),LPupa
(!X(a|FXG(!b))&(GFX(g xor h)))R(!G(a|b)),LPra
(!X(a|FXG(!b))&(GFX(g xor h)))U(!G(a|b)),LPera
(!X(a|GXF(!b))&(FGX(g xor h)))U(!G(a|Fb)),LPepa
(!X(a|GXF(!b))&(FGX(g xor h)))U(!F(a|Gb)),LPa
(!X(a|FXG(!b))&(GFX(g xor h)))R(!F(a|Gb)),LPura
(!X(a|FXG(!b))&(GFX(g xor h)))R(!G(a|Fb)),LPa
GFa M GFb,&!xLPeua
FGa M FGb,&!xLPeupa
Fa  M GFb,&!xLPera
GFa W GFb,&!xLPeura
FGa W FGb,&!xLPeua
Ga  W FGb,&!xLPupa
Ga  W b,&!xLPsopra
Fa  M b,&!xLPgopra
{a;b*;c},&!fPsopra
{a;b*;c}!,&!fPgopra
126
# The negative normal form is {a;b*;c}[]->1
127 128 129
!{a;b*;c}!,&fPsopra
{a;b*;p112}[]->0,&!fPsopra
!{a;b*;c.2},&!fPgopr
130 131 132
!{a[+];b*;c[+]},&!fPgopra
!{a[+];b*;c*},&!xfPgopra
{a[+];b*;c[+]},&!fPsopra
133 134
{a[+] && b || c[+]},&!fPsopra
{a[+] && b[+] || c[+]},&!xfPsopra
135 136 137
{p[+]:p[+]},&!xfPsoprla
(!p W Gp) | ({(!p[*];(p[+]:(p[*];!p[+])))[:*4][:+]}<>-> (!p W Gp)),&!xPpla
{b[+][:*0..3]},&!fPsopra
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
138
{a->c[*]},xfPsopra
139
EOF
140

141
run 0 ../kind input