}
else if (IFF == k || EQ == k)
{
- ASTVec c = a.GetChildren();
+ const ASTVec& c = a.GetChildren();
if (c[0] == c[1])
return ASTTrue;
- ASTNode c1 = c[1];
-
- bool updated = simp->UpdateSubstitutionMap(c[0], c1);
+ bool updated = simp->UpdateSubstitutionMap(c[0], c[1]);
output = updated ? ASTTrue : a;
if (updated)
//fill the arrayname readindices vector if e0 is a
//READ(Arr,index) and index is a BVCONST
int to;
- if ((to = TermOrder(c[0], c1)) == 1 && c[0].GetKind() == READ)
- at->FillUp_ArrReadIndex_Vec(c[0], c1);
- else if (to == -1 && c1.GetKind() == READ)
- at->FillUp_ArrReadIndex_Vec(c1, c[0]);
+ if ((to = TermOrder(c[0], c[1])) == 1 && c[0].GetKind() == READ)
+ at->FillUp_ArrReadIndex_Vec(c[0], c[1]);
+ else if (to == -1 && c[1].GetKind() == READ)
+ at->FillUp_ArrReadIndex_Vec(c[1], c[0]);
}
}
else if (XOR == k)
for (ASTVec::const_iterator it = c.begin(), itend = c.end(); it != itend; it++)
{
- simp->UpdateAlwaysTrueFormSet(*it);
+ if (always_true)
+ simp->UpdateAlwaysTrueFormSet(*it);
ASTNode aaa = propagate(*it, at);
if (ASTTrue != aaa)
propagate(const ASTNode& a, ArrayTransformer*at);
HASHSET<int> alreadyVisited;
+ const bool always_true;
public:
PropagateEqualities(Simplifier *simp_, NodeFactory *nf_, STPMgr *bm_) :
- ASTTrue(bm_->ASTTrue), ASTFalse(bm_->ASTFalse)
+ ASTTrue(bm_->ASTTrue), ASTFalse(bm_->ASTFalse),
+ always_true(bm_->UserFlags.isSet("always_true","1"))
{
simp = simp_;
nf = nf_;