Submitted: November 2024

Abstract

In this day and age, the importance of safety-critical code is rising, as software is increasingly used in domains where its reliability is of the utmost importance. While designing inherently safe software is desirable, certain errors are unavoidable and must be considered by the software engineer, though others must be avoided at all cost. It is therefore vital to understand their impact and to ensure the proper handling of them.

The Rust programming language aids in developing dependable systems. This is achieved through its strong type system and above all through the use of the Result<T,E> type. The type is used to indicate whether an operation has been successful or failed. By using Results, potential errors become explicit and part of the data flow, thereby enabling Rust to manage the error flow as a subset of the data flow.

Static analysis tools enhance the reliability of software by providing early detection of potential issues, supporting the development of secure and robust code essential for safety-critical applications.

In this thesis, we document the development of the static analysis tool sefarer designed for analyzing error flow in Rust programs. We allow developers to analyze individual components of their programs, granting them fine-grained control over the thoroughness of the analysis. Through static program analysis, we extract the error paths of a component, which are then tested for feasibility using SMT solvers.

The analysis aims to assist developers by providing insights into error propagation and thus complementing the existing tools and manual code reviews.