Parameterized string matching: an application to software maintenance

  • Authors:
  • Rajesh Prasad;Suneeta Agarwal

  • Affiliations:
  • Motilal Nehru National Institute of Technology, Allahabad, India;Motilal Nehru National Institute of Technology, Allahabad, India

  • Venue:
  • ACM SIGSOFT Software Engineering Notes
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

In the problem of parameterized string matching, a given pattern P is said to match with a sub-string t of the text T, if there exists a one-one correspondence between the symbols of P and the symbols of t. This problem has an important application in software maintenance, where it is often required to find equivalency between two sections of codes. Two sections of codes are said to be equivalent if one can be transformed into the other by renaming only identifiers and variables. In this paper, we propose two new algorithms for the said problem by using the q-gram approach. The first one is obtained by using this approach on an existing string matching algorithm (simplified backward non-deterministic directed acyclic word graph matching (SBNDM)).The second one is obtained by using the q-gram approach on the parameterized string matching algorithm (parameterized backward non-deterministic directed acyclic word graph matching (PBNDM)). Performance of both the algorithms is tested for various values of q and it has been observed that both show their best performance for q nearly equal to half of the pattern length. We also study the effect on running time of these algorithms with increasing the duplicity in the text.