emptchk.test 841 Bytes
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
#!/bin/sh

. ./defs

set -e

expect_ce()
{
  ./ltl2tgba -e "$1"
  ./ltl2tgba -e -D "$1"
  ./ltl2tgba -e -f "$1"
  ./ltl2tgba -e -f -D "$1"
  ./ltl2tgba -m "$1"
  ./ltl2tgba -m -f "$1"
}

expect_no()
{
  ./ltl2tgba -E "$1"
  ./ltl2tgba -E -D "$1"
  ./ltl2tgba -E -f "$1"
  ./ltl2tgba -E -f -D "$1"
  ./ltl2tgba -M "$1"
  ./ltl2tgba -M -f "$1"
}

expect_ce 'a'
expect_ce 'a U b'
expect_ce 'X a'
expect_ce 'a & b & c'
expect_ce 'a | b | (c U (d & (g U (h ^ i))))'
expect_ce 'Xa & (b U !a) & (b U !a)'
expect_ce 'Fa & Xb & GFc & Gd'
expect_ce 'Fa & Xa & GFc & Gc'
expect_ce 'Fc & X(a | Xb) & GF(a | Xb) & Gc'
expect_ce '!((FF a) <=> (F x))'
expect_no '!((FF a) <=> (F a))'
expect_no 'Xa && (!a U b) && !b && X!b'
expect_no '(a U !b) && Gb'

41
42
# Expect at least four counter-examples.
test `./ltl2tgba -n 'FFx <=> Fx' | grep Prefix: | wc -l` -ge 4