Active Inductive Logic Programming for Code Search

12/13/2018
by   Aishwarya Sivaraman, et al.
0

Modern search techniques either cannot efficiently incorporate human feedback to refine search results or to express structural or semantic properties of desired code. The key insight of our interactive code search technique ALICE is that user feedback could be actively incorporated to allow users to easily express and refine search queries. We design a query language to model the structure and semantics of code as logic facts. Given a code example with user annotations, ALICE automatically extracts a logic query from features that are tagged as important. Users can refine the search query by labeling one or more examples as desired (positive) or irrelevant (negative). ALICE then infers a new logic query that separates the positives from negative examples via active inductive logic programming. Our comprehensive and systematic simulation experiment shows that ALICE removes a large number of false positives quickly by actively incorporating user feedback. Its search algorithm is also robust to noise and user labeling mistakes. Our choice of leveraging both positive and negative examples and the nested containment structure of selected code is effective in refining search queries. Compared with an existing technique, Critics, ALICE does not require a user to manually construct a search pattern and yet achieves comparable precision and recall with fewer search iterations on average. A case study with users shows that ALICE is easy to use and helps express complex code patterns.

READ FULL TEXT

page 3

page 7

research
05/07/2023

Synthesizing Conjunctive Queries for Code Search

This paper presents Squid, a new conjunctive query synthesis algorithm f...
research
12/07/2022

You Don't Know Search: Helping Users Find Code by Automatically Evaluating Alternative Queries

Tens of thousands of engineers use Sourcegraph day-to-day to search for ...
research
01/03/2023

EQUI-VOCAL: Synthesizing Queries for Compositional Video Events from Limited User Interactions [Technical Report]

We introduce EQUI-VOCAL: a new system that automatically synthesizes que...
research
02/20/2023

Active Learning with Positive and Negative Pairwise Feedback

In this paper, we propose a generic framework for active clustering with...
research
05/17/2019

Seeker: Real-Time Interactive Search

This paper introduces Seeker, a system that allows users to interactivel...
research
02/14/2012

Noisy Search with Comparative Feedback

We present theoretical results in terms of lower and upper bounds on the...
research
07/13/2021

Mining Idioms in the Wild

Existing code repositories contain numerous instances of code patterns t...

Please sign up or login with your details

Forgot password? Click here to reset