Exception handling and object-oriented programming: towards a synthesis
OOPSLA/ECOOP '90 Proceedings of the European conference on object-oriented programming on Object-oriented programming systems, languages, and applications
Eiffel: the language
Proceedings of the fourteenth annual ACM symposium on Principles of distributed computing
Programming languages as operating systems (or revenge of the son of the lisp machine)
Proceedings of the fourth ACM SIGPLAN international conference on Functional programming
Asynchronous exceptions in Haskell
Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation
Extended static checking for Java
PLDI '02 Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation
Journal of Systems and Software
Java Virtual Machine Specification
Java Virtual Machine Specification
Kill-safe synchronization abstractions
Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation
IEEE Software
Finding and preventing run-time error handling mistakes
OOPSLA '04 Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Luna: a flexible Java protection system
OSDI '02 Proceedings of the 5th symposium on Operating systems design and implementationCopyright restrictions prevent ACM from being able to make the PDFs for this conference available for downloading
IEEE Transactions on Software Engineering
Boogie: a modular reusable verifier for object-oriented programs
FMCO'05 Proceedings of the 4th international conference on Formal Methods for Components and Objects
Strong exception-safety for Java-like languages
Proceedings of the 12th Workshop on Formal Techniques for Java-Like Programs
Atomic boxes: coordinated exception handling with transactional memory
Proceedings of the 25th European conference on Object-oriented programming
On the interplay of exception handling and design by contract: an aspect-oriented recovery approach
Proceedings of the 13th Workshop on Formal Techniques for Java-Like Programs
On exceptions, events and observer chains
Proceedings of the 12th annual international conference on Aspect-oriented software development
Hi-index | 0.00 |
The primary goal of exception mechanisms is to help ensure that when an operation fails, code that depends on the operation's successful completion is not executed (a property we call dependency safety ). However, the exception mechanisms of current mainstream programming languages make it hard to achieve dependency safety, in particular when objects manipulated inside a try block outlive the try block. Many programming languages, mechanisms and paradigms have been proposed that address this issue. However, they all depart significantly from current practice. In this paper, we propose a language mechanism called failboxes. When applied correctly, failboxes have no significant impact on the structure, the semantics, or the performance of the program, other than to eliminate the executions that violate dependency safety. Specifically, programmers may create failboxes dynamically and execute blocks of code in them. Once any such block fails, all subsequent attempts to execute code in the failbox will fail. To achieve dependency safety, programmers simply need to ensure that if an operation B depends on an operation A , then A and B are executed in the same failbox. Furthermore, failboxes help fix the unsafe interaction between locks and exceptions and they enable safe cancellation and robust resource cleanup. Finally, the Fail Fast mechanism prevents liveness issues when a thread is waiting on a failed thread. We give a formal syntax and semantics of the new constructs, and prove dependency safety. Furthermore, to show that the new constructs are easy to reason about, we propose proof rules in separation logic. The theory has been machine-checked.