Fixing Tim's subtype/solving bug for arrays
authorClark Barrett <barrett@cs.nyu.edu>
Mon, 26 May 2014 19:30:13 +0000 (12:30 -0700)
committerClark Barrett <barrett@cs.nyu.edu>
Mon, 26 May 2014 19:30:13 +0000 (12:30 -0700)
src/theory/arrays/theory_arrays.cpp

index 8aad6788307e702268779e30c4dcddd669a11bfe..7569b3e932e4f54db27541fdd5ad2f98fa2205e0 100644 (file)
@@ -316,11 +316,11 @@ Theory::PPAssertStatus TheoryArrays::ppAssert(TNode in, SubstitutionMap& outSubs
     {
       d_ppFacts.push_back(in);
       d_ppEqualityEngine.assertEquality(in, true, in);
-      if (in[0].isVar() && !in[1].hasSubterm(in[0]){
+      if (in[0].isVar() && !in[1].hasSubterm(in[0]) && (in[1].getType()).isSubtypeOf(in[0].getType()) ){
         outSubstitutions.addSubstitution(in[0], in[1]);
         return PP_ASSERT_STATUS_SOLVED;
       }
-      if (in[1].isVar() && !in[0].hasSubterm(in[1]){
+      if (in[1].isVar() && !in[0].hasSubterm(in[1]) && (in[0].getType()).isSubtypeOf(in[1].getType())){
         outSubstitutions.addSubstitution(in[1], in[0]);
         return PP_ASSERT_STATUS_SOLVED;
       }