Abstract
The Eiffel exception mechanism supports two methodological aspects. First, a method specification by a pre- and postcondition also determines when the method exits exceptionally, namely when the stated postcondition cannot be satisfied. Secondly, the rescue and retry statements combine catching an exception with a loop structure, thus requiring a dedicated form of correctness reasoning. We present verification rules for total correctness that take these two aspects into account. The rules handle normal loops and retry loop structures in an analogous manner. They also allow the Eiffel’s mechanism to be slightly generalized. The verification rules are derived from a definition of statements by higher-order predicate transformers and have been checked with a theorem prover.
Keywords
- Program Expression
- High Order Logic
- Exception Handling
- Total Correctness
- Normal Loop
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
This is a preview of subscription content, access via your institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Eiffel: Analysis, Design and Programming Language, 2nd edn. Standard ECMA-367. Ecma International (June 2006)
Back, R.-J., von Wright, J.: Refinement Calculus: A Systematic Introduction. Springer (1998)
Back, R.J.R., von Wright, J.: Reasoning algebraically about loops. Acta Informatica 36(4), 295–334 (1999)
Bowen, J., Gordon, M.: A shallow embedding of Z in HOL. Information and Software Technology 37(5-6), 269–276 (1995)
Buhr, P.A., Russell Mok, W.Y.: Advanced exception handling mechanisms. IEEE Transactions on Software Engineering 26(9), 820–836 (2000)
Cohen, E.: Separation and Reduction. In: Backhouse, R., Oliveira, J.N. (eds.) MPC 2000. LNCS, vol. 1837, pp. 45–59. Springer, Heidelberg (2000)
Cristian, F.: Correct and robust programs. IEEE Transactions on Software Engineering 10(2), 163–174 (1984)
Gordon, M.J.C.: Mechanizing programming logics in higher order logic. In: Birtwistle, G., Subrahmanyam, P.A. (eds.) Current Trends in Hardware Verification and Automated Theorem Proving, pp. 387–439. Springer, New York (1989)
Harrison, J.: HOL Light tutorial (for version 2.20). Technical report, Intel JF1-13 (January 2011)
Jacobs, B.: A Formalisation of Java’s Exception Mechanism. In: Sands, D. (ed.) ESOP 2001. LNCS, vol. 2028, pp. 284–301. Springer, Heidelberg (2001)
King, S., Morgan, C.: Exits in the refinement calculus. Formal Aspects of Computing 7(1), 54–76 (1995)
Leavens, G.T., Baker, A.L., Ruby, C.: Preliminary design of JML: a behavioral interface specification language for Java. SIGSOFT Software Engineering Notes 31, 1–38 (2006)
Leino, K.R.M., van de Snepscheut, J.L.A.: Semantics of exceptions. In: Olderog, E.-R. (ed.) PROCOMET 1994: Proceedings of the IFIP TC2/WG2.1/WG2.2/WG2.3 Working Conference on Programming Concepts, Methods and Calculi. IFIP Transactions A-56, pp. 447–466. North-Holland Publishing Co., Amsterdam (1994)
Rustan, M., Leino, K., Schulte, W.: Exception safety for C#. In: Software Engineering and Formal Methods, SEFM 2004, pp. 218–227. IEEE Computer Society (2004)
Liskov, B., Guttag, J.: Program Development in Java: Abstraction, Specification, and Object-Oriented Design. Addison-Wesley Longman Publishing Co., Boston (2000)
Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice-Hall, Inc., Upper Saddle River (1997)
Nordio, M., Calcagno, C., Müller, P., Meyer, B.: A Sound and Complete Program Logic for Eiffel. In: Oriol, M., Meyer, B. (eds.) TOOLS EUROPE 2009. LNBIP, vol. 33, pp. 195–214. Springer, Heidelberg (2009)
von Oheimb, D.: Analyzing Java in Isabelle/HOL: Formalization, Type Safety and Hoare Logic. PhD thesis, Technische Universität München (2001)
Sekerinski, E.: Exceptions for dependability. In: Petre, L., Sere, K., Troubitsyna, E. (eds.) Dependability and Computer Engineering: Concepts for Software-Intensive Systems—a Handbook on Dependability Research, pp. 11–35. IGI Global (2011)
Sekerinski, E., Zhang, T.: Partial correctness for exception handling. In: Bonakdarpour, B., Maibaum, T. (eds.) Proceedings of the 2nd International Workshop on Logical Aspects of Fault-Tolerance, pp. 116–132 (June 2011)
Tschannen, J., Furia, C.A., Nordio, M., Meyer, B.: Verifying Eiffel programs with Boogie. In: Rustan, K., Leino, M., Moskal, M. (eds.) First International Workshop on Intermediate Verification Languages: BOOGIE 2011. CADE 23 Workshop, pp. 14–26 (2011)
von Wright, J.: Towards a refinement algebra. Science of Computer Programming 51(1-2), 23–45 (2004); Mathematics of Program Construction (MPC 2002)
Wildmoser, M., Nipkow, T.: Certifying Machine Code Safety: Shallow Versus Deep Embedding. In: Slind, K., Bunker, A., Gopalakrishnan, G.C. (eds.) TPHOLs 2004. LNCS, vol. 3223, pp. 305–320. Springer, Heidelberg (2004)
Yemini, S., Berry, D.M.: A modular verifiable exception handling mechanism. ACM Trans. Program. Lang. Syst. 7(2), 214–243 (1985)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Sekerinski, E., Zhang, T. (2012). Verification Rules for Exception Handling in Eiffel. In: Gheyi, R., Naumann, D. (eds) Formal Methods: Foundations and Applications. SBMF 2012. Lecture Notes in Computer Science, vol 7498. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-33296-8_14
Download citation
DOI: https://doi.org/10.1007/978-3-642-33296-8_14
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-33295-1
Online ISBN: 978-3-642-33296-8
eBook Packages: Computer ScienceComputer Science (R0)
