Skip to content

Commit

Permalink
Correct instantiation of counter example
Browse files Browse the repository at this point in the history
This was not adding the correct constraints on the bounds.
  • Loading branch information
romainbrenguier committed Mar 1, 2018
1 parent 569edb5 commit 2a1bc92
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/solvers/refinement/string_refinement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1947,18 +1947,11 @@ static std::pair<bool, std::vector<exprt>> check_axioms(
const exprt &val=v.second;
const string_constraintt &axiom=axioms.universal[v.first];

implies_exprt instance(axiom.premise(), axiom.body());
implies_exprt instance(
and_exprt(axiom.univ_within_bounds(), axiom.premise()), axiom.body());
replace_expr(axiom.univ_var(), val, instance);
// We are not sure the index set contains only positive numbers
exprt bounds=and_exprt(
axiom.univ_within_bounds(),
binary_relation_exprt(
from_integer(0, val.type()), ID_le, val));
replace_expr(axiom.univ_var(), val, bounds);
const implies_exprt counter(bounds, instance);

stream << " - " << from_expr(ns, "", counter) << eom;
lemmas.push_back(counter);
stream << " - " << from_expr(ns, "", instance) << eom;
lemmas.push_back(instance);
}

for(const auto &v : violated_not_contains)
Expand Down

0 comments on commit 2a1bc92

Please sign in to comment.