Generating Precise Error Specifications for C: A Zero Shot Learning Approach
In C programs, error specifications, which specify the value range that each function returns to indicate failures, are widely used to check and propagate errors for the sake of reliability and security. Various kinds of C analyzers employ error specifications for different purposes, e.g., to detect error handling bugs, yet a general approach for generating precise specifications is still missing. This limits the applicability of those tools.
In this paper, we solve this problem by developing a machine learning-based approach named MLPEx. It
generates error specifications by analyzing only the source code, and is thus general. We propose a novel machine learning paradigm based on transfer learning, enabling MLPEx to require only one-time minimal data labeling from us (as the tool developers) and zero manual labeling efforts from users. To improve the accuracy of generated error specifications, MLPEx extracts and exploits project-specific information. We evaluate MLPEx on 10 projects, including 6 libraries and 4 applications. An investigation of 3,443 functions and 17,750 paths reveals that MLPEx generates error specifications with a precision of 91% and a recall of 94%, significantly higher than those of state-of-the-art approaches. To further demonstrate the usefulness of the generated error specifications, we use them to detect 57 bugs in 5 tested projects.
Wed 23 Oct
|14:00 - 14:22|
Duet: An Expressive Higher-Order Language and Linear Type System for Statically Enforcing Differential Privacy
Joseph P. NearUniversity of Vermont, David DaraisUniversity of Vermont, Chike AbuahUniversity of Vermont, Tim StevensUniversity of Vermont, Pranav GaddamaduguUniversity of California, Berkeley, Lun WangUniversity of California, Berkeley, Neel SomaniUniversity of California, Berkeley, Mu ZhangUniversity of Utah, Nikhil SharmaUniversity of California, Berkeley, Alex ShanUniversity of California, Berkeley, Dawn SongUniversity of California, BerkeleyDOI
|14:22 - 14:45|
Improving Bug Detection via Context-Based Code Representation Learning and Attention-Based Neural Networks
Yi LiNew Jersey Institute of Technology, USA, Shaohua WangNew Jersey Institute of Technology, USA, Tien N. NguyenUniversity of Texas at Dallas, Son NguyenThe University of Texas at DallasDOI
|14:45 - 15:07|
Osbert BastaniUniversity of Pennsylvania, Xin ZhangMassachusetts Institute of Technology, Armando Solar-LezamaMassachusetts Institute of TechnologyDOI
|15:07 - 15:30|
Baijun WuUniversity of Louisiana at Lafayette, John Peter Campora IIIUniversity of Louisiana at Lafayette, He YiUniversity of Louisiana at Lafayette, Alexander SchlechtUniversity of Louisiana at Lafayette, Sheng ChenUniversity of Louisiana at LafayetteDOI