A Specification Logic for Exceptions and Beyond

  • Cristian Gherghina
  • Cristina David
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6252)

Abstract

Exception handling is an important language feature for building more robust software programs. It is primarily concerned with capturing abnormal events, with the help of catch handlers for supporting recovery actions. In this paper, we advocate for a specification logic that can uniformly handle exceptions, program errors and other kinds of control flows. Our logic treats exceptions as possible outcomes that could be later remedied, while errors are conditions that should be avoided by user programs. This distinction is supported through a uniform mechanism that captures static control flows (such as normal execution) and dynamic control flows (such as exceptions) within a single formalism. Following Stroustrup’s definition [15,9], our verification technique could ensure exception safety in terms of four guarantees of increasing quality, namely no-leak guarantee, basic guarantee, strong guarantee and no-throw guarantee.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Beckert, B., Hähnle, R., Schmitt, P.H. (eds.): Verification of Object-Oriented Software. LNCS, vol. 4334. Springer, Heidelberg (2007)Google Scholar
  2. 2.
    Blume, M., Acar, U.A., Chae, W.: Exception handlers as extensible cases. In: Ramalingam, G. (ed.) APLAS 2008. LNCS, vol. 5356, pp. 273–289. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  3. 3.
    David, C., Gherghina, C., Chin, W.N.: Translation and optimization for a core calculus with exceptions. In: ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation. ACM Press, New York (2009)Google Scholar
  4. 4.
    Fähndrich, M., Aiken, A.: Program analysis using mixed term and set constraints. In: Van Hentenryck, P. (ed.) SAS 1997. LNCS, vol. 1302, pp. 114–126. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  5. 5.
    Goodenough, J.B.: Structured exception handling. In: POPL 1975: Proceedings of the 2nd ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pp. 204–224. ACM, New York (1975)Google Scholar
  6. 6.
    Jo, J.-W., Chang, B.-M., Yi, K., Choe, K.-M.: An uncaught exception analysis for Java. Journal of Systems and Software 72(1), 59–69 (2004)CrossRefGoogle Scholar
  7. 7.
    Rustan, K., Leino, M., Schulte, W.: Exception Safety for C#. In: SEFM 2004: Proceedings of the Software Engineering and Formal Methods, Second International Conference, Washington, DC, USA, pp. 218–227. IEEE Computer Society, Los Alamitos (2004)CrossRefGoogle Scholar
  8. 8.
    Leino, R.: Personal Communication (January 2009)Google Scholar
  9. 9.
    Li, X., Hoover, H.J., Rudnicki, P.: Towards automatic exception safety verification. In: FM, pp. 396–411 (2006)Google Scholar
  10. 10.
    Maxion, R.A., Olszewski, R.T.: Improving software robustness with dependability cases. In: 28th International Symposium on Fault Tolerant Computing, pp. 346–355 (1998)Google Scholar
  11. 11.
    Nguyen, H.H., David, C., Qin, S.C., Chin, W.N.: Automated Verification of Shape And Size Properties via Separation Logic. In: Cook, B., Podelski, A. (eds.) VMCAI 2007. LNCS, vol. 4349, pp. 251–266. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  12. 12.
    Pugh, W.: The Omega Test: A fast practical integer programming algorithm for dependence analysis. Communications of the ACM 8, 102–114 (1992)CrossRefGoogle Scholar
  13. 13.
    Reynolds, J.: Separation Logic: A Logic for Shared Mutable Data Structures. In: IEEE LICS, Copenhagen, Denmark, pp. 55–74 (July 2002)Google Scholar
  14. 14.
    Shivers, O., Fisher, D.: Multi-return function call. In: ICFP 2004: Proceedings of the Ninth ACM SIGPLAN International Conference on Functional Programming, pp. 79–89. ACM, New York (2004)CrossRefGoogle Scholar
  15. 15.
    Stroustrup, B.: Exception safety: Concepts and techniques. In: Advances in Exception Handling Techniques, pp. 60–76 (2000)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Cristian Gherghina
    • 1
  • Cristina David
    • 1
  1. 1.Department of Computer ScienceNational University of SingaporeSingapore

Personalised recommendations