RustPruner: A Program Slicing Tool for Rust Programs

Yanfeng Hu, Weihong Chen, Yilong Zhao, Ruiyu Zhang, Liangze Yin, Wei Dong · Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering · 2024

In the realm of analyzing Rust programs, traditional full-scale analytical approaches are often rendered impractical due to considerable time and performance expenditures.Despite the potential for program slicing technologies to drastically curtail these expenses, the vast majority of existing slicing tools lack compatibility with the Rust language.This study introduces RustPruner, a specialized tool designed for slicing Rust code.RustPruner commences by constructing a goto-style control flow graph (CFG) through rigorous control flow analysis, comprehensively mapping out all feasible execution paths.Subsequently, it leverages a backward slicing algorithm, integrating the outcomes of program dependency analysis and abstract syntax tree (AST) analysis, to generate precise program slices.By innovatively adapting slicing technology to Rust, RustPruner facilitates comprehensive, low-level analysis of Rust's distinctive features.The generated slices undergo rigorous compilation and verification procedures, thereby enhancing the efficiency of the analysis process.The effectiveness of RustPruner has been validated within some crucial system modules of operational operating systems, which significantly improves both the efficiency and accuracy of the verification.

Read the paper · More papers on PaperTik