Skip to main content

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4119))

  • 514 Accesses

Abstract

Exception specifications can aid in the tasks of writing correct exception handlers and understanding exceptional control flow, but current exception specification systems are impractical in a number of ways. In particular, they are too low-level, too heavyweight, and do not provide adequate support for describing exception policies.

We have identified the essential properties of a practical exception specification system and we present a methodology and tool that provides integrated support for specifying understanding, and evolving exception policies. The annotations required of the programmer are lightweight and easier to maintain than those of current systems; in our studies we observed a 50% to 93% reduction in annotations. By leveraging these annotations, our system provides scalable support for understanding exception flow and for modifying exception annotations.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# programming system. In: Huisman, M. (ed.) Cassis International Workshop (2004)

    Google Scholar 

  2. Bloch, J.: Effective Java. Addison-Wesley Professional, Reading (2001)

    Google Scholar 

  3. Dony, C.: A fully object-oriented exception handling system: rationale and Smalltalk implementation. In: Advances in exception handling techniques, pp. 18–38. Springer, New York (2001)

    Chapter  Google Scholar 

  4. Eckel, B.: Thinking in Java, 3rd edn. Prentice-Hall PTR, Englewood Cliffs (2002)

    Google Scholar 

  5. Flanagan, C., Leino, K., Lillibridge, M., Nelson, C., Saxe, J., Stata, R.: Extended static checking for Java. In: Proceedings of PLDI 2002 (2002)

    Google Scholar 

  6. Fu, C., Milanova, A., Ryder, B., Wonnacott, D.: Robustness testing of Java server applications. In: IEEE Transactions on Software Engineering, pp. 292–312 (April 2005)

    Google Scholar 

  7. Garcia, A.F., Rubira, C.M.F., Romanovsky, A.B., Xu, J.: A comparative study of exception handling mechanisms for building dependable object-oriented software. Journal of Systems and Software 59(2), 197–222 (2001)

    Article  Google Scholar 

  8. Gosling, J., Joy, B., Steele, G., Bracha, G.: Java(TM) Language Specification, 3rd edn. Java Series. Addison-Wesley Professional, Reading (2005)

    Google Scholar 

  9. Grothoff, C., Palsberg, J., Vitek, J.: Encapsulating objects with confined types. In: Proceedings of the 16th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2001), pp. 241–255. ACM Press, New York (2001)

    Chapter  Google Scholar 

  10. Horton, A.: Why doesn’t C# have exception specifications? Available at: http://msdn.microsoft.com/vcsharp/team/language/ask/exceptionspecs

  11. Jo, J., Byeong-Mo, C., Yi, K., Kwang-Moo, C.: An uncaught exception analysis for Java. Journal of Systems and Software (2004)

    Google Scholar 

  12. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–353. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  13. Kiniry, J.R.: Exceptions in Java and Eiffel: Two extremes in exception design and application. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743. Springer, Heidelberg (2003)

    Google Scholar 

  14. Knudsen, J.L.: Fault tolerance and exception handling in BETA. In: Advances in exception handling techniques, pp. 1–17. Springer, New York (2001)

    Chapter  Google Scholar 

  15. Leino, K.R.M., Schulte, W.: Exception safety for C#. In: SEFM, pp. 218–227. IEEE Computer Society, Los Alamitos (2004)

    Google Scholar 

  16. Lippert, M., Lopes, C.V.: A study on exception detecton and handling using aspect-oriented programming. In: Proceedings of the 22nd International Conference on Software Engineering (ICSE 2000), pp. 418–427. ACM Press, New York (2000)

    Chapter  Google Scholar 

  17. Litke, J.D.: A systematic approach for implementing fault tolerant software designs in Ada. In: Proceedings of the conference on TRI-ADA 1990, pp. 403–408. ACM Press, New York (1990)

    Chapter  Google Scholar 

  18. Miller, R., Tripathi, A.R.: Issues with Exception Handling in Object-Oriented Systems. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 85–103. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  19. Reimer, D., Srinivasan, H.: Analyzing exception usage in large Java applications. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743. Springer, Heidelberg (2003)

    Google Scholar 

  20. Robillard, M.P.: Personal communication (May 2005)

    Google Scholar 

  21. Robillard, M.P., Murphy, G.C.: Designing robust Java programs with exceptions. In: FSE 2000, pp. 2–10. ACM Press, New York (2000)

    Google Scholar 

  22. Robillard, M.P., Murphy, G.C.: Static analysis to support the evolution of exception structure in object-oriented systems. ACM Trans. Softw. Eng. Methodol. 12(2), 191–221 (2003)

    Article  Google Scholar 

  23. Sinha, S., Orso, A., Harrold, M.J.: Automated support for development, maintenance, and testing in the presence of implicit control flow. In: Proceedings of the 26th International Conference on Software Engineering (ICSE 2004), pp. 336–345. IEEE Computer Society, Los Alamitos (2004)

    Chapter  Google Scholar 

  24. Venners, B.: Interface Design: Best Practices in Object-Oriented API Design in Java (2001), Available at: http://www.artima.com/interfacedesign

  25. Venners, B.: Failure and exceptions: a conversation with James Gosling, Part II (September 2003), Available at: http://www.artima.com/intv/solid.html

  26. Venners, B., Eckel, B.: The trouble with checked exceptions: A conversation with Anders Hejlsberg, Part II (August 2003), Available at: http://www.artima.com/intv/handcuffs.html

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Malayeri, D., Aldrich, J. (2006). Practical Exception Specifications. In: Dony, C., Knudsen, J.L., Romanovsky, A., Tripathi, A. (eds) Advanced Topics in Exception Handling Techniques. Lecture Notes in Computer Science, vol 4119. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11818502_11

Download citation

  • DOI: https://doi.org/10.1007/11818502_11

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-37443-5

  • Online ISBN: 978-3-540-37445-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics