Skip to content

Commit 2a1bc92

Browse files
Correct instantiation of counter example
This was not adding the correct constraints on the bounds.
1 parent 569edb5 commit 2a1bc92

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/solvers/refinement/string_refinement.cpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,18 +1947,11 @@ static std::pair<bool, std::vector<exprt>> check_axioms(
19471947
const exprt &val=v.second;
19481948
const string_constraintt &axiom=axioms.universal[v.first];
19491949

1950-
implies_exprt instance(axiom.premise(), axiom.body());
1950+
implies_exprt instance(
1951+
and_exprt(axiom.univ_within_bounds(), axiom.premise()), axiom.body());
19511952
replace_expr(axiom.univ_var(), val, instance);
1952-
// We are not sure the index set contains only positive numbers
1953-
exprt bounds=and_exprt(
1954-
axiom.univ_within_bounds(),
1955-
binary_relation_exprt(
1956-
from_integer(0, val.type()), ID_le, val));
1957-
replace_expr(axiom.univ_var(), val, bounds);
1958-
const implies_exprt counter(bounds, instance);
1959-
1960-
stream << " - " << from_expr(ns, "", counter) << eom;
1961-
lemmas.push_back(counter);
1953+
stream << " - " << from_expr(ns, "", instance) << eom;
1954+
lemmas.push_back(instance);
19621955
}
19631956

19641957
for(const auto &v : violated_not_contains)

0 commit comments

Comments
 (0)