Skip to content

Commit 0e5a54e

Browse files
romainbrenguierallredj
authored andcommitted
Avoid initializing the index set if not needed diffblue/test-gen#199
This can improve performances when strings are not important
1 parent f8f7610 commit 0e5a54e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/solvers/refinement/string_refinement.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,22 @@ decision_proceduret::resultt string_refinementt::dec_solve()
612612
found_length.clear();
613613
found_content.clear();
614614

615+
// Initial try without index set
616+
decision_proceduret::resultt res=supert::dec_solve();
617+
if(res==D_SATISFIABLE)
618+
{
619+
if(!check_axioms())
620+
{
621+
debug() << "check_SAT: got SAT but the model is not correct" << eom;
622+
}
623+
else
624+
{
625+
debug() << "check_SAT: the model is correct" << eom;
626+
concretize_lengths();
627+
return D_SATISFIABLE;
628+
}
629+
}
630+
615631
initial_index_set(universal_axioms);
616632
update_index_set(cur);
617633
cur.clear();

0 commit comments

Comments
 (0)