|
ABSTRACT
We address the problem of automatically generating invariants with quantified and boolean structure for proving the validity of given assertions or generating pre-conditions under which the assertions are valid. We present three novel algorithms, having different strengths, that combine template and predicate abstraction based formalisms to discover required sophisticated program invariants using SMT solvers. Two of these algorithms use an iterative approach to compute fixed-points (one computes a least fixed-point and the other computes a greatest fixed-point), while the third algorithm uses a constraint based approach to encode the fixed-point. The key idea in all these algorithms is to reduce the problem of invariant discovery to that of finding optimal solutions for unknowns (over conjunctions of some predicates from a given set) in a template formula such that the formula is valid. Preliminary experiments using our implementation of these algorithms show encouraging results over a benchmark of small but complicated programs. Our algorithms can verify program properties that, to our knowledge, have not been automatically verified before. In particular, our algorithms can generate full correctness proofs for sorting algorithms (which requires nested universally-existentially quantified invariants) and can also generate preconditions required to establish worst-case upper bounds of sorting algorithms. Furthermore, for the case of previously considered properties, in particular sortedness in sorting algorithms, our algorithms take less time than reported by previous techniques.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
Dirk Beyer, Thomas Henzinger, Rupak Majumdar, and Andrey Rybalchenko. Invariant synthesis for combined theories. In VMCAI, volume 4349 of LNCS, pages 378--394, 2007.
|
 |
2
|
Dirk Beyer , Thomas A. Henzinger , Rupak Majumdar , Andrey Rybalchenko, Path invariants, Proceedings of the 2007 ACM SIGPLAN conference on Programming language design and implementation, June 10-13, 2007, San Diego, California, USA
|
| |
3
|
|
| |
4
|
Michael Colon, Sriram Sankaranarayanan, and Henny Sipma. Linear invariant generation using non-linear constraint solving. In CAV, pages 420--432, 2003.
|
 |
5
|
|
| |
6
|
|
| |
7
|
Leonardo de Moura and Nikolaj Bjorner. Z3: Efficient SMT solver. In TACAS, volume 4963 of LNCS, pages 337--340, April 2008.
|
| |
8
|
|
 |
9
|
|
| |
10
|
|
 |
11
|
|
 |
12
|
|
 |
13
|
|
| |
14
|
Sumit Gulwani , Saurabh Srivastava , Ramarathnam Venkatesan, Constraint-Based Invariant Inference over Predicate Abstraction, Proceedings of the 10th International Conference on Verification, Model Checking, and Abstract Interpretation, December 18-20, 2008, Savannah, GA
[doi> 10.1007/978-3-540-93900-9_13]
|
 |
15
|
|
 |
16
|
Thomas A. Henzinger , Ranjit Jhala , Rupak Majumdar , Kenneth L. McMillan, Abstractions from proofs, Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.232-244, January 14-16, 2004, Venice, Italy
|
| |
17
|
Ranjit Jhala and Ken McMillan. Array abstraction from proofs. In CAV, 2007.
|
| |
18
|
Deepak Kapur. Automatically generating loop invariants using quantifier elimination. In Deduction and Applications, 2005.
|
 |
19
|
|
| |
20
|
|
 |
21
|
|
| |
22
|
Andreas Podelski and Thomas Wies. Boolean heaps. In SAS, 2005.
|
| |
23
|
Thomas W. Reps, Shmuel Sagiv, and Greta Yorsh. Symbolic impl. of the best transformer. In VMCAI, pages 252--266, 2004.
|
| |
24
|
Microsoft Research. Phoenix. http://research.microsoft.com/Phoenix/.
|
| |
25
|
Microsoft Research. Z3. http://research.microsoft.com/projects/Z3/.
|
 |
26
|
|
| |
27
|
Sriram Sankaranarayanan, Henny B. Sipma, and Zohar Manna. Constraint-based linear-relations analysis. In SAS, pages 53--68, 2004.
|
 |
28
|
Armando Solar-Lezama , Gilad Arnold , Liviu Tancau , Rastislav Bodik , Vijay Saraswat , Sanjit Seshia, Sketching stencils, Proceedings of the 2007 ACM SIGPLAN conference on Programming language design and implementation, June 10-13, 2007, San Diego, California, USA
|
 |
29
|
Armando Solar-Lezama , Liviu Tancau , Rastislav Bodik , Sanjit Seshia , Vijay Saraswat, Combinatorial sketching for finite programs, Proceedings of the 12th international conference on Architectural support for programming languages and operating systems, October 21-25, 2006, San Jose, California, USA
|
| |
30
|
Saurabh Srivastava and Sumit Gulwani. Program verification using templates over predicate abstraction. Technical Report MSR-TR-2008-173, Nov 2008.
|
| |
31
|
Saurabh Srivastava, Sumit Gulwani, and Jeffrey Foster. VS3 : SMT-solvers for program verification. In CAV, 2009.
|
 |
32
|
|
|