tcp enabled gast version added
[tt2015.git] / a3 / code / Gast / stdProperty.dcl
1 definition module stdProperty
2
3 /*
4 GAST: A Generic Automatic Software Test-system
5
6 stdProperty: opertors on logical properties
7
8 Pieter Koopman, 2004
9 Radboud Universty, Nijmegen
10 The Netherlands
11 pieter@cs.ru.nl
12 */
13
14 import genLibTest
15 import testable
16
17 class (\/) infixr 2 a b :: !a b -> Property // Conditional or of arg1 and arg2
18 class (/\) infixr 3 a b :: !a b -> Property // Conditional and of arg1 and arg2
19
20 instance /\ Bool Bool
21 instance /\ Property Bool
22 instance /\ Bool Property
23 instance /\ Property Property
24
25 instance \/ Bool Bool
26 instance \/ Property Bool
27 instance \/ Bool Property
28 instance \/ Property Property
29
30 class (==>) infixr 1 b :: b p -> Property | Testable p
31
32 instance ==> Bool
33 instance ==> Property
34
35 (<==>) infix 4 :: !a !b -> Property | Testable a & Testable b // True if properties are equivalent
36
37 ExistsIn :: (x->p) [x] -> Property | Testable p & TestArg x // type is too restricive
38 Exists :: (x->p) -> Property | Testable p & TestArg x
39 ForAll :: !(x->p) -> Property | Testable p & TestArg x
40
41 ForEach :: ![x] !(x->p) -> Property | Testable p & TestArg x
42 (For) infixl 0 :: !(x->p) ![x] -> Property | Testable p & TestArg x
43 (ForAndGen) infixl 0 :: !(x->p) ![x] -> Property | Testable p & TestArg x
44
45 classify :: !Bool l !p -> Property | Testable p & genShow{|*|} l
46 label :: !l !p -> Property | Testable p & genShow{|*|} l
47 name :: !n !p -> Property | Testable p & genShow{|*|} n
48
49 instance ~ Bool
50 instance ~ Property