decision procedures
play

Decision Procedures An Algorithmic Point of View Linear Arithmetic - PowerPoint PPT Presentation

Decision Procedures An Algorithmic Point of View Linear Arithmetic D. Kroening O. Strichman ETH/Technion Version 1.0, 2007 Part V Linear Arithmetic Fourier-Motzkin Variable Elimination Outline 1 History 2 Linear Arithmetic over the Reals 3


  1. Decision Procedures An Algorithmic Point of View Linear Arithmetic D. Kroening O. Strichman ETH/Technion Version 1.0, 2007

  2. Part V Linear Arithmetic

  3. Fourier-Motzkin Variable Elimination Outline 1 History 2 Linear Arithmetic over the Reals 3 Partitioning and Bounds 4 Complexity D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 3 / 11

  4. Fourier-Motzkin Variable Elimination Goal: decide satisfiability of conjunction of linear constraints over reals � � a i,j x j ≤ b i 1 ≤ i ≤ m 1 ≤ j ≤ n D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 4 / 11

  5. Fourier-Motzkin Variable Elimination Goal: decide satisfiability of conjunction of linear constraints over reals � � a i,j x j ≤ b i 1 ≤ i ≤ m 1 ≤ j ≤ n Earliest method for solving linear inequalities Discovered in 1826 by Fourier, re-discovered by Motzkin in 1936 D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 4 / 11

  6. Fourier-Motzkin Variable Elimination Goal: decide satisfiability of conjunction of linear constraints over reals � � a i,j x j ≤ b i 1 ≤ i ≤ m 1 ≤ j ≤ n Earliest method for solving linear inequalities Discovered in 1826 by Fourier, re-discovered by Motzkin in 1936 Basic idea of variable elimination: Pick one variable and eliminate it Continue until all variables but one are eliminated D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 4 / 11

  7. Linear Arithmetic over the Reals Input: A system of conjoined linear inequalities Ax ≤ b       a 11 a 12 a 1 n x 1 b 1 · · · · · · . . . ... . . .       a 21 a 22 . . .       m constraints ≤ . . . .  ...      . . . .  . .   .   .        a m 1 a 22 a mn x n b n · · · · · · n variables D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 5 / 11

  8. Removing unbounded variables Iteratively remove variables that are not bounded in both ways (and all the constraints that use them) The new problem has a solution iff the old problem has one! 8 x 7 y ≥ x 3 ≥ y z ≥ z 10 ≥ 20 z ≥ D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 6 / 11

  9. Removing unbounded variables Iteratively remove variables that are not bounded in both ways (and all the constraints that use them) The new problem has a solution iff the old problem has one! 8 x 7 y ≥ x 3 ≥ y z ≥ z 10 ≥ 20 z ≥ D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 6 / 11

  10. Removing unbounded variables Iteratively remove variables that are not bounded in both ways (and all the constraints that use them) The new problem has a solution iff the old problem has one! 8 x 7 y ≥ x 3 y z ≥ ≥ 10 y z z ≥ − → ≥ z 10 20 z ≥ ≥ 20 z ≥ D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 6 / 11

  11. Removing unbounded variables Iteratively remove variables that are not bounded in both ways (and all the constraints that use them) The new problem has a solution iff the old problem has one! 8 x 7 y ≥ x 3 y z ≥ ≥ 10 y z z ≥ − → ≥ z 10 20 z ≥ ≥ 20 z ≥ D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 6 / 11

  12. Removing unbounded variables Iteratively remove variables that are not bounded in both ways (and all the constraints that use them) The new problem has a solution iff the old problem has one! 8 x 7 y ≥ x 3 y z ≥ ≥ z 10 ≥ 10 y z z ≥ − → ≥ − → 20 ≥ z z 10 20 z ≥ ≥ 20 z ≥ D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 6 / 11

  13. Partitioning the Constraints 1. When eliminating x n , partition the constraints according to the coefficient a in : a i,n > 0 : upper bound β i a i,n < 0 : lower bound β i D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 7 / 11

  14. Partitioning the Constraints 1. When eliminating x n , partition the constraints according to the coefficient a in : a i,n > 0 : upper bound β i a i,n < 0 : lower bound β i n � a i,j · x j ≤ b i j =1 D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 7 / 11

  15. Partitioning the Constraints 1. When eliminating x n , partition the constraints according to the coefficient a in : a i,n > 0 : upper bound β i a i,n < 0 : lower bound β i n � a i,j · x j ≤ b i j =1 n − 1 � ⇒ a i,n · x n ≤ b i − a i,j · x j j =1 D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 7 / 11

  16. Partitioning the Constraints 1. When eliminating x n , partition the constraints according to the coefficient a in : a i,n > 0 : upper bound β i a i,n < 0 : lower bound β i n � a i,j · x j ≤ b i j =1 n − 1 � ⇒ a i,n · x n ≤ b i − a i,j · x j j =1 n − 1 b i a i,j � x n ≤ · x j =: β i ⇒ − a i,n a i,n j =1 D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 7 / 11

  17. Example for Upper and Lower Bounds Category? (1) x 1 − x 2 ≤ 0 (2) x 1 − x 3 ≤ 0 (3) − x 1 + x 2 + 2 x 3 ≤ 0 (4) − x 3 ≤ − 1 Assume we eliminate x 1 . D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 8 / 11

  18. Example for Upper and Lower Bounds Category? (1) x 1 − x 2 ≤ 0 Upper bound (2) x 1 − x 3 ≤ 0 (3) − x 1 + x 2 + 2 x 3 ≤ 0 (4) − x 3 ≤ − 1 Assume we eliminate x 1 . D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 8 / 11

  19. Example for Upper and Lower Bounds Category? (1) x 1 − x 2 ≤ 0 Upper bound (2) x 1 − x 3 ≤ 0 Upper bound (3) − x 1 + x 2 + 2 x 3 ≤ 0 (4) − x 3 ≤ − 1 Assume we eliminate x 1 . D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 8 / 11

  20. Example for Upper and Lower Bounds Category? (1) x 1 − x 2 ≤ 0 Upper bound (2) x 1 − x 3 ≤ 0 Upper bound (3) − x 1 + x 2 + 2 x 3 ≤ 0 Lower bound (4) − x 3 ≤ − 1 Assume we eliminate x 1 . D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 8 / 11

  21. Adding the constraints 2. For each pair of a lower bound a l,n < 0 and upper bound a u,n > 0 , we have β l x n β u ≤ ≤ 3. For each such pair, add the constraint β l β u ≤ D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 9 / 11

  22. Fourier-Motzkin: Example Category? (1) x 1 − x 2 ≤ 0 (2) x 1 − x 3 ≤ 0 (3) − x 1 + x 2 + 2 x 3 ≤ 0 (4) − x 3 ≤ − 1 D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 10 / 11

  23. Fourier-Motzkin: Example Category? (1) x 1 − x 2 ≤ 0 Upper bound (2) x 1 − x 3 ≤ 0 Upper bound (3) − x 1 + x 2 + 2 x 3 ≤ 0 Lower bound (4) − x 3 ≤ − 1 we eliminate x 1 D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 10 / 11

  24. Fourier-Motzkin: Example Category? (1) x 1 − x 2 ≤ 0 Upper bound (2) x 1 − x 3 ≤ 0 Upper bound (3) − x 1 + x 2 + 2 x 3 ≤ 0 Lower bound (4) − x 3 ≤ − 1 we eliminate x 1 (5) 2 x 3 ≤ 0 (from 1,3) D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 10 / 11

  25. Fourier-Motzkin: Example Category? (1) x 1 − x 2 ≤ 0 Upper bound (2) x 1 − x 3 ≤ 0 Upper bound (3) − x 1 + x 2 + 2 x 3 ≤ 0 Lower bound (4) − x 3 ≤ − 1 we eliminate x 1 (5) 2 x 3 ≤ 0 (from 1,3) (6) x 2 + x 3 ≤ 0 (from 2,3) D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 10 / 11

  26. Fourier-Motzkin: Example Category? (1) x 1 − x 2 ≤ 0 (2) x 1 − x 3 ≤ 0 (3) − x 1 + x 2 + 2 x 3 ≤ 0 (4) − x 3 ≤ − 1 we eliminate x 1 (5) 2 x 3 ≤ 0 (from 1,3) (6) x 2 + x 3 ≤ 0 (from 2,3) D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 10 / 11

  27. Fourier-Motzkin: Example Category? (1) x 1 − x 2 ≤ 0 (2) x 1 − x 3 ≤ 0 (3) − x 1 + x 2 + 2 x 3 ≤ 0 (4) − x 3 ≤ − 1 we eliminate x 1 (5) 2 x 3 ≤ 0 (from 1,3) (6) x 2 + x 3 ≤ 0 (from 2,3) we eliminate x 3 D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 10 / 11

  28. Fourier-Motzkin: Example Category? (1) x 1 − x 2 ≤ 0 (2) x 1 − x 3 ≤ 0 (3) − x 1 + x 2 + 2 x 3 ≤ 0 (4) − x 3 ≤ − 1 Lower bound we eliminate x 1 (5) 2 x 3 ≤ 0 (from 1,3) Upper bound (6) x 2 + x 3 ≤ 0 (from 2,3) Upper bound we eliminate x 3 D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 10 / 11

  29. Fourier-Motzkin: Example Category? (1) x 1 − x 2 ≤ 0 (2) x 1 − x 3 ≤ 0 (3) − x 1 + x 2 + 2 x 3 ≤ 0 (4) − x 3 ≤ − 1 Lower bound we eliminate x 1 (5) 2 x 3 ≤ 0 (from 1,3) Upper bound (6) x 2 + x 3 ≤ 0 (from 2,3) Upper bound we eliminate x 3 (7) 0 ≤ − 1 (from 4,5) → Contradiction (the system is UNSAT) D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 10 / 11

  30. Complexity Worst-case complexity: m → m 2 D. Kroening, O. Strichman (ETH/Technion) Decision Procedures Version 1.0, 2007 11 / 11

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend