Skip to main content
  • 812 Accesses

Abstract

A distinctive feature of this book is that types are preferably equipped with assertions. Assertions are the topic of Sect. 2.1. The basic notions related to assertions are introduced in Sect. 2.1.1. This section also specifies the basic reasoning rules such as those that apply to assignments, conditional statements, and loops. Methods equipped with preconditions and postconditions are discussed in Sect. 2.2.1. Loop invariants are the topic of Sect. 2.2.2 and a verification technique for proving loop termination in Sect. 2.2.3. Class assertions called object invariants are the topic of Sect. 2.2.4. The implications of the developed apparatus of assertions on parametric types are discussed in Sect. 2.2.5. Finally, in Sect. 2.2.6 we revisit the notion of subtyping in the presence of assertions and explain the all important compatibility requirement for classes called behavioral subtyping.

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

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 54.99
Price excludes VAT (USA)
  • Durable hardcover 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

References

  1. S. Alagić, A family of the ODMG object models, invited paper, in Proceedings of ADBIS ‘98. Lecture Notes in Computer Science, vol. 1691 (1999)

    Google Scholar 

  2. S. Alagić, Semantics of temporal classes. Inf. Comput. 163, 60–102 (2000)

    Article  Google Scholar 

  3. S. Alagić, S. Kouznetsova, Behavioral compatibility of self-typed theories, in Proceedings of ECOOP 2002. Lecture Notes in Computer Science, vol. 2374 (Springer, New York, 2002), pp. 585–608

    Google Scholar 

  4. S. Alagić, M. Royer, D. Crews, Temporal verification theories for Java-like classes, in Proceedings of the ECOOP FTfJP06 Workshop: Formal Techniques for Java-Like Programs (2006), http://www.disi.unige.it/person/AnconaD/FTfJP06/

  5. Code Contracts, Microsoft Research, http://research.microsoft.com/en-us/projects/contracts/

  6. Java Modeling Language, http://www.eecs.ucf.edu/leavens/JML/

  7. K.R. Leino, P. Muller, Using Spec# language, methodology, and tools to write bug-free programs, Microsoft Research (2010), http://research.microsoft.com/en-us/projects/specsharp/

  8. B. Liskov, J.M. Wing, A behavioral notion of subtyping. ACM TOPLAS 16, 1811–1841 (1994)

    Article  Google Scholar 

  9. B. Meyer, Object-Oriented Software Construction, 2nd edn. (Prentice Hall, New Jersey, 1997)

    Google Scholar 

  10. Microsoft Corp., Spec#, http://research.microsoft.com/specsharp/

  11. R. Monahan, R. Leino, Program verification using the Spec# programming systems, ECOOP 2009 Tutorial, http://www.rosemarymonahan.com/specsharp/papers/ECOOPTutorial.pdf

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Alagić, S. (2015). Assertions. In: Object-Oriented Technology. Springer, Cham. https://doi.org/10.1007/978-3-319-20442-0_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-20442-0_2

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-20441-3

  • Online ISBN: 978-3-319-20442-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics