Solving Semantic Searches for Source Code

Abstract

Programmers search for code frequently utilizing syntactic queries. The effectiveness of this type of search depends on the ability of a programmer to specify a query that captures how the desired code may have been implemented, and the results often include many irrelevant matches that must be filtered manually. More semantic search approaches could address these limitations yet the existing approaches either do not scale or require for the programmer to define complex queries. Instead, our approach to semantic search requires for the programmer to write lightweight, incomplete specifications, such as an example input and expected output of a desired function. Unlike existing approaches to semantic search, we use an SMT solver to identify programs in a repository, encoded as constraints, that match the programmer-provided specification. We instantiate the approach on subsets of the Java string library, Yahoo! Pipes mashup language and SQL select statements, and begin to assess its effectiveness and efficiency through evaluations in each domain.

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Nov 01, 2012
Accession Number
ADA578103

Entities

People

  • Daniel Dobos
  • Kathryn T. Stolee
  • Sebastian Elbaum

Organizations

  • University of Nebraska-Lincoln Department of Computer Science and Engineering

Tags

Communities of Interest

  • C4I

DTIC Thesaurus Topics

  • Artifacts
  • Coding
  • Communities
  • Computer Programming
  • Computer Programs
  • Computer Science
  • Concrete
  • Databases
  • Demographic Cohorts
  • Efficiency
  • Electronic Mail
  • Filters
  • Language
  • Lightweight
  • Specifications
  • Storage
  • Test And Evaluation

Fields of Study

  • Computer science

Readers

  • Artificial Intelligence
  • Database Systems and Applications