Semantic Code Search via Equational Reasoning
We present a new approach to semantic code search based on equational reasoning, and the Yogo tool implementing this approach. Our approach works by considering not only the dataflow graph of a function, but also the dataflow graphs of all equivalent functions reachable via a set of rewrite rules. In doing so, it can recognize an operation even if it uses alternate APIs, is in a different but mathematically-equivalent form, is split apart with temporary variables, or is interleaved with other code. Furthermore, it can recognize when code is an instance of some higher-level concept such as iterating through a file. Because of this, from a single query, Yogo can find equivalent code in multiple languages. Our evaluation further shows the utility of Yogo beyond code search: encoding a buggy pattern as a Yogo query, we found a bug in Oracle’s Graal compiler which had been missed by a hand-written static analyzer designed for that exact kind of bug. Yogo is built on the Cubix multi-language infrastructure, and currently supports Java and Python.
Thu 21 OctDisplayed time zone: Central Time (US & Canada) change
13:50 - 15:10 | PLDI 2020 Papers 2SIGPLAN Papers at Zurich F Chair(s): Tyler Sorensen University of California at Santa Cruz | ||
13:50 15mTalk | Automated Derivation of Parametric Data Movement Lower Bounds for Affine Programs SIGPLAN Papers Auguste Olivry Inria, France, Julien Langou , Louis-Noël Pouchet Colorado State University, USA, Saday Sadayappan University of Utah, USA, Fabrice Rastello Inria, France | ||
14:05 15mTalk | Responsive Parallelism with Futures and State SIGPLAN Papers Stefan K. Muller Illinois Institute of Technology, Kyle Singer Washington University in St. Louis, USA, Noah Goldstein Washington University in St. Louis, USA, Umut A. Acar Carnegie Mellon University, Kunal Agrawal Washington University in St. Louis, USA, I-Ting Angelina Lee Washington University in St. Louis, USA | ||
14:20 15mTalk | The Essence of Bluespec: A Core Language for Rule-Based Hardware Design SIGPLAN Papers Thomas Bourgeat , Clément Pit-Claudel MIT CSAIL, Adam Chlipala Massachusetts Institute of Technology, Arvind Massachusetts Institute of Technology, USA | ||
14:35 15mPaper | Semantic Code Search via Equational Reasoning SIGPLAN Papers Varot Premtoon Massachusetts Institute of Technology, USA, James Koppel Massachusetts Institute of Technology, USA, Armando Solar-Lezama Massachusetts Institute of Technology Link to publication | ||
14:50 20mLive Q&A | Discussion, Questions and Answers SIGPLAN Papers |