| 1 |
; COMMAND-LINE: --relational-triggers --full-saturate-quant |
| 2 |
; EXPECT: unsat |
| 3 |
(set-logic UFNIA) |
| 4 |
(set-info :status unsat) |
| 5 |
|
| 6 |
(declare-fun two_to_the (Int) Int) |
| 7 |
|
| 8 |
|
| 9 |
;other definitions |
| 10 |
(define-fun intmax ((k Int)) Int (- (two_to_the k) 1)) |
| 11 |
(define-fun intmodtotal ((k Int) (a Int) (b Int)) Int (ite (= b 0) a (mod a b))) |
| 12 |
(define-fun intnot ((k Int) (a Int)) Int (- (intmax k) a)) |
| 13 |
(define-fun intadd ((k Int) (a Int) (b Int) ) Int (intmodtotal k (+ a b) (two_to_the k))) |
| 14 |
|
| 15 |
;l and SC |
| 16 |
(define-fun l ((k Int) (x Int) (s Int) (t Int)) Bool (distinct (intadd k x s) t)) |
| 17 |
(define-fun SC ((k Int) (s Int) (t Int)) Bool true) |
| 18 |
|
| 19 |
;conditional inverse |
| 20 |
(define-fun inv ((k Int) (s Int) (t Int)) Int (intnot k (intadd k s t))) |
| 21 |
|
| 22 |
(declare-fun k () Int) |
| 23 |
(declare-fun s () Int) |
| 24 |
(declare-fun t () Int) |
| 25 |
|
| 26 |
(define-fun left_to_right ((k Int) (s Int) (t Int)) Bool (=> (SC k s t) (l k (inv k s t) s t))) |
| 27 |
(define-fun assertion_ltr () Bool (not (left_to_right k s t))) |
| 28 |
|
| 29 |
;range helpers (everything between 0 and 2^k) |
| 30 |
(define-fun in_range ((k Int) (x Int)) Bool (and (>= x 0) (< x (two_to_the k)))) |
| 31 |
(define-fun range_assumptions ((k Int) (s Int) (t Int)) Bool (and (>= k 1) (in_range k s) (in_range k t))) |
| 32 |
|
| 33 |
;original assertions |
| 34 |
(assert (range_assumptions k s t)) |
| 35 |
|
| 36 |
(assert assertion_ltr) |
| 37 |
(declare-fun dummy (Int) Bool) |
| 38 |
(assert (dummy t)) |
| 39 |
(assert (forall ((x Int)) (! (=> (>= x 0) (and (dummy x) (distinct (- (two_to_the k) 1) (* 2 x)))) :pattern ((dummy x))) )) |
| 40 |
|
| 41 |
; relational-triggers segfaulted this previous due to a quantified formula that only has a relational trigger, which is unusable |
| 42 |
(check-sat) |