A Formalism to Automate Mapping from Program Features to Code

  • Authors:
  • Jean-Christophe Deprez;Arun Lakhotia

  • Affiliations:
  • -;-

  • Venue:
  • IWPC '00 Proceedings of the 8th International Workshop on Program Comprehension
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

How does one locate the segments of code that implement a particular feature? Wilde and Scully (WS) pioneered the use of execution traces to map program features to code. Using their technique, to locate the implementation of a particular feature, a program is executed with two sets of inputs, one set invokes the feature of interest and the other set does not. Operations such as set-difference and set-intersection, amongst others, are then applied on the execution traces to obtain answers for various questions related to a feature and its implementation. Previous researchers have automated the tasks of computing the execution traces and performing operations on the execution traces. We present a formalism to automate the most time-consuming aspect of this approach for locating code, namely, the partitioning of the input-sets into invoking and non-invoking sets. A collection of input-sets is partitioned using feature syntax, a grammar of the program's input annotated with feature names. An input-set is placed in the invoking set if and only if its parse tree is annotated with that feature. WS' technique solely applies set operations on the execution traces of inputs, b, n, m, h, j, k, l, 0.. 0, in our technique, we also apply the set operations among the set of features used by these inputs. By doing so, we can precisely determine the features whose implementation is identified when applying the operations on the execution traces.