Introduction and Motivation The need for coalescing January 19, 2015 8 / 27 Causes of Splintering Several operations on integer sets may introduce coalescing opportunities Projection Subtraction Parametric integer programming Union Intersection
Introduction and Motivation The need for coalescing January 19, 2015 8 / 27 Causes of Splintering Several operations on integer sets may introduce coalescing opportunities Projection Subtraction Parametric integer programming Union Intersection
Introduction and Motivation Traditional “Coalescing” January 19, 2015 9 / 27 Traditional “Coalescing” Traditional method (e.g., in CLooG with original PolyLib backend) Compute convex hull H of S 1 Remove integer elements not in S from H 2 ⇒ H \ ( H \ S )
Introduction and Motivation Traditional “Coalescing” January 19, 2015 9 / 27 Traditional “Coalescing” Traditional method (e.g., in CLooG with original PolyLib backend) Compute convex hull H of S 1 Remove integer elements not in S from H 2 ⇒ H \ ( H \ S )
Introduction and Motivation Traditional “Coalescing” January 19, 2015 9 / 27 Traditional “Coalescing” Traditional method (e.g., in CLooG with original PolyLib backend) Compute convex hull H of S 1 Remove integer elements not in S from H 2 ⇒ H \ ( H \ S )
Introduction and Motivation Traditional “Coalescing” January 19, 2015 9 / 27 Traditional “Coalescing” Traditional method (e.g., in CLooG with original PolyLib backend) Compute convex hull H of S 1 Remove integer elements not in S from H 2 ⇒ H \ ( H \ S )
Introduction and Motivation Traditional “Coalescing” January 19, 2015 9 / 27 Traditional “Coalescing” Traditional method (e.g., in CLooG with original PolyLib backend) Compute convex hull H of S 1 Remove integer elements not in S from H 2 ⇒ H \ ( H \ S ) Issues: Convex hull may have exponential number of constraints We may be able to remove some of them, but we still need to compute them first. Constraints of convex hull may have very large coefficients Convex hull is an operation on rational sets ⇒ mixture of operation on rational sets (convex hull) and integer sets (set subtraction) ⇒ in isl , convex hull operation not fully defined on sets with existentially quantified variables Convex hull is costly to compute
Introduction and Motivation Traditional “Coalescing” January 19, 2015 9 / 27 Traditional “Coalescing” Traditional method (e.g., in CLooG with original PolyLib backend) Compute convex hull H of S 1 Remove integer elements not in S from H 2 ⇒ H \ ( H \ S ) Issues: Convex hull may have exponential number of constraints We may be able to remove some of them, but we still need to compute them first. Constraints of convex hull may have very large coefficients Convex hull is an operation on rational sets ⇒ mixture of operation on rational sets (convex hull) and integer sets (set subtraction) ⇒ in isl , convex hull operation not fully defined on sets with existentially quantified variables Convex hull is costly to compute
Introduction and Motivation Traditional “Coalescing” January 19, 2015 10 / 27 Effect on AST Generation — covariance With isl coalescing (in this case same result as no coalescing) for ( long c1 = n >= 1 ? ((n - 1) % 32) - n - 31 : 0; c1 <= (n >= 1 ? n - 1 : 0); c1 += 32) { /* .. */ } With convex hull based “coalescing” for ( long c1 = 32 * floord(-1073741839 * n - 32749125633, 68719476720) - 1073741792; c1 <= floord(715827882 * n + 357913941, 1431655765) + 1073741823; c1 += 32) { /* .. */ }
Introduction and Motivation Traditional “Coalescing” January 19, 2015 11 / 27 Traditional “Coalescing” Traditional method (e.g., in CLooG with original PolyLib backend) Compute convex hull H of S 1 Remove integer elements not in S from H 2 ⇒ H \ ( H \ S ) Issues: Convex hull may have exponential number of constraints We may be able to remove some of them, but we still need to compute them first. Constraints of convex hull may have very large coefficients Convex hull is an operation on rational sets ⇒ mixture of operation on rational sets (convex hull) and integer sets (set subtraction) ⇒ in isl , convex hull operation not fully defined on sets with existentially quantified variables Convex hull is costly to compute
Introduction and Motivation Traditional “Coalescing” January 19, 2015 11 / 27 Traditional “Coalescing” Traditional method (e.g., in CLooG with original PolyLib backend) Compute convex hull H of S 1 Remove integer elements not in S from H 2 ⇒ H \ ( H \ S ) Issues: Convex hull may have exponential number of constraints We may be able to remove some of them, but we still need to compute them first. Constraints of convex hull may have very large coefficients Convex hull is an operation on rational sets ⇒ mixture of operation on rational sets (convex hull) and integer sets (set subtraction) ⇒ in isl , convex hull operation not fully defined on sets with existentially quantified variables Convex hull is costly to compute
Introduction and Motivation Traditional “Coalescing” January 19, 2015 12 / 27 AST Generation Times Generation times on isl AST generation test cases isl coalescing 16.0s no coalescing 16.3s convex hull (FM) 24m00s convex hull (wrapping) 6m40s Note: isl may not have the most efficient convex hull implementation However, double description based implementations are costly too
Coalescing in isl January 19, 2015 13 / 27 Outline Introduction and Motivation 1 Polyhedal Model The need for coalescing Traditional “Coalescing” Coalescing in isl 2 Rational Cases Constraints adjacent to inequality Constraints adjacent to equality Wrapping Existentially Quantified Variables 3 Conclusions
Coalescing in isl January 19, 2015 14 / 27 Coalescing in isl Coalescing in isl never increases the total number of constraints based on solving LP problems with same dimension as input set recognizes a set of patterns
Coalescing in isl Rational Cases January 19, 2015 15 / 27 Coalescing Cases
Coalescing in isl Rational Cases January 19, 2015 16 / 27 Constraint types Given two disjuncts A and B For each affine constraint t ( x ) ≥ 0 of A , determine its effect on B Note: affine expression t ( x ) ≥ 0 has integer coefficients min and max computed using (incremental) LP solver
Coalescing in isl Rational Cases January 19, 2015 16 / 27 Constraint types Given two disjuncts A and B For each affine constraint t ( x ) ≥ 0 of A , determine its effect on B min t ( x ) > − 1 over B ⇒ valid constraint Note: affine expression t ( x ) ≥ 0 has integer coefficients min and max computed using (incremental) LP solver
Coalescing in isl Rational Cases January 19, 2015 16 / 27 Constraint types Given two disjuncts A and B For each affine constraint t ( x ) ≥ 0 of A , determine its effect on B min t ( x ) > − 1 over B ⇒ valid constraint max t ( x ) < 0 over B ⇒ separating constraint Note: affine expression t ( x ) ≥ 0 has integer coefficients min and max computed using (incremental) LP solver
Coalescing in isl Rational Cases January 19, 2015 16 / 27 Constraint types Given two disjuncts A and B For each affine constraint t ( x ) ≥ 0 of A , determine its effect on B min t ( x ) > − 1 over B ⇒ valid constraint max t ( x ) < 0 over B ⇒ separating constraint otherwise (attains both positive and negative values over B ) ⇒ cut constraint Note: affine expression t ( x ) ≥ 0 has integer coefficients min and max computed using (incremental) LP solver
Coalescing in isl Rational Cases January 19, 2015 17 / 27 Coalescing Cases
Coalescing in isl Rational Cases January 19, 2015 17 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 All constraints of A are valid for B 1 valid: min t ( x ) > − 1 ⇒ drop B separate: max t ( x ) < 0 cut: otherwise
Coalescing in isl Rational Cases January 19, 2015 17 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 All constraints of A are valid for B 1 valid: min t ( x ) > − 1 ⇒ drop B separate: max t ( x ) < 0 cut: otherwise
Coalescing in isl Rational Cases January 19, 2015 17 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 All constraints of A are valid for B 1 valid: min t ( x ) > − 1 ⇒ drop B separate: max t ( x ) < 0 cut: otherwise
Coalescing in isl Rational Cases January 19, 2015 17 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 All constraints of A are valid for B 1 valid: min t ( x ) > − 1 ⇒ drop B separate: max t ( x ) < 0 Neither A nor B have separating 2 constraints and all cut constraints of A are valid for the cut facets of B ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints
Coalescing in isl Rational Cases January 19, 2015 17 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 All constraints of A are valid for B 1 valid: min t ( x ) > − 1 ⇒ drop B separate: max t ( x ) < 0 Neither A nor B have separating 2 constraints and all cut constraints of A are valid for the cut facets of B ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints
Coalescing in isl Rational Cases January 19, 2015 17 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 All constraints of A are valid for B 1 valid: min t ( x ) > − 1 ⇒ drop B separate: max t ( x ) < 0 Neither A nor B have separating 2 constraints and all cut constraints of A are valid for the cut facets of B ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints
Coalescing in isl Rational Cases January 19, 2015 17 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 All constraints of A are valid for B 1 valid: min t ( x ) > − 1 ⇒ drop B separate: max t ( x ) < 0 Neither A nor B have separating 2 constraints and all cut constraints of A are valid for the cut facets of B ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints
Coalescing in isl Rational Cases January 19, 2015 17 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 All constraints of A are valid for B 1 valid: min t ( x ) > − 1 ⇒ drop B separate: max t ( x ) < 0 Neither A nor B have separating 2 constraints and all cut constraints of A are valid for the cut facets of B ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints
Coalescing in isl Rational Cases January 19, 2015 17 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 All constraints of A are valid for B 1 valid: min t ( x ) > − 1 ⇒ drop B separate: max t ( x ) < 0 Neither A nor B have separating 2 constraints and all cut constraints of A are valid for the cut facets of B ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints
Coalescing in isl Constraints adjacent to inequality January 19, 2015 18 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 valid: min t ( x ) > − 1 separate: max t ( x ) < 0 cut: otherwise
Coalescing in isl Constraints adjacent to inequality January 19, 2015 19 / 27 Constraint types Given two disjuncts A and B For each affine constraint t ( x ) ≥ 0 of A , determine its effect on B min t ( x ) > − 1 over B ⇒ valid constraint max t ( x ) < 0 over B ⇒ separating constraint otherwise (attains both positive and negative values over B ) ⇒ cut constraint Note: affine expression t ( x ) ≥ 0 has integer coefficients min and max computed using (incremental) LP solver
Coalescing in isl Constraints adjacent to inequality January 19, 2015 19 / 27 Constraint types Given two disjuncts A and B For each affine constraint t ( x ) ≥ 0 of A , determine its effect on B min t ( x ) > − 1 over B ⇒ valid constraint max t ( x ) < 0 over B ⇒ separating constraint special cases: ◮ t = − u − 1 with u ( x ) ≥ 0 a constraints of B ⇒ constraint is adjacent to an inequality of B otherwise (attains both positive and negative values over B ) ⇒ cut constraint Note: affine expression t ( x ) ≥ 0 has integer coefficients min and max computed using (incremental) LP solver
Coalescing in isl Constraints adjacent to inequality January 19, 2015 20 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 valid: min t ( x ) > − 1 separate: max t ( x ) < 0 cut: otherwise
Coalescing in isl Constraints adjacent to inequality January 19, 2015 20 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 single pair of adjacent inequalities 3 valid: min t ( x ) > − 1 (other constraints valid) separate: max t ( x ) < 0 ⇒ replace A ∪ B by set bounded by ◮ adjacent to inequality: all valid constraints t = − u − 1 cut: otherwise
Coalescing in isl Constraints adjacent to inequality January 19, 2015 20 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 single pair of adjacent inequalities 3 valid: min t ( x ) > − 1 (other constraints valid) separate: max t ( x ) < 0 ⇒ replace A ∪ B by set bounded by ◮ adjacent to inequality: all valid constraints t = − u − 1 cut: otherwise
Coalescing in isl Constraints adjacent to inequality January 19, 2015 20 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 valid: min t ( x ) > − 1 separate: max t ( x ) < 0 ◮ adjacent to inequality: t = − u − 1 cut: otherwise
Coalescing in isl Constraints adjacent to inequality January 19, 2015 20 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 4 valid: min t ( x ) > − 1 inequality of B (other constraints of separate: max t ( x ) < 0 A are valid) ◮ adjacent to inequality: t = − u − 1 cut: otherwise
Coalescing in isl Constraints adjacent to inequality January 19, 2015 20 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 4 valid: min t ( x ) > − 1 inequality of B (other constraints of separate: max t ( x ) < 0 A are valid) ◮ adjacent to inequality: Result of replacing t ( x ) ≥ 0 by t = − u − 1 t ( x ) ≤ − 1 and adding valid constraints of B is a subset of B ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints
Coalescing in isl Constraints adjacent to inequality January 19, 2015 20 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 4 valid: min t ( x ) > − 1 inequality of B (other constraints of separate: max t ( x ) < 0 A are valid) ◮ adjacent to inequality: Result of replacing t ( x ) ≥ 0 by t = − u − 1 t ( x ) ≤ − 1 and adding valid constraints of B is a subset of B ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints
Coalescing in isl Constraints adjacent to equality January 19, 2015 21 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 valid: min t ( x ) > − 1 separate: max t ( x ) < 0 ◮ adjacent to inequality: t = − u − 1 cut: otherwise
Coalescing in isl Constraints adjacent to equality January 19, 2015 22 / 27 Constraint types Given two disjuncts A and B For each affine constraint t ( x ) ≥ 0 of A , determine its effect on B min t ( x ) > − 1 over B ⇒ valid constraint max t ( x ) < 0 over B ⇒ separating constraint special cases: ◮ t = − u − 1 with u ( x ) ≥ 0 a constraints of B ⇒ constraint is adjacent to an inequality of B otherwise (attains both positive and negative values over B ) ⇒ cut constraint Note: affine expression t ( x ) ≥ 0 has integer coefficients min and max computed using (incremental) LP solver
Coalescing in isl Constraints adjacent to equality January 19, 2015 22 / 27 Constraint types Given two disjuncts A and B For each affine constraint t ( x ) ≥ 0 of A , determine its effect on B min t ( x ) > − 1 over B ⇒ valid constraint max t ( x ) < 0 over B ⇒ separating constraint special cases: ◮ t = − u − 1 with u ( x ) ≥ 0 a constraints of B ⇒ constraint is adjacent to an inequality of B ◮ t ( x ) = − 1 over B ⇒ constraint is adjacent to an equality of B otherwise (attains both positive and negative values over B ) ⇒ cut constraint Note: affine expression t ( x ) ≥ 0 has integer coefficients min and max computed using (incremental) LP solver
Coalescing in isl Constraints adjacent to equality January 19, 2015 23 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 valid: min t ( x ) > − 1 separate: max t ( x ) < 0 ◮ adjacent to inequality: t = − u − 1 cut: otherwise
Coalescing in isl Constraints adjacent to equality January 19, 2015 23 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 5 valid: min t ( x ) > − 1 equality of B (other constraints of A separate: max t ( x ) < 0 are valid) ◮ adjacent to inequality: t = − u − 1 ◮ adjacent to equality: t = − 1 cut: otherwise
Coalescing in isl Constraints adjacent to equality January 19, 2015 23 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 5 valid: min t ( x ) > − 1 equality of B (other constraints of A separate: max t ( x ) < 0 are valid) ◮ adjacent to inequality: Result of replacing t ( x ) ≥ 0 by t = − u − 1 t ( x ) ≤ − 1 is a subset of B ◮ adjacent to equality: ⇒ replace A ∪ B by set bounded by t = − 1 all valid constraints cut: otherwise
Coalescing in isl Constraints adjacent to equality January 19, 2015 23 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 5 valid: min t ( x ) > − 1 equality of B (other constraints of A separate: max t ( x ) < 0 are valid) ◮ adjacent to inequality: Result of replacing t ( x ) ≥ 0 by t = − u − 1 t ( x ) ≤ − 1 is a subset of B ◮ adjacent to equality: ⇒ replace A ∪ B by set bounded by t = − 1 all valid constraints cut: otherwise
Coalescing in isl Constraints adjacent to equality January 19, 2015 23 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 5 valid: min t ( x ) > − 1 equality of B (other constraints of A separate: max t ( x ) < 0 are valid) ◮ adjacent to inequality: Result of replacing t ( x ) ≥ 0 by t = − u − 1 t ( x ) ≤ − 1 is a subset of B ◮ adjacent to equality: ⇒ replace A ∪ B by set bounded by t = − 1 all valid constraints cut: otherwise
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 valid: min t ( x ) > − 1 separate: max t ( x ) < 0 ◮ adjacent to inequality: t = − u − 1 ◮ adjacent to equality: t = − 1 cut: otherwise
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 6 valid: min t ( x ) > − 1 equality of B (other constraints of A separate: max t ( x ) < 0 are valid) ◮ adjacent to inequality: Non-valid constraints of B (except t = − u − 1 t ( x ) ≤ − 1) can be wrapped around ◮ adjacent to equality: t ( x ) ≥ − 1 to include A t = − 1 ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints and all wrapped constraints
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 6 valid: min t ( x ) > − 1 equality of B (other constraints of A separate: max t ( x ) < 0 are valid) ◮ adjacent to inequality: Non-valid constraints of B (except t = − u − 1 t ( x ) ≤ − 1) can be wrapped around ◮ adjacent to equality: t ( x ) ≥ − 1 to include A t = − 1 ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints and all wrapped constraints
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 6 valid: min t ( x ) > − 1 equality of B (other constraints of A separate: max t ( x ) < 0 are valid) ◮ adjacent to inequality: Non-valid constraints of B (except t = − u − 1 t ( x ) ≤ − 1) can be wrapped around ◮ adjacent to equality: t ( x ) ≥ − 1 to include A t = − 1 ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints and all wrapped constraints
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 6 valid: min t ( x ) > − 1 equality of B (other constraints of A separate: max t ( x ) < 0 are valid) ◮ adjacent to inequality: Non-valid constraints of B (except t = − u − 1 t ( x ) ≤ − 1) can be wrapped around ◮ adjacent to equality: t ( x ) ≥ − 1 to include A t = − 1 ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints and all wrapped constraints
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 6 valid: min t ( x ) > − 1 equality of B (other constraints of A separate: max t ( x ) < 0 are valid) ◮ adjacent to inequality: Non-valid constraints of B (except t = − u − 1 t ( x ) ≤ − 1) can be wrapped around ◮ adjacent to equality: t ( x ) ≥ − 1 to include A t = − 1 ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints and all wrapped constraints
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 6 valid: min t ( x ) > − 1 equality of B (other constraints of A separate: max t ( x ) < 0 are valid) ◮ adjacent to inequality: Non-valid constraints of B (except t = − u − 1 t ( x ) ≤ − 1) can be wrapped around ◮ adjacent to equality: t ( x ) ≥ − 1 to include A t = − 1 ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints and all wrapped constraints
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 6 valid: min t ( x ) > − 1 equality of B (other constraints of A separate: max t ( x ) < 0 are valid) ◮ adjacent to inequality: Non-valid constraints of B (except t = − u − 1 t ( x ) ≤ − 1) can be wrapped around ◮ adjacent to equality: t ( x ) ≥ − 1 to include A t = − 1 ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints and all wrapped constraints
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has single inequality adjacent to 6 valid: min t ( x ) > − 1 equality of B (other constraints of A separate: max t ( x ) < 0 are valid) ◮ adjacent to inequality: Non-valid constraints of B (except t = − u − 1 t ( x ) ≤ − 1) can be wrapped around ◮ adjacent to equality: t ( x ) ≥ − 1 to include A t = − 1 ⇒ replace A ∪ B by set bounded by cut: otherwise all valid constraints and all wrapped constraints
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 valid: min t ( x ) > − 1 separate: max t ( x ) < 0 ◮ adjacent to inequality: t = − u − 1 ◮ adjacent to equality: t = − 1 cut: otherwise
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 B extends beyond A by at most one 7 valid: min t ( x ) > − 1 and all cut constraints of B can be separate: max t ( x ) < 0 wrapped around shifted facet of A ◮ adjacent to inequality: to include A t = − u − 1 ⇒ replace A ∪ B by set bounded by ◮ adjacent to equality: all valid constraints and all t = − 1 wrapped constraints cut: otherwise (check final number of constraints does not increase)
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 B extends beyond A by at most one 7 valid: min t ( x ) > − 1 and all cut constraints of B can be separate: max t ( x ) < 0 wrapped around shifted facet of A ◮ adjacent to inequality: to include A t = − u − 1 ⇒ replace A ∪ B by set bounded by ◮ adjacent to equality: all valid constraints and all t = − 1 wrapped constraints cut: otherwise (check final number of constraints does not increase)
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 B extends beyond A by at most one 7 valid: min t ( x ) > − 1 and all cut constraints of B can be separate: max t ( x ) < 0 wrapped around shifted facet of A ◮ adjacent to inequality: to include A t = − u − 1 ⇒ replace A ∪ B by set bounded by ◮ adjacent to equality: all valid constraints and all t = − 1 wrapped constraints cut: otherwise (check final number of constraints does not increase)
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 B extends beyond A by at most one 7 valid: min t ( x ) > − 1 and all cut constraints of B can be separate: max t ( x ) < 0 wrapped around shifted facet of A ◮ adjacent to inequality: to include A t = − u − 1 ⇒ replace A ∪ B by set bounded by ◮ adjacent to equality: all valid constraints and all t = − 1 wrapped constraints cut: otherwise (check final number of constraints does not increase)
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 B extends beyond A by at most one 7 valid: min t ( x ) > − 1 and all cut constraints of B can be separate: max t ( x ) < 0 wrapped around shifted facet of A ◮ adjacent to inequality: to include A t = − u − 1 ⇒ replace A ∪ B by set bounded by ◮ adjacent to equality: all valid constraints and all t = − 1 wrapped constraints cut: otherwise (check final number of constraints does not increase)
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 B extends beyond A by at most one 7 valid: min t ( x ) > − 1 and all cut constraints of B can be separate: max t ( x ) < 0 wrapped around shifted facet of A ◮ adjacent to inequality: to include A t = − u − 1 ⇒ replace A ∪ B by set bounded by ◮ adjacent to equality: all valid constraints and all t = − 1 wrapped constraints cut: otherwise (check final number of constraints does not increase)
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 B extends beyond A by at most one 7 valid: min t ( x ) > − 1 and all cut constraints of B can be separate: max t ( x ) < 0 wrapped around shifted facet of A ◮ adjacent to inequality: to include A t = − u − 1 ⇒ replace A ∪ B by set bounded by ◮ adjacent to equality: all valid constraints and all t = − 1 wrapped constraints cut: otherwise (check final number of constraints does not increase)
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 B extends beyond A by at most one 7 valid: min t ( x ) > − 1 and all cut constraints of B can be separate: max t ( x ) < 0 wrapped around shifted facet of A ◮ adjacent to inequality: to include A t = − u − 1 ⇒ replace A ∪ B by set bounded by ◮ adjacent to equality: all valid constraints and all t = − 1 wrapped constraints cut: otherwise (check final number of constraints does not increase)
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 B extends beyond A by at most one 7 valid: min t ( x ) > − 1 and all cut constraints of B can be separate: max t ( x ) < 0 wrapped around shifted facet of A ◮ adjacent to inequality: to include A t = − u − 1 ⇒ replace A ∪ B by set bounded by ◮ adjacent to equality: all valid constraints and all t = − 1 wrapped constraints cut: otherwise (check final number of constraints does not increase)
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 B extends beyond A by at most one 7 valid: min t ( x ) > − 1 and all cut constraints of B can be separate: max t ( x ) < 0 wrapped around shifted facet of A ◮ adjacent to inequality: to include A t = − u − 1 ⇒ replace A ∪ B by set bounded by ◮ adjacent to equality: all valid constraints and all t = − 1 wrapped constraints cut: otherwise (check final number of constraints does not increase)
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 valid: min t ( x ) > − 1 separate: max t ( x ) < 0 ◮ adjacent to inequality: t = − u − 1 ◮ adjacent to equality: t = − 1 cut: otherwise
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has equality adjacent to equality 8 valid: min t ( x ) > − 1 of B separate: max t ( x ) < 0 Non-valid constraints of B (except ◮ adjacent to inequality: t ( x ) ≤ − 1) can be wrapped around t = − u − 1 t ( x ) ≥ − 1 to include A ◮ adjacent to equality: Non-valid constraints of A (except t = − 1 t ( x ) ≥ 0) can be wrapped around cut: otherwise t ( x ) ≤ 0 to include B ⇒ replace A ∪ B by set bounded by all valid constraints and all wrapped constraints
Coalescing in isl Wrapping January 19, 2015 24 / 27 Coalescing Cases Constraint t ( x ) ≥ 0 A has equality adjacent to equality 8 valid: min t ( x ) > − 1 of B separate: max t ( x ) < 0 Non-valid constraints of B (except ◮ adjacent to inequality: t ( x ) ≤ − 1) can be wrapped around t = − u − 1 t ( x ) ≥ − 1 to include A ◮ adjacent to equality: Non-valid constraints of A (except t = − 1 t ( x ) ≥ 0) can be wrapped around cut: otherwise t ( x ) ≤ 0 to include B ⇒ replace A ∪ B by set bounded by all valid constraints and all wrapped constraints
Recommend
More recommend