ACM Home Page
Please provide us with feedback. Feedback
Combining the robustness of checked exceptions with the flexibility of unchecked exceptions using anchored exception declarations
Full text PdfPdf (305 KB)
Source Conference on Object Oriented Programming Systems Languages and Applications archive
Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications table of contents
San Diego, CA, USA
SESSION: Exceptional exceptions table of contents
Pages: 455 - 471  
Year of Publication: 2005
ISBN:1-59593-031-0
Also published in ...
Authors
Marko van Dooren  University of Leuven, Leuven, Belgium
Eric Steegmans  University of Leuven, Leuven, Belgium
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 9,   Downloads (12 Months): 66,   Citation Count: 4
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1094811.1094847
What is a DOI?

ABSTRACT

Ever since their invention 30 years ago, checked exceptions have been a point of much discussion. On the one hand, they increase the robustness of software by preventing the manifestation of unanticipated checked exceptions at run-time. On the other hand, they decrease the adaptability of software because they must be propagated explicitly, and must often be handled even if they cannot be signalled.We show that the problems with checked exceptions are caused by a lack of expressiveness of the exceptional return type of a method, which currently dictates a copy & paste style. We add the required expressiveness by introducing anchored exception declarations, which allow the exceptional behavior of a method to be declared relative to that of others. We present the formal semantics of anchored exception declarations, along with the necessary rules for ensuring compile-time safety, and give a proof of soundness. We show that anchored exception declarations do not violate the principle of information hiding when used properly, and provide a guideline for when to use them.We have implemented anchored exception declarations in Cappuccino, which is an extension to the ClassicJava programming language.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
J. Aldrich and K. Donnelly. Selective open recursion: Modular reasoning about components and inheritance. In Proc. FSE 2004 Workshop on Specification and Verification of Component-Based Systems.
2
 
3
M. Barnett, K. R. M. Leino, and W. Schulte. The Spec# programming system: An overview. In CASSIS 2004 proceedings, 2004.
 
4
5
 
6
7
8
 
9
ECMA Technical Committee 39 (TC39) Task Group 2 (TG2). C# Language Specification. ECMA, 2 edition, December 2002.
 
10
 
11
M. Fähndrich and A. Aiken. Refined type inference for ML. In Proceedings of the 1st Workshop on Types in Compilation, June 1997.
 
12
13
 
14
 
15
16
17
 
18
 
19
J. Guzmán and A. Suárez. An Extended Type System for Exceptions. In Record of the fifth ACM SIGPLAN workshop on ML and its Applications, June 1994. Also appears as Research Report 2265, INRIA, BP 105 - 78153 Le Chesnay Cedex, France.
 
20
A. Hejlsberg. The trouble with checked exceptions. http://www.artima.com/intv/handcuffs.html.
21
22
 
23
 
24
25
26
 
27
G. T. Leavens, A. L. Baker, and C. Ruby. Preliminary design of JML: A behavioral interface specification language for Java. Technical Report 98-06i, 2000.
 
28
 
29
M. Lippert and C. Lopes. A study on exception detection and handling using aspect-oriented programming. Technical report, Xerox PARC, 1999.
 
30
 
31
 
32
 
33
B. Meyer. Overloading vs. object technology. Journal of Object-Oriented Programming, October 2001.
 
34
 
35
R. Miller and A. Tripathi. Issues with exception handling in object-oriented systems. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP '97), volume 1241 of LNCS, page 85, Jyväskylä, Finland, June 1997. Springer.
 
36
37
 
38
39
40
41
42
 
43
 
44
 
45
 
46
 
47
N. Smeets and M. van Dooren. Jnome, 2004. http://www.jnome.org.
48
 
49
M. van Dooren and E. Steegmans. Combining the robustness of checked exceptions with the flexibility of unchecked exceptions using anchored exception declarations. Technical Report CW 407, Katholieke Universiteit Leuven, March 2005.
 
50
 
51
W. Winston. Operations Research: Applications and Algorithms. Duxbury, 2003.
52
53
 
54
K. Yi. Compile-time detection of uncaught exceptions in standard ML programs. In The 1st International Static Analysis Symposium, volume 864 of Lecture Notes in Computer Science, pages 238--254, Namur, September 1994.
 
55
 
56


Collaborative Colleagues:
Marko van Dooren: colleagues
Eric Steegmans: colleagues