Abstract
This chapter serves as an introduction to formal specifications. In Sect. 5.1 we reconsider in greater detail, but still on a fairly general level, the basic building blocks of formal specification—pre- and postconditions, invariants, and modifies clauses—that have already been informally introduced in Sect. 1.3. The next two sections then show how these notions can be formulated in two popular specification languages, OCL and JML. A short comparison between the two languages in Section 5.4 concludes this chapter.
Methodological questions like: How should operation contracts be inherited by subclasses? At which system states are invariants required to hold? How can modular specification and verification be effected? will be postponed till Chapter 8.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Editor information
Rights and permissions
Copyright information
© 2007 Springer Berlin Heidelberg
About this chapter
Cite this chapter
Roth, A., Schmitt, P.H. (2007). Formal Specification. In: Beckert, B., Hähnle, R., Schmitt, P.H. (eds) Verification of Object-Oriented Software. The KeY Approach. Lecture Notes in Computer Science(), vol 4334. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69061-0_5
Download citation
DOI: https://doi.org/10.1007/978-3-540-69061-0_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-68977-5
Online ISBN: 978-3-540-69061-0
eBook Packages: Computer ScienceComputer Science (R0)