Active inductive logic programming for code search
A Sivaraman, T Zhang… - 2019 IEEE/ACM 41st …, 2019 - ieeexplore.ieee.org
2019 IEEE/ACM 41st International Conference on Software …, 2019•ieeexplore.ieee.org
Modern search techniques either cannot efficiently incorporate human feedback to refine
search results or cannot express structural or semantic properties of desired code. The key
insight of our interactive code search technique ALICE is that user feedback can 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 code features that are …
search results or cannot express structural or semantic properties of desired code. The key
insight of our interactive code search technique ALICE is that user feedback can 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 code features that are …
Modern search techniques either cannot efficiently incorporate human feedback to refine search results or cannot express structural or semantic properties of desired code. The key insight of our interactive code search technique ALICE is that user feedback can 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 code 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 positive examples from negative examples via active inductive logic programming. Our comprehensive 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 user labeling mistakes. Our choice of leveraging both positive and negative examples and using nested program structure as an inductive bias is effective in refining search queries. Compared with an existing interactive code search technique, ALICE does not require a user to manually construct a search pattern and yet achieves comparable precision and recall with much fewer search iterations. A case study with real developers shows that ALICE is easy to use and helps express complex code patterns.
ieeexplore.ieee.org