Exploring Interpolants Philipp R ummer, Pavle Suboti c Uppsala - - PowerPoint PPT Presentation

exploring interpolants
SMART_READER_LITE
LIVE PREVIEW

Exploring Interpolants Philipp R ummer, Pavle Suboti c Uppsala - - PowerPoint PPT Presentation

Exploring Interpolants Philipp R ummer, Pavle Suboti c Uppsala University, Sweden COST Meeting, October 17 R ummer, Suboti c Exploring Interpolants COST Meeting, October 17 1 / 39 Introduction Interpolants in Model Checking Craig


slide-1
SLIDE 1

Exploring Interpolants

Philipp R¨ ummer, Pavle Suboti´ c

Uppsala University, Sweden

COST Meeting, October 17

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 1 / 39

slide-2
SLIDE 2

Introduction

Interpolants in Model Checking

Craig interpolants used in model checking to refine abstractions

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 2 / 39

slide-3
SLIDE 3

Introduction

Interpolants in Model Checking

Craig interpolants used in model checking to refine abstractions For a given interpolation problem several interpolants may exist

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 2 / 39

slide-4
SLIDE 4

Introduction

Interpolants in Model Checking

Craig interpolants used in model checking to refine abstractions For a given interpolation problem several interpolants may exist The choice of interpolants affect if/how a program is verified

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 2 / 39

slide-5
SLIDE 5

Introduction

Interpolants in Model Checking

Craig interpolants used in model checking to refine abstractions For a given interpolation problem several interpolants may exist The choice of interpolants affect if/how a program is verified We present a technique that:

◮ Discovers a range of interpolants R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 2 / 39

slide-6
SLIDE 6

Introduction

Interpolants in Model Checking

Craig interpolants used in model checking to refine abstractions For a given interpolation problem several interpolants may exist The choice of interpolants affect if/how a program is verified We present a technique that:

◮ Discovers a range of interpolants ◮ Incorporates domain specific knowledge R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 2 / 39

slide-7
SLIDE 7

Introduction

Interpolants in Model Checking

Craig interpolants used in model checking to refine abstractions For a given interpolation problem several interpolants may exist The choice of interpolants affect if/how a program is verified We present a technique that:

◮ Discovers a range of interpolants ◮ Incorporates domain specific knowledge ◮ Semantic in nature R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 2 / 39

slide-8
SLIDE 8

Introduction

Interpolants in Model Checking

Craig interpolants used in model checking to refine abstractions For a given interpolation problem several interpolants may exist The choice of interpolants affect if/how a program is verified We present a technique that:

◮ Discovers a range of interpolants ◮ Incorporates domain specific knowledge ◮ Semantic in nature ◮ Prover independent R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 2 / 39

slide-9
SLIDE 9

Preliminaries

Craig Interpolants

Let (A∧ B = false) then there exists an interpolant I for (A,B) such that: A → I B → ¬I I refers only to common symbols of A,B

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 3 / 39

slide-10
SLIDE 10

Motivation

Motivating Example

i = 0; x = j; // init while (i<50) { // loop i++; x++; } if (j == 0) assert (x >= 50); // error location

Safety Properties

No feasible path exists that reaches an error state

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 4 / 39

slide-11
SLIDE 11

Motivation

Analysis using CEGAR

1

Compute an approximation of CFG with respect to a set of predicates

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 5 / 39

slide-12
SLIDE 12

Motivation

Analysis using CEGAR

1

Compute an approximation of CFG with respect to a set of predicates

2

Choose a (spurious or genuine) path to error

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 5 / 39

slide-13
SLIDE 13

Motivation

Analysis using CEGAR

1

Compute an approximation of CFG with respect to a set of predicates

2

Choose a (spurious or genuine) path to error

3

If spurious, use interpolation to generate further predicates

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 5 / 39

slide-14
SLIDE 14

Motivation

Motivating Example

i = 0; x = j; // init while (i<50) { // loop i++; x++; } if (j == 0) assert (x >= 50); // error location

Counter Example - one loop iteration

init

  • i0 = 0∧ x0 = j

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 6 / 39

slide-15
SLIDE 15

Motivation

Motivating Example

i = 0; x = j; // init while (i<50) { // loop i++; x++; } if (j == 0) assert (x >= 50); // error location

Counter Example - one loop iteration

init

  • i0 = 0∧ x0 = j ∧

loop

  • i0 < 50∧ i1 = i0 + 1∧ x1 = x0 + 1

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 7 / 39

slide-16
SLIDE 16

Motivation

Motivating Example

i = 0; x = j; // init while (i<50) { // loop i++; x++; } if (j == 0) assert (x >= 50); // error location

Counter Example - one loop iteration

init

  • i0 = 0∧ x0 = j ∧

loop

  • i0 < 50∧ i1 = i0 + 1∧ x1 = x0 + 1∧

error

  • i1 ≥ 50∧ j = 0∧ x1 < 50

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 8 / 39

slide-17
SLIDE 17

Motivation

Counter Example - one loop iteration

i0 = 0∧ x0 = j ∧ i0 < 50∧ i1 = i0 + 1∧ x1 = x0 + 1

  • A

∧i1 ≥ 50∧ j = 0∧ x1 < 50

  • B

Interpolation Problem

i0 = 0∧ x0 = j ∧ i0 < 50∧ i1 = i0 + 1∧ x1 = x0 + 1

  • A

→ I

i1 ≥ 50∧ j = 0∧ x1 < 50

  • B

→ ¬I

where I has symbols only from A and B

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 9 / 39

slide-18
SLIDE 18

Motivation

Candidate Interpolant

I1 = (i1 ≤ 1)

The Interpolant

i0 = 0∧ x0 = j ∧ i0 < 50∧ i1 = i0 + 1∧ x1 = x0 + 1

  • A

→ i1 ≤ 1

i1 ≥ 50∧ j = 0∧ x1 < 50

  • B

→ ¬i1 ≤ 1

i1 ∈ sym(A) and i1 ∈ sym(B)

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 10 / 39

slide-19
SLIDE 19

Motivation

The Problem

(i1 ≤ 1) eliminates the counter-example

Results in unrolling the loop - not general enough What we really would like is an inductive invariant

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 11 / 39

slide-20
SLIDE 20

Motivation

A Better Candidate Interpolant

I2 = (x1 ≥ i1 + j)

The Interpolant

i0 = 0∧ x0 = j ∧ i0 < 50∧ i1 = i0 + 1∧ x1 = x0 + 1

  • A

→ (x1 ≥ i1 + j)

i1 ≥ 50∧ j = 0∧ x1 < 50

  • B

→ ¬(x1 ≥ i1 + j)

x1,i1,j ∈ sym(A) and x1,i1,j ∈ sym(B)

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 12 / 39

slide-21
SLIDE 21

Motivation

Interpolants

(x1 ≥ i1 + j) avoids loop unrolling

But how do we get (x1 ≥ i1 + j) instead of (i1 ≤ 1) from the theorem prover?

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 13 / 39

slide-22
SLIDE 22

Interpolant lattice for the example

x1 = j + 1∧ i1 = 1 j = 0∨ i1 ≤ 49∨ x1 ≥ 50 i1 = 1 i1 ≤ 1 i1 ≤ 2 i1 ≤ 49 x1 = i1 + j x1 ≥ i1 + j j = 0∨ x1 ≥ i1 . . . . . . I1 I2 I⊥ I⊤

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 14 / 39

slide-23
SLIDE 23

Interpolant lattice for the example

x1 = j + 1∧ i1 = 1 j = 0∨ i1 ≤ 49∨ x1 ≥ 50 i1 = 1 i1 ≤ 1 i1 ≤ 2 i1 ≤ 49 x1 = i1 + j x1 ≥ i1 + j j = 0∨ x1 ≥ i1 . . . . . . I1 I2 I⊥ I⊤ How to navigate in lattice? How to compare “quality” of interpolants?

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 14 / 39

slide-24
SLIDE 24

Some Related Work

Syntactic restrictions (R. Jhala and K. L. McMillan, TACAS 06) Interpolant strength (V. D’Silva VMCAI 10) Beautiful Interpolants (A.Albarghouthi, K. L. McMillan, CAV 13) Term abstraction (F

. Alberti, R. Bruttomesso, S. Ghilardi, S. Ranise, and N. Sharygina, LPAR 12)

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 15 / 39

slide-25
SLIDE 25

Our Approach

Pre-process the interpolation query

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 16 / 39

slide-26
SLIDE 26

Our Approach

Pre-process the interpolation query General, prover independent framework

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 16 / 39

slide-27
SLIDE 27

Our Approach

Pre-process the interpolation query General, prover independent framework Generate several interpolants for a given interpolation problem

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 16 / 39

slide-28
SLIDE 28

Our Approach

Pre-process the interpolation query General, prover independent framework Generate several interpolants for a given interpolation problem Incorporate domain specific knowledge in defining interpolant quality

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 16 / 39

slide-29
SLIDE 29

Outline

1

Interpolation Abstractions

2

Exploring Interpolants

3

Experiments on Software Programs

4

Conclusion

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 17 / 39

slide-30
SLIDE 30

Interpolation Abstractions

Abstractions in the Example

Step 1: Rename common variables in A[¯ sA,¯ s]∧ B[¯ s,¯ sB]

In the example: common symbols are {j,i1,x1}

A[¯ sA,¯ s′] = i0 = 0∧ x0 = j′ ∧ i0 < 50∧ i′

1 = i0 ∧ x′ 1 = x0

B[¯ s′′,¯ sB] = i′′

1 ≥ 50∧ j′′ = 0∧ x′′ 1 < 50

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 18 / 39

slide-31
SLIDE 31

Interpolation Abstractions

Abstractions in the Example

Step 1: Rename common symbols in A[¯ sA,¯ s]∧ B[¯ s,¯ sB] Step 2: Add templates capturing limited knowledge

In the example: templates are {j,x1 − i1}

A[¯ sA,¯ s]♯ = i0 = 0∧ x0 = j′ ∧ i0 < 50∧ i′

1 = i0 ∧ x′ 1 = x0 ∧ x′ 1 − i′ 1 = x1 − i1 ∧ j′ = j

  • RA[¯

s′,¯ s]

B[¯ s,¯ sB]♯ = i′′

1 ≥ 50∧ j′′ = 0∧ x′′ 1 < 50 ∧ x1 − i1 = x′′ 1 − i′′ 1 ∧ j = j′′

  • RB[¯

s,¯ s′′]

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 19 / 39

slide-32
SLIDE 32

Interpolation Abstractions

Example

Interpolation Problem A∧ B

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 20 / 39

slide-33
SLIDE 33

Interpolation Abstractions

Example

With abstraction generated by template x − y

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 21 / 39

slide-34
SLIDE 34

Interpolation Abstractions

Example

Blocks Interpolants x ≥ 4 etc.

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 22 / 39

slide-35
SLIDE 35

Interpolation Abstractions

Example

Allows interpolants x ≥ y etc.

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 23 / 39

slide-36
SLIDE 36

Interpolation Abstractions

Interpolant sub-lattice for templates {i1} and {j,x1 − i1}

x1 = j + 1∧ i1 = 1 j = 0∨ i1 ≤ 49∨ x1 ≥ 50 i1 = 1 i1 ≤ 1 i1 ≤ 2 i1 ≤ 49 x1 = i1 + j x1 ≥ i1 + j j = 0∨ x1 ≥ i1 . . . . . . I1 I2 I⊥ I⊤

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 24 / 39

slide-37
SLIDE 37

Interpolation Abstractions

Definitions

Definition (Abstraction)

An interpolation abstraction is a pair (RA[¯ s′,¯ s],RB[¯ s,¯ s′′]) of formulae with the property that RA[¯ s,¯ s] and RB[¯ s,¯ s] are valid i.e., Id[¯ s′,¯ s] ⇒ RA[¯ s′,¯ s] and Id[¯ s,¯ s′′] ⇒ RB[¯ s,¯ s′′].

Definition (Abstract Interpolation Problem)

A[¯ sA,¯ s]∧ B[¯ s,¯ sB] is the concrete interpolation problem.

  • A[¯

sA,¯ s′]∧ RA[¯ s,¯ s′]

  • RB[¯

s′′,¯ s]∧ B[¯ s′′,¯ sB]

  • is called

abstract interpolation problem;

Definition (Feasible Abstractions)

Assuming that the concrete interpolation problem is solvable, we call an interpolation abstraction feasible if also the abstract interpolation problem is solvable, and infeasible otherwise.

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 25 / 39

slide-38
SLIDE 38

Interpolation Abstractions

Natural classes of Abstractions

Term interpolation abstractions, constructed from a set of terms {t1,t2,...,tn} RT

A [¯

s′,¯ s] =

n

  • i=1

ti[¯ s′] = ti[¯ s], RT

B [¯

s,¯ s′′] =

n

  • i=1

ti[¯ s] = ti[¯ s′′] (same possible for inequalities) Predicate interpolation abstractions, constructed from {φ1,φ2,...,φn} RPred

A

s′,¯ s] =

n

  • i=1
  • φi[¯

s′] → φi[¯ s]

  • ,

RPred

B

s,¯ s′′] =

n

  • i=1
  • φi[¯

s] → φi[¯ s′′]

  • Quantified interpolation abstractions

···

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 26 / 39

slide-39
SLIDE 39

Interpolation Abstractions

Soundness and Completeness

Lemma (Soundness)

Every interpolant of the abstract interpolation problem is also an interpolant of the concrete interpolation problem (but in general not vice versa).

Lemma (Completeness)

Suppose A[¯ sA,¯ s]∧ B[¯ s,¯ sB] is an interpolation problem with interpolant I[¯ s], such that both A[¯ sA,¯ s] and B[¯ s,¯ sB] are satisfiable. Then there is a feasible interpolation abstraction such that every abstract interpolant is equivalent to I[¯ s].

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 27 / 39

slide-40
SLIDE 40

Exploring Interpolants

Exploring Interpolants

How do we find good interpolation abstractions? Can be done in two steps:

◮ Define a base vocabulary of “interesting” templates (building blocks for interpolants) ◮ Search for maximum feasible interpolation abstractions in this language R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 28 / 39

slide-41
SLIDE 41

Exploring Interpolants

Exploring Interpolants

How do we find good interpolation abstractions? Can be done in two steps:

◮ Define a base vocabulary of “interesting” templates (building blocks for interpolants) ◮ Search for maximum feasible interpolation abstractions in this language

Definition (Abstraction lattice)

Suppose an interpolation problem A[¯ sA,¯ s]∧ B[¯ s,¯ sB]. An abstraction lattice is a pair

(L,⊑L,µ) consisting of a complete lattice L,⊑L and a monotonic mapping µ from

elements of L,⊑L to interpolation abstractions (RA[¯ s′,¯ s],RB[¯ s,¯ s′′]) with the property that µ(⊥) = (Id[¯ s′,¯ s],Id[¯ s,¯ s′′]).

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 28 / 39

slide-42
SLIDE 42

Exploring Interpolants

Abstraction lattice template base set {x1 − i1,i1,j}

/ {x1 − i1} {j,i1} {x1 − i1,i1,j} {i1} {j} {x1 − i1,i1} {x1 − i1,j}

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 29 / 39

slide-43
SLIDE 43

Exploring Interpolants

Sub-lattices of interpolant lattice

x1 = j + 1∧ i1 = 1 j = 0∨ i1 ≤ 49∨ x1 ≥ 50 i1 = 1 i1 ≤ 1 i1 ≤ 2 i1 ≤ 49 x1 = i1 + j x1 ≥ i1 + j j = 0∨ x1 ≥ i1 . . . . . . I1 I2 I⊥ I⊤

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 30 / 39

slide-44
SLIDE 44

Exploring Interpolants

Overall Architecture

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 31 / 39

slide-45
SLIDE 45

Exploring Interpolants

Overall Architecture

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 32 / 39

slide-46
SLIDE 46

Experiments on Software Programs

Experiments

Experiment Setup

Extended the Eldarica model checker with our approach Experiments on Horn clause benchmarks generated from programs Pre-computed templates of the form {x,y,x − y,x + y} Typically 15–300 templates Costs assigned to templates to define preference

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 33 / 39

slide-47
SLIDE 47

Experiments on Software Programs

Experiments

Benchmark Eldarica Eldarica-ABS Flata Z3 N sec N sec sec sec C programs boustrophedon (C) * * 10 10.7 * 0.1 boustrophedon expansed (C) * * 11 7.7 * 0.1 halbwachs (C) * * 53 2.4 * 0.1 gopan (C) 17 22.2 62 57.0 0.4 349.5 rate limiter (C) 11 2.7 11 19.1 1.0 0.1 anubhav (C) 1 1.7 1 1.6 0.9 * cousot (C) * * 3 7.7 0.7 * bubblesort (E) 1 2.8 1 2.3 77.6 0.3 insdel (C) 1 0.9 1 0.9 0.7 0.0 insertsort (E) 1 1.8 1 1.7 1.3 0.1 listcounter (C) * * 8 2.0 0.2 * listcounter (E) 1 0.9 1 0.9 0.2 0.0 listreversal (C) 1 1.9 1 1.9 4.9 * mergesort (E) 1 2.9 1 2.6 1.1 0.2 selectionsort (E) 1 2.4 1 2.4 1.2 0.2 rotation vc.1 (C) 7 2.0 7 0.3 1.9 0.2 rotation vc.2 (C) 8 2.7 8 0.2 2.2 0.3 rotation vc.3 (C) 2.3 0.2 2.3 0.0 rotation.1 (E) 3 1.8 3 1.8 0.5 0.1 split vc.1 (C) 18 3.9 17 3.2 * 1.1 split vc.2 (C) * * 18 1.1 * 0.2 split vc.3 (C) 2.8 1.5 * 0.0 Recursive Horn SMT-LIB Benchmarks addition (C) 1 0.7 1 0.8 0.4 0.0 bfprt (C) * * 5 8.3

  • 0.0

binarysearch (C) 1 0.9 1 0.9

  • 0.0

buildheap (C) * * * *

  • *

countZero (C) 2 2.0 2 2.0

  • 0.0

disjunctive (C) 10 2.4 5 5.0 0.2 0.3 floodfill (C) * * * * 41.2 0.1 gcd (C) 4 1.2 4 2.0

  • *

identity (C) 2 1.1 2 2.1

  • 0.1

merge-leq (C) 3 1.1 7 7.0 15.7 0.1

Table: Comparison of Eldarica without interpolation abstraction, Eldarica with ABStraction,

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 34 / 39

slide-48
SLIDE 48

Conclusion

Summary

A semantic, solver-independent framework for guiding interpolant search

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 35 / 39

slide-49
SLIDE 49

Conclusion

Summary

A semantic, solver-independent framework for guiding interpolant search We pre-process the interpolation queries

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 35 / 39

slide-50
SLIDE 50

Conclusion

Summary

A semantic, solver-independent framework for guiding interpolant search We pre-process the interpolation queries

◮ Easy to integrate in verifiers (basic implementation 500-1000 LOC) R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 35 / 39

slide-51
SLIDE 51

Conclusion

Summary

A semantic, solver-independent framework for guiding interpolant search We pre-process the interpolation queries

◮ Easy to integrate in verifiers (basic implementation 500-1000 LOC) ◮ Enables use of domain-specific knowledge in interpolation R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 35 / 39

slide-52
SLIDE 52

Conclusion

Summary

A semantic, solver-independent framework for guiding interpolant search We pre-process the interpolation queries

◮ Easy to integrate in verifiers (basic implementation 500-1000 LOC) ◮ Enables use of domain-specific knowledge in interpolation

General framework

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 35 / 39

slide-53
SLIDE 53

Conclusion

Summary

A semantic, solver-independent framework for guiding interpolant search We pre-process the interpolation queries

◮ Easy to integrate in verifiers (basic implementation 500-1000 LOC) ◮ Enables use of domain-specific knowledge in interpolation

General framework

◮ Our implementation is just a basic instance of the framework R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 35 / 39

slide-54
SLIDE 54

Conclusion

Summary

A semantic, solver-independent framework for guiding interpolant search We pre-process the interpolation queries

◮ Easy to integrate in verifiers (basic implementation 500-1000 LOC) ◮ Enables use of domain-specific knowledge in interpolation

General framework

◮ Our implementation is just a basic instance of the framework ◮ Each query can have a specific lattice, lattices can be infinite etc. R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 35 / 39

slide-55
SLIDE 55

Conclusion

Summary

A semantic, solver-independent framework for guiding interpolant search We pre-process the interpolation queries

◮ Easy to integrate in verifiers (basic implementation 500-1000 LOC) ◮ Enables use of domain-specific knowledge in interpolation

General framework

◮ Our implementation is just a basic instance of the framework ◮ Each query can have a specific lattice, lattices can be infinite etc. ◮ Applicable to various logics, not restricted to arithmetic R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 35 / 39

slide-56
SLIDE 56

Conclusion

Summary

A semantic, solver-independent framework for guiding interpolant search We pre-process the interpolation queries

◮ Easy to integrate in verifiers (basic implementation 500-1000 LOC) ◮ Enables use of domain-specific knowledge in interpolation

General framework

◮ Our implementation is just a basic instance of the framework ◮ Each query can have a specific lattice, lattices can be infinite etc. ◮ Applicable to various logics, not restricted to arithmetic

Templates, but interpolants still constructed by theorem prover

⇒ Arbitrary Boolean structure, etc., allowed

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 35 / 39

slide-57
SLIDE 57

Conclusion

Summary

Applications (ongoing work)

Software programs with heap, other datatypes Timed systems Reachability in Petri nets/Vector addition systems

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 36 / 39

slide-58
SLIDE 58

Conclusion

Thank you - Questions

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 37 / 39

slide-59
SLIDE 59

Conclusion

Finding Abstractions

Algorithm 1: Exploration algorithm Input: Interpolation problem A[¯ sA,¯ s]∧ B[¯ s,¯ sB], abstraction lattice (L,⊑L,µ) Result: Set of maximal feasible interpolation abstractions if ⊥ is infeasible then

1

return /

0;

2

end

3

Frontier ← {maximise(⊥)};

4

while ∃ feasible elem ∈ L, incomparable with Frontier do

5

Frontier ← Frontier ∪{maximise(elem)};

6

end

7

return Frontier;

8

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 38 / 39

slide-60
SLIDE 60

Conclusion

Finding Abstractions

Algorithm 2: Maximisation algorithm Input: Feasible element: elem Result: Maximal feasible element while ∃ feasible successor fs of elem do

1

pick element middle such that fs ⊑L middle ⊑L ⊤;

2

if middle is feasible then

3

elem ← middle;

4

else

5

elem ← fs;

6

end

7

end

8

return elem;

9

R¨ ummer, Suboti´ c Exploring Interpolants COST Meeting, October 17 39 / 39