1 / 21

Christoph Scholl, Stefan Disch, Florian Pigorsch, Stefan Kupferschmid

Using an SMT Solver and Craig Interpolation to Detect and Remove Redundant Linear Constraints in Representations of Non-Convex Polyhedra. Christoph Scholl, Stefan Disch, Florian Pigorsch, Stefan Kupferschmid Albert-Ludwigs-University Freiburg, Germany. Background and Motivation.

lweinstein
Download Presentation

Christoph Scholl, Stefan Disch, Florian Pigorsch, Stefan Kupferschmid

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using an SMT Solver and Craig Interpolation toDetect and Remove Redundant Linear Constraints in Representations of Non-Convex Polyhedra Christoph Scholl, Stefan Disch, Florian Pigorsch, Stefan Kupferschmid Albert-Ludwigs-University Freiburg, Germany

  2. Background and Motivation • Non-convex polyhedra = Arbitrary boolean combinations (including conjunction, disjunction and negation) of linear constraints • (Extended) non-convex polyhedra = arbitrary boolean combinations of linear constraints and boolean variables • We represent (extended) non-convex polyhedra by a data structure called LinAIGs (AIGs = And-Inverter-Graphs)

  3. c2 c2 c1 c1 Problem: Optimization of non-convex polyhedra • A linear constraint is redundant for a non-convex polyhedron iff the non-convex polyhedron can be described without using this linear constraint. • Question: How to remove redundant linear constraints from representations efficiently?

  4. Example y 3 • F= (y ¸ 0) ¢ (-2x – y + 3 ¸ 0) ¢ (y – x ¸ 0) + (x ¸ 0) ¢ (-1/2 x – y + 3/2) ¢ (x – y ¸ 0) 2 1 x 1 2 3 l1 l2 l5 l3 l4 l6 • Question: Are l5 and l6 redundant? • I.e.: Is there a boolean function G with F(l1, ..., l6) = G(l1, ..., l4)?

  5. Function table of F(b1, ..., b6): 0000 10 0000 01 0001 11 0001 10 0001 01 1111 00 1111 01 1111 10 1111 11 1110 00 1110 01 1110 10 0010 11 1110 11 1101 01 1101 10 1101 11 1100 00 1100 01 1100 10 1100 11 1011 00 1011 01 1011 10 1011 11 1010 00 1010 01 1101 00 0001 00 0000 11 1010 10 0000 00 1001 00 1000 00 1001 10 1001 11 1000 01 1000 10 1000 11 0111 00 0111 01 0111 10 0111 11 1010 11 0110 01 0110 10 0110 11 0101 00 0110 00 0101 10 1001 01 0010 10 0101 01 0010 00 0011 11 0011 10 0010 01 0011 00 0100 11 0100 10 0011 01 0100 01 0100 00 0101 11 function value = 1: function value = 0: Example l1 l2 l5 l3 l4 l6 • F= (y ¸ 0) ¢ (-2x – y + 3 ¸ 0) ¢ (y – x ¸ 0) + (x ¸ 0) ¢ (-1/2 x – y + 3/2) ¢ (x – y ¸ 0) • Is there a boolean function G with F(l1, ..., l6) = G(l1, ..., l4)? • In order to solve the problem consider the boolean abstraction (boolean variable b1 for l1, ..., b6 for l6): F(b1, ..., b6) = b1¢ b2¢ b5 + b3¢ b4¢ b6

  6. 0000 00 0000 01 0000 10 0000 11 0001 01 0001 10 0001 11 0010 00 0010 01 0111 11 0010 11 0011 00 0011 01 0011 10 0011 11 0010 10 0100 01 0111 01 0100 00 0110 11 0110 10 0110 01 0110 00 0111 00 0101 10 0101 01 0101 11 0101 00 0100 11 0100 10 0111 10 1001 01 0001 00 1000 01 1000 10 1000 11 1001 00 1001 10 1001 11 1010 00 1010 01 1010 10 1010 11 1000 00 1011 01 1011 10 1011 11 1100 00 1100 01 1011 00 1100 11 1111 11 1100 10 1111 01 1111 00 1110 11 1110 10 1111 10 1110 00 1101 11 1110 01 1101 10 1101 01 1101 00 Example l1 l2 l5 l3 l4 l6 • F= (y ¸ 0) ¢ (-2x – y + 3 ¸ 0) ¢ (y – x ¸ 0) + (x ¸ 0) ¢ (-1/2 x – y + 3/2) ¢ (x – y ¸ 0) Function table of F(b1, ..., b6): F(b1, ..., b6) = b1¢ b2¢ b5 + b3¢ b4¢ b6 function value = 1: function value = 0:

  7. 3 l2 = false 2 l5 = true 1 1 2 3 l3 = false Example l1 l2 l5 l3 l4 l6 • F= (y ¸ 0) ¢ (-2x – y + 3 ¸ 0) ¢ (y – x ¸ 0) + (x ¸ 0) ¢ (-1/2 x – y + 3/2) ¢ (x – y ¸ 0) • Is there a boolean function G with F(l1, ..., l6) = G(l1, ..., l4)? • Problem is turned into logic synthesis problem with don‘t cares. • Don‘t cares correspond to inconsistent assignments to Boolean abstraction variables. • Example:b2=0, b5 = 1, b3 = 0 is inconsistent, because l2 = false, l5 = true, l3 = false can not be true at the same time. ) For b2=0, b5 = 1, b3 = 0 we can change F(b1, ..., b6) without changing the predicate F(l1, ..., l6).

  8. 0000 00 0000 01 0000 10 0000 11 0001 01 0001 10 0001 11 0010 00 0010 01 0111 11 0010 11 0011 00 0011 01 0011 10 0011 11 0010 10 0100 01 0111 01 0100 00 0110 11 0110 10 0110 01 0110 00 0111 00 0101 10 0101 01 0101 11 0101 00 0100 11 0100 10 0111 10 1001 01 0001 00 1000 01 1000 10 1000 11 1001 00 1001 10 1001 11 1010 00 1010 01 1010 10 1010 11 1000 00 1011 01 1011 10 1011 11 1100 00 1100 01 1011 00 1100 11 1111 11 1100 10 1111 01 1111 00 1110 11 1110 10 1111 10 1110 00 1101 11 1110 01 1101 10 1101 01 1101 00 Example l1 l2 l5 l3 l4 l6 • F= (y ¸ 0) ¢ (-2x – y + 3 ¸ 0) ¢ (y – x ¸ 0) + (x ¸ 0) ¢ (-1/2 x – y + 3/2) ¢ (x – y ¸ 0) Function table of F(b1, ..., b6): Inconsistent assignment ) don‘t care: function value = 1: function value = 0:

  9. 0000 00 0000 01 0000 10 0000 11 0001 01 0001 10 0001 11 0010 00 0010 01 0111 11 0010 11 0011 00 0011 01 0011 10 0011 11 0010 10 0100 01 0111 01 0100 00 0110 11 0110 10 0110 01 0110 00 0111 00 0101 10 0101 01 0101 11 0101 00 0100 11 0100 10 0111 10 1001 01 0001 00 1000 01 1000 10 1000 11 1001 00 1001 10 1001 11 1010 00 1010 01 1010 10 1010 11 1000 00 1011 01 1011 10 1011 11 1100 00 1100 01 1011 00 1100 11 1111 11 1100 10 1111 01 1111 00 1110 11 1110 10 1111 10 1110 00 1101 11 1110 01 1101 10 1101 01 1101 00 Example l1 l2 l5 l3 l4 l6 • F= (y ¸ 0) ¢ (-2x – y + 3 ¸ 0) ¢ (y – x ¸ 0) + (x ¸ 0) ¢ (-1/2 x – y + 3/2) ¢ (x – y ¸ 0) Function table of F(b1, ..., b6): Inconsistent assignment ) don‘t care: function value = 1: function value = 0:

  10. 0000 00 0000 01 0000 10 0000 11 0001 01 0001 10 0001 11 0010 00 0010 01 0111 11 0010 11 0011 00 0011 01 0011 10 0011 11 0010 10 0100 01 0111 01 0100 00 0110 11 0110 10 0110 01 0110 00 0111 00 0101 10 0101 01 0101 11 0101 00 0100 11 0100 10 0111 10 1001 01 0001 00 1000 01 1000 10 1000 11 1001 00 1001 10 1001 11 1010 00 1010 01 1010 10 1010 11 1000 00 1011 01 1011 10 1011 11 1100 00 1100 01 1011 00 1100 11 1111 11 1100 10 1111 01 1111 00 1110 11 1110 10 1111 10 1110 00 1101 11 1110 01 1101 10 1101 01 1101 00 Example l1 l2 l5 l3 l4 l6 • F= (y ¸ 0) ¢ (-2x – y + 3 ¸ 0) ¢ (y – x ¸ 0) + (x ¸ 0) ¢ (-1/2 x – y + 3/2) ¢ (x – y ¸ 0) Function table of F(b1, ..., b6): Inconsistent assignment ) don‘t care: function value = 1: function value = 0:

  11. 0000 00 0000 01 0000 10 0000 11 0001 01 0001 10 0001 11 0010 00 0010 01 0111 11 0010 11 0011 00 0011 01 0011 10 0011 11 0010 10 0100 01 0111 01 0100 00 0110 11 0110 10 0110 01 0110 00 0111 00 0101 10 0101 01 0101 11 0101 00 0100 11 0100 10 0111 10 1001 01 0001 00 1000 01 1000 10 1000 11 1001 00 1001 10 1001 11 1010 00 1010 01 1010 10 1010 11 1000 00 1011 01 1011 10 1011 11 1100 00 1100 01 1011 00 1100 11 1111 11 1100 10 1111 01 1111 00 1110 11 1110 10 1111 10 1110 00 1101 11 1110 01 1101 10 1101 01 1101 00 Example l1 l2 l5 l3 l4 l6 • F= (y ¸ 0) ¢ (-2x – y + 3 ¸ 0) ¢ (y – x ¸ 0) + (x ¸ 0) ¢ (-1/2 x – y + 3/2) ¢ (x – y ¸ 0) Function table of G(b1, ..., b4): Changed function G does not depend on b5 and b6! G(b1, ..., b4) = b1¢ b3¢ (b2 + b4) G(l1, ..., l4) = F(l1, ..., l6) function value = 1: function value = 0:

  12. 0 0 0 0 1 1 function value = 1: 1 0011 01 0100 00 0001 11 0000 01 0000 10 0000 11 0010 00 0001 01 0001 10 0100 10 0011 11 0010 01 0001 00 1000 01 0100 01 0111 11 0111 10 0010 10 0111 00 0110 11 0111 01 0110 01 0110 10 0101 00 0101 01 0100 11 0101 11 0110 00 0101 10 1000 00 0010 11 0011 00 1010 11 0000 00 1100 00 1011 11 1011 10 1011 01 1011 00 1010 00 1010 10 1010 01 1100 01 1001 10 1000 11 1101 10 1101 00 1101 01 1100 10 1101 11 0011 10 1000 10 1001 11 1001 00 1001 01 1111 11 1111 10 1100 11 1111 00 1110 11 1110 10 1110 01 1110 00 1111 01 function value = 0: 1 0 0 0 1 1 Example • F(b1, ..., b6) = b1 b2 b5 + b3 b4 b6 • DC =

  13. 0 0 0 0 1 1 1 0100 00 0001 11 0000 01 0000 10 0000 11 0001 00 0010 00 0001 10 0011 01 0011 11 0010 01 0010 10 0001 01 0100 10 0100 01 0111 11 0111 10 0010 11 0111 00 0110 11 0110 10 0111 01 0110 00 0101 11 0101 10 0101 01 0101 00 0100 11 0110 01 1000 00 0011 00 1000 10 1001 01 0000 00 1100 00 1011 11 1011 10 1011 01 1011 00 1010 00 1010 10 1010 01 1100 01 1001 11 0011 10 1100 10 1101 10 1101 00 1010 11 1001 00 1000 01 1001 10 1000 11 1100 11 1101 01 1111 10 1111 01 1111 11 1110 11 1110 10 1110 01 1110 00 1101 11 1111 00 1 0 0 0 1 1 Example l5 and l6 can not be false at the same time! )Minimized conflict clause (b5 + b6) inserted by SMT solver )Insert :b5:b6 into don‘t care representation! • F(b1, ..., b6) = b1 b2 b5 + b3 b4 b6 • DC = : b5: b6

  14. 0000 00 0000 10 0000 11 0001 00 0001 01 0001 10 0001 11 0010 00 0010 01 0010 10 0010 11 0011 00 0011 01 0111 11 0011 11 0011 10 0100 01 0111 01 0111 00 0110 11 0100 00 0110 01 0110 00 0110 10 0101 10 0101 01 0101 00 0100 11 0100 10 0101 11 0111 10 1000 01 0000 01 1000 10 1000 11 1001 00 1001 01 1001 10 1001 11 1010 00 1010 01 1010 10 1010 11 1011 00 1011 01 1011 10 1011 11 1000 00 1100 01 1100 00 1100 11 1111 11 1111 10 1111 01 1100 10 1110 11 1110 10 1111 00 1110 00 1101 11 1101 10 1101 01 1101 00 1110 01 Example Inconsistent assignment ) don‘t care: function value = 1: function value = 0: • F(b1, ..., b6) = b1 b2 b5 + b3 b4 b6 • DC = : b5: b6

  15. 0000 00 0000 01 0000 10 0000 11 0001 00 0001 01 0001 11 0010 00 0111 11 0010 10 0010 11 0011 00 0011 01 0011 10 0011 11 0010 01 0100 01 0100 00 0111 00 0110 11 0110 10 0110 01 0110 00 0111 01 0101 10 0101 01 0101 00 0100 11 0100 10 0101 11 0111 10 1001 10 0001 10 1000 01 1000 10 1000 11 1001 00 1001 01 1001 11 1010 00 1010 01 1010 10 1000 00 1011 00 1011 01 1011 10 1011 11 1100 00 1100 01 1010 11 1100 11 1101 00 1101 01 1101 10 1101 11 1110 00 1110 01 1110 10 1100 10 1110 11 1111 00 1111 01 1111 10 1111 11 Example 0 0 0 0 1 1 1 1 0 1 1 0 1 • F(b1, ..., b6) = b1 b2 b5 + b3 b4 b6 • DC = : b5: b6

  16. Example ...

  17. 0000 00 0000 10 0000 11 0001 00 0001 01 0001 10 0001 11 0010 00 0010 01 0010 10 0010 11 0011 00 0011 01 1111 11 0011 10 0100 00 0111 01 0111 00 0110 11 0110 10 0110 01 0011 11 0110 00 0101 10 0101 01 0101 00 0100 11 0100 10 0100 01 0101 11 0000 01 0111 10 0111 11 1000 00 1000 10 1000 11 1001 00 1001 01 1001 10 1001 11 1010 00 1010 01 1010 10 1010 11 1011 00 1011 01 1011 10 1011 11 1100 00 1110 01 1100 10 1100 11 1101 00 1101 01 1101 10 1101 11 1110 00 1100 01 1110 10 1110 11 1111 00 1111 01 1111 10 1000 01 Example – Final Result • F(b1, ..., b6) = b1 b2 b3 + b4 b5 b6 • DC = :b5:b6 + :b1:b2b4 + :b1b3b6 + :b2b4:b6 + b2:b3:b4 + b1:b3b5 + b2:b4:b5

  18. Redundancy Removal • How to remove redundant constraints efficiently (i.e. compute G(b1, ..., b4) efficiently)? • Approach 1-Existential quantification: G(b1, ..., b4) = 9 b5 b6 (F ¢: DC) • 9 bi F = F|bi = 0 + F|bi = 1. • Risk of doubling AIG representation with quantification of one variable. • Potential problem for large numbers of redundant constraints. • Approach 2:Craig interpolation • Obtain appropriate function G by one Craig interpolation for • F(b1, ..., b4, b5, b6) ¢: DC(b1, ..., b4, b5, b6) • : F(b1, ..., b4, b´5, b´6) ¢: DC(b1, ..., b4, b´5, b´6)

  19. Experimental results – Model checking with and without redundancy removal • Early removal of redundant constraints pays off.

  20. Experimental results: Redundancy elimination -Existential quantification versus Craig interpolation

  21. Conclusions and future work • Approach for optimizing non-convex polyhedra based on removal of redundant constraints • Successfully applied to solving of quantified formulas including linear real arithmetic and boolean variables • Accelerate approach by using state-of-the-art SMT solver for don‘t care computation, too. • Apply methods to underlying theories different from linear arithmetic?

More Related