summaryrefslogtreecommitdiff
path: root/test/regress/regress0/bug567.smt2
blob: 37403d8a30dc718f4a3b4884ff9ce188293f6a2d (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
(set-logic ALL_SUPPORTED)
; COMMAND-LINE: --incremental
; EXPECT: unknown
; EXPECT: unsat
; EXPECT: unknown
(declare-datatypes () ((OptInt0 (Some (value0 Int)) (None))))
(declare-datatypes () ((List0 (Cons (head0 Int) (tail0 List0)) (Nil))))

(declare-fun errorValue2 () Bool)
(declare-fun errorValue1 () Bool)





(declare-fun size (List0) Int)
(declare-fun mergeInto (List0 List0) List0)
(declare-fun isSorted (List0) Bool)
(declare-fun buggySortedIns (Int List0) List0)
(declare-fun sortedIns (Int List0) List0)
(declare-fun sort (List0) List0)
(declare-fun contents (List0) (Set Int))

(assert (forall ((l List0)) (! (= (size l) (ite (is-Nil l) 0 (+ 1 (size (tail0 l))))) :pattern ((size l)))))
(assert (forall ((l1 List0) (l2 List0)) (! (= (mergeInto l1 l2) (ite (is-Nil l1) l2 (mergeInto (tail0 l1) (sortedIns (head0 l1) l2)))) :pattern ((mergeInto l1 l2)))))
(assert (forall ((l2 List0)) (! (= (isSorted l2) (ite (is-Nil l2) true (ite (and (is-Cons l2) (is-Nil (tail0 l2))) true (ite (and (is-Cons l2) (is-Cons (tail0 l2))) (and (<= (head0 l2) (head0 (tail0 l2))) (isSorted (Cons (head0 (tail0 l2)) (tail0 (tail0 l2))))) errorValue1)))) :pattern ((isSorted l2)))))
(assert (forall ((l4 List0) (e1 Int)) (! (= (buggySortedIns e1 l4) (ite (is-Nil l4) (Cons e1 Nil) (ite (<= (head0 l4) e1) (Cons (head0 l4) (buggySortedIns e1 (tail0 l4))) (Cons e1 l4)))) :pattern ((buggySortedIns e1 l4)))))
(assert (forall ((l3 List0) (e Int)) (! (= (sortedIns e l3) (ite (is-Nil l3) (Cons e Nil) (ite (<= (head0 l3) e) (Cons (head0 l3) (sortedIns e (tail0 l3))) (Cons e l3)))) :pattern ((sortedIns e l3)))))
(assert (forall ((l5 List0)) (! (= (sort l5) (ite (is-Nil l5) Nil (sortedIns (head0 l5) (sort (tail0 l5))))) :pattern ((sort l5)))))
(assert (forall ((l1 List0)) (! (= (contents l1) (ite (is-Nil l1) (as emptyset (Set Int)) (union (contents (tail0 l1)) (singleton (head0 l1))))) :pattern ((contents l1)))))



(push)
(assert (forall ((l List0)) (not (let ((result (ite (is-Nil l) 0 (+ 1 (size (tail0 l)))))) (>= result 0)))))
(check-sat)
(pop)

(push)
(assert (forall ((l2 List0)) (not (not (and (not (is-Nil l2)) (not (and (is-Cons l2) (is-Nil (tail0 l2)))) (not (and (is-Cons l2) (is-Cons (tail0 l2)))))))))
(check-sat)
(pop)

(push)
(assert (forall ((l4 List0) (e1 Int)) (not (let ((result2 (ite (is-Nil l4) (Cons e1 Nil) (ite (<= (head0 l4) e1) (Cons (head0 l4) (buggySortedIns e1 (tail0 l4))) (Cons e1 l4))))) (and (= (contents result2) (union (contents l4) (singleton e1))) (isSorted result2) (= (size result2) (+ (size l4) 1)))))))
(check-sat)
(pop)

generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback