Sporq: An Interactive Environment for Exploring Code using Query-by-Example
Sporq: An Interactive Environment for Exploring Code using Query-by-Example
复制标题
DOI:
10.1145/3472749.3474737
复制
发表时间:
2021-10
期刊:
影响因子:
--
通讯作者:
Aaditya Naik;Jonathan Mendelson;Nathaniel Sands;Yuepeng Wang;M. Naik;Aalok Thakkar;Nathaniel Sands;Mukund Raghothaman;Mukund Ragothaman
中科院分区:
文献类型:
--
作者:
Aaditya Naik;Jonathan Mendelson;Nathaniel Sands;Yuepeng Wang;M. Naik;Aalok Thakkar;Nathaniel Sands;Mukund Raghothaman;Mukund Ragothaman
There has been widespread adoption of IDEs and powerful tools for program analysis. However, programmers still find it difficult to conveniently analyze their code for custom patterns. Such systems either provide inflexible interfaces or require knowledge of complex query languages and compiler internals. In this paper, we present Sporq, a tool that allows developers to mine their codebases for a range of patterns, including bugs, code smells, and violations of coding standards. Sporq offers an interactive environment in which the user highlights program elements, and the system responds by identifying other parts of the codebase with similar patterns. The programmer can then provide feedback which enables the system to rapidly infer the programmer’s intent. Internally, our system is driven by high-fidelity relational program representations and algorithms to synthesize database queries from examples. Our experiments and user studies with a VS Code extension indicate that Sporq reduces the effort needed by programmers to write custom analyses and discover bugs in large codebases.