Skip to content

Commit

Permalink
Merge pull request #99 from VeriFIT/nielsen_first
Browse files Browse the repository at this point in the history
Run nielsen before underapproximation
  • Loading branch information
jurajsic authored Sep 23, 2023
2 parents 8eb505f + ca447c6 commit a0e3745
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/smt/theory_str_noodler/theory_str_noodler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,12 +885,6 @@ namespace smt::noodler {
// Get the initial length vars that are needed here (i.e they are in aut_assignment)
std::unordered_set<BasicTerm> init_length_sensitive_vars{ get_init_length_vars(aut_assignment) };

// try underapproximation (if enabled) to solve
if(m_params.m_underapproximation && is_underapprox_suitable(instance, aut_assignment) && solve_underapprox(instance, aut_assignment, init_length_sensitive_vars, conversions) == l_true) {
STRACE("str", tout << "Sat from underapproximation" << std::endl;);
return FC_DONE;
}

// try Nielsen transformation (if enabled) to solve
if(m_params.m_try_nielsen && is_nielsen_suitable(instance)) {
STRACE("str", tout << "Trying nielsen" << std::endl);
Expand Down Expand Up @@ -920,6 +914,15 @@ namespace smt::noodler {
}
}

// try underapproximation (if enabled) to solve
if(m_params.m_underapproximation && is_underapprox_suitable(instance, aut_assignment)) {
STRACE("str", tout << "Try underapproximation" << std::endl);
if (solve_underapprox(instance, aut_assignment, init_length_sensitive_vars, conversions) == l_true) {
STRACE("str", tout << "Sat from underapproximation" << std::endl;);
return FC_DONE;
}
}

DecisionProcedure dec_proc = DecisionProcedure{ instance, aut_assignment, init_length_sensitive_vars, m_params, conversions };

STRACE("str", tout << "Starting preprocessing" << std::endl);
Expand Down

0 comments on commit a0e3745

Please sign in to comment.