Interpolant Synthesis for Quadratic Polynomial Inequalities and - - PowerPoint PPT Presentation

interpolant synthesis for quadratic polynomial
SMART_READER_LITE
LIVE PREVIEW

Interpolant Synthesis for Quadratic Polynomial Inequalities and - - PowerPoint PPT Presentation

Key ideas Generating interpolants for CQI Combination with EUF Evaluation results Concluding remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . Interpolant Synthesis for Quadratic Polynomial Inequalities and Combination with EUF


slide-1
SLIDE 1

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks

Interpolant Synthesis for Quadratic Polynomial Inequalities and Combination with EUF

Deepak Kapur

Department of Computer Science, University of New Mexico Joint work with Ting Gan, Liyun Dai, Bican Xia, Naijun Zhan, and Mingshuai Chen

Dagstuhl, September 2015

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 1 / 29

slide-2
SLIDE 2

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks

Outline

1 Key ideas

Generalization of Motzkin's transposition theorem Concave quadratic polynomials Positive constant replaced by sum of squares

2 Generating interpolants for Concave Quadratic Polynomial inequalities

NSOSC condition : generalized Motzkin's theorem applies SOS (NSOSC not satisifed) : equalities from expressions in a sum of squares being equal to 0.

3 Combination with uninterpreted function symbols (EUF)

similar to the linear case

4 Concluding remarks Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 2 / 29

slide-3
SLIDE 3

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks

Outline

1 Key ideas

Generalization of Motzkin's transposition theorem Concave quadratic polynomials Positive constant replaced by sum of squares

2 Generating interpolants for Concave Quadratic Polynomial inequalities

NSOSC condition : generalized Motzkin's theorem applies SOS (NSOSC not satisifed) : equalities from expressions in a sum of squares being equal to 0.

3 Combination with uninterpreted function symbols (EUF)

similar to the linear case

4 Concluding remarks Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 2 / 29

slide-4
SLIDE 4

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks

Outline

1 Key ideas

Generalization of Motzkin's transposition theorem Concave quadratic polynomials Positive constant replaced by sum of squares

2 Generating interpolants for Concave Quadratic Polynomial inequalities

NSOSC condition : generalized Motzkin's theorem applies SOS (NSOSC not satisifed) : equalities from expressions in a sum of squares being equal to 0.

3 Combination with uninterpreted function symbols (EUF)

similar to the linear case

4 Concluding remarks Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 2 / 29

slide-5
SLIDE 5

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks

Outline

1 Key ideas

Generalization of Motzkin's transposition theorem Concave quadratic polynomials Positive constant replaced by sum of squares

2 Generating interpolants for Concave Quadratic Polynomial inequalities

NSOSC condition : generalized Motzkin's theorem applies SOS (NSOSC not satisifed) : equalities from expressions in a sum of squares being equal to 0.

3 Combination with uninterpreted function symbols (EUF)

similar to the linear case

4 Concluding remarks Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 2 / 29

slide-6
SLIDE 6

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks

Outline

1 Key ideas

Generalization of Motzkin's transposition theorem Concave quadratic polynomials Positive constant replaced by sum of squares

2 Generating interpolants for Concave Quadratic Polynomial inequalities

NSOSC condition : generalized Motzkin's theorem applies SOS (NSOSC not satisifed) : equalities from expressions in a sum of squares being equal to 0.

3 Combination with uninterpreted function symbols (EUF)

similar to the linear case

4 Concluding remarks Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 2 / 29

slide-7
SLIDE 7

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks

Outline

1 Key ideas

Generalization of Motzkin's transposition theorem Concave quadratic polynomials Positive constant replaced by sum of squares

2 Generating interpolants for Concave Quadratic Polynomial inequalities

NSOSC condition : generalized Motzkin's theorem applies SOS (NSOSC not satisifed) : equalities from expressions in a sum of squares being equal to 0.

3 Combination with uninterpreted function symbols (EUF)

similar to the linear case

4 Concluding remarks Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 2 / 29

slide-8
SLIDE 8

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks

Outline

1 Key ideas

Generalization of Motzkin's transposition theorem Concave quadratic polynomials Positive constant replaced by sum of squares

2 Generating interpolants for Concave Quadratic Polynomial inequalities

NSOSC condition : generalized Motzkin's theorem applies SOS (NSOSC not satisifed) : equalities from expressions in a sum of squares being equal to 0.

3 Combination with uninterpreted function symbols (EUF)

similar to the linear case

4 Concluding remarks Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 2 / 29

slide-9
SLIDE 9

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks

Outline

1 Key ideas

Generalization of Motzkin's transposition theorem Concave quadratic polynomials Positive constant replaced by sum of squares

2 Generating interpolants for Concave Quadratic Polynomial inequalities

NSOSC condition : generalized Motzkin's theorem applies SOS (NSOSC not satisifed) : equalities from expressions in a sum of squares being equal to 0.

3 Combination with uninterpreted function symbols (EUF)

similar to the linear case

4 Concluding remarks Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 2 / 29

slide-10
SLIDE 10

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks

Outline

1 Key ideas

Generalization of Motzkin's transposition theorem Concave quadratic polynomials Positive constant replaced by sum of squares

2 Generating interpolants for Concave Quadratic Polynomial inequalities

NSOSC condition : generalized Motzkin's theorem applies SOS (NSOSC not satisifed) : equalities from expressions in a sum of squares being equal to 0.

3 Combination with uninterpreted function symbols (EUF)

similar to the linear case

4 Concluding remarks Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 2 / 29

slide-11
SLIDE 11

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks

Outline

1 Key ideas

Generalization of Motzkin's transposition theorem Concave quadratic polynomials Positive constant replaced by sum of squares

2 Generating interpolants for Concave Quadratic Polynomial inequalities

NSOSC condition : generalized Motzkin's theorem applies SOS (NSOSC not satisifed) : equalities from expressions in a sum of squares being equal to 0.

3 Combination with uninterpreted function symbols (EUF)

similar to the linear case

4 Concluding remarks Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 2 / 29

slide-12
SLIDE 12

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Overview

Overview of the idea

Example (running example) Consider two formulas A and B with A ∧ B | = ⊥, where A := −x12 + 4x1 + x2 − 4 ≥ 0 ∧ −x1 − x2 + 3 − y2 > 0, B := −3x12 − x22 + 1 ≥ 0 ∧ x2 − z2 ≥ 0 We aim to generate an interpolant I for A and B, on the common variables (x1 and x2), such that A | = I and I ∧ B | = ⊥. An intuitive description of a candidate interpolant is as the purple curve in the above right figure, which separates A and B in the panel of x1 and x2.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 3 / 29

slide-13
SLIDE 13

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Overview

Overview of the idea

A polynomial time algorithm for generating interpolants from mutually contradictory conjunctions of concave quadratic polynomial inequalities over the reals :

If no nonpositive constant combination of nonstrict inequalities is a sum of squares polynomial, an interpolant a la McMillan can be generated essentially using the linearization of quadratic polynomials. Otherwise, linear equalities relating variables are deduced, resulting to interpolation subproblems with fewer variables on which the algorithm is recursively applied.

An algorithm for generating interpolants for the combination of quantifier-free theory of concave quadratic polynomial inequalities and equality theory over uninterpreted function symbols (EUF).

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 4 / 29

slide-14
SLIDE 14

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Overview

Overview of the idea

A polynomial time algorithm for generating interpolants from mutually contradictory conjunctions of concave quadratic polynomial inequalities over the reals :

If no nonpositive constant combination of nonstrict inequalities is a sum of squares polynomial, an interpolant a la McMillan can be generated essentially using the linearization of quadratic polynomials. Otherwise, linear equalities relating variables are deduced, resulting to interpolation subproblems with fewer variables on which the algorithm is recursively applied.

An algorithm for generating interpolants for the combination of quantifier-free theory of concave quadratic polynomial inequalities and equality theory over uninterpreted function symbols (EUF).

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 4 / 29

slide-15
SLIDE 15

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Overview

Overview of the idea

A polynomial time algorithm for generating interpolants from mutually contradictory conjunctions of concave quadratic polynomial inequalities over the reals :

If no nonpositive constant combination of nonstrict inequalities is a sum of squares polynomial, an interpolant a la McMillan can be generated essentially using the linearization of quadratic polynomials. Otherwise, linear equalities relating variables are deduced, resulting to interpolation subproblems with fewer variables on which the algorithm is recursively applied.

An algorithm for generating interpolants for the combination of quantifier-free theory of concave quadratic polynomial inequalities and equality theory over uninterpreted function symbols (EUF).

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 4 / 29

slide-16
SLIDE 16

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Overview

Overview of the idea

A polynomial time algorithm for generating interpolants from mutually contradictory conjunctions of concave quadratic polynomial inequalities over the reals :

If no nonpositive constant combination of nonstrict inequalities is a sum of squares polynomial, an interpolant a la McMillan can be generated essentially using the linearization of quadratic polynomials. Otherwise, linear equalities relating variables are deduced, resulting to interpolation subproblems with fewer variables on which the algorithm is recursively applied.

An algorithm for generating interpolants for the combination of quantifier-free theory of concave quadratic polynomial inequalities and equality theory over uninterpreted function symbols (EUF).

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 4 / 29

slide-17
SLIDE 17

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Preliminaries

Preliminaries

Theorem (Motzkin's transposition theorem) Let A and B be matrices and let ⃗ α and ⃗ β be column vectors. Then there exists a vector x with Ax − ⃗ α ≥ 0 and Bx − ⃗ β > 0, iff for all row vectors y, z ≥ 0 : (i) if yA + zB = 0 then y⃗ α + z⃗ β ≤ 0; (ii) if yA + zB = 0 and z ̸= 0 then y⃗ α + z⃗ β < 0. Corollary Let A

r n and B s n be matrices and r and s be column vectors,

where Ai i r is the ith row of A and Bj j s is the jth row of B. There does not exist a vector x with Ax and Bx , iff there exist real numbers

r

and

s

such that

r i i Aix i s j j Bjx j

with

s j j

(1)

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 5 / 29

slide-18
SLIDE 18

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Preliminaries

Preliminaries

Theorem (Motzkin's transposition theorem) Let A and B be matrices and let ⃗ α and ⃗ β be column vectors. Then there exists a vector x with Ax − ⃗ α ≥ 0 and Bx − ⃗ β > 0, iff for all row vectors y, z ≥ 0 : (i) if yA + zB = 0 then y⃗ α + z⃗ β ≤ 0; (ii) if yA + zB = 0 and z ̸= 0 then y⃗ α + z⃗ β < 0. Corollary Let A ∈ Rr×n and B ∈ Rs×n be matrices and ⃗ α ∈ Rr and ⃗ β ∈ Rs be column vectors, where Ai, i = 1, . . . , r is the ith row of A and Bj, j = 1, . . . , s is the jth row of B. There does not exist a vector x with Ax − ⃗ α ≥ 0 and Bx − ⃗ β > 0, iff there exist real numbers λ1, . . . , λr ≥ 0 and η0, η1, . . . , ηs ≥ 0 such that

r

i=1

λi(Aix − αi) +

s

j=1

ηj(Bjx − βj) + η0 ≡ 0 with

s

j=0

ηj = 1. (1)

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 5 / 29

slide-19
SLIDE 19

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Concave quadratic polynomials

Concave quadratic polynomials

Definition (Concave Quadratic) A polynomial f ∈ R[x] is called concave quadratic (CQ) if the following two conditions hold : f has total degree at most 2, i.e., it has the form f = xTAx + 2⃗ αTx + a, where A is a real symmetric matrix, ⃗ α is a column vector and a ∈ R ; the matrix A is negative semi-definite, written as A ⪯ 0. Example Take f = −3x12 − x22 + 1 in the running example, which is from the ellipsoid domain and can be expressed as f = ( x1 x2 )T( −3 −1 )( x1 x2 ) + 1. The corresponding A = ( −3 −1 ) ⪯ 0. Thus, f is CQ.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 6 / 29

slide-20
SLIDE 20

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Concave quadratic polynomials

Concave quadratic polynomials

If f ∈ R[x] is linear, then f is CQ because its total degree is 1 and the corresponding A is 0 which is of course negative semi-definite. A quadratic polynomial f x xTAx

Tx

a can also be represented as an inner product of matrices, i.e., P xT x xxT where P a

T

A

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 7 / 29

slide-21
SLIDE 21

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Concave quadratic polynomials

Concave quadratic polynomials

If f ∈ R[x] is linear, then f is CQ because its total degree is 1 and the corresponding A is 0 which is of course negative semi-definite. A quadratic polynomial f(x) = xTAx + 2⃗ αTx + a can also be represented as an inner product of matrices, i.e., ⟨ P, ( 1 xT x xxT )⟩ , where P = ( a αT α A ) .

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 7 / 29

slide-22
SLIDE 22

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Linearization of CQ polynomials

Linearization of CQ polynomials

Definition (Linearization) Given a quadratic polynomial f(x) = ⟨ P, ( 1 xT x xxT )⟩ , its linearization is defined as f(x) = ⟨ P, ( 1 xT x ⃗ X )⟩ , where ( 1 xT x ⃗ X ) ⪰ 0. let K x

n

f x fr x g x gs x (2) K x xT x X

r i

Pi xT x X

s j

Qj xT x X for some X (3)

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 8 / 29

slide-23
SLIDE 23

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Linearization of CQ polynomials

Linearization of CQ polynomials

Definition (Linearization) Given a quadratic polynomial f(x) = ⟨ P, ( 1 xT x xxT )⟩ , its linearization is defined as f(x) = ⟨ P, ( 1 xT x ⃗ X )⟩ , where ( 1 xT x ⃗ X ) ⪰ 0. let K ˆ = {x ∈ Rn | f1(x) ≥ 0, . . . , fr(x) ≥ 0, g1(x) > 0, . . . , gs(x) > 0}, (2) K1 ˆ = {x | ( 1 xT x ⃗ X ) ⪰ 0, ∧r

i=1

⟨ Pi, ( 1 xT x ⃗ X )⟩ ≥ 0, ∧s

j=1

⟨ Qj, ( 1 xT x ⃗ X )⟩ > 0, for some ⃗ X}, (3)

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 8 / 29

slide-24
SLIDE 24

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Linearization of CQ polynomials

Linearization of CQ polynomials

Theorem Let f1, . . . , fr and g1, . . . , gs be CQ polynomials, K and K1 as above, then K = K1. Therefore, when fis and gjs are CQ, the CQ polynomial inequalities can be transformed equivalently to a set of linear inequality constraints and a positive semi-definite constraint.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 9 / 29

slide-25
SLIDE 25

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Synthesis algorithms

Problem formulation

Problem 1 Given two formulas ϕ and ψ on n variables with ϕ ∧ ψ | = ⊥, where ϕ = f1 ≥ 0 ∧ . . . ∧ fr1 ≥ 0 ∧ g1 > 0 ∧ . . . ∧ gs1 > 0, ψ = fr1+1 ≥ 0 ∧ . . . ∧ fr ≥ 0 ∧ gs1+1 > 0 ∧ . . . ∧ gs > 0, in which f1, . . . , fr, g1, . . . , gs are all CQ, develop an algorithm to generate a (reverse) Craig interpolant I for ϕ and ψ, on the common variables of ϕ and ψ, such that ϕ | = I and I ∧ ψ | = ⊥. x = (x1, . . . , xd), y = (y1, . . . , yu) and z = (z1, . . . , zv), where d + u + v = n.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 10 / 29

slide-26
SLIDE 26

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Synthesis algorithms

NSOSC Condition

Definition (NSOSC) Formulas ϕ and ψ in Problem 1, satisfy the non-existence of an SOS polynomial condition (NSOSC) iff there do not exist δ1 ≥ 0, . . . , δr ≥ 0, s.t. −(δ1f1 + . . . + δrfr) is a non-zero SOS. Example Formulas A and B in the running example do not satisfy NSOSC, since there exist δ1 = 1, δ2 = 1, δ3 = 1, s.t. − (δ1(−x12 + 4x1 + x2 − 4) + δ2(−3x12 − x22 + 1) + δ3(x2 − z2)) = (2x1 − 1)2 + (x2 − 1)2 + z2 is a non-zero SOS.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 11 / 29

slide-27
SLIDE 27

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Synthesis algorithms

Generalization of Motzkin’s theorem

Theorem (Generalization of Motzkin’s theorem) Let f1, . . . , fr, g1, . . . , gs be CQ polynomials whose conjunction is unsatisfiable. If the condition NSOSC holds, then there exist λi ≥ 0 (i = 1, · · · , r), ηj ≥ 0 (j = 0, 1, · · · , s) and a quadratic SOS polynomial h of the form (l1)2 + . . . + (lk)2 where li are linear expressions in x, y, z. , s.t.

r

i=1

λifi +

s

j=1

ηjgj + η0 + h ≡ 0, (4) η0 + η1 + . . . + ηs = 1. (5) Using this generalization, an interpolant for ϕ and ψ is generated from the SOS polynomial h by splitting it into two SOS polynomials.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 12 / 29

slide-28
SLIDE 28

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Synthesis algorithms

When NSOSC is satisfied

Theorem Let ϕ and ψ as defined in Problem 1 with ϕ ∧ φ | = ⊥, which satisfy NSOSC. Then there exist λi ≥ 0 (i = 1, · · · , r), ηj ≥ 0 (j = 0, 1, · · · , s) and two quadratic SOS polynomial h1 ∈ R[x, y] and h2 ∈ R[x, z] s.t.

r

i=1

λifi +

s

j=1

ηjgj + η0 + h1 + h2 ≡ 0, (6) η0 + η1 + . . . + ηs = 1. (7) Let I = ∑r1

i=1 λifi + ∑s1 j=1 ηjgj + η0 + h1 ∈ R[x]. Then, if ∑s1 j=0 ηj > 0, then I > 0 is an

interpolant ; otherwise I ≥ 0 is an interpolant.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 13 / 29

slide-29
SLIDE 29

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Synthesis algorithms

Computing interpolant using semi-definite programming

Let W =       1 xT yT zT x xxT xyT xzT y yxT yyT yzT z zxT zyT zzT       , fi = ⟨Pi, W⟩, gj = ⟨Qj, W⟩, where Pi and Qj are (n + 1) × (n + 1) matrices, h1 = ⟨M, W⟩, h2 = ⟨ ˆ M, W⟩, and M = (Mij)4×4, ˆ M = ( ˆ Mij)4×4 with appropriate dimensions, e.g., M12 ∈ R1×d and ˆ M34 ∈ Ru×v. Then, with NSOSC, computing the interpolant is reduced to the following SDP feasibility problem :

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 14 / 29

slide-30
SLIDE 30

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Synthesis algorithms

Computing interpolant using semi-definite programming

Find : λ1, . . . , λr, η1, . . . , ηs ∈ R, M, ˆ M ∈ R(n+1)×(n+1) subject to                ∑r

i=1 λiPi + ∑s j=1 ηjQj + η0E1,1 + M + ˆ

M = 0, ∑s

j=1 ηj = 1,

M41 = (M14)T = 0, M42 = (M24)T = 0, M43 = (M34)T = 0, M44 = 0, ˆ M31 = ( ˆ M13)T = 0, ˆ M32 = ( ˆ M23)T = 0, ˆ M33 = 0, ˆ M34 = ( ˆ M43)T = 0, M ⪰ 0, ˆ M ⪰ 0, λi ≥ 0, ηj ≥ 0, for i = 1, . . . , r, j = 1, . . . , s, where E(1,1) is a (n + 1) × (n + 1) matrix, whose all other entries are 0 except for (1, 1) entry being 1.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 15 / 29

slide-31
SLIDE 31

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Synthesis algorithms

Generating interpolants when NSOSC holds

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 16 / 29

slide-32
SLIDE 32

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Synthesis algorithms

When NSOSC is not satisfied

If ϕ and ψ do not satisfy NSOSC, i.e., an SOS polynomial h(x, y, z) = −(∑r

i=1 λifi)

can be computed which can be split into two SOS polynomials h1(x, y) and h2(x, z) as discussed previously. Then an SOS polynomial f(x) such that ϕ | = f(x) ≥ 0 and ψ | = −f(x) ≥ 0 can be constructed as f(x) = (

r1

i=1

δifi) + h1 = −(

r

i=r1+1

δifi) − h2, δi ≥ 0. Lemma If Problem 1 does not satisfy NSOSC, there exists f ∈ R[x], s.t. ϕ ⇔ ϕ1 ∨ ϕ2 and ψ ⇔ ψ1 ∨ ψ2, where, ϕ1 = (f > 0 ∧ ϕ), ϕ2 = (f = 0 ∧ ϕ),ψ1 = (−f > 0 ∧ ψ), ψ2 = (f = 0 ∧ ψ). (8)

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 17 / 29

slide-33
SLIDE 33

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Synthesis algorithms

When NSOSC is not satisfied

Using the previous lemma, an interpolant I for ϕ and ψ can be constructed from an interpolant I2,2 for ϕ2 and ψ2. Theorem With ϕ, ψ, ϕ1, ϕ2, ψ1, ψ2 as in previous Lemma, from an interpolant I2,2 for ϕ2 and ψ2, I := (f > 0) ∨ (f ≥ 0 ∧ I2,2) is an interpolant for ϕ and ψ. If h and hence h h have a positive constant an , then f cannot be 0, implying that are . We thus have : Theorem With , , as in previous Lemma and h has an , f is an interpolant for and . In case h does not have a constant, i.e., an , elimination of variables can be recursively performed to terminate the algorithm.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 18 / 29

slide-34
SLIDE 34

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Synthesis algorithms

When NSOSC is not satisfied

Using the previous lemma, an interpolant I for ϕ and ψ can be constructed from an interpolant I2,2 for ϕ2 and ψ2. Theorem With ϕ, ψ, ϕ1, ϕ2, ψ1, ψ2 as in previous Lemma, from an interpolant I2,2 for ϕ2 and ψ2, I := (f > 0) ∨ (f ≥ 0 ∧ I2,2) is an interpolant for ϕ and ψ. If h and hence h1, h2 have a positive constant an+1 > 0, then f cannot be 0, implying that ϕ2, ψ2 are ⊥. We thus have : Theorem With ϕ, ψ, ϕ1, ϕ2, ψ1, ψ2 as in previous Lemma and h has an+1 > 0, f > 0 is an interpolant for ϕ and ψ. In case h does not have a constant, i.e., an+1 = 0, elimination of variables can be recursively performed to terminate the algorithm.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 18 / 29

slide-35
SLIDE 35

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Synthesis algorithms

Generating interpolants for CQI

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 19 / 29

slide-36
SLIDE 36

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Synthesis algorithms

Generating interpolants for CQI

Example Recall the running example where h = (2x1 − 1)2 + (x2 − 1)2 + z2 = 1 2 ((2x1 − 1)2 + (x2 − 1)2)

  • h1

+ 1 2 ((2x1 − 1)2 + (x2 − 1)2) + z2

  • h2

f = δ1(−x12 + 4x1 + x2 − 4) + h1 = −3 + 2x1 + x12 + 1 2 x22 We construct A′ from A by setting x1 = 1

2 , x2 = 1 derived from h1 = 0 ; similarly B′ is

constructed by setting x1 = 1

2 , x2 = 1, z = 0 in B as derived from h2 = 0. It follows

that, A′ := B′ := ⊥ Thus, I(A′, B′) := (0 > 0) is an interpolant for (A′, B′). An interpolant for A and B is thus (f(x) > 0) ∨ (f(x) = 0 ∧ I(A′, B′)), i.e. −3 + 2x1 + x12 + 1 2 x22 > 0. which corresponds to the purple curve mentioned previously.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 20 / 29

slide-37
SLIDE 37

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Key ideas

Combination with EUF

Ω = Ω1 ∪ Ω2 ∪ Ω3 : a finite set of uninterpreted function symbols in EUF ; , ; x y z : the extension of x y z in which polynomials can have terms built using function symbols in and variables in x y z. Problem 2 Suppose two formulas and with = , where f fr g gs fr fr gs gs where f fr g gs are all CQ polynomials, f fr g gs x y , fr fr gs gs x z , the goal is to generate an interpolant I for and , expressed using the common symbols x , i.e., I includes

  • nly polynomials in

x .

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 21 / 29

slide-38
SLIDE 38

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Key ideas

Combination with EUF

Ω = Ω1 ∪ Ω2 ∪ Ω3 : a finite set of uninterpreted function symbols in EUF ; Ω12 = Ω1 ∪ Ω2, Ω13 = Ω1 ∪ Ω3 ; x y z : the extension of x y z in which polynomials can have terms built using function symbols in and variables in x y z. Problem 2 Suppose two formulas and with = , where f fr g gs fr fr gs gs where f fr g gs are all CQ polynomials, f fr g gs x y , fr fr gs gs x z , the goal is to generate an interpolant I for and , expressed using the common symbols x , i.e., I includes

  • nly polynomials in

x .

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 21 / 29

slide-39
SLIDE 39

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Key ideas

Combination with EUF

Ω = Ω1 ∪ Ω2 ∪ Ω3 : a finite set of uninterpreted function symbols in EUF ; Ω12 = Ω1 ∪ Ω2, Ω13 = Ω1 ∪ Ω3 ; R[x, y, z]Ω : the extension of R[x, y, z] in which polynomials can have terms built using function symbols in Ω and variables in x, y, z. Problem 2 Suppose two formulas and with = , where f fr g gs fr fr gs gs where f fr g gs are all CQ polynomials, f fr g gs x y , fr fr gs gs x z , the goal is to generate an interpolant I for and , expressed using the common symbols x , i.e., I includes

  • nly polynomials in

x .

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 21 / 29

slide-40
SLIDE 40

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Key ideas

Combination with EUF

Ω = Ω1 ∪ Ω2 ∪ Ω3 : a finite set of uninterpreted function symbols in EUF ; Ω12 = Ω1 ∪ Ω2, Ω13 = Ω1 ∪ Ω3 ; R[x, y, z]Ω : the extension of R[x, y, z] in which polynomials can have terms built using function symbols in Ω and variables in x, y, z. Problem 2 Suppose two formulas and with = , where f fr g gs fr fr gs gs where f fr g gs are all CQ polynomials, f fr g gs x y , fr fr gs gs x z , the goal is to generate an interpolant I for and , expressed using the common symbols x , i.e., I includes

  • nly polynomials in

x .

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 21 / 29

slide-41
SLIDE 41

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Key ideas

Combination with EUF

Ω = Ω1 ∪ Ω2 ∪ Ω3 : a finite set of uninterpreted function symbols in EUF ; Ω12 = Ω1 ∪ Ω2, Ω13 = Ω1 ∪ Ω3 ; R[x, y, z]Ω : the extension of R[x, y, z] in which polynomials can have terms built using function symbols in Ω and variables in x, y, z. Problem 2 Suppose two formulas ϕ and ψ with ϕ ∧ ψ | = ⊥, where ϕ = f1 ≥ 0 ∧ . . . ∧ fr1 ≥ 0 ∧ g1 > 0 ∧ . . . ∧ gs1 > 0, ψ = fr1+1 ≥ 0 ∧ . . . ∧ fr ≥ 0 ∧ gs1+1 > 0 ∧ . . . ∧ gs > 0, where f1, . . . , fr, g1, . . . , gs are all CQ polynomials, f1, . . . , fr1, g1, . . . , gs1 ∈ R[x, y]Ω12, fr1+1, . . . , fr, gs1+1, . . . , gs ∈ R[x, z]Ω13, the goal is to generate an interpolant I for ϕ and ψ, expressed using the common symbols x, Ω1, i.e., I includes

  • nly polynomials in R[x]Ω1.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 21 / 29

slide-42
SLIDE 42

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Key ideas

Sketch of the idea (Algorithm IGFQCE)

1 Flatten and purify the formulas ϕ and ψ as ϕ and ψ by introducing fresh variables

for each term with uninterpreted symbols as well as for the terms with uninterpreted symbols.

2 Generate a set N of Horn clauses as

N

n k

ck bk c b c cn c D b bn b D where D consists of unit clauses of the form c cn c, with c cn be variables and .

3 Partition N into N

N and Nmix with all symbols in N N appearing in , , respectively, and Nmix consisting of symbols from both . = iff D = iff N N Nmix = (9)

4 Generate interpolant : Notice that

N N Nmix = has no uninterpreted function symbols. If Nmix can be replaced by Nsep and Nsep as in [Rybalchenko & Sofronie-Stokkermans 10] using separating terms, then IGFQC can be applied. An interpolant generated for this problem can be used to generate an interpolant for after uniformly replacing all new symbols by their corresponding expressions from D.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 22 / 29

slide-43
SLIDE 43

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Key ideas

Sketch of the idea (Algorithm IGFQCE)

1 Flatten and purify the formulas ϕ and ψ as ϕ and ψ by introducing fresh variables

for each term with uninterpreted symbols as well as for the terms with uninterpreted symbols.

2 Generate a set N of Horn clauses as

N = {∧n

k=1 ck = bk → c = b | ω(c1, . . . , cn) = c ∈ D, ω(b1, . . . , bn) = b ∈ D},

where D consists of unit clauses of the form ω(c1, . . . , cn) = c, with c1, . . . , cn be variables and ω ∈ Ω.

3 Partition N into N

N and Nmix with all symbols in N N appearing in , , respectively, and Nmix consisting of symbols from both . = iff D = iff N N Nmix = (9)

4 Generate interpolant : Notice that

N N Nmix = has no uninterpreted function symbols. If Nmix can be replaced by Nsep and Nsep as in [Rybalchenko & Sofronie-Stokkermans 10] using separating terms, then IGFQC can be applied. An interpolant generated for this problem can be used to generate an interpolant for after uniformly replacing all new symbols by their corresponding expressions from D.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 22 / 29

slide-44
SLIDE 44

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Key ideas

Sketch of the idea (Algorithm IGFQCE)

1 Flatten and purify the formulas ϕ and ψ as ϕ and ψ by introducing fresh variables

for each term with uninterpreted symbols as well as for the terms with uninterpreted symbols.

2 Generate a set N of Horn clauses as

N = {∧n

k=1 ck = bk → c = b | ω(c1, . . . , cn) = c ∈ D, ω(b1, . . . , bn) = b ∈ D},

where D consists of unit clauses of the form ω(c1, . . . , cn) = c, with c1, . . . , cn be variables and ω ∈ Ω.

3 Partition N into Nφ, Nψ, and Nmix with all symbols in Nφ, Nψ appearing in ϕ, ψ,

respectively, and Nmix consisting of symbols from both ϕ, ψ. ϕ ∧ ψ | = ⊥ iff ϕ ∧ ψ ∧ D | = ⊥ iff (ϕ ∧ Nφ) ∧ (ψ ∧ Nψ) ∧ Nmix | = ⊥. (9)

4 Generate interpolant : Notice that

N N Nmix = has no uninterpreted function symbols. If Nmix can be replaced by Nsep and Nsep as in [Rybalchenko & Sofronie-Stokkermans 10] using separating terms, then IGFQC can be applied. An interpolant generated for this problem can be used to generate an interpolant for after uniformly replacing all new symbols by their corresponding expressions from D.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 22 / 29

slide-45
SLIDE 45

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Key ideas

Sketch of the idea (Algorithm IGFQCE)

1 Flatten and purify the formulas ϕ and ψ as ϕ and ψ by introducing fresh variables

for each term with uninterpreted symbols as well as for the terms with uninterpreted symbols.

2 Generate a set N of Horn clauses as

N = {∧n

k=1 ck = bk → c = b | ω(c1, . . . , cn) = c ∈ D, ω(b1, . . . , bn) = b ∈ D},

where D consists of unit clauses of the form ω(c1, . . . , cn) = c, with c1, . . . , cn be variables and ω ∈ Ω.

3 Partition N into Nφ, Nψ, and Nmix with all symbols in Nφ, Nψ appearing in ϕ, ψ,

respectively, and Nmix consisting of symbols from both ϕ, ψ. ϕ ∧ ψ | = ⊥ iff ϕ ∧ ψ ∧ D | = ⊥ iff (ϕ ∧ Nφ) ∧ (ψ ∧ Nψ) ∧ Nmix | = ⊥. (9)

4 Generate interpolant : Notice that (ϕ ∧ Nφ) ∧ (ψ ∧ Nψ) ∧ Nmix |

= ⊥ has no uninterpreted function symbols. If Nmix can be replaced by Nφ

sep and Nψ sep as in

[Rybalchenko & Sofronie-Stokkermans 10] using separating terms, then IGFQC can be applied. An interpolant generated for this problem can be used to generate an interpolant for ϕ, ψ after uniformly replacing all new symbols by their corresponding expressions from D.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 22 / 29

slide-46
SLIDE 46

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Illustrating example

An illustrating example

Example ϕ :=(f1 = −(y1 − x1 + 1)2 − x1 + x2 ≥ 0) ∧ (y2 = α(y1) + 1) ∧ (g1 = −x2

1 − x2 2 − y2 2 + 1 > 0),

ψ :=(f2 = −(z1 − x2 + 1)2 + x1 − x2 ≥ 0) ∧ (z2 = α(z1) − 1) ∧ (g2 = −x2

1 − x2 2 − z2 2 + 1 > 0).

1 Flattening and purification gives

f y y g f z z g where D y y z z N y z y z .

2 NSOSC is not satisfied, since h

f f y x z x is an SOS. h y x h z x This gives f f h f h x x

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 23 / 29

slide-47
SLIDE 47

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Illustrating example

An illustrating example

Example ϕ :=(f1 = −(y1 − x1 + 1)2 − x1 + x2 ≥ 0) ∧ (y2 = α(y1) + 1) ∧ (g1 = −x2

1 − x2 2 − y2 2 + 1 > 0),

ψ :=(f2 = −(z1 − x2 + 1)2 + x1 − x2 ≥ 0) ∧ (z2 = α(z1) − 1) ∧ (g2 = −x2

1 − x2 2 − z2 2 + 1 > 0).

1 Flattening and purification gives

ϕ := (f1 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0), ψ := (f2 ≥ 0 ∧ z2 = z − 1 ∧ g2 > 0). where D = {y = α(y1), z = α(z1)}, N = (y1 = z1 → y = z).

2 NSOSC is not satisfied, since h

f f y x z x is an SOS. h y x h z x This gives f f h f h x x

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 23 / 29

slide-48
SLIDE 48

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Illustrating example

An illustrating example

Example ϕ :=(f1 = −(y1 − x1 + 1)2 − x1 + x2 ≥ 0) ∧ (y2 = α(y1) + 1) ∧ (g1 = −x2

1 − x2 2 − y2 2 + 1 > 0),

ψ :=(f2 = −(z1 − x2 + 1)2 + x1 − x2 ≥ 0) ∧ (z2 = α(z1) − 1) ∧ (g2 = −x2

1 − x2 2 − z2 2 + 1 > 0).

1 Flattening and purification gives

ϕ := (f1 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0), ψ := (f2 ≥ 0 ∧ z2 = z − 1 ∧ g2 > 0). where D = {y = α(y1), z = α(z1)}, N = (y1 = z1 → y = z).

2 NSOSC is not satisfied, since h = −f1 − f2 = (y1 − x1 + 1)2 + (z1 − x2 + 1)2 is

an SOS. h1 = (y1 − x1 + 1)2 , h2 = (z1 − x2 + 1)2. This gives f := f1 + h1 = −f2 − h2 = −x1 + x2.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 23 / 29

slide-49
SLIDE 49

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Illustrating example

An illustrating example

3 An interpolant for ϕ, ψ is an interpolant of ((ϕ ∧ f > 0) ∨ (ϕ ∧ f = 0)) and

((ψ ∧ −f > 0) ∨ (ϕ ∧ f = 0)) which simplifies to : (f > 0) ∨ (f ≥ 0 ∧ I2) where I2 is an interpolant for ϕ ∧ f = 0 and ψ ∧ f = 0. Substituting ϕ ∧ f = 0 | = y1 = x1 − 1 and ψ ∧ f = 0 | = z1 = x2 − 1 into ϕ and ψ, we get ϕ′ := − x1 + x2 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0 ∧ y1 = x1 − 1, ψ′ :=x1 − x2 ≥ 0 ∧ z2 = z − 1 ∧ g2 > 0 ∧ z1 = x2 − 1.

4 Recursively call IGFQCE until NSOSC is satisfied. y

z is deduced from linear inequalities in and , and separating terms for y z are constructed : = x y x = x z x Let t x , then separate y z y z into two parts : y t y t t z t z Add them to and respectively, we have x x y y g y x y x y t x x z z g z x x z t z

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 24 / 29

slide-50
SLIDE 50

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Illustrating example

An illustrating example

3 An interpolant for ϕ, ψ is an interpolant of ((ϕ ∧ f > 0) ∨ (ϕ ∧ f = 0)) and

((ψ ∧ −f > 0) ∨ (ϕ ∧ f = 0)) which simplifies to : (f > 0) ∨ (f ≥ 0 ∧ I2) where I2 is an interpolant for ϕ ∧ f = 0 and ψ ∧ f = 0. Substituting ϕ ∧ f = 0 | = y1 = x1 − 1 and ψ ∧ f = 0 | = z1 = x2 − 1 into ϕ and ψ, we get ϕ′ := − x1 + x2 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0 ∧ y1 = x1 − 1, ψ′ :=x1 − x2 ≥ 0 ∧ z2 = z − 1 ∧ g2 > 0 ∧ z1 = x2 − 1.

4 Recursively call IGFQCE until NSOSC is satisfied. y1 = z1 is deduced from

linear inequalities in ϕ′ and ψ′, and separating terms for y1, z1 are constructed : ϕ′ | = x1 − 1 ≤ y1 ≤ x2 − 1, ψ′ | = x2 − 1 ≤ z1 ≤ x1 − 1. Let t = α(x2 − 1), then separate y1 = z1 → y = z into two parts : y1 = t+ → y = t, t+ = z1 → t = z. Add them to ϕ′ and ψ′ respectively, we have ϕ′1 := −x1 + x2 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0 ∧ y1 = x1 − 1 ∧ y1 = x2 − 1 → y = t, ψ′1 := x1 − x2 ≥ 0 ∧ z2 = z − 1 ∧ g2 > 0 ∧ z1 = x2 − 1 ∧ x2 − 1 = z1 → t = z.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 24 / 29

slide-51
SLIDE 51

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Illustrating example

An illustrating example

4 Then

ϕ′1 := − x1 + x2 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0 ∧ y1 = x1 − 1 ∧ (x2 − 1 > y1 ∨ y1 > x2 − 1 ∨ y = t), ψ′1 :=x1 − x2 ≥ 0 ∧ z2 = z − 1 ∧ g2 > 0 ∧ z1 = x2 − 1 ∧ t = z. Thus, ϕ′1 :=ϕ′2 ∨ ϕ′3 ∨ ϕ′4, where ϕ′2 := − x1 + x2 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0 ∧ y1 = x1 − 1 ∧ x2 − 1 > y1, ϕ′3 := − x1 + x2 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0 ∧ y1 = x1 − 1 ∧ y1 > x2 − 1, ϕ′4 := − x1 + x2 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0 ∧ y1 = x1 − 1 ∧ y = t. Since ϕ′3 = false, then ϕ′1 = ϕ′2 ∨ ϕ′4. Then find interpolant I(ϕ′2, ψ′1) and I(ϕ′4, ψ′1).

5 Finally we conclude that I

I is an interpolant.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 25 / 29

slide-52
SLIDE 52

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Illustrating example

An illustrating example

4 Then

ϕ′1 := − x1 + x2 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0 ∧ y1 = x1 − 1 ∧ (x2 − 1 > y1 ∨ y1 > x2 − 1 ∨ y = t), ψ′1 :=x1 − x2 ≥ 0 ∧ z2 = z − 1 ∧ g2 > 0 ∧ z1 = x2 − 1 ∧ t = z. Thus, ϕ′1 :=ϕ′2 ∨ ϕ′3 ∨ ϕ′4, where ϕ′2 := − x1 + x2 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0 ∧ y1 = x1 − 1 ∧ x2 − 1 > y1, ϕ′3 := − x1 + x2 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0 ∧ y1 = x1 − 1 ∧ y1 > x2 − 1, ϕ′4 := − x1 + x2 ≥ 0 ∧ y2 = y + 1 ∧ g1 > 0 ∧ y1 = x1 − 1 ∧ y = t. Since ϕ′3 = false, then ϕ′1 = ϕ′2 ∨ ϕ′4. Then find interpolant I(ϕ′2, ψ′1) and I(ϕ′4, ψ′1).

5 Finally we conclude that I(ϕ′2, ψ′1) ∨ I(ϕ′4, ψ′1) is an interpolant. Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 25 / 29

slide-53
SLIDE 53

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Implementation

Implementation

We have implemented the presented algorithms in Mathematica to synthesize interpolation for concave quadratic polynomial inequalities as well as their combination with EUF. To deal with SOS solving and semi-definite programming, the Matlab-based optimization tool Yalmip and the SDP solver SDPT3 are invoked for assistant solving.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 26 / 29

slide-54
SLIDE 54

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Evaluation results

Evaluation results

Example Type Time (sec) CLP- Prover Foci CSIsat Our Approach Exp.1 NLA

  • 0.003

Exp.2 NLA+EUF

  • 0.036

Exp.3 NLA

  • 0.014

Exp.4 NLA

  • 0.003

Exp.5 LA 0.023 × 0.003 0.003 Exp.6 LA+EUF 0.025 0.006 0.007 0.003 Exp.7 Ellipsoid

  • 0.002

Exp.8 Ellipsoid

  • 0.002

Exp.9 Octagon 0.059 × 0.004 0.004 Exp.10 Octagon 0.065 × 0.004 0.004

  • - means interpolant generation fails, and × specifies particularly wrong answers (satisfiable).

Table : Evaluation results of the presented examples

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 27 / 29

slide-55
SLIDE 55

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Related work

Related work

McMillan [McMillan 05] popularized interpolants for automatically generating invariants of programs in 2005. Krajíček [Krajíček 97] and Pudlák [Pudlák 97] proposed approaches to deriving interpolants from resolution proofs prior to McMillan's work, which generate different interpolants from those done by McMillan's method. Kapur et al. [Kapur, Majumdar & Zarba 06] established an intimate connection between interpolants and quantifier elimination, by which Kapur [Kapur 13] showed that interpolants form a lattice ordered using implication. Rybalchenko et al. [Rybalchenko & Sofronie-Stokkermans 10] proposed an algorithm for generating interpolants for the combined theory of linear arithmetic and uninterpreted function symbols (EUF) by using a reduction of the problem to constraint solving in linear arithmetic. Dai et al. [L. Dai, B. Xia & N. Zhan 13] provided an approach to constructing non-linear interpolants based on semi-definite programming.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 28 / 29

slide-56
SLIDE 56

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Related work

Related work

McMillan [McMillan 05] popularized interpolants for automatically generating invariants of programs in 2005. Krajíček [Krajíček 97] and Pudlák [Pudlák 97] proposed approaches to deriving interpolants from resolution proofs prior to McMillan's work, which generate different interpolants from those done by McMillan's method. Kapur et al. [Kapur, Majumdar & Zarba 06] established an intimate connection between interpolants and quantifier elimination, by which Kapur [Kapur 13] showed that interpolants form a lattice ordered using implication. Rybalchenko et al. [Rybalchenko & Sofronie-Stokkermans 10] proposed an algorithm for generating interpolants for the combined theory of linear arithmetic and uninterpreted function symbols (EUF) by using a reduction of the problem to constraint solving in linear arithmetic. Dai et al. [L. Dai, B. Xia & N. Zhan 13] provided an approach to constructing non-linear interpolants based on semi-definite programming.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 28 / 29

slide-57
SLIDE 57

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Related work

Related work

McMillan [McMillan 05] popularized interpolants for automatically generating invariants of programs in 2005. Krajíček [Krajíček 97] and Pudlák [Pudlák 97] proposed approaches to deriving interpolants from resolution proofs prior to McMillan's work, which generate different interpolants from those done by McMillan's method. Kapur et al. [Kapur, Majumdar & Zarba 06] established an intimate connection between interpolants and quantifier elimination, by which Kapur [Kapur 13] showed that interpolants form a lattice ordered using implication. Rybalchenko et al. [Rybalchenko & Sofronie-Stokkermans 10] proposed an algorithm for generating interpolants for the combined theory of linear arithmetic and uninterpreted function symbols (EUF) by using a reduction of the problem to constraint solving in linear arithmetic. Dai et al. [L. Dai, B. Xia & N. Zhan 13] provided an approach to constructing non-linear interpolants based on semi-definite programming.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 28 / 29

slide-58
SLIDE 58

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Related work

Related work

McMillan [McMillan 05] popularized interpolants for automatically generating invariants of programs in 2005. Krajíček [Krajíček 97] and Pudlák [Pudlák 97] proposed approaches to deriving interpolants from resolution proofs prior to McMillan's work, which generate different interpolants from those done by McMillan's method. Kapur et al. [Kapur, Majumdar & Zarba 06] established an intimate connection between interpolants and quantifier elimination, by which Kapur [Kapur 13] showed that interpolants form a lattice ordered using implication. Rybalchenko et al. [Rybalchenko & Sofronie-Stokkermans 10] proposed an algorithm for generating interpolants for the combined theory of linear arithmetic and uninterpreted function symbols (EUF) by using a reduction of the problem to constraint solving in linear arithmetic. Dai et al. [L. Dai, B. Xia & N. Zhan 13] provided an approach to constructing non-linear interpolants based on semi-definite programming.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 28 / 29

slide-59
SLIDE 59

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Related work

Related work

McMillan [McMillan 05] popularized interpolants for automatically generating invariants of programs in 2005. Krajíček [Krajíček 97] and Pudlák [Pudlák 97] proposed approaches to deriving interpolants from resolution proofs prior to McMillan's work, which generate different interpolants from those done by McMillan's method. Kapur et al. [Kapur, Majumdar & Zarba 06] established an intimate connection between interpolants and quantifier elimination, by which Kapur [Kapur 13] showed that interpolants form a lattice ordered using implication. Rybalchenko et al. [Rybalchenko & Sofronie-Stokkermans 10] proposed an algorithm for generating interpolants for the combined theory of linear arithmetic and uninterpreted function symbols (EUF) by using a reduction of the problem to constraint solving in linear arithmetic. Dai et al. [L. Dai, B. Xia & N. Zhan 13] provided an approach to constructing non-linear interpolants based on semi-definite programming.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 28 / 29

slide-60
SLIDE 60

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Concluding remarks

Concluding remarks

Contributions

1

A complete, polynomial time algorithm for generating interpolants from mutually contradictory conjunctions of concave quadratic polynomial inequalities over the reals :

If NSOSC holds, an interpolant a la McMillan can be generated essentially using the linearization of quadratic polynomials. If NSOSC doesn't hold, linear equalities relating variables are deduced, resulting to interpolation subproblems with fewer variables on which the algorithm is recursively applied.

2

An algorithm, by partitioning Horn clauses, for generating interpolants for the combination of quantifier-free theory of concave quadratic polynomial inequalities and equality theory over uninterpreted function symbols (EUF).

Future work

Extending the proposed framework to which their linearization with some additional conditions on the coefficients (such as concavity for quadratic polynomials). Investigating how results reported for nonlinear polynomial inequalities based on positive nullstellensatz and the Archimedian condition on variables can be exploited in the proposed framework for dealing with polynomial inequalities.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 29 / 29

slide-61
SLIDE 61

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Concluding remarks

Concluding remarks

Contributions

1

A complete, polynomial time algorithm for generating interpolants from mutually contradictory conjunctions of concave quadratic polynomial inequalities over the reals :

If NSOSC holds, an interpolant a la McMillan can be generated essentially using the linearization of quadratic polynomials. If NSOSC doesn't hold, linear equalities relating variables are deduced, resulting to interpolation subproblems with fewer variables on which the algorithm is recursively applied.

2

An algorithm, by partitioning Horn clauses, for generating interpolants for the combination of quantifier-free theory of concave quadratic polynomial inequalities and equality theory over uninterpreted function symbols (EUF).

Future work

Extending the proposed framework to which their linearization with some additional conditions on the coefficients (such as concavity for quadratic polynomials). Investigating how results reported for nonlinear polynomial inequalities based on positive nullstellensatz and the Archimedian condition on variables can be exploited in the proposed framework for dealing with polynomial inequalities.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 29 / 29

slide-62
SLIDE 62

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Concluding remarks

Concluding remarks

Contributions

1

A complete, polynomial time algorithm for generating interpolants from mutually contradictory conjunctions of concave quadratic polynomial inequalities over the reals :

If NSOSC holds, an interpolant a la McMillan can be generated essentially using the linearization of quadratic polynomials. If NSOSC doesn't hold, linear equalities relating variables are deduced, resulting to interpolation subproblems with fewer variables on which the algorithm is recursively applied.

2

An algorithm, by partitioning Horn clauses, for generating interpolants for the combination of quantifier-free theory of concave quadratic polynomial inequalities and equality theory over uninterpreted function symbols (EUF).

Future work

Extending the proposed framework to which their linearization with some additional conditions on the coefficients (such as concavity for quadratic polynomials). Investigating how results reported for nonlinear polynomial inequalities based on positive nullstellensatz and the Archimedian condition on variables can be exploited in the proposed framework for dealing with polynomial inequalities.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 29 / 29

slide-63
SLIDE 63

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Concluding remarks

Concluding remarks

Contributions

1

A complete, polynomial time algorithm for generating interpolants from mutually contradictory conjunctions of concave quadratic polynomial inequalities over the reals :

If NSOSC holds, an interpolant a la McMillan can be generated essentially using the linearization of quadratic polynomials. If NSOSC doesn't hold, linear equalities relating variables are deduced, resulting to interpolation subproblems with fewer variables on which the algorithm is recursively applied.

2

An algorithm, by partitioning Horn clauses, for generating interpolants for the combination of quantifier-free theory of concave quadratic polynomial inequalities and equality theory over uninterpreted function symbols (EUF).

Future work

Extending the proposed framework to which their linearization with some additional conditions on the coefficients (such as concavity for quadratic polynomials). Investigating how results reported for nonlinear polynomial inequalities based on positive nullstellensatz and the Archimedian condition on variables can be exploited in the proposed framework for dealing with polynomial inequalities.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 29 / 29

slide-64
SLIDE 64

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Concluding remarks

Concluding remarks

Contributions

1

A complete, polynomial time algorithm for generating interpolants from mutually contradictory conjunctions of concave quadratic polynomial inequalities over the reals :

If NSOSC holds, an interpolant a la McMillan can be generated essentially using the linearization of quadratic polynomials. If NSOSC doesn't hold, linear equalities relating variables are deduced, resulting to interpolation subproblems with fewer variables on which the algorithm is recursively applied.

2

An algorithm, by partitioning Horn clauses, for generating interpolants for the combination of quantifier-free theory of concave quadratic polynomial inequalities and equality theory over uninterpreted function symbols (EUF).

Future work

Extending the proposed framework to which their linearization with some additional conditions on the coefficients (such as concavity for quadratic polynomials). Investigating how results reported for nonlinear polynomial inequalities based on positive nullstellensatz and the Archimedian condition on variables can be exploited in the proposed framework for dealing with polynomial inequalities.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 29 / 29

slide-65
SLIDE 65

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Concluding remarks

Concluding remarks

Contributions

1

A complete, polynomial time algorithm for generating interpolants from mutually contradictory conjunctions of concave quadratic polynomial inequalities over the reals :

If NSOSC holds, an interpolant a la McMillan can be generated essentially using the linearization of quadratic polynomials. If NSOSC doesn't hold, linear equalities relating variables are deduced, resulting to interpolation subproblems with fewer variables on which the algorithm is recursively applied.

2

An algorithm, by partitioning Horn clauses, for generating interpolants for the combination of quantifier-free theory of concave quadratic polynomial inequalities and equality theory over uninterpreted function symbols (EUF).

Future work

Extending the proposed framework to which their linearization with some additional conditions on the coefficients (such as concavity for quadratic polynomials). Investigating how results reported for nonlinear polynomial inequalities based on positive nullstellensatz and the Archimedian condition on variables can be exploited in the proposed framework for dealing with polynomial inequalities.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 29 / 29

slide-66
SLIDE 66

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Concluding remarks

Concluding remarks

Contributions

1

A complete, polynomial time algorithm for generating interpolants from mutually contradictory conjunctions of concave quadratic polynomial inequalities over the reals :

If NSOSC holds, an interpolant a la McMillan can be generated essentially using the linearization of quadratic polynomials. If NSOSC doesn't hold, linear equalities relating variables are deduced, resulting to interpolation subproblems with fewer variables on which the algorithm is recursively applied.

2

An algorithm, by partitioning Horn clauses, for generating interpolants for the combination of quantifier-free theory of concave quadratic polynomial inequalities and equality theory over uninterpreted function symbols (EUF).

Future work

Extending the proposed framework to which their linearization with some additional conditions on the coefficients (such as concavity for quadratic polynomials). Investigating how results reported for nonlinear polynomial inequalities based on positive nullstellensatz and the Archimedian condition on variables can be exploited in the proposed framework for dealing with polynomial inequalities.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 29 / 29

slide-67
SLIDE 67

. . . Key ideas . . . . . . . . . . . . . . . Generating interpolants for CQI . . . . . Combination with EUF . . Evaluation results . . Concluding remarks Concluding remarks

Concluding remarks

Contributions

1

A complete, polynomial time algorithm for generating interpolants from mutually contradictory conjunctions of concave quadratic polynomial inequalities over the reals :

If NSOSC holds, an interpolant a la McMillan can be generated essentially using the linearization of quadratic polynomials. If NSOSC doesn't hold, linear equalities relating variables are deduced, resulting to interpolation subproblems with fewer variables on which the algorithm is recursively applied.

2

An algorithm, by partitioning Horn clauses, for generating interpolants for the combination of quantifier-free theory of concave quadratic polynomial inequalities and equality theory over uninterpreted function symbols (EUF).

Future work

Extending the proposed framework to which their linearization with some additional conditions on the coefficients (such as concavity for quadratic polynomials). Investigating how results reported for nonlinear polynomial inequalities based on positive nullstellensatz and the Archimedian condition on variables can be exploited in the proposed framework for dealing with polynomial inequalities.

Deepak Kapur University of New Mexico Interpolant synthesis for CQI+EUF Dagstuhl, September 2015 29 / 29