satmin.test 2.28 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2013 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 <http://www.gnu.org/licenses/>.

. ./defs
set -e

# Skip if $SATSOLVE is not installed.
(${SATSOLVER-glucose} --help >/dev/null 2>&1) || exit 77

ltl2tgba=../../bin/ltl2tgba
ltlcross=../../bin/ltlcross

cat >formulas <<'EOF'
XXa
GF(a -> XXXb)
F(p & XF(q & XF(r & XFs)))
F(q & X(p U r))
F(p & X(q & XFr))
p U (q & X(r U s))
G(a -> Fb) & G(c -> Fd)
GFa & GFb
GFa | GFb | GFc
GFa
a U b U c U d
G(a -> Fb) & Gc
(Ga -> Fb) & (G!a -> F!b)
p U (q & X(r & F(s & XF(u & XF(v & XFw)))))
G(a -> Fb) & G(b -> Fc)
G(a -> Fb) & G(!a -> F!b)
GFp && GFq && GF r && GF u
GF(a <-> XXXb)
G(p -> q U r)
GF(a <-> XXb)
G!c & G(a -> Fb) & G(b -> Fc)
G(a -> XXXb)
G(a -> Fb)
G(a U b U !a U !b)
(p U q U r) || (q U r U p) || (r U p U q)
X((a M F((!c & !b) | (c & b))) W (G!c U b))
X(((a & b) R (!a U !c)) R b)
XXG(Fa U Xb)
(!a M !b) W F!c
(b & Fa & GFc) R a
(a R (b W a)) W G(!a M (c | b))
(Fa W b) R (Fc | !a)
X(G(!a M !b) | G(a | G!a))
Fa W Gb
Ga | GFb
G((G!a & ((!b & X!c) | (b & Xc))) | (Fa & ((!b & Xc) | (b & X!c))))
a M G(F!b | X!a)
G!a R XFb
XF(!a | GFb)
G(F!a U !a) U Xa
(a | G(a M !b)) W Fc
Fa W Xb
X(a R ((!b & F!c) M X!a))
XG!a R Fb
GFc | (a & Fb)
X(a R (Fb R F!b))
G(Xa M Fa)
X(Gb | GFa)
X(Gc | XG((b & Ga) | (!b & F!a)))
Ga R Fb
G(a U (b | X((!c & !a) | (a & c))))
XG((G!a & F!b) | (Fa & (a | Gb)))
(a U X!a) | XG(!b & XFc)
X(G!a | GFa)
G(G!a | F!c | G!b)
EOF

$ltlcross -F formulas \
  --timeout=300 \
  "$ltl2tgba --det --lbtt %f >%T" \
  "$ltl2tgba --det --lbtt -x tba-det --lbtt %f >%T" \
  "$ltl2tgba --det --lbtt -x tba-det,sat-minimize --lbtt %f >%T" \
  --json=det.json