skip to main content
article
Free Access

Goal-directed weakening of abstract interpretation results

Authors Info & Claims
Published:01 October 2007Publication History
Skip Abstract Section

Abstract

One proposal for automatic construction of proofs about programs is to combine Hoare logic and abstract interpretation. Constructing proofs is in Hoare logic. Discovering programs' invariants is done by abstract interpreters.

One problem of this approach is that abstract interpreters often compute invariants that are not needed for the proof goal. The reason is that the abstract interpreter does not know what the proof goal is, so it simply tries to find as strong invariants as possible. These unnecessary invariants increase the size of the constructed proofs. Unless the proof-construction phase is notified which invariants are not needed, it blindly proves all the computed invariants.

In this article, we present a framework for designing algorithms, called abstract-value slicers, that slice out unnecessary invariants from the results of forward abstract interpretation. The framework provides a generic abstract-value slicer that can be instantiated into a slicer for a particular abstract interpretation. Such an instantiated abstract-value slicer works as a post-processor to an abstract interpretation in the whole proof-construction process, and notifies to the next proof-construction phase which invariants it does not have to prove. Using the framework, we designed an abstract-value slicer for an existing relational analysis and applied it on programs. In this experiment, the slicer identified 62%--81% of the computed invariants as unnecessary, and resulted in 52%--84% reduction in the size of constructed proofs.

References

  1. Appel, A. W. 2001. Foundational proof-carrying code. In Proceedings of the IEEE Symposium on Logic in Computer Science (LICS). IEEE Computer Society Press, Los Alamitos, 247--258. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Appel, A. W. and Felty, A. P. 2000. A semantic model of types and machine instructions for proof-carrying code. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press, New York, 243--253. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Ball, T., Majumdar, R., Millstein, T., and Rajamani, S. K. 2001. Automatic predicate abstraction of C programs. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM Press, New York, 203--213. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Ball, T. and Rajamani, S. K. 2001. Automatically validating temporal safety properties of interfaces. In Proceedings of the SPIN Workshop on Model Checking of Software. Lecture Notes in Computer Science (LNCS), vol. 2057. Springer-Verlag, 103--122. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Besson, F., Jensen, T., and Turphin, T. 2007. Small witnesses for abstract interpretation-based proofs. In Proceedings of the European Symposium on Programming (ESOP). Lecture Notes in Computer Science, vol. 4421. Springer-Verlag, 268--283. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bourdoncle, F. 1993. Abstract debugging of higher-order imperative languages. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM Press, New York, 46--55. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Clarke, E. M., Grumberg, O., Jha, S., Lu, Y., and Veith, H. 2000. Counterexample-Guided abstraction refinement. In Proceedings of the International Conference on Computer-Aided Verification (CAV). Lecture Notes in Computer Science, vol. 1855. Springer-Verlag, 154--169. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Clarke, E. M., Grumberg, O., and Peled, D. A. 1999. Model Checking. The MIT Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Cortesi, A., Filé, G., and Winsborough, W. H. 1998. The quotient of an abstract interpretation. Theor. Comput. Sci. 202, 1-2, 163--192. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Cousot, P. 1981. Semantic foundations of program analysis. In Program Flow Analysis: Theory and Applications, S. Muchnick and N. Jones, Eds. Prentice-Hall, Inc., Englewood Cliffs, NJ, Chapter 10, 303--342.Google ScholarGoogle Scholar
  11. Cousot, P. 1998. The calculational design of a generic abstract interpreter. In Course notes for the NATO International Summer School Marktoberdorf (Germany) on Calculational System Design, M. Broy and R. Steinbrüggen, Eds. NATO ASI Series F. IOS Press, Amsterdam.Google ScholarGoogle Scholar
  12. Cousot, P. 2005. Abstract interpretation. MIT course 16.399, http://web.mit.edu/16.399/www/.Google ScholarGoogle Scholar
  13. Cousot, P. and Cousot, R. 1977. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press, New York, 238--252. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Cousot, P. and Cousot, R. 1979. Systematic design of program analysis frameworks. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press, New York, 269--282. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Cousot, P. and Cousot, R. 1999. Refining model checking by abstract interpretation. Autom. Softw. Engin. 6, 1, 69--95. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Dams, D., Gerth, R., and Grumberg, O. 1997. Abstract interpretation of reactive systems. ACM Trans. Program. Lang. Syst. 19, 2, 253--291. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Davey, D. A. and Priestley, H. A. 1990. Introduction to Lattices and Order. Cambridge University Press.Google ScholarGoogle Scholar
  18. Davis, K. and Wadler, P. L. 1990. Backwards strictness analysis: Proved and improved. In Functional Programming: Proceedings of the 1989 Glasgow Workshop. Springer-Verlag, 12--30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Duesterwald, E., Gupta, R., and Soffa, M. L. 1995. Demand-driven computation of interprocedural data flow. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press, New York, 37--48. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Filé, G., Giacobazzi, R., and Ranzato, F. 1996. A unifying view of abstract domain design. ACM Comput. Surv. 28, 2, 333--336. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Giacobazzi, R. and Mastroeni, I. 2004. Abstract noninterference: parameterizing noninterference by abstract interpretation. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press, New York, 186--197. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Giacobazzi, R. and Ranzato, F. 1997. Refining and compressing abstract domains. In Proceedings of the International Colloquium on Automata, Languages and Programming (ICALP). Lecture Notes in Computer Science, vol. 1256. Springer-Verlag, 771--781. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Giacobazzi, R. and Ranzato, F. 1999. The reduced relative power operation on abstract domains. Theor. Comput. Sci. 216, 1-2, 159--211. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Giacobazzi, R., Ranzato, F., and Scozzari, F. 2000. Making abstract interpretations complete. J. ACM 47, 2, 361--416. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Giacobazzi, R. and Scozzari, F. 1998. A logical model for relational abstract domains. ACM Trans. Program. Lang. Syst. 20, 5, 1067--1109. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Graf, S. and Saïdi, H. 1997. Construction of abstract state graphs with pvs. In Proceedings of the International Conference on Computer Aided Verification (CAV). Lecture Notes in Computer Science, vol. 1254. Springer-Verlag, 72--83. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Hamid, N., Shaoi, Z., Trifonov, V., Monnier, S., and Ni, Z. 2002. A syntactic approach to foundational proof-carrying code. In Proceedings of the IEEE Symposium on Logic in Computer Science (LICS). IEEE Computer Society Press, Los Alamitos, 89--100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Henzinger, T., Jhala, R., Majumdar, R., and Sutre, G. 2002. Lazy abstraction. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press, New York, 58--70. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Henzinger, T., Jhala, R., Majumdar, R., and Sutre, G. 2003. Software verification with blast. In Proceedings of the SPIN Workshop on Model Checking of Software. Lecture Notes in Computer Science, vol. 2648. Springer-Verlag, 235--239.Google ScholarGoogle Scholar
  30. Hoare, C. A. R. 1969. An axiomatic basis for computer programming. Comm. ACM 12, 10, 576--580. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Howe, J. M., King, A., and Lu, L. 2004. Analysing logic programs by reasoning backwards. In Program Development in Computational Logic. Lecture Notes in Computer Science, vol. 3049. Springer-Verlag, 152--188.Google ScholarGoogle Scholar
  32. Hughes, J. 1988. Backwards analysis of functional programs. In Proceedings of the IFIP TC2 Workshop on Partial Evaluation and Mixed Computation. Elsevier, 187--208.Google ScholarGoogle Scholar
  33. Hughes, J. and Launchbury, J. 1992. Reversing abstract interpretations. In Proceedings of the European Symposium on Programming (ESOP). Lecture Notes in Computer Science, vol. 582. Springer-Verlag, 269--286. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. King, A. and Lu, L. 2002. A backward analysis for constraint logic programs. Theory Prac. Logic Progr. 2, 4-5, 517--547. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Massé, D. 2001. Combining forward and backward analyses of temporal properties. In Proceedings of the 2nd Symposium on Programs as Data Objects (PADO). Lecture Notes in Computer Science, vol. 2053. Springer-Verlag, 103--116. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Miné, A. 2001. A new numerical abstract domain based on difference-bound matrices. In Proceedings of the 2nd Symposium on Programs as Data Objects (PADO). Lecture Notes in Computer Science, vol. 2053. Springer-Verlag, 155--172. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Morrisett, G., Walker, D., Crary, K., and Glew, N. 1998. From System F to typed assembly language. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press, New York, 85--97. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Necula, G. C. 1997. Proof-carrying code. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press, New York, 106--119. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Necula, G. C. and Lee, P. 1997. Safe, untrusted agents using proof-carrying code. In Special Issue on Mobile Agent Security, G. Vigna, Ed. Lecture Notes in Computer Science, vol. 1419. Springer-Verlag, 61--91. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Necula, G. C. and Rahul, S. P. 2001. Oracle-based checking of untrusted software. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press, New York, 142--154. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Necula, G. C. and Schneck, R. 2002. Proof-carrying code with untrusted proof rules. In Software Security---Theories and Systems. Lecture Notes in Computer Science, vol. 2609. Springer-Verlag, 283--298.Google ScholarGoogle Scholar
  42. Rival, X. 2005a. Abstract dependences for alarm diagnosis. In Proceedings of the Asian Symposium on Programming Languages and Systems (APLAS). Lecture Notes in Computer Science, vol. 3780. Springer-Verlag, 347--363. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Rival, X. 2005b. Understanding the origin of alarms in ASTRÉE. In Proceedings of the International Static Analysis Symposium (SAS). Lecture Notes in Computer Science, vol. 3672. Springer-Verlag, 303--319. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Seo, S., Yang, H., and Yi, K. 2003. Automatic construction of Hoare proofs from abstract interpretation results. In Proceedings of the Asian Symposium on Programming Languages and Systems (APLAS). Lecture Notes in Computer Science, vol. 2895. Springer-Verlag, 230--245.Google ScholarGoogle Scholar
  45. Tip, F. 1995. A survey of program slicing techniques. J. Program. Lang. 3, 3, 121--189.Google ScholarGoogle Scholar
  46. Wadler, P. and Hughes, R. J. M. 1987. Projections for Strictness Analysis. In Functional Programming Languages and Computer Architecture, G. Kahn, Ed. Lecture Notes in Computer Science, vol. 274. Springer, Berlin, 385--407. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Yang, H., Seo, S., Yi, K., and Han, T. 2006. Off-line semantic slicing from abstract interpretation results. Tech. mem. ROPAS-2006-34, Programming Research Laboratory, School of Computer Science & Engineering, Seoul National University. Available at http://ropas.snu.ac.kr/lib/dock/YaSeYiHa2006.pdf.Google ScholarGoogle Scholar

Index Terms

  1. Goal-directed weakening of abstract interpretation results

                Recommendations

                Comments

                Login options

                Check if you have access through your login credentials or your institution to get full access on this article.

                Sign in

                Full Access

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader
                About Cookies On This Site

                We use cookies to ensure that we give you the best experience on our website.

                Learn more

                Got it!