纤维化计算效应
Fibred Computational Effects
摘要:
依赖类型提供了一种轻量级和模块化的方法来集成编程和正式程序验证。特别地,以依赖类型的程序设计语言(Agda、Idris、F* 等)编写的程序的类型可以用来表示程序正确性的规范。这些规范可以从简单到要求除法函数中的除数为非零,到复杂到指定工业强度语言编译器的正确性。成功的程序编译保证了它满足基于类型的规范。虽然依赖类型允许通过在编译时拒绝错误的程序来消除许多运行时错误,但依赖类型语言尚未在更广泛的编程社区中流行。其中一个原因是它们对计算效果的支持有限,这是所有广泛使用的程序设计语言的组成部分,从命令式语言(如C)到函数式语言(如ML和Haskell)。例如,除了简单地将它们的输入转换为输出之外,用这些程序设计语言编写的程序可以引发异常、访问计算机的存储器、通过网络通信、在屏幕上呈现图像等。因此,如果依赖类型的程序设计语言要真正实现它们无缝集成编程和正式程序验证的承诺,我们必须首先理解如何正确地解释这些语言中的计算效应。虽然已经有关于这一主题的工作,但一个全面的理论所需的成分通常是缺失的。例如,基础往往没有固定;可用的效果可能有限;或者效果可能没有得到系统的处理。在本论文中,我们通过对依赖类型和一般计算效果的组合进行全面处理来解决这些缺点。
英文摘要:
Dependent types provide a lightweight and modular means to integrate programming and formal program verification. In particular, the types of programs written in dependently typed programming languages (Agda, Idris, F*, etc.) can be used to express specifications of program correctness. These specifications can vary from being as simple as requiring the divisor in the division function to be non-zero, to as complex as specifying the correctness of compilers of industrial-strength languages. Successful compilation of a program then guarantees that it satisfies its type-based specification. While dependent types allow many runtime errors to be eliminated by rejecting erroneous programs at compile-time, dependently typed languages are yet to gain popularity in the wider programming community. One reason for this is their limited support for computational effects, an integral part of all widely used programming languages, ranging from imperative languages, such as C, to functional languages, such as ML and Haskell. For example, in addition to simply turning their inputs to outputs, programs written in these programming languages can raise exceptions, access computer's memory, communicate over a network, render images on a screen, etc. Therefore, if dependently typed programming languages are to truly live up to their promise of seamlessly integrating programming and formal program verification, we must first understand how to properly account for computational effects in such languages. While there already exists work on this topic, ingredients needed for a comprehensive theory are generally missing. For example, foundations are often not settled; available effects may be limited; or effects may not be treated systematically. In this thesis we address these shortcomings by providing a comprehensive treatment of the combination of dependent types and general computational effects.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。