License: Creative Commons Attribution 4.0 International license (CC BY 4.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.ECOOP.2023.36
URN: urn:nbn:de:0030-drops-182294
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2023/18229/
Go to the corresponding LIPIcs Volume Portal


Wang, Chengpeng ; Yao, Peisen ; Tang, Wensheng ; Fan, Gang ; Zhang, Charles

Synthesizing Conjunctive Queries for Code Search

pdf-format:
LIPIcs-ECOOP-2023-36.pdf (2 MB)


Abstract

This paper presents Squid, a new conjunctive query synthesis algorithm for searching code with target patterns. Given positive and negative examples along with a natural language description, Squid analyzes the relations derived from the examples by a Datalog-based program analyzer and synthesizes a conjunctive query expressing the search intent. The synthesized query can be further used to search for desired grammatical constructs in the editor. To achieve high efficiency, we prune the huge search space by removing unnecessary relations and enumerating query candidates via refinement. We also introduce two quantitative metrics for query prioritization to select the queries from multiple candidates, yielding desired queries for code search. We have evaluated Squid on over thirty code search tasks. It is shown that Squid successfully synthesizes the conjunctive queries for all the tasks, taking only 2.56 seconds on average.

BibTeX - Entry

@InProceedings{wang_et_al:LIPIcs.ECOOP.2023.36,
  author =	{Wang, Chengpeng and Yao, Peisen and Tang, Wensheng and Fan, Gang and Zhang, Charles},
  title =	{{Synthesizing Conjunctive Queries for Code Search}},
  booktitle =	{37th European Conference on Object-Oriented Programming (ECOOP 2023)},
  pages =	{36:1--36:30},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-281-5},
  ISSN =	{1868-8969},
  year =	{2023},
  volume =	{263},
  editor =	{Ali, Karim and Salvaneschi, Guido},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/opus/volltexte/2023/18229},
  URN =		{urn:nbn:de:0030-drops-182294},
  doi =		{10.4230/LIPIcs.ECOOP.2023.36},
  annote =	{Keywords: Query Synthesis, Multi-modal Program Synthesis, Code Search}
}

Keywords: Query Synthesis, Multi-modal Program Synthesis, Code Search
Collection: 37th European Conference on Object-Oriented Programming (ECOOP 2023)
Issue Date: 2023
Date of publication: 11.07.2023


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI