Type-Based Approaches to Rounding Error Analysis

Guardado en:
書目詳細資料
發表在:ProQuest Dissertations and Theses (2024)
主要作者: Kellison, Ariel Eileen
出版:
ProQuest Dissertations & Theses
主題:
在線閱讀:Citation/Abstract
Full Text - PDF
標簽: 添加標簽
沒有標簽, 成為第一個標記此記錄!
實物特徵
Resumen:This dissertation explores the design and implementation of programming languages that represent rounding error analysis through typing. A rounding error analysis establishes an a priori bound on the rounding errors introduced by finite-precision arithmetic in a numerical program, providing a measure of the quality of the program as an approximation to its ideal, infinitely precise counterpart. This can be achieved by measuring the distance between the computed output and the ideal result, known as the forward error, or by determining the smallest distance by which the input must be perturbed to make the computed output match the ideal result, known as the backward error. Due to the complex interaction between the rounding errors produced locally by a program and those propagated from its inputs, performing a rounding error analysis is known to be challenging. Moreover, while most programs can be shown to have a forward error bound, even if trivially large, many programs cannot be shown to have a backward error bound. This makes the task of deriving backward error bounds for complex programs even more challenging than the corresponding task of deriving forward error bounds.One way to view programs that use finite-precision arithmetic is as computations that produce rounding error, while also consuming and amplifying rounding errors passed to them as inputs from other functions. This perspective aligns closely with the notions of effects (what programs produce aside from values) and coeffects (how programs use their inputs). Both effectful and coeffectful program behaviors can be analyzed using type-based approaches, where graded monadic types track effects, and graded comonadic types track coeffects. While recent work has studied the interaction of effects and coeffects in various domains, the work presented in this dissertation is the first to investigate these behaviors in the context of numerical analysis and the propagation of rounding errors in numerical programs.The first part of this dissertation demonstrates that it is possible to design languages for forward error analysis, as illustrated with NumFuzz, a functional programming language whose type system expresses quantitative bounds on rounding error. This type system combines a sensitivity analysis, enforced through a linear typing discipline, with a novel graded monad to track the accumulation of rounding errors. We establish the soundness of the type system by relating the denotational semantics of the language to both an exact and floating-point operational semantics. To illustrate the capabilities of our system, we instantiate NumFuzz with error metrics from the numerical analysis literature and incorporate rounding operations that accurately model key aspects of the IEEE 754 floating-point standard. Furthermore, to demonstrate the practical utility of NumFuzz as a tool for automated error analysis, we have developed a prototype implementation capable of inferring error bounds. This implementation produces bounds competitive with existing tools, while often achieving significantly faster analysis times.The second part of this dissertation explores a type-based approach to backward error analysis with Bean, a first-order programming language with a linear type system that can express quantitative bounds on backward error. Bean’s type system combines a graded coeffect system with strict linearity to soundly track the flow of backward error through programs. To illustrate Bean’s potential as a practical tool for automated backward error analysis, we implement a variety of standard algorithms from numerical linear algebra in Bean, establishing fine-grained backward error bounds via typing in a compositional style. We also develop a prototype implementation of Bean that infers backward error bounds automatically. Our evaluation shows that these inferred bounds match worst-case theoretical relative backward error bounds from the literature, underscoring Bean’s utility in validating a key property of numerical programs: numerical stability.
ISBN:9798302154101
Fuente:ProQuest Dissertations & Theses Global