summaryrefslogtreecommitdiff
path: root/test/regress/regress0/sets/sets-sample.smt2
blob: 1bd0eb396237e8972ac85332640bdac26e8f6a8c (plain)
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
; COMMAND-LINE: --incremental
; EXPECT: unsat
; EXPECT: unsat
; EXPECT: unsat
; EXPECT: unsat
(set-logic ALL_SUPPORTED)
(define-sort SetInt () (Set Int))

; Something simple to test parsing
(push 1)
(declare-fun a () (Set Int))
(declare-fun b () (Set Int))
(declare-fun c () (Set Int))
(declare-fun e () Int)
(assert (= a (setenum 5)))
(assert (= c (union a b) ))
(assert (not (= c (intersection a b) )))
(assert (= c (setminus a b) ))
(assert (subseteq a b))
(assert (in e c))
(assert (in e a))
(assert (in e (intersection a b)))
(check-sat)
(pop 1)

; UF can tell that this is UNSAT (union)
(push 1)
(declare-fun x () (Set Int))
(declare-fun y () (Set Int))
(declare-fun z () (Set Int))
(assert (= x y))
(assert (not (= (union x z) (union y z))))
(check-sat)
(pop 1)

; UF can tell that this is UNSAT (containment)
(push 1)
(declare-fun x () (Set Int))
(declare-fun y () (Set Int))
(declare-fun e1 () Int)
(declare-fun e2 () Int)
(assert (= x y))
(assert (= e1 e2))
(assert (in e1 x))
(assert (not (in e2 y)))
(check-sat)
(pop 1)

; UF can tell that this is UNSAT (merge union + containment examples)
(push 1)
(declare-fun x () (Set Int))
(declare-fun y () (Set Int))
(declare-fun z () (Set Int))
(declare-fun e1 () Int)
(declare-fun e2 () Int)
(assert (= x y))
(assert (= e1 e2))
(assert (in e1 (union x z)))
(assert (not (in e2 (union y z))))
(check-sat)
(pop 1)
 
(exit) 
(exit)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback