A Query Algebra for Program Databases

  • Authors:
  • Santanu Paul;Ataul Prakash

  • Affiliations:
  • -;-

  • Venue:
  • IEEE Transactions on Software Engineering
  • Year:
  • 1996

Quantified Score

Hi-index 0.01

Visualization

Abstract

Querying source code is an essential aspect of a variety of software engineering tasks such as program understanding, reverse engineering, program structure analysis, and program flow analysis. In this paper, we present and demonstrate the use of an algebraic source code query technique that blends expressive power with query compactness. The query framework of Source Code Algebra, or SCA, permits users to express complex source code queries and views as algebraic expressions. Queries are expressed on an extensible, object-oriented database that stores program source code. The SCA algebraic approach offers multiple benefits such as an applicative query language, high expressive power, seamless handling of structural and flow information, clean formalism, and potential for query optimization. We present a case study where SCA expressions are used to query a program in terms of program organization, resource flow, control flow, metrics, and syntactic structure. Our experience with an SCA-based prototype query processor indicates that an algebraic approach to source code queries combines the benefits of expressive power and compact query formulation.