SyRust: Automatic Testing of Rust Libraries with Semantic-Aware Program Synthesis
Rust’s type system ensures the safety of Rust programs; however, programmers can side-step some of the strict typing rules by using the unsafe keyword. A common use of unsafe Rust is by libraries. Bugs in these libraries undermine the safety of the entire Rust program. Therefore, it is crucial to thoroughly test library APIs to rule out bugs. Unfortunately, such testing relies on programmers to manually construct test cases, which is an inefficient and ineffective process.
The goal of this paper is to develop a methodology for automatically generating Rust programs to effectively test Rust library APIs. The main challenge is to synthesize \emph{well-typed} Rust programs to account for proper chaining of API calls and Rust’s ownership type system and polymorphic types. We develop a program synthesis technique for Rust library API testing, which relies on a novel logical encoding of typing constraints from Rust’s ownership type system. We implement SyRust, a testing framework for Rust libraries that automatically synthesizes semantically valid test cases. Our experiments on 30 popular open-source Rust libraries found 4 new bugs.
Thu 21 OctDisplayed time zone: Central Time (US & Canada) change
13:50 - 15:10 | |||
13:50 15mTalk | Concurrent Deferred Reference Counting for Non-garbage-collected Languages SIGPLAN Papers Daniel Anderson Carnegie Mellon University, Guy E. Blelloch Carnegie Mellon University, USA, Yuanhao Wei Carnegie Mellon University, USA | ||
14:05 15mTalk | Snapshot-Free, Transparent, and Robust Memory Reclamation for Lock-Free Data Structures SIGPLAN Papers | ||
14:20 15mTalk | SyRust: Automatic Testing of Rust Libraries with Semantic-Aware Program Synthesis SIGPLAN Papers Yoshiki Takashima Carnegie Mellon University, Ruben Martins Carnegie Mellon University, Limin Jia Carnegie Mellon University, Corina S. Păsăreanu Carnegie Mellon University | ||
14:35 15mTalk | Vectorized Secure Evaluation of Decision Forests SIGPLAN Papers Raghav Malik Purdue University, Vidush Singhal Purdue University, Benjamin Gottfried Purdue University, Milind Kulkarni Purdue University | ||
14:50 20mLive Q&A | Discussion, Questions and Answers SIGPLAN Papers |