@@ -542,12 +542,32 @@ private predicate unequalIntegralSsa(
542
542
) {
543
543
exists ( SemExpr e , int d1 , int d2 |
544
544
unequalFlowStepIntegralSsa ( v , pos , e , d1 , reason ) and
545
- bounded ( e , b , d2 , true , _ , _ , _ ) and
546
- bounded ( e , b , d2 , false , _ , _ , _ ) and
545
+ boundedUpper ( e , b , d1 ) and
546
+ boundedLower ( e , b , d2 ) and
547
547
delta = d2 + d1
548
548
)
549
549
}
550
550
551
+ /**
552
+ * Holds if `b + delta` is an upper bound for `e`.
553
+ *
554
+ * This predicate only exists to prevent a bad standard order in `unequalIntegralSsa`.
555
+ */
556
+ pragma [ nomagic]
557
+ private predicate boundedUpper ( SemExpr e , SemBound b , int delta ) {
558
+ bounded ( e , b , delta , true , _, _, _)
559
+ }
560
+
561
+ /**
562
+ * Holds if `b + delta` is a lower bound for `e`.
563
+ *
564
+ * This predicate only exists to prevent a bad standard order in `unequalIntegralSsa`.
565
+ */
566
+ pragma [ nomagic]
567
+ private predicate boundedLower ( SemExpr e , SemBound b , int delta ) {
568
+ bounded ( e , b , delta , false , _, _, _)
569
+ }
570
+
551
571
/** Weakens a delta to lie in the range `[-1..1]`. */
552
572
bindingset [ delta, upper]
553
573
private int weakenDelta ( boolean upper , int delta ) {
0 commit comments