DOI: 10.1145/3860636 ISSN: 1049-331X
Replacing Output Parameters with Algebraic Data Types in C-to-Rust Translation
Jaemin Hong, Hyunhee Kang, Sukyoung RyuTranslating legacy systems from C to Rust promises to enhance their reliability. However, existing translators fail to generate Rust code that fully utilizes Rust's language features, such as algebraic data types. This work focuses on tuples and
Option/Result
types, an important subset of algebraic data types. These are used as return types to represent functions that return multiple values or may fail. Due to the absence of these types, C programs use