Debian Codegraph @

test/regress/cli/regress1/sygus/sygus-dt.sy

raw
1 ; EXPECT: feasible
2 ; COMMAND-LINE: --lang=sygus2 --sygus-out=status --decision=justification
3
4 (set-logic LIA)
5
6 (declare-datatypes ((List 0)) (((cons (head Int) (tail List)) (nil))))
7 (define-fun g ((x Int)) List (cons (+ x 1) nil))
8 (define-fun i () List (cons 3 nil))
9
10 (synth-fun f ((x Int)) List
11 ((Start List) (StartInt Int))
12 ((Start List ((g StartInt) i (cons StartInt Start) nil (tail Start)))
13 (StartInt Int (x 0 1 (+ StartInt StartInt)))))
14
15 (declare-var x Int)
16
17 (constraint (= (f x) (cons x nil)))
18 (check-synth)