Dependency safety for Java - implementing failboxes

D. Bosnacki, M.G.J. van den Brand, P.E.J.G. Denissen, C. Huizing, B. Jacobs, R. Kuiper, A.J. Wijs, Maciej Wiłkowski, D. Zhang

Research output: Chapter in Book/Report/Conference proceedingConference contributionAcademicpeer-review

5 Downloads (Pure)

Abstract

Exception mechanisms help to ensure that a program satisfies the important robustness criterion of dependency safety: if an operation fails, no code that depends on the operation's successful completion is executed anymore nor will wait for the completion. However, the exception handling mechanisms available in languages like Java do not provide a structured way to achieve dependency safety. The language extension failbox provides dependency safety for Java in a compositional manner. So far, there only exists an implementation of failbox in Scala. It requires the assumption of absence of asynchronous exceptions inside the failbox code. In this paper, we are the first to provide an implementation without the above mentioned assumption, this time in Java. First, we present and discuss a direct reimplementation of failbox in Java that is still restricted. Then, we show that using uncaught exception handlers the earlier assumption can be essentially weakened to only concern code before setting the thread handler. Finally, we provide an implementation using the Java native interface that completely removes the assumption.
Original languageEnglish
Title of host publicationPPPJ '16 Proceedings of the 13th International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools
Place of PublicationNew York
PublisherAssociation for Computing Machinery, Inc
Number of pages6
ISBN (Print)978-1-4503-4135-6
DOIs
Publication statusPublished - 2016
EventPPPJ '16 - 13th International Conference on Principles and Practices of Programming on the Java Platform: virtual machines, languages, and tools - Laguno , Switzerland
Duration: 29 Aug 20162 Sep 2016

Conference

ConferencePPPJ '16 - 13th International Conference on Principles and Practices of Programming on the Java Platform: virtual machines, languages, and tools
CountrySwitzerland
CityLaguno
Period29/08/162/09/16

Cite this

Bosnacki, D., van den Brand, M. G. J., Denissen, P. E. J. G., Huizing, C., Jacobs, B., Kuiper, R., ... Zhang, D. (2016). Dependency safety for Java - implementing failboxes. In PPPJ '16 Proceedings of the 13th International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools [15] New York: Association for Computing Machinery, Inc. https://doi.org/10.1145/2972206.2972216