We are adding a preprocessing pass that simplifies arithmetic constraints related to strings.
For example, len(s) >= 0 would be replaced by true.
This will make use of CVC4::theory::strings::ArithEntail::check.
This PR is the third and final step. It adds the user-facing option that turn this feature on, as well as regression tests.
read_only = true
help = "Force no CPU limit when dumping models and proofs"
+[[option]]
+ name = "foreignTheoryRewrite"
+ category = "regular"
+ long = "foreign-theory-rewrite"
+ type = "bool"
+ default = "false"
+ read_only = true
+ help = "Cross-theory rewrites"
+
+
[[option]]
name = "solveBVAsInt"
category = "undocumented"
{
d_passes["bv-to-int"]->apply(&assertions);
}
+ if (options::foreignTheoryRewrite())
+ {
+ d_passes["foreign-theory-rewrite"]->apply(&assertions);
+ }
// Since this pass is not robust for the information tracking necessary for
// unsat cores, it's only applied if we are not doing unsat core computation
regress0/seq/issue5543-unit-cmv.smt2
regress0/seq/issue5547-seq-len-unit.smt2
regress0/seq/issue5547-small-seq-len-unit.smt2
+ regress0/seq/len_simplify.smt2
regress0/seq/seq-2var.smt2
regress0/seq/seq-ex1.smt2
regress0/seq/seq-ex2.smt2
--- /dev/null
+; COMMAND-LINE: --foreign-theory-rewrite -q
+; EXPECT: sat
+(set-logic ALL)
+(assert (forall ((x (Seq Int)) ) (>= (seq.len x) 0)))
+(check-sat)