Author:
Sumanth Prabhu S.,D’Souza Deepak,Chakraborty Supratik,Venkatesh R,Fedyukovich Grigory
Abstract
AbstractPrecondition inference is an important problem with many applications. Existing precondition inference techniques for programs with arrays have limited ability to find and prove the weakest preconditions, especially when programs have non-determinism. In this paper, we propose an approach to overcome the limitation. As the problem is uncomputable in general, our approach targets a special class of programs called linear array programs that are commonly encountered in practical applications and have been studied before. We also focus on a class of quantified formulas for pre- and postconditions that suffice to specify program properties in many applications. Our approach uses two novel techniques called Structural Array Abduction (SAA) and Specialized Maximality Checking (SMC). SAA is an abduction-based technique used to infer quantified preconditions and necessary inductive invariants. SMC proves that an inferred precondition is the weakest by finding an under-approximated program and solving the complement verification problem on it using SAA. When inconclusive, it attempts to weaken the precondition. Our approach can infer (and also prove) the weakest preconditions for a range of benchmarks relatively quickly, and outperforms competing techniques.
Publisher
Springer Nature Switzerland
Reference55 articles.
1. A. Albarghouthi, I. Dillig, and A. Gurfinkel. Maximal specification synthesis. In POPL, pages 789–801. ACM, 2016.
2. A. Astorga, P. Madhusudan, S. Saha, S. Wang, and T. Xie. Learning stateful preconditions modulo a test generator. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 775–787, 2019.
3. N. Bjørner and M. Janota. Playing with quantified satisfaction. In LPAR (short papers), volume 35 of EPiC Series in Computing, pages 15–27. EasyChair, 2015.
4. N. Bjørner, K. McMillan, and A. Rybalchenko. On solving universally quantified Horn clauses. In International Static Analysis Symposium, pages 105–125. Springer, 2013.
5. B. Blanchet, P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, D. Monniaux, and X. Rival. Design and implementation of a special-purpose static program analyzer for safety-critical real-time embedded software. In The essence of computation, pages 85–108. Springer, 2002.