skip to main content
10.1145/2527269.2534188acmconferencesArticle/Chapter ViewAbstractPublication PagesadaConference Proceedingsconference-collections
tutorial

Practical specification and verification with code contracts

Published: 10 November 2013 Publication History

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.
[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.
[3]
M. Barnett, M. Fähndrich, and F. Logozzo. Embedded contract languages. In SAC'10. ACM Press, 2010.
[4]
M. Bouaziz, L. Logozzo, and M. Fähndrich. Inference of necessary field conditions with abstract interpretation. In APLAS, 2012.
[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.
[6]
P. Cousot, R. Cousot, M. Fähndrich, and F. Logozzo. Automatic inference of necessary preconditions. In VMCAI, pages 128--148, 2013.
[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.
[8]
M. Fahndrich, M. Barnett, D. Leijen, and F. Logozzo. Integrating a set of contract checking tools into visual studio. In TOPI. IEEE, 2012.
[9]
M. Fähndrich and F. Logozzo. Static contract checking with abstract interpretation. In FoVeOOS, 2010.
[10]
P. Ferrara, F. Logozzo, and M. Fähndrich. Safer unsafe code in .NET. In OOPSLA'08. ACM Press, 2008.
[11]
V. Laviron and F. Logozzo. Subpolyhedra: A (more) scalable approach to infer linear inequalities. In VMCAI '09, 2009.
[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.
[13]
F. Logozzo and T. Ball. Modular and verified automatic program repair. In OOPSLA. ACM, 2012.
[14]
F. Logozzo and M. Fähndrich. Pentagons: a weakly relational abstract domain for the efficient validation of array accesses. In SAC. ACM, 2008.
[15]
B. Meyer. Eiffel: The Language. Prentice Hall, 1991.
[16]
Microsoft. Codecontracts tools.texttthttp://aka.ms/codecontracts/vsgallery.

Cited By

View all
  • (2024)A Pyramid Of (Formal) Software VerificationFormal Methods10.1007/978-3-031-71177-0_24(393-419)Online publication date: 13-Sep-2024
  • (2017)Automatic Contract Insertion with CCBotIEEE Transactions on Software Engineering10.1109/TSE.2016.262524843:8(701-714)Online publication date: 1-Aug-2017
  • (2015)Verification by abstract interpretation, soundness and abstract inductionProceedings of the 17th International Symposium on Principles and Practice of Declarative Programming10.1145/2790449.2790451(1-4)Online publication date: 14-Jul-2015
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

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
Permission to make digital or hard copies of part or all 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 third-party components of this work must be honored. For all other uses, contact the Owner/Author.

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 10 November 2013

Check for updates

Author Tags

  1. abstract interpretation
  2. ainference
  3. contracts
  4. program verification

Qualifiers

  • Tutorial

Conference

HILT 2013
Sponsor:
HILT 2013: High Integrity Language Technology ACM SIGAda Annual
November 10 - 14, 2013
Pennsylvania, Pittsburgh, USA

Acceptance Rates

HILT '13 Paper Acceptance Rate 9 of 17 submissions, 53%;
Overall Acceptance Rate 27 of 48 submissions, 56%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 10 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)A Pyramid Of (Formal) Software VerificationFormal Methods10.1007/978-3-031-71177-0_24(393-419)Online publication date: 13-Sep-2024
  • (2017)Automatic Contract Insertion with CCBotIEEE Transactions on Software Engineering10.1109/TSE.2016.262524843:8(701-714)Online publication date: 1-Aug-2017
  • (2015)Verification by abstract interpretation, soundness and abstract inductionProceedings of the 17th International Symposium on Principles and Practice of Declarative Programming10.1145/2790449.2790451(1-4)Online publication date: 14-Jul-2015
  • (2022)Specification and Verification of Normative DocumentsFormal Methods for Software Engineering10.1007/978-3-030-38800-3_6(307-343)Online publication date: 23-Jun-2022
  • (2020)Unifying execution of imperative generators and declarative specificationsProceedings of the ACM on Programming Languages10.1145/34282854:OOPSLA(1-26)Online publication date: 13-Nov-2020

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media