Debian Codegraph @

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

raw
1 ; EXPECT: feasible
2 ; COMMAND-LINE: --lang=sygus2 --sygus-out=status
3 (set-logic LIA)
4 (synth-fun inv ((l Int)) Bool
5 (
6 (Start Bool ((and AtomicFormula AtomicFormula)
7 (or AtomicFormula AtomicFormula)))
8 (AtomicFormula Bool ((<= Sum Const) (= Sum Const)))
9 (Sum Int ((+ Term Term)))
10 (Term Int ((* Sign Var)))
11 (Sign Int (0 1 (- 1)))
12 (Var Int (l))
13 (Const Int ((- 3) (- 2) (- 1) 0 1 2 3))
14 )
15 )
16
17 (define-fun implies ((b1 Bool) (b2 Bool)) Bool (or (not b1) b2))
18 (define-fun and3 ((b1 Bool) (b2 Bool) (b3 Bool)) Bool (and (and b1 b2) b3))
19 (define-fun and4 ((b1 Bool) (b2 Bool) (b3 Bool) (b4 Bool)) Bool (and (and3 b1 b2 b3) b4))
20 (define-fun and5 ((b1 Bool) (b2 Bool) (b3 Bool) (b4 Bool) (b5 Bool)) Bool (and (and4 b1 b2 b3 b4) b5))
21 (define-fun and6 ((b1 Bool) (b2 Bool) (b3 Bool) (b4 Bool) (b5 Bool) (b6 Bool)) Bool (and (and5 b1 b2 b3 b4 b5) b6))
22 (define-fun or3 ((b1 Bool) (b2 Bool) (b3 Bool)) Bool (or (or b1 b2) b3))
23 (define-fun or4 ((b1 Bool) (b2 Bool) (b3 Bool) (b4 Bool)) Bool (or (or3 b1 b2 b3) b4))
24 (define-fun or5 ((b1 Bool) (b2 Bool) (b3 Bool) (b4 Bool) (b5 Bool)) Bool (or (or4 b1 b2 b3 b4) b5))
25
26 (declare-var x0 Int)
27 (declare-var x1 Int)
28 (declare-var x2 Int)
29 (declare-var x3 Int)
30 (declare-var x4 Int)
31 (declare-var l Int)
32 (declare-var x0p Int)
33 (declare-var x1p Int)
34 (declare-var x2p Int)
35 (declare-var x3p Int)
36 (declare-var x4p Int)
37
38 (constraint (implies (and6 (= l 0) (or (= x0p (+ x0 1)) (= x0p (- x0 1)))
39 (or (= x1p (+ x1 1)) (= x1p (- x1 1)))
40 (or (= x2p (+ x2 1)) (= x2p (- x2 1)))
41 (or (= x3p (+ x3 1)) (= x3p (- x3 1)))
42 (or (= x4p (+ x4 1)) (= x4p (- x4 1))))
43 (inv l)))
44 (constraint (implies (and (inv l) (not (= l 0))) false))
45
46 (check-synth)