Satisfiability Checking The Omega Test Prof. Dr. Erika Ábrahám RWTH Aachen University Informatik 2 LuFG Theory of Hybrid Systems WS 14/15 The Omega test Goal: Decide satisfiability for conjunctions of linear constraints of the form X ai xi ≥ b 0≤i≤n over integers. Original application: Program optimizations done by a compiler. Extension of Fourier-Motzkin variable elimination: Pick one variable and eliminate it. Continue until all variables but one are eliminated. Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) WS 14/15 2 / 16 Overview of the Omega test ? Check REAL shadow No solution? UNSAT Possible solution ? Check DARK shadow Integer - SAT solution? No integer solution ? Check GREY shadow Integer - SAT solution? No integer solution ? UNSAT Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) WS 14/15 3 / 16 The real shadow Check REAL shadow Assume we eliminate variable z For each pair of upper/lower bound: β ≤ bz cβ ≤ cbz cz cbz ≤ γ (b, c > 0) ≤ bγ Constraint for real shadow: cβ ≤ bγ Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) WS 14/15 4 / 16 The real shadow: Example I Check REAL shadow Eliminate x: 4y ≤ 2x 1.5 1.25 1 0.75 0.5 0.25 !0.25 y 4y ≤ −2x + 6 @ R @ 4y " 2x 4y " 6!2x 4y # 1 1.5 2 4y ≤ 6 − 4y 8y ≤ 6 x 3.5 4y ≤ 2x Real Shadow: 8y ≤ 6 4y ≥ 1 4y ≤ −2x + 6 No integer solution 0.5 1 4y ≥ 1 2.5 3 y ≤ 0.75 y ≥ 0.25 =⇒ Original problem has no solution Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) WS 14/15 5 / 16 The real shadow: Example II Let’s eliminate y instead: Check REAL shadow 1 ≤ 4y H 1.5 1.25 1 0.75 0.5 0.25 !0.25 4y ≤ 2x j H 1 ≤ 2x y 1 ≤ 4y 4y " 2x 0.5 1 4y " 6!2x 4y # 1 1.5 2 2.5 3 H x 3.5 4y ≤ −2x + 6 j H 1 ≤ −2x + 6 4y ≤ −2x + 6 Real Shadow: 1 ≤ 2x 1 ≤ −2x + 6 4y ≥ 1 Integer solution! 4y ≤ 2x x ≥ 0.5 x ≤ 2.5 But original problem has no integer solution! Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) WS 14/15 6 / 16 From real to dark shadow ? Check REAL shadow No solution? UNSAT Possible solution ? Check DARK shadow An integer solution for the REAL shadow does not guarantee that there is an integer solution for the original problem. Thus, we check the DARK shadow next. Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) WS 14/15 7 / 16 Idea of the dark shadow Check DARK shadow Idea of the DARK shadow: β β b ≤ bz ≤ z |:b cz z ≤ ≤ γ |:c γ c z ∈N How to compute the dark shadow? Try to prove that there is an integer z between Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) β b and γc . WS 14/15 8 / 16 Dark shadow: Proof by contradiction Check DARK shadow Assume there is no integer z between Let i := b βb c i ∈Z β i b | {z } ≥ b1 β b and γc . Then: i +1 | {z } γ c - ≥ c1 Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) WS 14/15 9 / 16 Dark shadow: Proof by contradiction β i b | {z } ≥ b1 β b −i i + 1 − γc β b +1− γ c ≥ ≥ ≥ 1 b 1 c 1 b + 1 c cβ + cb − bγ ≥ c + b cβ − bγ ≥ −cb + c + b i +1 | {z } γ c - ≥ c1 |·c ·b | − cb | · (−1) bγ − cβ ≤ cb − c − b Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) WS 14/15 10 / 16 Dark shadow: Proof by contradiction From previous slide: ↔ ↔ ↔ bγ − cβ ¬(bγ − cβ ¬(bγ − cβ ¬(bγ − cβ | ≤ > ≥ ≥ cb − c − b cb − c − b) cb − c − b + 1) (c − 1)(b − 1)) {z } * Thus, if * holds, we know that there must be an integer solution. If c = 1 or b = 1, then this is the same as the real shadow. This case is called an exact projection. Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) WS 14/15 11 / 16 Example for the dark shadow Check DARK shadow Eliminate y with the dark shadow: 2y ≤ 2x + 1 y 1.5 2y " 1#2x 4y ≥ 3 Hj H 2y " 5!2x 4(2x + 1) − 2 · 3 ≥ (2 − 1)(4 − 1) 1.25 1 0.75 4y ≥ 3 4y $ 3 0.5 HH j 2y ≤ −2x + 5 4(−2x + 5) − 2 · 3 ≥ (2 − 1)(4 − 1) 0.25 0.5 1 1.5 2 x 2y ≤ −2x + 5 Dark Shadow: x x 4y ≥ 3 =⇒ Integer solution! !0.25 2y ≤ 2x + 1 Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) ≥ 5/8 ≤ 11/8 WS 14/15 12 / 16 From dark to grey shadow ? Check REAL shadow No solution? UNSAT Possible solution ? Check DARK shadow Integer - SAT solution? No integer solution ? Check GREY shadow No integer solution in the DARK shadow does not guarantee that there is no integer solution for the original problem. Thus, we check the GREY shadow next. Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) WS 14/15 13 / 16 The grey shadow Check GREY shadow Idea of the Grey shadow If the real shadow R has integer solutions, but the dark shadow D does not, search R \ D. In R: Not in D: ↔ ⇒ bγ ≥ cbz ≥ cβ cb − c − b ≥ bγ − cβ cb − c − b + cβ ≥ bγ cb − c − b + cβ ≥ cbz ≥ cβ (cb − c − b)/c + β ≥ bz ≥ β Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) |:c WS 14/15 14 / 16 The grey shadow Check GREY shadow Try all values of z such that (cb − c − b)/c + β ≥ bz ≥ β Optimization: find the largest coefficient c in any upper bound and try the following for each lower bound bz ≥ β: bz = β + i for (cb − c − b)/c ≥ i ≥ 0 As before, combine this with the original problem, and solve recursively. Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) WS 14/15 15 / 16 Example of the grey shadow Eliminate y : c = 4, b = 4, β = 3 Check GREY shadow y 1.75 1.5 4 y " 2 # 3 x 4 y " 11 ! 3 x 1.25 1 0.75 4y $ 3 0.5 0.25 !0.25 0.5 1 1.5 2 2.5 4y ≤ 3x + 2 4y ≤ −3x + 11 3 x New constraint: 4y = 3 + i for 2 ≥ i ≥ 0: 4y = 3 4y = 4 4y = 5 =⇒ Integer solution with 4y = 4 4y ≥ 3 Satisfiability Checking — Prof. Dr. Erika Ábrahám (RWTH Aachen University) WS 14/15 16 / 16
© Copyright 2025 Paperzz