| 1 |
; EXPECT: feasible |
| 2 |
; COMMAND-LINE: --lang=sygus2 --sygus-out=status |
| 3 |
|
| 4 |
(set-logic DTSLIA) |
| 5 |
(declare-datatype DT ((A (a Int)) (B (b String)) (JSBool (jsBool Bool)))) |
| 6 |
|
| 7 |
(define-fun isA ((i DT)) Bool ((_ is A) i)) |
| 8 |
(define-fun isB ((i DT)) Bool ((_ is B) i)) |
| 9 |
|
| 10 |
(synth-fun add ((x1 DT)) DT |
| 11 |
((ntDT DT) (ntBool Bool) (ntInt Int)) |
| 12 |
( |
| 13 |
(ntDT DT |
| 14 |
( x1 |
| 15 |
(JSBool ntBool) |
| 16 |
(A ntInt) |
| 17 |
(ite ntBool ntDT ntDT) |
| 18 |
) |
| 19 |
) |
| 20 |
(ntBool Bool |
| 21 |
( |
| 22 |
(isA ntDT) |
| 23 |
(isB ntDT) |
| 24 |
(jsBool ntDT) |
| 25 |
) |
| 26 |
) |
| 27 |
(ntInt Int |
| 28 |
(1 |
| 29 |
(a ntDT) |
| 30 |
(+ ntInt ntInt) |
| 31 |
) |
| 32 |
) |
| 33 |
) |
| 34 |
) |
| 35 |
(constraint (= (add (A 6)) (A 7))) |
| 36 |
(constraint (= (add (B "j")) (B "j"))) |
| 37 |
(check-synth) |