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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
S. Alagić, A family of the ODMG object models, invited paper, in Proceedings of ADBIS ‘98. Lecture Notes in Computer Science, vol. 1691 (1999)
S. Alagić, Semantics of temporal classes. Inf. Comput. 163, 60–102 (2000)
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
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/
Code Contracts, Microsoft Research, http://research.microsoft.com/en-us/projects/contracts/
Java Modeling Language, http://www.eecs.ucf.edu/leavens/JML/
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/
B. Liskov, J.M. Wing, A behavioral notion of subtyping. ACM TOPLAS 16, 1811–1841 (1994)
B. Meyer, Object-Oriented Software Construction, 2nd edn. (Prentice Hall, New Jersey, 1997)
Microsoft Corp., Spec#, http://research.microsoft.com/specsharp/
R. Monahan, R. Leino, Program verification using the Spec# programming systems, ECOOP 2009 Tutorial, http://www.rosemarymonahan.com/specsharp/papers/ECOOPTutorial.pdf
Author information
Authors and Affiliations
Rights 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)