skip to main content
10.1145/2972206.2972216acmotherconferencesArticle/Chapter ViewAbstractPublication PagespppjConference Proceedingsconference-collections
research-article

Dependency Safety for Java: Implementing Failboxes

Authors Info & Claims
Published:29 August 2016Publication History

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.

References

  1. J. Armstrong. Making Reliable Distributed Systems in the Presence of Software Errors. PhD thesis, Royal Institute of Technology, Stockholm, Sweden, 2003.Google ScholarGoogle Scholar
  2. M. Bagherzadeh, H. Rajan, and M. A. D. Darab. On Exceptions, Events and Observer Chains. In AOSD, pages 185--196, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. D. Bošnački, M. van den Brand, J. Gabriels, B. Jacobs, R. Kuiper, S. Roede, A. Wijs, and D. Zhang. Towards Modular Verification of Threaded Concurrent Executable Code Generated from DSL Models. In Formal Aspects of Component Software - 12th International Conference, FACS 2015, Niterói, Brazil, October 14-16, 2015, pages 141--160, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. P. Felber, C. Fetzer, V. Gramoli, D. Harmanci, and M. Nowack. Safe Exception Handling with Transactional Memory. In Transactional Memory. Foundations, Algorithms, Tools, and Applications, pages 245--267, 2015.Google ScholarGoogle Scholar
  5. C. Fetzer, K. Högstedt, and P. Felber. Automatic Detection and Masking of Non-Atomic Exception Handling. In 2003 International Conference on Dependable Systems and Networks, 22-25 June 2003, San Francisco, CA, USA, pages 445--454, 2003.Google ScholarGoogle Scholar
  6. J. Gosling, B. Joy, G. Steele, G. Bracha, and A. Buckley. The Java Language Specification. Java SE 8 Edition, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. B. Jacobs. Provably Live Exception Handling. In Proceedings of the 17th Workshop on Formal Techniques for Java-like Programs, Prague, Czech Republic, July 7, 2015, pages 7:1--7:4, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. B. Jacobs, D. Bosnacki, and R. Kuiper. Modular Termination Verification: Extended Version. Cw reports, Katholieke Universiteit Leuven, 2015.Google ScholarGoogle Scholar
  9. B. Jacobs, P. Müller, and F. Piessens. Sound Reasoning about Unchecked Exceptions. In Proceedings ICFEM, 2007.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. B. Jacobs and F. Piessens. Failboxes: Provably Safe Exception Handling. In ECOOP, pages 470--494. Springer, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. G. Lagorio and M. Servetto. Strong Exception-Safety for Checked and Unchecked Exceptions. Journal of Object Technology, 10(1):1--20, 2011.Google ScholarGoogle Scholar
  12. N. D. Matsakis and T. R. Gross. Handling Errors in Parallel Programs Based on Happens Before Relations. In 24th IEEE International Symposium on Parallel and Distributed Processing, Atlanta, Georgia, USA, 19-23 April 2010, pages 1--8, 2010.Google ScholarGoogle Scholar
  13. H. Rebêlo, R. Coelho, R. M. F. Lima, G. T. Leavens, M. Huisman, A. Mota, and F. Castor. On the Interplay of Exception Handling and Design by Contract: An Aspect-Oriented Recovery Approach. In Proceedings of the 13th Workshop on Formal Techniques for Java-Like Programs, Lancaster, United Kingdom, July 25-29, 2011, pages 7:1--7:6, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. N. Shavit and D. Touitou. Software Transactional Memory. In Proceedings of the Fourteenth Annual ACM Symposium on Principles of Distributed Computing, Ottawa, Canada, August 20-23, 1995, pages 204--213, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Toub. Keep Your Code Running with the Reliability Features of the .NET Framework. MSDN Magazine, October 2015.Google ScholarGoogle Scholar
  16. D. Zhang, D. Bošnački, M. van den Brand, L. Engelen, C. Huizing, R. Kuiper, and A. Wijs. Towards Verified Java Code Generation from Concurrent State Machines. In AMT@ MoDELS, pages 64--69, 2014.Google ScholarGoogle Scholar

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in
  • Published in

    cover image ACM Other conferences
    PPPJ '16: Proceedings of the 13th International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools
    August 2016
    186 pages
    ISBN:9781450341356
    DOI:10.1145/2972206

    Copyright © 2016 ACM

    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 29 August 2016

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • research-article
    • Research
    • Refereed limited

    Acceptance Rates

    PPPJ '16 Paper Acceptance Rate14of31submissions,45%Overall Acceptance Rate29of58submissions,50%

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader