svf-lib 1.0.2003 → 1.0.2004
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -393,7 +393,7 @@ public:
|
|
|
393
393
|
auto it = rhs.find(item.first);
|
|
394
394
|
if (it == rhs.end()) return false;
|
|
395
395
|
// judge from expr id
|
|
396
|
-
if (item.second.getInterval().
|
|
396
|
+
if (item.second.getInterval().contain(it->second.getInterval())) return false;
|
|
397
397
|
}
|
|
398
398
|
return true;
|
|
399
399
|
}
|
|
@@ -409,7 +409,8 @@ public:
|
|
|
409
409
|
// judge from expr id
|
|
410
410
|
if (it->second.isInterval() && item.second.isInterval())
|
|
411
411
|
{
|
|
412
|
-
if (!it->second.getInterval().
|
|
412
|
+
if (!it->second.getInterval().contain(
|
|
413
|
+
item.second.getInterval()))
|
|
413
414
|
return false;
|
|
414
415
|
}
|
|
415
416
|
|
|
@@ -298,8 +298,11 @@ public:
|
|
|
298
298
|
this->_ub = plus_infinity();
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
///
|
|
302
|
-
|
|
301
|
+
/// Determines if the current IntervalValue is fully contained within another IntervalValue.
|
|
302
|
+
/// Example: this: [2, 3], other: [1, 4] -> returns true
|
|
303
|
+
/// Note: If the current interval is 'bottom', it is considered contained within any interval.
|
|
304
|
+
/// If the other interval is 'bottom', it cannot contain any interval.
|
|
305
|
+
bool containedWithin(const IntervalValue &other) const
|
|
303
306
|
{
|
|
304
307
|
if (this->isBottom())
|
|
305
308
|
{
|
|
@@ -316,8 +319,11 @@ public:
|
|
|
316
319
|
|
|
317
320
|
}
|
|
318
321
|
|
|
319
|
-
///
|
|
320
|
-
|
|
322
|
+
/// Determines if the current IntervalValue fully contains another IntervalValue.
|
|
323
|
+
/// Example: this: [1, 4], other: [2, 3] -> returns true
|
|
324
|
+
/// Note: If the current interval is 'bottom', it is considered to contain any interval.
|
|
325
|
+
/// If the other interval is 'bottom', it cannot be contained by any interval.
|
|
326
|
+
bool contain(const IntervalValue &other) const
|
|
321
327
|
{
|
|
322
328
|
if (this->isBottom())
|
|
323
329
|
{
|
|
@@ -333,6 +339,42 @@ public:
|
|
|
333
339
|
}
|
|
334
340
|
}
|
|
335
341
|
|
|
342
|
+
/// Check the upper bound of this Interval is less than or equal to the lower bound
|
|
343
|
+
/// e.g. [1, 3] < [3, 5] return true, lhs.ub <= rhs.lb
|
|
344
|
+
bool leq(const IntervalValue &other) const
|
|
345
|
+
{
|
|
346
|
+
if (this->isBottom())
|
|
347
|
+
{
|
|
348
|
+
return true;
|
|
349
|
+
}
|
|
350
|
+
else if (other.isBottom())
|
|
351
|
+
{
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
else
|
|
355
|
+
{
|
|
356
|
+
return this->_ub.leq(other._lb);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/// Check the lower bound of this Interval is greater than or equal to the upper bound
|
|
361
|
+
/// e.g. [3, 5] > [1, 3] return true, lhs.lb >= rhs.ub
|
|
362
|
+
bool geq(const IntervalValue &other) const
|
|
363
|
+
{
|
|
364
|
+
if (this->isBottom())
|
|
365
|
+
{
|
|
366
|
+
return true;
|
|
367
|
+
}
|
|
368
|
+
else if (other.isBottom())
|
|
369
|
+
{
|
|
370
|
+
return false;
|
|
371
|
+
}
|
|
372
|
+
else
|
|
373
|
+
{
|
|
374
|
+
return this->_lb.geq(other._ub);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
336
378
|
|
|
337
379
|
/// Equality comparison
|
|
338
380
|
bool equals(const IntervalValue &other) const
|
|
Binary file
|
|
Binary file
|