skip to main content
research-article

Enabledness-based program abstractions for behavior validation

Published:30 July 2013Publication History
Skip Abstract Section

Abstract

Code artifacts that have nontrivial requirements with respect to the ordering in which their methods or procedures ought to be called are common and appear, for instance, in the form of API implementations and objects. This work addresses the problem of validating if API implementations provide their intended behavior when descriptions of this behavior are informal, partial, or nonexistent. The proposed approach addresses this problem by generating abstract behavior models which resemble typestates. These models are statically computed and encode all admissible sequences of method calls. The level of abstraction at which such models are constructed has shown to be useful for validating code artifacts and identifying findings which led to the discovery of bugs, adjustment of the requirements expected by the engineer to the requirements implicit in the code, and the improvement of available documentation.

References

  1. Alur, R., Cerny, P., Madhusudan, P., and Nam, W. 2005. Synthesis of interface specifications for java classes. In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Panguages (POPL'05). 98--109. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Andersen, M., Barnett, M., Fahndrich, M., Grunkemeyer, B., King, K., Logozzo, F., Patel, V., and Zuniga, D. 2009. Code contracts. http://research.microsoft.com/enus/projects/contracts.Google ScholarGoogle Scholar
  3. Barrett, C. and Berezin, S. 2004. CVC Lite: A new implementation of the cooperating validity checker. In Proceedings of the 16th International Conference on Computer Aided Verification (CAV'04). 515--518.Google ScholarGoogle Scholar
  4. Beckman, N. and Nori, A. 2011. Probabilistic, modular and scalable inference of typestate specifications. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'11). Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Beckman, N. E., Kim, D., and Aldrich, J. 2011. An empirical study of object protocols in the wild. In Proceedings of the 25th European Conference on Object-Oriented Programming (ECOOP'11). Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Beschastnikh, I., Brun, Y., Sloan, S., and Ernst, M. 2011. Leveraging existing instrumentation to automatically infer invariant-constrained models. In Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering (FSE'11). Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Beyer, D., Henzinger, T., Jhala, R., and Majumdar, R. 2007. The software model checker blast. Int. J. Softw. Tools Technol. Transfer 9, 5, 505--525. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Bierhoff, K. and Aldrich, J. 2008. Plural: Checking protocol compliance under aliasing. In Companion of the 30th International Conference on Software Engineering (ICSE'08). ACM Press, New York, 971--972. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Cok, D. and Kiniry, J. 2005. ESC/Java2: Uniting esc/java and jml. In Proceedings of the International Workshop on Construction and Analysis of Safe, Secure, and Interoperable Smart Devices. Lecture Notes in Computer Science, vol. 3362. Springer, 108--128. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Dallmeier, V., Knopp, N., Mallon, C., Hack, S., and Zeller, A. 2010. Generating test cases for specification mining. In Proceedings of the International Symposium on Software Testing and Analysis. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Dallmeier, V., Lindig, C., Wasylkowski, A., and Zeller, A. 2006. Mining object behavior with ADABU. In Proceedings of the Workshop on Dynamic Systems Analysis. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. De Caso, G., Braberman, V., Garbervetsky, D., and Uchitel, S. 2010. Automated abstractions for contract validation. IEEE Trans. Softw. Engin. 38, 1, 141--162. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Deline, R. and Fahndrich, M. 2001. Enforcing high-level protocols in low-level software. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'01). 59--69. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Demsky, B. and Rinard, M. 2009. Automatic extraction of heap reference properties in object-oriented programs. IEEE Trans. Softw. Engin. 35, 305--324. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Dijkstra, E. 1975. Guarded commands, nondeterminacy and formal derivation of programs. Comm. ACM 18, 8, 453--457. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Ernst, M., Perkins, J., Guo, P., Mccamant, S., Pacheco, C., Tschantz, M., and Xiao, C. 2007. The Daikon system for dynamic detection of likely invariants. Sci. Comput. Program. 69, 35--45. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Gabel, M. and Su, Z. 2008. Symbolic mining of temporal specifications. In Companion of the 30th International Conference on Software Engineering (ICSE'08). 51--60. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Ghezzi, C., Mocci, A., and Monga, M. 2009. Synthesizing intensional behavior models by graph transformation. In Companion of the 31st International Conference on Software Engineering (ICSE'09). 430--440. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Giannakopoulou, D. and Pasa Reanu, C. 2009. Interface generation and compositional verification in javapathfinder. In Proceedings of the 12th International Conference on Fundamental Approaches to Software Engineering (FASE'09): Held as Part of the Joint European Conferences on Theory and Practice of Software (ETAPS'09). 94--108. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Graf, S. and Saidi, H. 1997. Construction of abstract state graphs with pvs. In Proceedings of the 9th International Conference on Computer Aided Verification (CAV'97). 72--83. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Grieskamp, W., Gurevich, Y., Schulte, W., and Veanes, M. 2002. Generating finite state machines from abstract state machines. In Proceedings of the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA'02). 112--122. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Grieskamp, W., Kicillof, N., Macdonald, D., Nandan, A., Stobie, K., and Wurden, F. 2008. Model-based quality assurance of windows protocol documentation. In Proceedings of the 1st International Conference on Software Testing, Verification, and Validation (ICST'08). 502--506. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Grieskamp, W., Kicillof, N., Stobie, K., and Braberman, V. 2011. Model-based quality assurance of protocol documentation: Tools and methodology. Softw. Testing Verif. Reliabil. 21, 1, 55--71. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Henzinger, T., Jhala, R., and Majumdar, R. 2005. Permissive interfaces. In Proceedings of the 10th European Software Engineering Conference held jointly with the 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering (ESEC/FSE'05). 31--40. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Hodges, W. 1997. A Shorter Model Theory. Cambridge University Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Khurshid, S., Pasa Reanu, C., and Visser, W. 2003. Generalized symbolic execution for model checking and testing. In Tools and Algorithms for the Construction and Analysis of Systems, 553--568. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Klensin, J., Freed, N., Rose, M., Stefferud, E., and Crocker, D. 1995. Smtp service extensions. Tech. rep., RFC 2846.Google ScholarGoogle Scholar
  28. Leavens, G., Leino, K., and Muller, P. 2007. Specification and verification challenges for sequential object-oriented programs. Formal Aspects Comput. 19, 2, 159--189. Google ScholarGoogle ScholarCross RefCross Ref
  29. Lee, D. and Yannakakis, M. 1992. Online minimization of transition systems (extended abstract). In Proceedings of the 24th Annual ACM Symposium on Theory of Computing (STOC'92). 264--274. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Liu, L., Meyer, B., and Schoeller, B. 2007. Using contracts and boolean queries to improve the quality of automatic test generation. In Proceedings of the 1st International Conference on Tests and Proofs (TAP'07). 114--130. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Lorenzoli, D., Mariani, L., and Pezze, M. 2008. Automatic generation of software behavioral models. In Companion of the 30th International Conference on Software Engineering (ICSE'08). 501--510. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Nanda, M., Grothoff, C., and Chandra, S. 2005. Deriving object typestates in the presence of interobject references. ACM SIGPLAN Not. 40, 10, 77--96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Pacheco, C. and Ernst, M. 2007. Randoop: Feedback-directed random testing for java. In Proceeding of the Companion to the 22nd ACM SIGPLAN Conference on Object-Oriented Programming Systems and Applications Companion (OOPSLA'07). ACM Press, New York, 815--816. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Pradel, M. and Gross, T. R. 2009. Automatic generation of object usage specifications from large method traces. In Proceedings of the IEEE/ACM International Conference on Automated Software Engineering (ASE'09). IEEE, 371--382. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Strom, R. and Yemini, S. 1986. Typestate: A programming language concept for enhancing software reliability. IEEE Trans. Softw. Engin. 12, 1, 157--171. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Uribe, T. 1999. Abstraction-based deductive-algorithmic verification of reactive systems. http://www-step.stanford.edu/papers/dissertations/tomas.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Zoppi, E., Braberman, V., De Caso, G., Garbervetsky, D., and Uchitel, S. 2011. Contractor.net: Inferring typestate properties to enrich code contracts. In Proceedings of the 1st Workshop on Developing Tools as Plug-ins (TOPI'11). ACM Press, New York, 44--47. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Enabledness-based program abstractions for behavior validation

            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

            • Published in

              cover image ACM Transactions on Software Engineering and Methodology
              ACM Transactions on Software Engineering and Methodology  Volume 22, Issue 3
              In memoriam, fault detection and localization, formal methods, modeling and design
              July 2013
              414 pages
              ISSN:1049-331X
              EISSN:1557-7392
              DOI:10.1145/2491509
              Issue’s Table of Contents

              Copyright © 2013 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: 30 July 2013
              • Revised: 1 May 2012
              • Accepted: 1 May 2012
              • Received: 1 June 2011
              Published in tosem Volume 22, Issue 3

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article
              • Research
              • Refereed

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader