University of Twente Student Theses
Static Analysis of Rust Error Propagation
Kas, Thomas (2024) Static Analysis of Rust Error Propagation.
PDF
665kB |
Abstract: | The Rust programming language deals with errors in a different way than many popular languages. Rust wraps errors using its robust type system. This simplifies the error system as it does not interrupt regular program execution, which might make it easier to reason about. The type used to wrap errors is a regular enumeration, Result, which has two possible values: Result::Ok; and Result::Err. Developers can interact with this type using Rust's many features such as pattern matching, or explicitly propagate error values using the try operator, '?'. We feel this approach to errors might lead to better error-handling practices among developers. However, no research has been done on how developers use these error systems. In this paper, we present a newly developed static analysis tool that can show the error propagation within Rust programs. Furthermore, we use our tool to conduct a small case study to explore how the error system is used in two open-source Rust programs. We hope this tool enables further research into the ways the error system of the Rust language is used in practice. |
Item Type: | Essay (Bachelor) |
Faculty: | EEMCS: Electrical Engineering, Mathematics and Computer Science |
Subject: | 54 computer science |
Programme: | Computer Science BSc (56964) |
Link to this item: | https://purl.utwente.nl/essays/100758 |
Export this item as: | BibTeX EndNote HTML Citation Reference Manager |
Repository Staff Only: item control page