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 Times are displayed in time zone: Beirut change
14:00 - 15:30: Machine LearningOOPSLA at Attica Chair(s): Elisa Gonzalez BoixVrije Universiteit Brussel, Belgium | |||
14:00 - 14:22 Talk | Duet: An Expressive Higher-Order Language and Linear Type System for Statically Enforcing Differential Privacy OOPSLA 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, Berkeley DOI | ||
14:22 - 14:45 Talk | Improving Bug Detection via Context-Based Code Representation Learning and Attention-Based Neural Networks OOPSLA 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 Dallas DOI | ||
14:45 - 15:07 Talk | Probabilistic Verification of Fairness Properties via Concentration OOPSLA Osbert BastaniUniversity of Pennsylvania, Xin ZhangMassachusetts Institute of Technology, Armando Solar-LezamaMassachusetts Institute of Technology DOI | ||
15:07 - 15:30 Talk | Generating Precise Error Specifications for C: A Zero Shot Learning Approach OOPSLA Baijun WuUniversity of Louisiana at Lafayette, John Peter CamporaUniversity of Louisiana at Lafayette, He YiUniversity of Louisiana at Lafayette, Alexander SchlechtUniversity of Louisiana at Lafayette, Sheng ChenUniversity of Louisiana at Lafayette DOI |