def _widening(self, other: 'IntervalLattice') -> 'IntervalLattice':
"""``[a, b] ? [c, d] = [(c < a? -oo : a), (b < d? +oo : b)]``."""
lower = self.lower
upper = self.upper
if other.lower < self.lower:
lower = -inf
if self.upper < other.upper:
upper = inf
return self.replace(IntervalLattice(lower, upper))
# arithmetic operations
评论列表
文章目录