Debian Codegraph @

test/regress/cli/regress1/sygus/VC22_a.sy

raw
1 ; EXPECT: feasible
2 ; COMMAND-LINE: --lang=sygus2 --sygus-out=status
3 ; COMMAND-LINE: --lang=sygus2 --sygus-out=status --cegis-sample=use
4 (set-logic LIA)
5
6 (synth-fun f ((x1 Int) (x2 Int)) Int
7 ((Start Int) (StartBool Bool))
8 ((Start Int (0 1 x1 x2
9 (ite StartBool Start Start)))
10 (StartBool Bool ((= Start Start)))))
11
12 (define-fun vmin () Int 1)
13 (define-fun vmax () Int 2)
14
15 (define-fun Zero ((v Int)) Bool
16 (= v 0))
17
18 (define-fun InV1 ((v Int)) Bool
19 (and (>= v vmin) (<= v vmax)))
20
21 (define-fun InV2 ((v1 Int) (v2 Int)) Bool
22 (and (and (and (>= v1 vmin) (<= v1 vmax))
23 (>= v2 vmin)) (<= v2 vmax)))
24
25 (define-fun InVorZero ((v Int)) Bool
26 (or (InV1 v) (Zero v)))
27
28 (define-fun UnsafeSame ((x1 Int) (x2 Int) (v1 Int) (v2 Int)) Bool
29 (or (and (>= x1 x2) (>= (+ x2 v2) (+ x1 v1)))
30 (and (>= x2 x1) (>= (+ x1 v1) (+ x2 v2)))))
31
32 (define-fun Unsafe ((x1 Int) (x2 Int) (v1 Int) (v2 Int)) Bool
33 (UnsafeSame x1 x2 v1 v2))
34
35 (define-fun BadSame ((x1 Int) (x2 Int)) Bool
36 (= x1 x2))
37
38 (define-fun Bad ((x1 Int) (x2 Int)) Bool
39 (BadSame x1 x2))
40
41 (declare-var x1 Int)
42 (declare-var x2 Int)
43 (declare-var v1 Int)
44 (declare-var v2 Int)
45
46 (constraint (InVorZero (f x1 x2)))
47
48 (constraint (or (or (not (InV2 v1 v2))
49 (Zero (f x1 x2)))
50 (and (not (Unsafe x1 x2 (f x1 x2) (f x1 x2)))
51 (not (Zero (f (+ x1 (f x1 x2)) (+ x2 (f x1 x2))))))))
52
53 (constraint (or (or (not (InV2 v1 v2))
54 (or (Unsafe x1 x2 v1 v2)
55 (Zero (f (+ x1 v1) (+ x2 v2)))))
56 (not (Zero (f x1 x2)))))
57
58 (constraint (or (Bad x1 x2) (not (Zero (f x1 x2)))))
59
60 (check-synth)