csisat: interpolation for la+euf · csisat: interpolation for la+euf dirk beyer1 damien zu erey2...

32
CSIsat: Interpolation for LA+EUF Dirk Beyer 1 Damien Zufferey 2 Rupak Majumdar 3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA, CA, USA CAV’08, Princeton, July 11, 2008

Upload: others

Post on 06-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

CSIsat: Interpolation for LA+EUF

Dirk Beyer1 Damien Zufferey2 Rupak Majumdar3

1 Simon Fraser University, BC, Canada

2 EPFL, Switzerland

3 UCLA, CA, USA

CAV’08, Princeton, July 11, 2008

Page 2: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

1 Interpolation

2 How to use CSIsat ?

3 How CSIsat works ?

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 2 / 15

Page 3: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Outline

1 Interpolation

2 How to use CSIsat ?

3 How CSIsat works ?

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 3 / 15

Page 4: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Definition [Craig 57]

Let A and B be two formulas such that A ∧ B unsat.An interpolant I has the following properties:

I contains only AB-common symbols.

A implies I

I ∧ B unsat.

Interpolation exists for LA+EUF.

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 4 / 15

Page 5: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Interpolant for EUF

A: a = b ∧ b = c B: f (a) 6= f (c)

a b c

f (a) f (c)

= =

6=

=

==

EUF f /∈ AB-common

=

I

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 5 / 15

Page 6: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Interpolant for EUF

A: a = b ∧ b = c B: f (a) 6= f (c)

a b c

f (a) f (c)

= =

6=

=

==

EUF f /∈ AB-common

=

I

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 5 / 15

Page 7: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Interpolant for EUF

A: a = b ∧ b = c B: f (a) 6= f (c)

a b c

f (a) f (c)

= =

6=

=

=

=

EUF

f /∈ AB-common

=

I

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 5 / 15

Page 8: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Interpolant for EUF

A: a = b ∧ b = c B: f (a) 6= f (c)

a b c

f (a) f (c)

= =

6=

=

=

=

EUF

f /∈ AB-common

=

I

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 5 / 15

Page 9: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Interpolant for EUF

A: a = b ∧ b = c B: f (a) 6= f (c)

a b c

f (a) f (c)

= =

6=

=

=

=

EUF f /∈ AB-common

=

I

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 5 / 15

Page 10: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Interpolant for LA

A~x ≤ ~a B~x ≤ ~b

I~x ≤ ~δ

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 6 / 15

Page 11: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Interpolant for LA

A~x ≤ ~a B~x ≤ ~b

I~x ≤ ~δ

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 6 / 15

Page 12: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Interpolant for LA

A~x ≤ ~a B~x ≤ ~b

I~x ≤ ~δ

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 6 / 15

Page 13: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Applications

Predicate discovery for CEGAR-based model checkersfor refinement of abstract states.

Example: Blast1 2.5 is based on CSIsat:

Foci2 for DL + EUF.CLPprover3 for LA + EUF, but only conjunctions.CSIsat is a new implementation for LA + EUF.

Open-source software and freely extendable by others.

Total of 7500 lines of code written in Ocaml.Includes interpolation code and SMT solver.

1http://mtc.epfl.ch/blast/2http://www.kenmcmil.com/foci.html3http://www.mpi-sws.mpg.de/~rybal/clp-prover/

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 7 / 15

Page 14: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Applications

Predicate discovery for CEGAR-based model checkersfor refinement of abstract states.

Example: Blast1 2.5 is based on CSIsat:

Foci2 for DL + EUF.

CLPprover3 for LA + EUF, but only conjunctions.CSIsat is a new implementation for LA + EUF.

Open-source software and freely extendable by others.

Total of 7500 lines of code written in Ocaml.Includes interpolation code and SMT solver.

1http://mtc.epfl.ch/blast/2http://www.kenmcmil.com/foci.html3http://www.mpi-sws.mpg.de/~rybal/clp-prover/

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 7 / 15

Page 15: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Applications

Predicate discovery for CEGAR-based model checkersfor refinement of abstract states.

Example: Blast1 2.5 is based on CSIsat:

Foci2 for DL + EUF.CLPprover3 for LA + EUF, but only conjunctions.

CSIsat is a new implementation for LA + EUF.

Open-source software and freely extendable by others.

Total of 7500 lines of code written in Ocaml.Includes interpolation code and SMT solver.

1http://mtc.epfl.ch/blast/2http://www.kenmcmil.com/foci.html3http://www.mpi-sws.mpg.de/~rybal/clp-prover/

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 7 / 15

Page 16: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Applications

Predicate discovery for CEGAR-based model checkersfor refinement of abstract states.

Example: Blast1 2.5 is based on CSIsat:

Foci2 for DL + EUF.CLPprover3 for LA + EUF, but only conjunctions.CSIsat is a new implementation for LA + EUF.

Open-source software and freely extendable by others.

Total of 7500 lines of code written in Ocaml.Includes interpolation code and SMT solver.

1http://mtc.epfl.ch/blast/2http://www.kenmcmil.com/foci.html3http://www.mpi-sws.mpg.de/~rybal/clp-prover/

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 7 / 15

Page 17: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Outline

1 Interpolation

2 How to use CSIsat ?

3 How CSIsat works ?

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 8 / 15

Page 18: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

What to give, what to expect

Input: n formulae X1, . . . ,Xn such that

n∧i=1

Xi |= ⊥

Output: n − 1 interpolants such that

i∧j=1

Xj |= Ii

Ii ∧n∧

j=i+1

Xj |= ⊥

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 9 / 15

Page 19: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Syntax

Formula syntax is very simple and easy to integrate.

CSIsat supports also Foci syntax.

Example: A: a = b ∧ b = c B : f (a) 6= f (c)

a = b & b = c ; not f(a) = f(c)

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 10 / 15

Page 20: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Example

Input:

a = b;

b = c;

not f(a) = f(c)

CSIsat

Output:

a = b

a = c

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 11 / 15

Page 21: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Example

Input:

a = b;

b = c;

not f(a) = f(c)

CSIsat

Output:

a = b

a = c

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 11 / 15

Page 22: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Example

Input:

a = b;

b = c;

not f(a) = f(c)

CSIsat

Output:

a = b

a = c

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 11 / 15

Page 23: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Outline

1 Interpolation

2 How to use CSIsat ?

3 How CSIsat works ?

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 12 / 15

Page 24: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Architecture

1 Generating a resolution proof of unsatisfiability.

2 Constructing the interpolant.

SAT solver

Nelson-Oppen

LAEUF

resolution

proof

theory

specific

information

traversingproof

Nelson-Oppen

LAEUF

Yorsh,Musuvathi 05

Rybalchenko,Sofronie-Stokkermans 07

McMillan 05

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 13 / 15

Page 25: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Architecture

1 Generating a resolution proof of unsatisfiability.

2 Constructing the interpolant.

SAT solver

Nelson-Oppen

LAEUF

resolution

proof

theory

specific

information

traversingproof

Nelson-Oppen

LAEUF

Yorsh,Musuvathi 05

Rybalchenko,Sofronie-Stokkermans 07

McMillan 05

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 13 / 15

Page 26: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Architecture

1 Generating a resolution proof of unsatisfiability.2 Constructing the interpolant.

SAT solver

Nelson-Oppen

LAEUF

resolution

proof

theory

specific

information

traversingproof

Nelson-Oppen

LAEUF

Yorsh,Musuvathi 05

Rybalchenko,Sofronie-Stokkermans 07

McMillan 05

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 13 / 15

Page 27: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Architecture

1 Generating a resolution proof of unsatisfiability.2 Constructing the interpolant.

SAT solver

Nelson-Oppen

LAEUF

resolution

proof

theory

specific

information

traversingproof

Nelson-Oppen

LAEUF

Yorsh,Musuvathi 05

Rybalchenko,Sofronie-Stokkermans 07

McMillan 05

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 13 / 15

Page 28: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Architecture

1 Generating a resolution proof of unsatisfiability.2 Constructing the interpolant.

SAT solver

Nelson-Oppen

LAEUF

resolution

proof

theory

specific

information

traversingproof

Nelson-Oppen

LAEUF

Yorsh,Musuvathi 05

Rybalchenko,Sofronie-Stokkermans 07

McMillan 05

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 13 / 15

Page 29: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Architecture

1 Generating a resolution proof of unsatisfiability.2 Constructing the interpolant.

SAT solver

Nelson-Oppen

LAEUF

resolution

proof

theory

specific

information

traversingproof

Nelson-Oppen

LAEUF

Yorsh,Musuvathi 05

Rybalchenko,Sofronie-Stokkermans 07

McMillan 05

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 13 / 15

Page 30: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Architecture

1 Generating a resolution proof of unsatisfiability.2 Constructing the interpolant.

SAT solver

Nelson-Oppen

LAEUF

resolution

proof

theory

specific

information

traversingproof

Nelson-Oppen

LAEUF

Yorsh,Musuvathi 05

Rybalchenko,Sofronie-Stokkermans 07

McMillan 05

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 13 / 15

Page 31: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Performance

Program #queries Foci CLPprover CSIsat

Blast4

floppy 235 1.17 s 1.55 s 0.55 scdaudio 130 0.60 s 0.70 s 0.26 sssh 6881 29 s — 17 sARMC5

magill 9860 — 30 s 21 s

Related work: the new version of MathSAT [CAV 08] can generate

interpolants.

4http://mtc.epfl.ch/blast/5http://www.mpi-sws.mpg.de/~rybal/armc/

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 14 / 15

Page 32: CSIsat: Interpolation for LA+EUF · CSIsat: Interpolation for LA+EUF Dirk Beyer1 Damien Zu erey2 Rupak Majumdar3 1 Simon Fraser University, BC, Canada 2 EPFL, Switzerland 3 UCLA,

OutlineInterpolation

How to use CSIsat ?How CSIsat works ?

Conclusion

Try it out!

CSIsat is freely available online:

Project web page:http://www.cs.sfu.ca/~dbeyer/CSIsat

Sources and bug reports:http://csisat.googlecode.com

Feedback very welcome!

Questions?

Dirk Beyer, Damien Zufferey, Rupak Majumdar CSIsat CAV 2008 15 / 15