d_tt(),
d_ffDt(),
d_ttDt(),
- d_varCache(),
- d_termCache(),
+ d_varCache(smt.d_userContext),
+ d_termCache(smt.d_userContext),
d_typeCache(),
d_datatypeCache() {
if(dt != dt2) {
Assert(d_varCache.find(top) != d_varCache.end(),
"constructor `%s' not in cache", top.toString().c_str());
- result.top() << d_varCache[top];
+ result.top() << d_varCache[top].get();
worklist.pop();
goto next_worklist;
}
if(dt != dt2) {
Assert(d_varCache.find(top) != d_varCache.end(),
"tester or selector `%s' not in cache", top.toString().c_str());
- result.top() << d_varCache[top];
+ result.top() << d_varCache[top].get();
worklist.pop();
goto next_worklist;
} else {
class BooleanTermConverter {
/** The type of the Boolean term conversion variable cache */
- typedef std::hash_map<Node, Node, NodeHashFunction> BooleanTermVarCache;
+ typedef context::CDHashMap<Node, Node, NodeHashFunction> BooleanTermVarCache;
/** The type of the Boolean term conversion cache */
- typedef std::hash_map< std::pair<Node, theory::TheoryId>, Node,
- PairHashFunction< Node, bool,
- NodeHashFunction, std::hash<size_t> > > BooleanTermCache;
+ typedef context::CDHashMap< std::pair<Node, theory::TheoryId>, Node,
+ PairHashFunction< Node, bool,
+ NodeHashFunction, std::hash<size_t> > > BooleanTermCache;
/** The type of the Boolean term conversion type cache */
typedef std::hash_map< std::pair<TypeNode, bool>, TypeNode,
PairHashFunction< TypeNode, bool,
d_assertionsToCheck[d_substitutionsIndex] =
Rewriter::rewrite(Node(substitutionsBuilder));
}
- }
- else {
+ } else {
// If not in incremental mode, must add substitutions to model
TheoryModel* m = d_smt.d_theoryEngine->getModel();
if(m != NULL) {
# Regression tests for SMT2 inputs
SMT2_TESTS = \
arrayinuf_declare.smt2 \
+ boolean-terms-kernel1.smt2 \
+ boolean-terms-kernel2.smt2 \
chained-equality.smt2 \
ite2.smt2 \
ite3.smt2 \
--- /dev/null
+; COMMAND-LINE: --incremental
+; EXPECT: sat
+; EXPECT: sat
+(set-logic QF_ABV)
+(declare-fun b () (_ BitVec 32))
+(declare-fun hk () (Array Bool (_ BitVec 32)))
+(push 1)
+(assert (not (= b (select hk true))))
+(check-sat)
+(pop 1)
+(assert (not (= b (_ bv0 32))))
+(assert (= b (select hk true)))
+(check-sat)
--- /dev/null
+; COMMAND-LINE: --incremental
+; EXPECT: unsat
+; EXPECT: sat
+(set-logic QF_ABV)
+(declare-fun b () Bool)
+(declare-fun c () Bool)
+(declare-fun a () (Array Bool (Array (_ BitVec 32) (_ BitVec 32))))
+(declare-fun v2 () (_ BitVec 32))
+(declare-fun r0 () (_ BitVec 32))
+(declare-fun r1 () (_ BitVec 32))
+(declare-fun l () (_ BitVec 32))
+(declare-fun i () (_ BitVec 32))
+(assert c)
+(push 1)
+(assert (not (=> false (not (= i (select (select a true) (bvsub (bvmul (bvsdiv v2 (_ bv2 32)) (bvadd (bvmul (_ bv2 32) l) (_ bv1 32))) (_ bv1 32))))))))
+(check-sat)
+(pop 1)
+(assert (not (=> (= i (select (select a true) (bvsub (bvmul (bvsdiv v2 (_ bv2 32)) (bvadd (bvmul (_ bv2 32) l) (_ bv1 32))) (_ bv1 32)))) (not (= r1 (ite b i r0))))))
+(check-sat)