| 1 |
; EXPECT: feasible |
| 2 |
; COMMAND-LINE: --sygus-out=status --lang=sygus2 |
| 3 |
|
| 4 |
(set-logic S) |
| 5 |
|
| 6 |
(set-option :sygus-rec-fun true) |
| 7 |
(set-option :e-matching false) |
| 8 |
|
| 9 |
(define-sort Rex () RegLan) |
| 10 |
|
| 11 |
|
| 12 |
;SyGuS Grammar Definition. |
| 13 |
(synth-fun phi () Rex |
| 14 |
|
| 15 |
((<R> Rex)) |
| 16 |
((<R> Rex ( |
| 17 |
|
| 18 |
; alphabets |
| 19 |
(str.to_re "r") ; r = request |
| 20 |
(str.to_re "g") ; g = grant |
| 21 |
(str.to_re "e") ; e = empty |
| 22 |
(str.to_re "b") ; b = request, grant |
| 23 |
|
| 24 |
; (re.none <R>) |
| 25 |
; (re.all <R>) |
| 26 |
|
| 27 |
; CHOICE |
| 28 |
(re.union <R> <R>) |
| 29 |
|
| 30 |
; CONCATENATION |
| 31 |
(re.++ <R> <R>) |
| 32 |
|
| 33 |
; INTERSECTION |
| 34 |
(re.inter <R> <R>) |
| 35 |
|
| 36 |
; STAR |
| 37 |
(re.* <R>) |
| 38 |
|
| 39 |
; PLUS |
| 40 |
(re.+ <R>) |
| 41 |
|
| 42 |
; Complement / Don't work |
| 43 |
(re.comp <R>) |
| 44 |
|
| 45 |
; Difference / Don't work |
| 46 |
(re.diff <R> <R>) |
| 47 |
|
| 48 |
(re.opt <R>) |
| 49 |
|
| 50 |
))) |
| 51 |
) |
| 52 |
|
| 53 |
(define-fun w1() String "ee") |
| 54 |
|
| 55 |
(constraint (str.in_re w1 phi)) |
| 56 |
|
| 57 |
(define-fun n1() String "bbegre") |
| 58 |
(constraint (str.in_re n1 (re.comp phi))) |
| 59 |
|
| 60 |
(check-synth) |