run 2.74 KB
Newer Older
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
1
#!/bin/sh
2
# Copyright (C) 2010, 2011 Laboratoire de Recherche et Dveloppement
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
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
# 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 2 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 Spot; see the file COPYING.  If not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.

. ./defs

cat >obligations.txt <<EOF
G(!p)
Fr->(!p U r)
G(q->G(!p))
G((q&!r&Fr)->(!p U r))
G(q&!r->((!p U r)|G!p))
Fp
(!r U (p&!r))|(G!r)
G(!q)|F(q&Fp)
G(q&!r->((!r U (p&!r))|G!r))
(!p U ((p U ((!p U ((p U G!p)|Gp))|G!p))|Gp))|G!p
Fr->((!p&!r)U(r|((p&!r)U(r|((!p&!r)U(r|((p&!r)U(r|(!p U r)))))))))
Fq->(!q U (q&((!p U ((p U ((!p U ((p U G!p)|Gp))|G!p))|Gp))|G!p)))
G((q&Fr)->((!p&!r)U(r|((p&!r)U(r|((!p&!r)U(r|((p&!r)U(r|(!p U r))))))))))
G(q->((!p&!r)U(r|((p&!r)U(r|((!p&!r)U(r|((p&!r)U(r|((!p U r)|G!p)|Gp)))))))))
G(p)
Fr->(p U r)
G(q->G(p))
G((p&!r&Fr)->(p U r))
G(q&!r->((p U r)|Gp))
(!p U s)|Gp
Fr->(!p U (s|r))
G((q&!r&Fr)->(!p U (s|r)))
G(q&!r->((!p U (s|r))|G!p))
Fr->(p->(!r U (s&!r))) U r
G((q&!r&Fr)->(p->(!r U (s&!r))) U r)
Fp->(!p U (s&!p&X(!p U t)))
Fr->(!p U (r|(s&!p&X(!p U t))))
(G!q)|(!q U (q&Fp->(!p U (s&!p&X(!p U t)))))
G((q&Fr)->(!p U (r|(s&!p&X(!p U t)))))
G(q->(Fp->(!p U (r|(s&!p&X(!p U t))))))
(F(s&XFt))->((!s) U p)
Fr->((!(s&(!r)&X(!r U (t&!r))))U(r|p))
(G!q)|((!q)U(q&((F(s&XFt))->((!s) U p))))
G((q&Fr)->((!(s&(!r)&X(!r U (t&!r))))U(r|p)))
G(q->(!(s&(!r)&X(!r U (t&!r)))U(r|p)|G(!(s&XFt))))
Fr->(s&X(!r U t)->X(!r U (t&Fp))) U r
Fr->(p->(!r U (s&!r&X(!r U t)))) U r
G((q&Fr)->(p->(!r U (s&!r&X(!r U t)))) U r)
Fr->(p->(!r U (s&!r&!z&X((!r&!z) U t)))) U r
G((q&Fr)->(p->(!r U (s&!r&!z&X((!r&!z) U t)))) U r)
EOF

(
line=0
echo "# form. nbr., states, trans., states minimized, trans. minimized, formula"
while read f; do
71
  "$LTL2TGBA" -f -r7 -x -R3 -DS -kt "!($f)" >out
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
72
  states=`sed -n 's/^states: \([0-9]*\)$/\1/p' out`
73
  transitions=`sed -n 's/^sub trans.: \([0-9]*\)$/\1/p' out`
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
74

75
  "$LTL2TGBA" -f -r1 -R3 -Rm -kt "!($f)" >out
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
76
  states2=`sed -n 's/^states: \([0-9]*\)$/\1/p' out`
77
  transitions2=`sed -n 's/^sub trans.: \([0-9]*\)$/\1/p' out`
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
78

79
  line=`expr $line + 1`
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
80
81
82
83
84
  echo "$line, $states, $transitions, $states2, $transitions2, !($f)"
done < obligations.txt
) | tee results.txt

rm -f out obligations.txt