const static string pl_message = "After Pure Literals. ";
const static string bitvec_message = "After Bit-vector Solving. ";
const static string size_inc_message= "After Speculative Simplifications. ";
+ const static string pe_message= "After Propagating Equalities. ";
+
// The absolute TopLevel function that invokes STP on the input
{
simplified_solved_InputToSAT = simp->applySubstitutionMap(simplified_solved_InputToSAT);
simp->haveAppliedSubstitutionMap();
- bm->ASTNodeStats(pe->message.c_str(), simplified_solved_InputToSAT);
+ bm->ASTNodeStats(pe_message.c_str(), simplified_solved_InputToSAT);
}
if (bm->UserFlags.isSet("enable-unconstrained", "1"))
simp->haveAppliedSubstitutionMap();
}
- bm->ASTNodeStats(pe->message.c_str(), simplified_solved_InputToSAT);
+ bm->ASTNodeStats(pe_message.c_str(), simplified_solved_InputToSAT);
simplified_solved_InputToSAT = simp->SimplifyFormula_TopLevel(simplified_solved_InputToSAT, false);
namespace BEEV
{
- const string PropagateEqualities::message = "After Propagating Equalities: ";
+
+ // This doesn't rewrite changes through properly so needs to have a substitution applied to its output.
ASTNode
PropagateEqualities::propagate(const ASTNode& a, ArrayTransformer*at)
{
- if (!bm->UserFlags.propagate_equalities)
- return a;
-
ASTNode output;
//if the variable has been solved for, then simply return it
if (simp->CheckSubstitutionMap(a, output))
HASHSET<int> alreadyVisited;
public:
- const static string message;
PropagateEqualities(Simplifier *simp_, NodeFactory *nf_, STPMgr *bm_) :
ASTTrue(bm_->ASTTrue), ASTFalse(bm_->ASTFalse)
ASTNode
topLevel(const ASTNode& a, ArrayTransformer* at)
{
+ if (!bm->UserFlags.propagate_equalities)
+ return a;
+
bm->GetRunTimes()->start(RunTimes::PropagateEqualities);
ASTNode result = propagate(a, at);
bm->GetRunTimes()->stop(RunTimes::PropagateEqualities);