// The translation is done differently for variables (bound or free) and
// constants (values)
- Assert(original.isVar() || original.isConst() || original.isNullaryOp());
if (original.isVar())
{
if (original.getType().isBitVector())
}
else
{
- // original is a constant (value) or a nullary op (e.g., PI)
+ // original is a constant (value) or an operator with no arguments (e.g., PI)
if (original.getKind() == kind::CONST_BITVECTOR)
{
// Bit-vector constants are transformed into their integer value.
}
else
{
- // Other constants or nullary ops stay the same.
+ // Other constants or operators stay the same.
translation = original;
}
}
{
};
+TEST_F(TestApiBlackSolver, proj_issue416)
+{
+ Solver slv;
+ slv.setOption("solve-bv-as-int", "sum");
+ slv.setOption("strings-exp", "true");
+ Sort s1 = slv.getStringSort();
+ Term t27 = slv.mkConst(s1, "_x50");
+ Term t333 = slv.mkRegexpAll();
+ Term t1243 = slv.mkTerm(Kind::STRING_REPLACE_RE_ALL, {t27, t333, t27});
+ Term t1291 = slv.mkTerm(Kind::EQUAL, {t1243, t27});
+ slv.assertFormula(t1291);
+ slv.checkSat();
+}
+
TEST_F(TestApiBlackSolver, pow2Large1)
{
// Based on https://github.com/cvc5/cvc5-projects/issues/371