Generating Sharper and Simpler Nonlinear Interpolants for Program Verification Takamasa Okudono 1 , Yuki Nishida 2 , Kensuke Kojima 2 , Kohei Suenaga 2 , Kengo Kido 1 and Ichiro Hasuo 3 1 University of Tokyo, Japan 2 Kyoto University, Japan 3 National Institute of Informatics, Japan APLAS 2017, Suzhou, China. November 28 th 2017 Takamasa Okudono (University of Tokyo) 1
Interpolant is effective Purpose of This Work at program verification Disjointness of the regions β’ Automatic generation of polynomial interpolants. Def. [interpolant] β’ π΅, πΆ: Formulas satisfying β¨ Β¬(π΅ β§ πΆ) . Essential to β’ Formula π½ is an interpolant of π΅ and πΆ if: separate the regions 1. β¨ π΅ β π½ 2. β¨ Β¬(πΆ β§ π½) 3. Variables in π½ appear in both of π΅, πΆ For polynomial interpolants, atomic propositions are: (Poly.) β§ 0, (Poly.)>0, (Poly.)=0 2 Takamasa Okudono (University of Tokyo)
Existing Work β’ [Dai+, CAVβ13]: generation of polynomial interpolants with numerical optimization β’ Challenge 1: Unable to generate any interpolants in β touching β cases β’ Challenge 2: Incorrect and complex due to numerical errors Touching 54.1800π¦ + 108.3601π§ β₯ 0 π¦ + 2π§ β₯ 0 Takamasa Okudono (University of Tokyo) 3
Our Contribution β’ [Dai+, CAVβ13]: generation of polynomial interpolants with numerical optimization β’ Challenge 1: Unable to generate any interpolants in β touching β cases β’ Challenge 2: Incorrect and complex due to numerical errors Touching 54.1800π¦ + 108.3601π§ β₯ 0 Solved! π¦ + 2π§ β₯ 0 Solved! (Contribution 1) (Contribution 2) Takamasa Okudono (University of Tokyo) 4
Challenge 1 in [Dai+]: Sharpness β’ If two regions of π΅, πΆ are βtouchingβ, [Dai+, CAVβ13] always fails at generating their interpolant. β’ π΅ = (π§ β π¦ > 0 β§ π§ + π¦ > 0) Touching β’ πΆ = (βπ§ β₯ 0) Takamasa Okudono (University of Tokyo) 5
Challenge 1 in [Dai+]: Sharpness β’ If two regions of π΅, πΆ are βtouchingβ, [Dai+, CAVβ13] always fails at generating their interpolant. β’ π΅ = (π§ β π¦ > 0 β§ π§ + π¦ > 0) Touching β’ πΆ = βπ§ β₯ 0 β’ π½ = π§ > 0 β’ There is an interpolant, but [Dai, CAVβ13] cannot find it! Takamasa Okudono (University of Tokyo) 6
Challenge 1 in [Dai+]: Sharpness β’ If two regions of π΅, πΆ are βtouchingβ, [Dai+, CAVβ13] always fails at generating their interpolant. Takamasa Okudono (University of Tokyo) 7
Challenge 1: Flow of [Dai+] [Parrilo , Mathematical Programmingβ03] (2) Polynomial (1) Formulas (3) SDP β¦ β¦ Optimization Use SDP Solver π΅, πΆ Problem Problem β¦ (5) Numerical (4) Numerical (6) Interpolant β¦ β¦ Solution Solution π½ of (2) of (3) Takamasa Okudono (University of Tokyo) 8
Contribution 1: Method for Sharpness [Parrilo , Mathematical Programmingβ03] Method for Sharpness (2) Polynomial (1) Formulas (3) SDP β¦ β¦ Optimization Use SDP Solver π΅, πΆ Problem Problem β¦ (5) Numerical (4) Numerical (6) Interpolant β¦ β¦ Solution Solution π½ of (2) of (3) Takamasa Okudono (University of Tokyo) 9
Contribution 1: Example Method for Sharpness (2) Polynomial (1) Formulas β¦ Optimization π΅, πΆ Problem π΅ = y β x > 0, y + x > 0 , πΆ = (βπ§ β₯ 0) Takamasa Okudono (University of Tokyo) 10
Contribution 1: Example [Dai+, CAVβ13] β’ π΅ = (y β x > 0, y + x > 0), πΆ = (βπ§ β₯ 0) β’ [Dai+, CAVβ13] β’ Find polynomials π 1 , π 2 , π 3 , π 4 , π 5 β β[π] s.t. 1 π§ + π¦ + π§ β π¦ 2 π§ + π¦ 2 β’ π½ β 2 + π 1 + π 2 π§ β π¦ + π 3 π§ + π¦ + π 4 π§ β π¦ β’ π½ β² β 1 2 + π 5 (βπ§) β’ π 1 , π 2 , π 3 , π 4 , π 5 are sums of squares β’ π½ + π½ β² = 0 π is a sum of squares β’ ( π½ contains only π§ ) βΊ β’ Then π½ > 0 is an interpolant 2 + β― + π π 2 βπ 1 , β¦ , π π β β π ; π = π 1 Takamasa Okudono (University of Tokyo) 11
Contribution 1: Example [Dai+, CAVβ13] β’ π΅ = (y β x > 0, y + x > 0), πΆ = (βπ§ β₯ 0) β’ [Dai+, CAVβ13] β’ Find polynomials π 1 , π 2 , π 3 , π 4 , π 5 β β[π] s.t. 1 π§ + π¦ + π§ β π¦ 2 π§ + π¦ 2 β’ π½ β 2 + π 1 + π 2 π§ β π¦ + π 3 π§ + π¦ + π 4 π§ β π¦ β’ π½ β² β 1 2 + π 5 (βπ§) β’ π 1 , π 2 , π 3 , π 4 , π 5 are sums of squares β’ π½ + π½ β² = 0 β’ ( π½ contains only π§ ) β’ Then π½ > 0 is an interpolant Infeasible and unable to generate any interpolants! Takamasa Okudono (University of Tokyo) 12
Contribution 1: Example [Dai+, CAVβ13] β’ π΅ = (y β x > 0, y + x > 0), πΆ = (βπ§ β₯ 0) β’ [Dai+, CAVβ13] β’ Find π 1 , π 2 , π 3 , π 4 , π 5 β β[π] s.t. 1 π§ + π¦ + π§ β π¦ 2 π§ + π¦ 2 β’ π½ β 2 + π 1 + π 2 π§ β π¦ + π 3 π§ + π¦ + π 4 π§ β π¦ β’ π½ β² β 1 2 + π 5 (βπ§) β΅ Assume the feasibility. β’ π 1 , π 2 , π 3 , π 4 , π 5 are sums of squares 0 = π½ + π½ β² 0, 0 β’ π½ + π½ β² = 0 = 1 + π 1 0, 0 > 0. β’ ( π½ contains only π§ ) Contradiction. β‘ β’ Then π½ > 0 is an interpolant Infeasible and unable to generate any interpolants! Takamasa Okudono (University of Tokyo) 13
Contribution 1: Example [Dai+, CAVβ13] β’ π΅ = (y β x > 0, y + x > 0), πΆ = (βπ§ β₯ 0) β’ Our method for sharpness β’ Find polynomials π 1 , π 2 , π 3 , π 4 , π 5 β β[π] and π 1 , π 2 , π 3 β β β₯0 s.t. β’ π½ β π 1 + π 2 π§ β π¦ + π 3 π§ + π¦ + π 4 π§ β π¦ π§ + π¦ + π 1 + π 2 π§ β π¦ + π 3 π§ + π¦ β’ π½ β² β π 5 βπ§ β’ π 1 , π 2 , π 3 , π 4 , π 5 are sums of squares β’ π 1 + π 2 + π 3 > 0 β’ π½ + π½ β² = 0 β’ π½ contains only π§ β’ Then π½ > 0 is an interpolant Takamasa Okudono (University of Tokyo) 14
Contribution 1: Example [Dai+, CAVβ13] π 3 = 0 π 2 = 1 π 1 = 0 β’ π΅ = (y β x > 0, y + x > 0), πΆ = (βπ§ β₯ 0) π 3 = 1 π 4 = 0 π 2 = 0 β’ Our method for sharpness π 1 = 0 β’ Find polynomials π 1 , π 2 , π 3 , π 4 , π 5 β β[π] and π 1 , π 2 , π 3 β β β₯0 s.t. β’ π½ β π 1 + π 2 π§ β π¦ + π 3 π§ + π¦ + π 4 π§ β π¦ π 5 = 2 π§ + π¦ + π 1 + π 2 π§ β π¦ + π 3 π§ + π¦ β’ π½ β² β π 5 βπ§ β’ π 1 , π 2 , π 3 , π 4 , π 5 are sums of squares β’ π 1 + π 2 + π 3 > 0 π½ = 2π§ β’ π½ + π½ β² = 0 β’ π½ contains only π§ β’ Then π½ > 0 is an interpolant Feasible and able to generate an interpolant! Takamasa Okudono (University of Tokyo) 15
Contribution 1: Completeness A and B s.t. β¨ Β¬(Aβ§ B) Method for Sharpness βtouchingβ cases [Dai+] Takamasa Okudono (University of Tokyo) 16
Challenge 2: Numerical Error in [Dai+] (2) Polynomial (1) Formulas (3) SDP β¦ β¦ Optimization Use SDP Solver π΅, πΆ Problem Problem β¦ (5) Numerical (4) Numerical (6) Interpolant β¦ β¦ Solution Solution π½ of (2) of (3) Numerical Error Takamasa Okudono (University of Tokyo) 17
Challenge 2: Numerical Error in [Dai+] (2) Polynomial (1) Formulas (3) SDP β¦ β¦ Optimization Use SDP Solver π΅, πΆ Problem Problem β¦ (5) Numerical (4) Numerical (6) Interpolant β¦ β¦ Solution Solution π½ of (2) of (3) Numerical Numerical Error Error Takamasa Okudono (University of Tokyo) 18
Challenge 2: Numerical Error in [Dai+] (2) Polynomial (1) Formulas (3) SDP β¦ β¦ Optimization Use SDP Solver π΅, πΆ Problem Problem Less β¦ simple (5) Numerical (4) Numerical (6) Interpolant β¦ β¦ Maybe Solution Solution π½ spurious of (2) of (3) Numerical Numerical Numerical Error Error Error Numerical error spreads Takamasa Okudono (University of Tokyo) 19
Challenge 2: Numerical Error in [Dai+] (2) Polynomial (1) Formulas (3) SDP β¦ β¦ Optimization Use SDP Solver π΅, πΆ Problem Problem Less β¦ simple The same problem occurs in our method for sharpness (Contribution 1) (5) Numerical (4) Numerical (6) Interpolant β¦ β¦ Maybe Solution Solution π½ spurious of (2) of (3) Numerical Numerical Numerical Error Error Error Numerical error spreads Takamasa Okudono (University of Tokyo) 20
Challenge 2: Example β’ Example: π΅ = π¦ = 0 β§ π§ = 0 , πΆ = (π¦ + 2π§ < 0) β’ Spurious interpolant π½ = 54.1800π¦ + 108.3601π§ β₯ 0 β’ π¦, π§ = (β108.3601, 54.1800) satisfies both πΆ and π½ Def. [interpolant] β’ π΅, πΆ: Formulas satisfying β¨ (π΅ β§ πΆ) . β’ Formula π½ is an interpolant of π΅ and πΆ if: 1. β¨ π΅ β π½ 2. β¨ Β¬(πΆ β§ π½) 3. Variables in π½ appears in both of π΅, πΆ Takamasa Okudono (University of Tokyo) 21
Contribution 2: Observation Spurious Interpolant: π½ = 54.1800π¦ + 108.3601π§ β₯ 0 βΓ 2 Simplified Interpolant: π½ = π¦ + 2π§ β₯ 0 Correct and simple interpolant of π΅ = π¦ = 0 β§ π§ = 0 , πΆ = (π¦ + 2π§ < 0) Takamasa Okudono (University of Tokyo) 22
Recommend
More recommend