A transactional model for automatic exception handling

Software reliability and error handling are concepts that any programmer knows and deals with on a daily basis. Even so, studies suggest that the current approach to exception handling raises fundamental incompatibilities with object-oriented concepts, being a major cause for the lack of quality on error handling code. In this paper, we propose an exception handling model that makes the runtime environment responsible for automatically dealing with abnormal situations. The platform provides a number of benign recovery actions that are able to deal automatically with most common exception types. Whenever an exception is raised, and a benign recovery method can be found, code is re-executed from a clean transactional state. In this approach try blocks not only represent a nesting level where a fault can occur but also a block that can be re-executed transactionally as a clean slate. For validating the approach two case studies were performed. One involved providing automatic exception handling for Glassfish's Java Messaging System implementation and the other for the Hipergate CRM application. Both showed that increased robustness is possible while freeing the programmer from manually writing extensive error-handling code.

[1]  Douglas T. Ross The AED free storage package , 1967, CACM.

[2]  Ken Arnold,et al.  The Java Programming Language , 1996 .

[3]  Robert D. Tennent,et al.  Language design methods based on semantic principles , 1977, Acta Informatica.

[4]  P. Marques,et al.  Unchecked Exceptions : Can the Programmer be Trusted to Document Exceptions ? , 2006 .

[5]  Yu Chin Cheng,et al.  Exception handling: an architecture model and utility support , 2005, 12th Asia-Pacific Software Engineering Conference (APSEC'05).

[6]  Chandra Krintz,et al.  Supporting exception handling for futures in Java , 2007, PPPJ.

[7]  Francisco J. Ballesteros,et al.  TransLib: An Ada 95 Object Oriented Framework for Building Transactional Applications , 2000 .

[8]  Jean-Claude Laprie,et al.  Dependable computing: concepts, limits, challenges , 1995 .

[9]  Sriram K. Rajamani,et al.  Automatically validating temporal safety properties of interfaces , 2001, SPIN '01.

[10]  Saurabh Sinha,et al.  Analysis and Testing of Programs with Exception Handling Constructs , 2000, IEEE Trans. Software Eng..

[11]  Jörg Kienzle,et al.  Action-Oriented Exception Handling in Cooperative and Competitive Concurrent Object-Oriented Systems , 2000, Advances in Exception Handling Techniques.

[12]  Adele Goldberg,et al.  SmallTalk 80: The Language , 1989 .

[13]  Jörg Kienzle,et al.  Open multithreaded transactions: keeping threads and exceptions under control , 2001, Proceedings Sixth International Workshop on Object-Oriented Real-Time Dependable Systems.

[14]  Abraham Silberschatz,et al.  A Formal Approach to Recovery by Compensating Transactions , 1990, VLDB.

[15]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[16]  Brian Randell,et al.  Error recovery in asynchronous systems , 1986, IEEE Transactions on Software Engineering.

[17]  John B. Goodenough,et al.  Exception handling: issues and a proposed notation , 1975, CACM.

[18]  Peter A. Buhr,et al.  Synchronous and asynchronous handling of abnormal events in the μsystem , 1992, Softw. Pract. Exp..

[19]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[20]  Flaviu Cristian,et al.  Exception Handling and Software Fault Tolerance , 1982, IEEE Transactions on Computers.

[21]  Brian Randell,et al.  Software fault tolerance: t/(n-1)-variant programming , 1992 .

[22]  Gilles Motet,et al.  Design of dependable Ada software , 1995, BCS practitioner series.

[23]  Benjamin Hindman,et al.  Atomicity via source-to-source translation , 2006, MSPC '06.

[24]  Qian Cui,et al.  Data-Oriented Exception Handling , 1992, IEEE Trans. Software Eng..

[25]  Andreas Reuter,et al.  Transaction Processing: Concepts and Techniques , 1992 .

[26]  Barbara Liskov,et al.  Reliable object storage to support atomic actions , 1983, SOSP 1985.

[27]  Christof Fetzer,et al.  Automatic detection and masking of nonatomic exception handling , 2003, IEEE Transactions on Software Engineering.

[28]  Alessandro Garcia,et al.  Error handling as an aspect , 2007 .

[29]  Greg Utas Robust Communications Software: Extreme Availability, Reliability and Scalability for Carrier-Grade Systems , 2005 .

[30]  Christof Fetzer,et al.  Improving Program Correctness with Atomic Exception Handling , 2007, J. Univers. Comput. Sci..

[31]  Flaviu Cristian,et al.  Exception Handling and Tolerance of Software Faults , 1995 .

[32]  P. M. Melliar-Smith,et al.  A program structure for error detection and recovery , 1974, Symposium on Operating Systems.

[33]  Alessandro Garcia,et al.  A Quantitative Study on the Aspectization of Exception Handling , 2005 .

[34]  Valérie Issarny An exception handling mechanism for parallel object-oriented programming , 1992 .

[35]  Roy Levin Program structures for exceptional condition handling , 1977 .

[36]  Peter A. Buhr,et al.  Advanced Exception Handling Mechanisms , 2000, IEEE Trans. Software Eng..

[37]  Brian Randell,et al.  Reliability Issues in Computing System Design , 1978, CSUR.

[38]  Jørgen Lindskov Knudsen Better Exception-Handling in Block-Structured Systems , 1987, IEEE Software.

[39]  George C. Necula,et al.  Exceptional situations and program reliability , 2008, TOPL.

[40]  Richard W. Hamming,et al.  Error detecting and error correcting codes , 1950 .

[41]  Rebecca Wirfs-Brock Toward Exception-Handling Best Practices and Patterns , 2006, IEEE Software.

[42]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[43]  Michael Woodger,et al.  On Semantic Levels in Programming , 1971, IFIP Congress.

[44]  Jean Arlat,et al.  Definition and analysis of hardware- and software-fault-tolerant architectures , 1990, Computer.

[45]  Alan Griffiths Exception Handling in C++: Here be Dragons , 2004 .

[46]  Solomon W. Golomb,et al.  Backtrack Programming , 1965, JACM.

[47]  Leonardo Mariani,et al.  In-field healing of integration problems with COTS components , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[48]  Bjarne Stroustrup,et al.  The Design and Evolution of C , 1994 .

[49]  Yves Caseau Étude et réalisation d'un langage objet : lore , 1987 .

[50]  Alexander Romanovsky On Structuring Cooperative and Competitive Concurrent Systems , 1999, Comput. J..

[51]  J. Gregory Morrisett,et al.  Composing first-class transactions , 1994, TOPL.

[52]  Hina Shah,et al.  Why do developers neglect exception handling? , 2008, WEH '08.

[53]  Donald E. Eastlake ITS Status Report , 1972 .

[54]  Chandra Krintz,et al.  Language and Virtual Machine Support for Efficient Fine-Grained Futures in Java , 2007, 16th International Conference on Parallel Architecture and Compilation Techniques (PACT 2007).

[55]  R. Keithscott Fault-Tolerant SoFtware Reliability Modeling , 1987 .

[56]  Paulo Marques,et al.  Exception Handling: A Field Study in Java and .NET , 2007, ECOOP.

[57]  Anand R. Tripathi,et al.  Issues with Exception Handling in Object-Oriented Systems , 1997, ECOOP.

[58]  Avelino Francisco Zorzo,et al.  Frameworks for designing and implementing dependable systems using Coordinated Atomic Actions: A comparative study , 2009, J. Syst. Softw..

[59]  Markus Dahm,et al.  Byte Code Engineering , 1999, Java-Informations-Tage.

[60]  Kai Li,et al.  Memory Exclusion: Optimizing the Performance of Checkpointing Systems , 1999, Softw. Pract. Exp..

[61]  Robert DeLine,et al.  Enforcing high-level protocols in low-level software , 2001, PLDI '01.

[62]  Vivek Sarkar,et al.  X10: an object-oriented approach to non-uniform cluster computing , 2005, OOPSLA '05.

[63]  Alan Snyder,et al.  Exception Handling in CLU , 1979, IEEE Transactions on Software Engineering.

[64]  Guy L. Steele,et al.  The evolution of Lisp , 1993, HOPL-II.

[65]  Jonathan Aldrich,et al.  Practical Exception Specifications , 2006, Advanced Topics in Exception Handling Techniques.

[66]  Paulo Marques,et al.  Implementing Retry - Featuring AOP , 2009, 2009 Fourth Latin-American Symposium on Dependable Computing.

[67]  Cecília M. F. Rubira,et al.  Exceptions and aspects: the devil is in the details , 2006, SIGSOFT '06/FSE-14.

[68]  Jean Arlat,et al.  Architectural Issues in Software Fault Tolerance , 1995 .

[69]  Victor Luchangco,et al.  The Fortress Language Specification Version 1.0 , 2007 .

[70]  Bjarne Steensgaard,et al.  Integrating support for undo with exception handling , 2004 .

[71]  Ole Lehrmann Madsen,et al.  Object-oriented programming in the BETA programming language , 1993 .

[72]  Antony L. Hosking,et al.  Nested transactional memory: Model and architecture sketches , 2006, Sci. Comput. Program..

[73]  Alberto Manuel Fernández Álvarez,et al.  Extending object-oriented languages with backward error recovery integrated support , 2010, Comput. Lang. Syst. Struct..

[74]  Saurabh Sinha,et al.  Criteria for testing exception-handling constructs in Java programs , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[75]  George Radin,et al.  The early history and characteristics of PL/I , 1978, SIGP.

[76]  Mary Lou Soffa,et al.  Influences on the design of exception handling ACM SIGSOFT project on the impact of software engineering research on programming language design , 2003, ACM SIGSOFT Softw. Eng. Notes.

[77]  Pankaj Jalote,et al.  Fault tolerance in distributed systems , 1994 .

[78]  Cecília M. F. Rubira,et al.  A comparative study of exception handling mechanisms for building dependable object-oriented software , 2001, J. Syst. Softw..

[79]  C. A. R. Hoare Parallel programming: an axiomatic approach , 1975, Language Hierarchies and Interfaces.

[80]  Hina Shah,et al.  Visualization of exception handling constructs to support program understanding , 2008, SoftVis '08.

[81]  Shigeru Chiba,et al.  Load-Time Structural Reflection in Java , 2000, ECOOP.

[82]  Daniel M. Berry,et al.  A modular verifiable exception handling mechanism , 1985, TOPL.

[83]  Barbara Liskov,et al.  Distributed programming in Argus , 1988, CACM.

[84]  David M. Papurt The Use of Exceptions , 1998, J. Object Oriented Program..

[85]  Cristina V. Lopes,et al.  A study on exception detection and handling using aspect-oriented programming , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[86]  Narain H. Gehani,et al.  Exceptional C or C with exceptions , 1992, Softw. Pract. Exp..

[87]  Stephen N. Zilles,et al.  Programming with abstract data types , 1974, SIGPLAN Symposium on Very High Level Languages.

[88]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[89]  Paulo Marques,et al.  Making Exception Handling Work , 2006, HotDep.

[90]  Mauro Pezzè,et al.  Testing object-oriented software , 2004, Proceedings. 26th International Conference on Software Engineering.

[91]  Reino Kurki-Suonio,et al.  Liberating Object-Oriented Modeling from Programming-Level Abstractions , 1997, ECOOP Workshops.

[92]  Barbara Liskov,et al.  A design methodology for reliable software systems , 1972, AFIPS '72 (Fall, part I).

[93]  Milo M. K. Martin,et al.  Subtleties of transactional memory atomicity semantics , 2006, IEEE Computer Architecture Letters.

[94]  Cristina V. Lopes,et al.  Recent Developments in Aspect , 1998, ECOOP Workshops.

[95]  Jørgen Lindskov Knudsen Exception handling—A static approach , 1984, Softw. Pract. Exp..

[96]  Andrew M. Kuhn,et al.  Code Complete , 2005, Technometrics.

[97]  Rogério de Lemos,et al.  Exception handling in the software lifecycle , 2001, Comput. Syst. Sci. Eng..

[98]  Edsger W. Dijkstra,et al.  The structure of the “THE”-multiprogramming system , 1968, CACM.

[99]  Flaviu Cristian A Recovery Mechanism for Modular Software , 1979, ICSE.

[100]  B. Randell,et al.  The Origins of Digital Computers: Selected Papers (Monographs in Computer Science) , 1982 .

[101]  Scott Nettles,et al.  Transactions for Java , 1998, Proceedings of the 1998 International Conference on Computer Languages (Cat. No.98CB36225).

[102]  Cecília M. F. Rubira,et al.  Fault tolerance in concurrent object-oriented software through coordinated error recovery , 1995, Twenty-Fifth International Symposium on Fault-Tolerant Computing. Digest of Papers.

[103]  Michel Riveill,et al.  The Guide Language , 1994, Comput. J..

[104]  Thomas J. Mowbray,et al.  AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis , 1998 .

[105]  Jörg Kienzle,et al.  Combining tasking and transactions, part II: open multithreaded transactions , 2001 .

[106]  Ivar Jacobson,et al.  Object Design: Roles, Responsibilities, and Collaborations , 2002 .

[107]  John McCarthy,et al.  LISP 1.5 Programmer's Manual , 1962 .

[108]  Brian Randell,et al.  System structure for software fault tolerance , 1975, IEEE Transactions on Software Engineering.

[109]  Harald Winroth,et al.  Exception handling in C , 1993 .

[110]  Anand R. Tripathi,et al.  The guardian model for exception handling in distributed systems , 2002, 21st IEEE Symposium on Reliable Distributed Systems, 2002. Proceedings..

[111]  David B. Stewart,et al.  A study of the applicability of existing exception-handling techniques to component-based real-time software technology , 1998, TOPL.

[112]  Kunle Olukotun,et al.  The Atomos transactional programming language , 2006, PLDI '06.

[113]  Paulo Marques,et al.  A Case for Automatic Exception Handling , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[114]  Martin P. Robillard,et al.  Designing robust Java programs with exceptions , 2000, SIGSOFT '00/FSE-8.

[115]  David Chenho Kung,et al.  Testing Object-Oriented Software , 1998 .

[116]  Avelino Francisco Zorzo,et al.  CAA-DRIP: a framework for implementing Coordinated Atomic Actions , 2006, 2006 17th International Symposium on Software Reliability Engineering.

[117]  Jie Xu,et al.  From Recovery Blocks to Concurrent Atomic Actions , 2003 .

[118]  Eike Best,et al.  Semantics of sequential and parallel programs , 1996, Prentice Hall International series in computer science.

[119]  Robert H. Halstead,et al.  MULTILISP: a language for concurrent symbolic computation , 1985, TOPL.

[120]  Jean Arlat,et al.  Hardware- and Software-Fault Tolerance , 1990 .

[121]  José Alves Marques,et al.  Customizable Object Recovery Pattern , 2007 .

[122]  W. Y. Russell Mok Concurrent abnormal event handling mechanisms , 1997 .

[123]  Edsger W. Dijkstra,et al.  Structured programming , 1972, A.P.I.C. Studies in data processing.