; EXPECT: unsat
-; COMMAND-LINE: --cegqi-si=all --sygus-out=status
+; COMMAND-LINE: --lang=sygus2 --cegqi-si=all --sygus-out=status
(set-logic LIA)
(synth-fun constant ((x Int)) Int
+ ((Start Int))
((Start Int (0
2
3
(declare-var x Int)
(constraint (= (constant x) 100))
(check-synth)
-
; EXPECT: unsat
-; COMMAND-LINE: --cegqi-si=all --sygus-out=status --decision=justification
+; COMMAND-LINE: --lang=sygus2 --cegqi-si=all --sygus-out=status --decision=justification
(set-logic LIA)
(synth-fun P ((x Int) (y Int)) Bool
+ ((Start Bool) (StartIntC Int) (StartInt Int))
((Start Bool ((and Start Start)
(not Start)
(<= StartInt StartIntC)
; EXPECT: unsat
-; COMMAND-LINE: --cegqi-si=all --sygus-out=status
+; COMMAND-LINE: --lang=sygus2 --cegqi-si=all --sygus-out=status
(set-logic LIA)
(synth-fun max2 ((x Int) (y Int)) Int
+ ((Start Int) (StartBool Bool))
((Start Int ((Variable Int)
(Constant Int)
(+ Start Start)
(constraint (= (max2 x y) (+ x y 500)))
-
(check-synth)
-
-; COMMAND-LINE: --sygus-out=status --uf-ho
+; COMMAND-LINE: --lang=sygus2 --sygus-out=status --uf-ho
; EXPECT: unsat
-(set-logic UFLIA)
+(set-logic ALL)
-(declare-fun uf (Int) Int)
+(declare-var uf (-> Int Int))
(synth-fun f ((x Int) (y Int)) Bool
+ ((Start Bool) (IntExpr Int))
((Start Bool (true false
(<= IntExpr IntExpr)
(= IntExpr IntExpr)
-; COMMAND-LINE: --sygus-rr --sygus-samples=1000 --sygus-abort-size=3 --sygus-rr-verify-abort --no-sygus-sym-break
+; COMMAND-LINE: --lang=sygus2 --sygus-rr --sygus-samples=1000 --sygus-abort-size=3 --sygus-rr-verify-abort --no-sygus-sym-break
; EXPECT: (error "Maximum term size (3) for enumerative SyGuS exceeded.")
; SCRUBBER: grep -v -E '(\(define-fun|\(candidate-rewrite)'
; EXIT: 1
(set-logic SLIA)
-(synth-fun f ((x String) (y String)) Bool (
+(synth-fun f ((x String) (y String)) Bool
+((Start Bool) (StartRe RegLan) (StartStr String)) (
(Start Bool (
true
false
(= StartStr StartStr)
- (str.in.re StartStr StartRe)
+ (str.in_re StartStr StartRe)
))
(StartRe RegLan (
(re.++ StartRe StartRe)
(re.union StartRe StartRe)
(re.* StartRe)
- (str.to.re StartStr)
+ (str.to_re StartStr)
))
(StartStr String (
; EXPECT: unsat
-; COMMAND-LINE: --cegqi-si=all --sygus-out=status
+; COMMAND-LINE: --lang=sygus2 --cegqi-si=all --sygus-out=status
(set-logic BV)
-(define-fun hd19 ((x (BitVec 32)) (m (BitVec 32)) (k (BitVec 32))) (BitVec 32)
- (bvxor x (bvxor (bvshl (bvand (bvxor (bvlshr x k) x) m) k) (bvand (bvxor (bvlshr x k) x) m))))
+(define-fun hd19 ((x (_ BitVec 32)) (m (_ BitVec 32)) (k (_ BitVec 32))) (_ BitVec 32)
+ (bvxor x (bvxor (bvshl (bvand (bvxor (bvlshr x k) x) m) k) (bvand (bvxor (bvlshr x k) x) m))))
; bvand is a duplicate
-(synth-fun f ((x (BitVec 32)) (m (BitVec 32)) (k (BitVec 32))) (BitVec 32)
- ((Start (BitVec 32) ((bvand Start Start)
+(synth-fun f ((x (_ BitVec 32)) (m (_ BitVec 32)) (k (_ BitVec 32))) (_ BitVec 32)
+ ((Start (_ BitVec 32)))
+ ((Start (_ BitVec 32) ((bvand Start Start)
(bvsub Start Start)
(bvxor Start Start)
(bvor Start Start)
k))))
-(declare-var x (BitVec 32))
-(declare-var m (BitVec 32))
-(declare-var k (BitVec 32))
+(declare-var x (_ BitVec 32))
+(declare-var m (_ BitVec 32))
+(declare-var k (_ BitVec 32))
(constraint (= (hd19 x m k) (f x m k)))
(check-synth)
-
; EXPECT: unsat
-; COMMAND-LINE: --sygus-out=status
+; COMMAND-LINE: --lang=sygus2 --sygus-out=status
(set-logic ALL_SUPPORTED)
(declare-datatype Doc ((D (owner Int) (body Int))))
-(declare-datatype Policy
- ((p (principal Int))
+(declare-datatype Policy
+ ((p (principal Int))
(por (left Policy) (right Policy))))
(synth-fun mkPolicy ((d Doc)) Policy
+ ((Start Policy) (Q Policy))
((Start Policy (Q))
(Q Policy ((p 0) (p 1) (por Q Q))))
)
; EXPECT: unsat
-; COMMAND-LINE: --cegqi-si=all --sygus-out=status
+; COMMAND-LINE: --lang=sygus2 --cegqi-si=all --sygus-out=status
(set-logic LIA)
(synth-fun max ((x Int) (y Int)) Int
+ ((Start Int) (StartBool Bool))
((Start Int (0 1 x y
(+ Start Start)
(- Start Start)
(<= Start Start)))))
;(synth-fun min ((x Int) (y Int)) Int
+; ((Start Int) (StartBool Bool))
; ((Start Int ((Constant Int) (Variable Int)
; (+ Start Start)
; (- Start Start)
; EXPECT: unsat
-; COMMAND-LINE: --cegqi-si=all --cegqi-si-abort --decision=internal --cbqi-prereg-inst --cegqi-si-rcons=try --sygus-out=status
+; COMMAND-LINE: --lang=sygus2 --cegqi-si=all --cegqi-si-abort --decision=internal --cbqi-prereg-inst --cegqi-si-rcons=try --sygus-out=status
(set-logic BV)
(xor (not (xor a b)) (not (xor c d))))
(synth-fun NAND ((a Bool) (b Bool) (c Bool) (d Bool)) Bool
+ ((Start Bool) (StartAnd Bool) (Vars Bool) (Constants Bool))
((Start Bool ((not StartAnd) Vars Constants))
(StartAnd Bool ((and Start Start)))
(Vars Bool (a b c d))
; EXPECT: unsat
-; COMMAND-LINE: --sygus-out=status
+; COMMAND-LINE: --lang=sygus2 --sygus-out=status
(set-logic SLIA)
-(synth-fun f () RegLan (
+(synth-fun f () RegLan ((Start RegLan) (Tokens String)) (
(Start RegLan (
- (str.to.re Tokens)
+ (str.to_re Tokens)
(re.++ Start Start)))
(Tokens String ("A" "B"))
))
-(constraint (str.in.re "AB" f))
+(constraint (str.in_re "AB" f))
(check-synth)
; EXPECT: unsat
-; COMMAND-LINE: --sygus-out=status
+; COMMAND-LINE: --lang=sygus2 --sygus-out=status
(set-logic SLIA)
-(synth-fun P ((x String)) Bool (
-(Start Bool (
- (str.in.re StartStr StartRL)
+(synth-fun P ((x String)) Bool
+ ((Start Bool) (StartStr String) (StartStrC String) (StartRL RegLan) (StartRLi RegLan)) (
+ (Start Bool (
+ (str.in_re StartStr StartRL)
))
-(StartStr String (
- x
- (str.++ StartStr StartStr)
+ (StartStr String (
+ x
+ (str.++ StartStr StartStr)
+ ))
+ (StartStrC String (
+ "A" "B" ""
+ (str.++ StartStrC StartStrC)
+ ))
+ (StartRL RegLan (
+ (re.++ StartRLi StartRLi)
+ (re.inter StartRL StartRL)
+ (re.union StartRL StartRL)
+ (re.* StartRLi)
+ ))
+ (StartRLi RegLan (
+ (str.to_re StartStrC)
+ (re.inter StartRLi StartRLi)
+ (re.union StartRLi StartRLi)
+ (re.++ StartRLi StartRLi)
+ (re.* StartRLi)
))
-(StartStrC String (
- "A" "B" ""
- (str.++ StartStrC StartStrC)))
-(StartRL RegLan (
-(re.++ StartRLi StartRLi)
-(re.inter StartRL StartRL)
-(re.union StartRL StartRL)
-(re.* StartRLi)
-))
-(StartRLi RegLan (
-(str.to.re StartStrC)
-(re.inter StartRLi StartRLi)
-(re.union StartRLi StartRLi)
-(re.++ StartRLi StartRLi)
-(re.* StartRLi)
-))
))
(constraint (P "AAAAA"))
(constraint (not (P "AB")))
(constraint (not (P "B")))
-; (str.in.re x (re.* (str.to.re "A"))) is a solution
+; (str.in_re x (re.* (str.to_re "A"))) is a solution
(check-synth)
; EXPECT: unsat
-; COMMAND-LINE: --sygus-out=status --uf-ho
-(set-logic UFLIA)
-(declare-fun uf ( Int ) Int)
+; COMMAND-LINE: --lang=sygus2 --sygus-out=status --uf-ho
+(set-logic ALL)
+
+(declare-var uf (-> Int Int))
+
(synth-fun f ((x Int) (y Int)) Bool
-((Start Bool (true false
- (<= IntExpr IntExpr )
- (= IntExpr IntExpr )
- (and Start Start )
- (or Start Start )
- (not Start )))
-(IntExpr Int (0 1 x y
- (+ IntExpr IntExpr )
- (- IntExpr IntExpr )))))
+ ((Start Bool) (IntExpr Int))
+ ((Start Bool (true false
+ (<= IntExpr IntExpr)
+ (= IntExpr IntExpr)
+ (and Start Start)
+ (or Start Start)
+ (not Start )))
+ (IntExpr Int (0 1 x y
+ (+ IntExpr IntExpr)
+ (- IntExpr IntExpr)))))
+
(declare-var x Int)
+
(constraint (f (uf x) (uf x)))
(constraint (not (f 3 4)))
+
(check-synth)