skip to main content
10.1145/1390630.1390665acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article

Universal symbolic execution and its application to likely data structure invariant generation

Published:20 July 2008Publication History

ABSTRACT

Local data structure invariants are asserted over a bounded fragment of a data structure around a distinguished node M of the data structure. An example of such an invariant for a sorted doubly linked list is "for all nodes M of the list, if Mnull and M.nextnull, then M.next.prev = M and M.value ≤ M.next.value." It has been shown that such local invariants are both natural and sufficient for describing a large class of data structures. This paper explores a novel technique, called Krystal, to infer likely local data structure invariants using a variant of symbolic execution, called universal symbolic execution. Universal symbolic execution is like traditional symbolic execution except the fact that we create a fresh symbolic variable for every read of a lvalue that has no mapping in the symbolic state rather than creating a symbolic variable only for inputs. This helps universal symbolic execution to symbolically track data flow for all memory locations along an execution even if input values do not flow directly into those memory locations. We have implemented our algorithm and applied it to several data structure implementations in Java. Our experimental results show that we can infer many interesting local invariants for these data structures.

References

  1. R. Alur, P. Cerny, G. Gupta, P. Madhusudan, W. Nam, and A. Srivastava. Synthesis of Interface Specifications for Java Classes. In Proceedings of POPL'05 (32nd ACM Symposium on Principles of Programming Languages), 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. G. Ammons, R. Bodik, and J. R. Larus. Mining specifications. SIGPLAN Not., 37(1):4--16, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. L. Clarke. A system to generate test data and symbolically execute programs. IEEE Trans. Software Eng., 2:215--222, 1976.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. P. D. Coward. Symbolic execution systems-a review. Software Engineering Journal, 3(6):229--239, 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Csallner, N. Tillmann, and Y. Smaragdakis. DySy: Dynamic symbolic execution for invariant inference. In 30th ACM/IEEE International Conference on Software Engineering (ICSE), May 2008. To appear.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. B. Dutertre and L. M. de Moura. A fast linear-arithmetic solver for dpll(t). In Computer Aided Verification, volume 4144 of LNCS, pages 81--94, 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. D. Ernst, J. Cockrell, W. G. Griswold, and D. Notkin. Dynamically discovering likely program invariants to support program evolution. IEEE Transactions on Software Engineering, 27(2):99--123, Feb. 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. D. Ernst, A. Czeisler, W. G. Griswold, and D. Notkin. Quickly detecting relevant program invariants. In Proceedings of the 22nd International Conference on Software Engineering, pages 449--458, June 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. D. Ernst, W. G. Griswold, Y. Kataokay, and D. Notkin. Dynamically discovering program invariants involving collections. In TR UW-CSE-99-11-02, University of Washington, 2000.]]Google ScholarGoogle Scholar
  10. C. Flanagan, K. R. M. Leino, M. Lillibridge, G. Nelson, J. B. Saxe, and R. Stata. Extended static checking for Java. In Proc. of the ACM SIGPLAN Conference on Programming language design and implementation (PLDI'02), pages 234--245, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Flanagan and R. M. Leino. Houdini, an annotation assistant for esc/java. In Proceedings of the International Symposium of Formal Methods Europe (FME), pages 500--517, March 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Godefroid, N. Klarlund, and K. Sen. DART: Directed automated random testing. In Proc. of the ACM SIGPLAN 2005 Conference on Programming Language Design and Implementation (PLDI), 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. Hangal and M. S. Lam. Tracking down software bugs using automatic anomaly detection. In Proceedings of the International Conference on Software Engineering, May 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. Khurshid, C. S. Pasareanu, and W. Visser. Generalized symbolic execution for model checking and testing. In Proc. 9th Int. Conf. on TACAS, pages 553--568, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. C. King. Symbolic Execution and Program Testing. Communications of the ACM, 19(7):385--394, 1976.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. G. Lee, J. Morris, K. Parker, G. A. Bundell, and P. Lam. Using symbolic execution to guide test generation: Research articles. Softw. Test. Verif. Reliab., 15(1):41--61, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. F. Logozzo. Automatic inference of class invariants. In Proceedings of the 5th International Conference on Verification, Model Checking and Abstract Interpretation (VMCAI '04), January 2004.]]Google ScholarGoogle ScholarCross RefCross Ref
  18. M. Z. Malik, A. Pervaiz, , and S. Khurshid. Generating representation invariants of structurally complex data. In TACAS, pages 34--49, 2007.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. S. McPeak and G. C. Necula. Data structure specifications via local equality axioms. In Proceedings of Computer Aided Verification (CAV), pages 476--490, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. J. Mitchell. Foundations for Programming Languages. MIT Press, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. K. Sen, D. Marinov, and G. Agha. CUTE: A concolic unit testing engine for C. Technical Report UIUCDCS-R-2005-2597, UIUC, 2005.]]Google ScholarGoogle ScholarCross RefCross Ref
  22. K. Sen, D. Marinov, and G. Agha. CUTE: A concolic unit testing engine for C. In 5th joint meeting of the European Software Engineering Conference and ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC/FSE'05). ACM, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Taghdiri and D. Jackson. Inferring specifications to detect errors in code. Automated Software Engg., 14(1):87--121, 2007.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. N. Tillmann, F. Chen, and W. Schulte. Discovering likely method specifications. In ICFEM, pages 717--736, 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. R. Vallee-Rai, L. Hendren, V. Sundaresan, P. Lam, E. Gagnon, and P. Co. Soot -- a Java optimization framework. In CASCON 1999, pages 125--135, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. W. Visser, C. S. Pasareanu, and S. Khurshid. Test input generation with Java PathFinder. In Proc. 2004 ACM SIGSOFT International Symposium on Software Testing and Analysis, pages 97--107, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. S. Visvanathan and N. Gupta. Generating test data for functions with pointer inputs. In 17th IEEE International Conference on Automated Software Engineering, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. J. Whaley, M. C. Martin, and M. S. Lam. Automatic Extraction of Object-Oriented Component Interfaces. In Proceedings of ACM SIGSOFT ISSTA'02 (International Symposium on Software Testing and Analysis), 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. T. Xie, D. Marinov, W. Schulte, and D. Notkin. Symstra: A framework for generating object-oriented unit tests using symbolic execution. In Procs. of TACAS, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. J. Yang and D. Evans. Dynamically inferring temporal properties. In PASTE '04, pages 23--28. ACM, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Universal symbolic execution and its application to likely data structure invariant generation

                  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
                  • Published in

                    cover image ACM Conferences
                    ISSTA '08: Proceedings of the 2008 international symposium on Software testing and analysis
                    July 2008
                    324 pages
                    ISBN:9781605580500
                    DOI:10.1145/1390630

                    Copyright © 2008 ACM

                    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                    Publisher

                    Association for Computing Machinery

                    New York, NY, United States

                    Publication History

                    • Published: 20 July 2008

                    Permissions

                    Request permissions about this article.

                    Request Permissions

                    Check for updates

                    Qualifiers

                    • research-article

                    Acceptance Rates

                    Overall Acceptance Rate58of213submissions,27%

                    Upcoming Conference

                    ISSTA '24

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader