Debian Codegraph @

test/regress/cli/regress1/fmf/cons-sets-bounds.smt2

raw
1 ; COMMAND-LINE: --fmf-bound
2 ; EXPECT: sat
3 (set-logic ALL)
4 (declare-datatypes ((list 0)) (((cons (head Int) (tail list)) (nil))))
5
6 (declare-fun P (Int) Bool)
7 (declare-fun S () (Set list))
8
9 ; can use simple unification to infer bounds on x and y
10 (assert (forall ((x Int) (y list)) (=> (set.member (cons x y) S) (P x))))
11
12 (assert (set.member (cons 4 (cons 1 nil)) S))
13 (assert (set.member (cons 2 nil) S))
14
15 ; should construct instantiation involving selectors for l
16 (declare-fun l () list)
17 (assert ((_ is cons) l))
18 (assert (set.member l S))
19
20 ; should not contribute to instantiations
21 (assert (set.member nil S))
22
23 (assert (not (P 1)))
24 (assert (not (P 0)))
25
26 (check-sat)