SOLVER_RETURN_TYPE
STP::TopLevelSTPAux(SATSolver& NewSolver, const ASTNode& original_input)
{
-
- ASTNode inputToSAT = original_input;
- ASTNode orig_input = original_input;
- ASTNode simplified_solved_InputToSAT = inputToSAT;
-
- bm->ASTNodeStats("input asserts and query: ", inputToSAT);
- const bool arrayops = containsArrayOps(original_input);
+ bm->ASTNodeStats("input asserts and query: ", original_input);
DifficultyScore difficulty;
if (bm->UserFlags.stats_flag)
// A heap object so I can easily control its lifetime.
BVSolver* bvSolver = new BVSolver(bm, simp);
+ const bool arrayops = containsArrayOps(original_input);
+
// Run size reducing just once.
- simplified_solved_InputToSAT = sizeReducing(inputToSAT, bvSolver);
+ ASTNode simplified_solved_InputToSAT = original_input;
+ simplified_solved_InputToSAT = sizeReducing(simplified_solved_InputToSAT, bvSolver);
unsigned initial_difficulty_score = difficulty.score(simplified_solved_InputToSAT);
revert->toRevertTo = simplified_solved_InputToSAT;
}
+ ASTNode inputToSAT;
+
//round of substitution, solving, and simplification. ensures that
//DAG is minimized as much as possibly, and ideally should
//garuntee that all liketerms in BVPLUSes have been combined.
ToSATBase* satBase = bm->UserFlags.isSet("traditional-cnf", "0") ? tosat : ((ToSAT*) &toSATAIG) ;
// If it doesn't contain array operations, use ABC's CNF generation.
- res = Ctr_Example->CallSAT_ResultCheck(NewSolver, simplified_solved_InputToSAT, orig_input, satBase,
+ res = Ctr_Example->CallSAT_ResultCheck(NewSolver, simplified_solved_InputToSAT, original_input, satBase,
maybeRefinement);
if (SOLVER_UNDECIDED != res)
assert(bm->UserFlags.arrayread_refinement_flag); // Refinement must be enabled too.
assert (bm->UserFlags.solver_to_use != UserDefinedFlags::MINISAT_PROPAGATORS); // The array solver shouldn't have returned undecided..
- res = Ctr_Example->SATBased_ArrayReadRefinement(NewSolver, simplified_solved_InputToSAT, orig_input, satBase);
+ res = Ctr_Example->SATBased_ArrayReadRefinement(NewSolver, simplified_solved_InputToSAT, original_input, satBase);
if (SOLVER_UNDECIDED != res)
{
if (toSATAIG.cbIsDestructed())
return res;
}
- res = Ctr_Example->SATBased_ArrayWriteRefinement(NewSolver, orig_input, satBase);
+ res = Ctr_Example->SATBased_ArrayWriteRefinement(NewSolver, original_input, satBase);
if (SOLVER_UNDECIDED != res)
{
if (toSATAIG.cbIsDestructed())
return res;
}
- res = Ctr_Example->SATBased_ArrayReadRefinement(NewSolver, simplified_solved_InputToSAT, orig_input, satBase);
+ res = Ctr_Example->SATBased_ArrayReadRefinement(NewSolver, simplified_solved_InputToSAT, original_input, satBase);
if (SOLVER_UNDECIDED != res)
{
if (toSATAIG.cbIsDestructed())