Skip to main content

Specifying C Programs

  • Chapter
Rigorous Software Development

Abstract

In this chapter we shift the focus of our study to programs written in a realistic programming language. In particular, we focus on the ANSI/ISO C Specification Language (ACSL), which is an annotation language for C programs. ACSL has scope for frame conditions, loop invariants and variants, predicates and logic functions (either defined or specified by axioms), and a state label mechanism.

In the previous chapter we have introduced contracts and the principles of contract-based verification. ACSL adheres to these principles: each C function in a program is annotated with an ACSL specification—the function’s contract. Verification of a program consisting of a number of mutually-recursive functions is completely modular: each function is verified against its own contract, assuming that all other functions are correct. The program is correct if all functions are correct.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 39.95
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Fromhttp://frama-c.com/.

References

  1. Baudin, P., Cuoq, P., Filliâtre, J.-C., Marché, C., Monate, B., Moy, Y., Prevosto, V.: ACSL: ANSI/ISO C Specification Language. CEA LIST and INRIA (2009–2010)

    Google Scholar 

  2. Burghardt, J., Gerlach, J., Hartig, K., Soto, J., Weber, C.: ACSL By Example. DEVICE-SOFT project publication. Fraunhofer FIRST Institute (January 2010)

    Google Scholar 

  3. Hatcliff, J., Leavens, G.T., Leino, K.R.M., Müller, P., Parkinson, P.: Behavioral interface specification languages. Technical Report CS-TR-09-01, School of EECS, University of Central Florida (2009)

    Google Scholar 

  4. Leavens, G.T.: Tutorial on JML, the Java modeling language. In: Stirewalt, R.E.K., Egyed, A., Fischer, B. (eds.) Proceedings of ASE’07, p. 573. ACM, New York (2007)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to José Bacelar Almeida .

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag London Limited

About this chapter

Cite this chapter

Almeida, J.B., Frade, M.J., Pinto, J.S., Melo de Sousa, S. (2011). Specifying C Programs. In: Rigorous Software Development. Undergraduate Topics in Computer Science. Springer, London. https://doi.org/10.1007/978-0-85729-018-2_9

Download citation

  • DOI: https://doi.org/10.1007/978-0-85729-018-2_9

  • Publisher Name: Springer, London

  • Print ISBN: 978-0-85729-017-5

  • Online ISBN: 978-0-85729-018-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics