skip to main content
tutorial

Practical specification and verification with code contracts

Published:10 November 2013Publication History
Skip Abstract Section

Abstract

In this tutorial I will introduce CodeContracts, the .NET solution for contract specifications. CodeContracts consist of a language and compiler-agnostic API to express contracts, and of a set of tools to automatically generate the documentation and to perform dynamic and static verification. The CodeContracts API is part of .NET since v4, the tools are available for download on the Visual Studio Gallery. To date, they have been downloaded more than 100,000 times.

References

  1. J. Barnes. High Integrity Software: The SPARK Approach to Safety and Security. Addison-Wesley, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Barnett, M. Fähndrich, K. R. M. Leino, P. Müller, W. Schulte, and H. Venter. Specification and verification: the Spec# experience. Commun. ACM, 54(6):81--91, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. Barnett, M. Fähndrich, and F. Logozzo. Embedded contract languages. In SAC'10. ACM Press, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Bouaziz, L. Logozzo, and M. Fähndrich. Inference of necessary field conditions with abstract interpretation. In APLAS, 2012.Google ScholarGoogle ScholarCross RefCross Ref
  5. P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In POPL'77. ACM Press, Jan. 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. P. Cousot, R. Cousot, M. Fähndrich, and F. Logozzo. Automatic inference of necessary preconditions. In VMCAI, pages 128--148, 2013.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Cousot, R. Cousot, and F. Logozzo. A parametric segmentation functor for fully automatic and scalable array content analysis. In POPL 2011. ACM Press, Jan. 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. Fahndrich, M. Barnett, D. Leijen, and F. Logozzo. Integrating a set of contract checking tools into visual studio. In TOPI. IEEE, 2012.Google ScholarGoogle ScholarCross RefCross Ref
  9. M. Fähndrich and F. Logozzo. Static contract checking with abstract interpretation. In FoVeOOS, 2010.Google ScholarGoogle Scholar
  10. P. Ferrara, F. Logozzo, and M. Fähndrich. Safer unsafe code in .NET. In OOPSLA'08. ACM Press, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. V. Laviron and F. Logozzo. Subpolyhedra: A (more) scalable approach to infer linear inequalities. In VMCAI '09, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. G. T. Leavens, J. R. Kiniry, and E. Poll. A jml tutorial: Modular specification and verification of functional behavior for java. In CAV, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. F. Logozzo and T. Ball. Modular and verified automatic program repair. In OOPSLA. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. F. Logozzo and M. Fähndrich. Pentagons: a weakly relational abstract domain for the efficient validation of array accesses. In SAC. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. B. Meyer. Eiffel: The Language. Prentice Hall, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Microsoft. Codecontracts tools.texttthttp://aka.ms/codecontracts/vsgallery.Google ScholarGoogle Scholar

Index Terms

  1. Practical specification and verification with code contracts

              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 SIGAda Ada Letters
                ACM SIGAda Ada Letters  Volume 33, Issue 3
                HILT '13
                December 2013
                80 pages
                ISSN:1094-3641
                DOI:10.1145/2658982
                Issue’s Table of Contents
                • cover image ACM Conferences
                  HILT '13: Proceedings of the 2013 ACM SIGAda annual conference on High integrity language technology
                  November 2013
                  100 pages
                  ISBN:9781450324670
                  DOI:10.1145/2527269

                Copyright © 2013 Owner/Author

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 10 November 2013

                Check for updates

                Qualifiers

                • tutorial

              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!