首页> 外文学位 >Design and implementation of exception handling with zero overhead in functional languages.
【24h】

Design and implementation of exception handling with zero overhead in functional languages.

机译:功能语言中零开销的异常处理的设计和实现。

获取原文
获取原文并翻译 | 示例

摘要

This dissertation considers the implementation of exception handling specifically for functional languages. Some implementations incur overhead for using exception handling even when no exceptions are raised. We show the results of some experiments with the SML of New Jersey and OCAML compilers, two well-known compilers for functional languages. Imperative languages avoid this overhead by using tables, but the approach does not easily transfer to compilers using continuation passing style (CPS). This dissertation proposes an approach that works with CPS compilers like SML of New Jersey.; We first present an experiment where programs in SML are written with and without exception handlers. From these results, we conclude that programs with exception handling produce overhead even when no exceptions are raised. Then, we analyze the source of the exception handling overhead in the SML of New Jersey compiler. We present a solution to the problem. The new approach uses two continuations instead of the one continuation. One continuation encapsulates the rest of the normal computation as usual. A second continuation is used for passing the abnormal computation. The second continuation is not passed as an extra argument but is passed as a displacement from the first continuation.; We have implemented a basic CPS compiler for functional languages with exception handling. With it we were able to implement the new approach to exception handling and compare it side-by-side with the approach taken by the SML of New Jersey compiler. We show that the new approach to exception handling adds no overhead to the normal flow of control.; The importance of our new approach to exception handling for CPS compilers proposed in this dissertation is the improved run-time performance in every case in which an exception handler is used.
机译:本文考虑了专门针对功能语言的异常处理的实现。即使没有引发异常,某些实现也会产生使用异常处理的开销。我们展示了使用新泽西州的SML和OCAML编译器(两种功能语言的著名编译器)进行的一些实验的结果。命令式语言通过使用表来避免这种开销,但是该方法不容易使用连续传递样式(CPS)转移到编译器。本文提出了一种适用于CPS编译器(如新泽西州的SML)的方法。我们首先提出一个实验,其中使用SML程序编写有无异常处理程序。从这些结果可以得出结论,即使没有引发异常,具有异常处理的程序也会产生开销。然后,我们分析新泽西编译器的SML中异常处理开销的来源。我们提出了解决该问题的方法。新方法使用两个连续而不是一个连续。一个延续照常封装了其余的正常计算。第二继续用于通过异常计算。第二个延续不作为额外的参数传递,而是作为第一个延续的位移传递。我们已经为带有异常处理的功能语言实现了基本的CPS编译器。有了它,我们就能实现新的异常处理方法,并将其与新泽西州SML编译器采用的方法并排比较。我们表明,异常处理的新方法不会增加正常控制流的开销。本文提出的针对CPS编译器的异常处理新方法的重要性在于,在使用异常处理程序的每种情况下,改进的运行时性能。

著录项

  • 作者

    Zatarain Cabada, Ramon.;

  • 作者单位

    Florida Institute of Technology.;

  • 授予单位 Florida Institute of Technology.;
  • 学科 Computer Science.
  • 学位 Ph.D.
  • 年度 2003
  • 页码 155 p.
  • 总页数 155
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类 自动化技术、计算机技术;
  • 关键词

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号