Accepting blame for safe tunneled exceptions

Author:

Zhang Yizhou1,Salvaneschi Guido2,Beightol Quinn1,Liskov Barbara3,Myers Andrew C.1

Affiliation:

1. Cornell University, USA

2. TU Darmstadt, Germany

3. Massachusetts Institute of Technology, USA

Abstract

Unhandled exceptions crash programs, so a compile-time check that exceptions are handled should in principle make software more reliable. But designers of some recent languages have argued that the benefits of statically checked exceptions are not worth the costs. We introduce a new statically checked exception mechanism that addresses the problems with existing checked-exception mechanisms. In particular, it interacts well with higher-order functions and other design patterns. The key insight is that whether an exception should be treated as a "checked" exception is not a property of its type but rather of the context in which the exception propagates. Statically checked exceptions can "tunnel" through code that is oblivious to their presence, but the type system nevertheless checks that these exceptions are handled. Further, exceptions can be tunneled without being accidentally caught, by expanding the space of exception identifiers to identify the exception-handling context. The resulting mechanism is expressive and syntactically light, and can be implemented efficiently. We demonstrate the expressiveness of the mechanism using significant codebases and evaluate its performance. We have implemented this new exception mechanism as part of the new Genus programming language, but the mechanism could equally well be applied to other programming languages.

Funder

U.S. Air Force

European Research Council

National Science Foundation

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference52 articles.

1. Ada 95. Ada 95 reference manual: language and standard libraries 1997. Ada 95. Ada 95 reference manual: language and standard libraries 1997.

2. Apache Commons. The Apache Commons project. https: //commons.apache.org/. Apache Commons. The Apache Commons project. https: //commons.apache.org/.

3. The DaCapo benchmarks

4. Exception analysis and points-to analysis

Cited by 5 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. With or Without You: Programming with Effect Exclusion;Proceedings of the ACM on Programming Languages;2023-08-30

2. A Type System for Effect Handlers and Dynamic Labels;Programming Languages and Systems;2023

3. Region-based Resource Management and Lexical Exception Handlers in Continuation-Passing Style;Programming Languages and Systems;2022

4. What You See Is What You Get: Practical Effect Handlers in Capability-Passing Style;Ernst Denert Award for Software Engineering 2020;2022

5. GATE: Gradual Effect Types;Lecture Notes in Computer Science;2021

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3