Real World Verification Andr Platzer 1 Jan-David Quesel 2 Philipp - - PowerPoint PPT Presentation

real world verification
SMART_READER_LITE
LIVE PREVIEW

Real World Verification Andr Platzer 1 Jan-David Quesel 2 Philipp - - PowerPoint PPT Presentation

Real World Verification Andr Platzer 1 Jan-David Quesel 2 Philipp Rmmer 3 1 Carnegie Mellon University, Computer Science Department 2 University of Oldenburg, Department of Computing Science 3 Oxford University Computing Laboratory 22nd


slide-1
SLIDE 1

Real World Verification

André Platzer1 Jan-David Quesel2 Philipp Rümmer3

1Carnegie Mellon University, Computer Science Department 2University of Oldenburg, Department of Computing Science 3Oxford University Computing Laboratory

22nd International Conference on Automated Deduction 7 August 2009

1 / 18

slide-2
SLIDE 2

Outline

Motivation, real world applications Survey of real world methods New procedure: Gröbner bases for the Real Nullstellensatz decides quantifier-free real arithmetic Empirical evaluation: Comparison of various decision procedures for real arithmetic Conclusion

2 / 18

slide-3
SLIDE 3

Motivation + applications

Verification in the KeYmaera system: Hybrid systems Mathematical algorithms in real or floating-point arithmetic Geometric problems

x1 x2 y1 y2 d ω e ¯ ϑ ̟

3 / 18

slide-4
SLIDE 4

KeYmaera

4 / 18

slide-5
SLIDE 5

Overall verification approach

5 / 18

slide-6
SLIDE 6

Overall verification approach

5 / 18

slide-7
SLIDE 7

Short history of symbolic methods in real arithmetic

1930 First quantifier elimination procedure by Tarski (Non-elementary) 1965 Buchberger introduces Gröbner bases 1973 Real Nullstellensatz and Positivstellensatz by Stengle 1975 Cylindrical algebraic decomposition (CAD) by Collins (Doubly exponential) 1983 Cohen-Hörmander elimination procedure 2003 Parrilo introduces semidefinite programming for the Posi- tivstellensatz (Later refined by Harrison) 2005 Tiwari’s polynomial simplex method

6 / 18

slide-8
SLIDE 8

Short history of symbolic methods in real arithmetic

1930 First quantifier elimination procedure by Tarski (Non-elementary) 1965 Buchberger introduces Gröbner bases 1973 Real Nullstellensatz and Positivstellensatz by Stengle 1975 Cylindrical algebraic decomposition (CAD) by Collins (Doubly exponential) 1983 Cohen-Hörmander elimination procedure 2003 Parrilo introduces semidefinite programming for the Posi- tivstellensatz (Later refined by Harrison) 2005 Tiwari’s polynomial simplex method

6 / 18

slide-9
SLIDE 9

Gröbner bases for quantifier-free real arithmetic

7 / 18

slide-10
SLIDE 10

Gröbner bases for quantifier-free real arithmetic

Inequalities and disequations can be eliminated: f = g ≡ ∃z. (f − g)z = 1 f ≥ g ≡ ∃z. f − g = z2 f > g ≡ ∃z. (f − g)z2 = 1

7 / 18

slide-11
SLIDE 11

Gröbner bases for quantifier-free real arithmetic

Goal: prove unsatisfiability of:

  • i

ti = 0

7 / 18

slide-12
SLIDE 12

Gröbner bases for quantifier-free real arithmetic

Witnesses for unsatisfiability:

i

siti

  • = 1

= ⇒

  • i

ti = 0 unsatisfiable How to determine coefficients si?

7 / 18

slide-13
SLIDE 13

Gröbner bases for quantifier-free real arithmetic

Witnesses for unsatisfiability:

i

siti

  • = 1

= ⇒

  • i

ti = 0 unsatisfiable How to determine coefficients si? Need some more notation: Ideal generated by {t1, . . . , tn} ⊆ ◗[X1, . . . , Xn]: (t1, . . . , tn) =

i

siti | s1, . . . , sn ∈ ◗[X1, . . . , Xn]

  • 7 / 18
slide-14
SLIDE 14

Gröbner bases for quantifier-free real arithmetic

Gröbner bases to solve the ideal membership problem: Monomial ordering ≺: admissible total well-founded ordering on monomials Reduction of a polynomial s w.r.t. B = {t1, . . . , tn}: s ≻ s + u1ti1 ≻ s + u1ti1 + u2ti2 ≻ · · · ≻ redB s B is called Gröbner basis if redB s = 0 for all s ∈ (B)

7 / 18

slide-15
SLIDE 15

Gröbner bases for quantifier-free real arithmetic

Gröbner bases to solve the ideal membership problem: Monomial ordering ≺: admissible total well-founded ordering on monomials Reduction of a polynomial s w.r.t. B = {t1, . . . , tn}: s ≻ s + u1ti1 ≻ s + u1ti1 + u2ti2 ≻ · · · ≻ redB s B is called Gröbner basis if redB s = 0 for all s ∈ (B)

7 / 18

slide-16
SLIDE 16

The Nullstellensatz

Method is sound and complete over complex numbers:

Theorem (Hilbert’s Nullstellensatz)

¬∃x ∈ ❈n :

  • i

ti(x) = 0 iff 1 ∈ (t1, . . . , tn) ⇒ Method cannot be complete over reals: e.g. x2 + 1 = 0 is unsatisfiable but (x2 + 1) does not contain a unit We present an extension that is complete over the reals

8 / 18

slide-17
SLIDE 17

The Real Nullstellensatz

Theorem (Stengle’s Real Nullstellensatz, 1973)

¬∃x ∈ ❘n :

  • i

ti(x) = 0 iff ∃s1, . . . , sk ∈ ❘[X1, . . . , Xm] : 1 + s2

1 + · · · + s2 k ∈ (t1, . . . , tn)

9 / 18

slide-18
SLIDE 18

The Real Nullstellensatz

Theorem (Stengle’s Real Nullstellensatz, 1973)

¬∃x ∈ ❘n :

  • i

ti(x) = 0 iff ∃s1, . . . , sk ∈ ❘[X1, . . . , Xm] : 1 + s2

1 + · · · + s2 k ∈ (t1, . . . , tn)

9 / 18

slide-19
SLIDE 19

The Real Nullstellensatz

Theorem (Stengle’s Real Nullstellensatz, 1973)

¬∃x ∈ ❘n :

  • i

ti(x) = 0 iff ∃s1, . . . , sk ∈ ❘[X1, . . . , Xm] : 1 + s2

1 + · · · + s2 k ∈ (t1, . . . , tn)

How to pick sum of squares s2

1 + · · · + s2 n?

9 / 18

slide-20
SLIDE 20

The Real Nullstellensatz

Observation: [Parrilo, 2003] Sums of squares can be represented as scalar products E.g. 2x2 − 2xy + y2 = x2 + (x − y)2 =

  • x

y t 2 −1 −1 1 x y

  • 9 / 18
slide-21
SLIDE 21

The Real Nullstellensatz

Lemma

Every sum of squares can be represented as ptXp, where p ∈ ❘[X1, . . . , Xm]k and X is positive semi-definite (and vice versa). Matrix X is called positive semi-definite if X is symmetric xtXx ≥ 0 for all x ∈ ❘n.

9 / 18

slide-22
SLIDE 22

The Real Nullstellensatz

Lemma

Every sum of squares can be represented as ptXp, where p ∈ ❘[X1, . . . , Xm]k and X is positive semi-definite (and vice versa). Matrix X is called positive semi-definite if X is symmetric xtXx ≥ 0 for all x ∈ ❘n.

9 / 18

slide-23
SLIDE 23

The Real Nullstellensatz

Constraint solving by semidefinite programming (convex optimisation): Has been used successfully in combination with Positivstellensatz [Parrilo, 2003; Harrison, 2007]

9 / 18

slide-24
SLIDE 24

Example

Prove unsatisfiability of: x ≥ y, z ≥ 0, yz > xz

10 / 18

slide-25
SLIDE 25

Example

Prove unsatisfiability of: x ≥ y, z ≥ 0, yz > xz Translated to system of equations: x − y = a2, z = b2, (yz − xz)c2 = 1

10 / 18

slide-26
SLIDE 26

Example

Prove unsatisfiability of: x ≥ y, z ≥ 0, yz > xz Translated to system of equations: x − y = a2, z = b2, (yz − xz)c2 = 1 Corresponding Gröbner basis: B = {a2 − x + y, b2 − z, xzc2 − yzc2 + 1}

10 / 18

slide-27
SLIDE 27

Example

Prove unsatisfiability of: x ≥ y, z ≥ 0, yz > xz Translated to system of equations: x − y = a2, z = b2, (yz − xz)c2 = 1 Corresponding Gröbner basis: B = {a2 − x + y, b2 − z, xzc2 − yzc2 + 1} Pick basis monomials and symmetric matrix Q: p =    1 a2 abc    Q =    q1,1 q1,2 q1,3 q1,2 q2,2 q2,3 q1,3 q2,3 q3,3    ptQp = q1,112 + 2q1,2a2 + 2q1,3abc + 2q2,3a3bc + q3,3a2b2c2

10 / 18

slide-28
SLIDE 28

Example (2)

ptQp = q1,112 + 2q1,2a2 + 2q1,3abc + 2q2,3a3bc + q3,3a2b2c2

11 / 18

slide-29
SLIDE 29

Example (2)

ptQp = q1,112 + 2q1,2a2 + 2q1,3abc + 2q2,3a3bc + q3,3a2b2c2 Reduce 1 + ptQp w.r.t. B: redB(1 + ptQp) = 1 + q1,1 − q3,3 + 2q1,2x − 2q1,2y+ 2q1,3abc + 2q2,3abcx − 2q2,3abcy

11 / 18

slide-30
SLIDE 30

Example (2)

ptQp = q1,112 + 2q1,2a2 + 2q1,3abc + 2q2,3a3bc + q3,3a2b2c2 Reduce 1 + ptQp w.r.t. B: redB(1 + ptQp) = 1 + q1,1 − q3,3 + 2q1,2x − 2q1,2y+ 2q1,3abc + 2q2,3abcx − 2q2,3abcy Set up semidefinite program redB(1 + ptQp) = 0: 1 + q1,1 − q3,3 = 0 −2q1,2 = 0 2q2,3 = 0 2q1,2 = 0 2q1,3 = 0 −2q2,3 = 0

11 / 18

slide-31
SLIDE 31

Example (2)

ptQp = q1,112 + 2q1,2a2 + 2q1,3abc + 2q2,3a3bc + q3,3a2b2c2 Reduce 1 + ptQp w.r.t. B: redB(1 + ptQp) = 1 + q1,1 − q3,3 + 2q1,2x − 2q1,2y+ 2q1,3abc + 2q2,3abcx − 2q2,3abcy Set up semidefinite program redB(1 + ptQp) = 0: 1 + q1,1 − q3,3 = 0 −2q1,2 = 0 2q2,3 = 0 2q1,2 = 0 2q1,3 = 0 −2q2,3 = 0 Solve the program: q3,3 = 1 and qi,j = 0 for all (i, j) = (3, 3) 1 + ptQp = 1 + (abc)2

  • Witness for unsatisfiability

∈ (B)

11 / 18

slide-32
SLIDE 32

Gröbner bases for the Real Nullstellensatz (GRN)

Properties of the procedure

Sound + complete method for quantifier-free real arithmetic Sums of squares as certificates (“proof producing”) Termination criteria can be given → decision procedure In practice: We enumerate basis monomials with ascending degree

Numerical issues

Existing solvers for semidefinite programming are numeric (we use CSDP) Solution: Solve program numerically, then round to exact solution [Harrison, 2007]

12 / 18

slide-33
SLIDE 33

Optimisations

Pre-processing of Gröbner basis is a good idea: Rewriting with polynomials x + t Rewriting with polynomials x2 − α1m2

1 − · · · − αnm2 n

(with αi > 0) Elimination of polynomials xy − 1, xn + t Splitting polynomials α1m2

1 + · · · + αnm2 n ∈ B with αi > 0

13 / 18

slide-34
SLIDE 34

Comparison with related work

Positivstellensatz methods [Parrilo, 2003; Harrison, 2007]: Positivstellensatz [Stengle, 1973]: Extension of Real Nullstellensatz for inequalities Differences: Gröbner bases, simpler certificates Tiwari’s method [Tiwari, 2005]: Differences: less heuristic ⇒ completeness, semidefinite programming Proof-producing quantifier elimination [McLaughlin, Harrison, 2005]: Differences: universal fragment vs. full real arithmetic, performance Numeric methods: Differences: soundness + completeness

14 / 18

slide-35
SLIDE 35

Empirical comparison of decision procedures

Gröbner basis approaches

GM, GO: pure Gröbner bases (inequalities → equations) GK: Gröbner bases combined with Fourier-Motzkin GRN: Gröbner bases for the Real Nullstellensatz

Quantifier elimination procedures

QQ, QM, QRc: cylindrical algebraic decomposition (CAD) QRs: CAD + virtual substitution QC, QH: Cohen-Hörmander

Semidefinite programming for the Positivstellensatz

PH: Harrison’s implementation PK: own implementation in KeYmaera

Benchmarks: 100 problems taken from . . .

Case studies in hybrid systems verification Verification of mathematical algorithms, geometry (A few) synthetic problems

15 / 18

slide-36
SLIDE 36

Experiments

16 / 18

slide-37
SLIDE 37

Conclusion

New decision procedure for quantifier-free real arithmetic: Gröbner bases for the Real Nullstellensatz Procedure is competitive with CAD + produces certificates Current implementation is straightforward ⇒ Much room for improvements Comparison of symbolic methods for real arithmetic: Gröbner bases Quantifier elimination Positivstellensatz + Real Nullstellensatz methods

Future work

Optimise our procedure Empirical comparison with Tiwari’s method Integration with methods to check satisfiability

17 / 18

slide-38
SLIDE 38

Thanks for your attention!

18 / 18