3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-21 12:16:20 +00:00

Address code review: clarify add_lower/upper_int_bound return semantics; fix test assertion

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-10 23:29:15 +00:00
parent 47f9be0270
commit 57ede4cdcd
2 changed files with 9 additions and 5 deletions

View file

@ -540,15 +540,19 @@ namespace seq {
// IntBounds: tighten the lower bound for len(var).
// Returns true if the bound was tightened (lb > current lower bound).
// When tightened, adds an int_constraint len(var) >= lb to this node.
// Sets arithmetic conflict if lb > current upper bound.
// When tightened without conflict, adds an int_constraint len(var) >= lb.
// When lb > current upper bound, sets arithmetic conflict (no constraint added)
// and still returns true (the bound value changed). Check is_general_conflict()
// separately to distinguish tightening-with-conflict from normal tightening.
// Mirrors ZIPT's AddLowerIntBound().
bool add_lower_int_bound(euf::snode* var, unsigned lb, dep_tracker const& dep);
// IntBounds: tighten the upper bound for len(var).
// Returns true if the bound was tightened (ub < current upper bound).
// When tightened, adds an int_constraint len(var) <= ub to this node.
// Sets arithmetic conflict if current lower bound > ub.
// When tightened without conflict, adds an int_constraint len(var) <= ub.
// When current lower bound > ub, sets arithmetic conflict (no constraint added)
// and still returns true (the bound value changed). Check is_general_conflict()
// separately to distinguish tightening-with-conflict from normal tightening.
// Mirrors ZIPT's AddHigherIntBound().
bool add_upper_int_bound(euf::snode* var, unsigned ub, dep_tracker const& dep);