monitor.test 1.64 KB
Newer Older
1
2
#!/bin/sh
# -*- coding: utf-8 -*-
3
4
# Copyright (C) 2014, 2015 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
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
#
# 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

expect()
{
   cat >output.exp
   run 0 "$@" > output.out
   cat output.out
   diff output.out output.exp
}

expect ../../bin/ltl2tgba --monitor a <<EOF
digraph G {
36
  rankdir=LR
37
38
  I [label="", style=invis, width=0]
  I -> 1
39
  0 [label="0"]
40
  0 -> 0 [label="1"]
41
  1 [label="1"]
42
  1 -> 0 [label="a"]
43
44
45
46
47
48
49
}
EOF

expect ../../bin/ltl2tgba --monitor a --hoa<<EOF
HOA: v1
name: "a"
States: 2
50
Start: 1
51
52
53
54
AP: 1 "a"
acc-name: all
Acceptance: 0 t
properties: trans-labels explicit-labels state-acc deterministic
55
properties: stutter-invariant inherently-weak
56
57
--BODY--
State: 0
58
[t] 0
59
State: 1
60
[0] 0
61
62
63
64
65
66
67
68
69
70
71
--END--
EOF

expect ../../bin/ltl2tgba --monitor GFa --hoa<<EOF
HOA: v1
name: "GFa"
States: 1
Start: 0
AP: 0
acc-name: all
Acceptance: 0 t
72
73
properties: trans-labels explicit-labels state-acc complete
properties: deterministic stutter-invariant
74
75
76
77
78
--BODY--
State: 0
[t] 0
--END--
EOF