This disables the CAV 2018 techniques for BV quantifier instantiation when solving sygus since they may generate terms with witness in them. This adds a regression where this occurs.
I've opened an cvc4 projects issue to revisit this (CVC4/cvc4-projects#227).
{
options::cegqiMidpoint.set(true);
}
+ // must disable cegqi-bv since it may introduce witness terms, which
+ // cannot appear in synthesis solutions
+ if (!options::cegqiBv.wasSetByUser())
+ {
+ options::cegqiBv.set(false);
+ }
if (options::sygusRepairConst())
{
if (!options::cegqi.wasSetByUser())
regress1/sygus/extract.sy
regress1/sygus/fast-enum-backtrack.sy
regress1/sygus/fg_polynomial3.sy
+ regress1/sygus/find_inv_eq_bvmul_4bit_withoutgrammar-v2.sy
regress1/sygus/find_sc_bvult_bvnot.sy
regress1/sygus/hd-01-d1-prog.sy
regress1/sygus/hd-19-d1-prog-dup-op.sy
--- /dev/null
+; EXPECT: unsat
+; COMMAND-LINE: --lang=sygus2 --sygus-out=status
+
+(set-logic BV)
+
+(synth-fun inv ((s (_ BitVec 4)) (t (_ BitVec 4))) (_ BitVec 4))
+
+(declare-var s (_ BitVec 4))
+(declare-var t (_ BitVec 4))
+
+
+(define-fun l ( (s (_ BitVec 4)) (t (_ BitVec 4))) Bool
+ (= (bvmul (inv s t) s) t)
+)
+(define-fun SC ((s (_ BitVec 4)) (t (_ BitVec 4))) Bool
+ (= (bvand (bvor (bvneg s) s) t) t)
+)
+(constraint
+ (=>
+ (SC s t)
+ (l s t)
+ )
+)
+
+; should not generate witness terms in solution
+(check-synth)
; EXPECT: unsat
-; COMMAND-LINE: --lang=sygus2 --sygus-out=status
+; COMMAND-LINE: --lang=sygus2 --sygus-out=status --cegqi-bv
(set-logic BV)
(synth-fun max2 ((x (_ BitVec 32)) (y (_ BitVec 32))) (_ BitVec 32))