Skip to content

Commit

Permalink
add interval constructor validation
Browse files Browse the repository at this point in the history
  • Loading branch information
bjjwwang committed Jul 26, 2024
1 parent 4105178 commit 3d74b43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion svf/include/AE/Core/IntervalValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ class IntervalValue
explicit IntervalValue(BoundedInt n) : IntervalValue(n, n) {}

/// Create the IntervalValue [lb, ub]
explicit IntervalValue(BoundedInt lb, BoundedInt ub) : _lb(std::move(lb)), _ub(std::move(ub)) {}
explicit IntervalValue(BoundedInt lb, BoundedInt ub) : _lb(std::move(lb)), _ub(std::move(ub)) {
assert(_lb.leq(_ub) && "lower bound should be less than or equal to upper bound");
}

explicit IntervalValue(s64_t lb, s64_t ub) : IntervalValue(BoundedInt(lb), BoundedInt(ub)) {}

Expand Down

0 comments on commit 3d74b43

Please sign in to comment.