Identifying reusable functions using specification driven program slicing: a case study

  • Authors:
  • A. Cimitile;A. De Lucia;M. Munro

  • Affiliations:
  • -;-;-

  • Venue:
  • ICSM '95 Proceedings of the International Conference on Software Maintenance
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present the results of a case study in identifying and isolating reusable functions from C programs. The work exploits and specializes to programs written in C the theoretical framework of specification driven program slicing, a new program slicing process for isolating code fragments implementing functional abstractions. The specification of the function to be isolated, given in terms of a precondition and a postcondition, is used to identify a suitable slicing criterion. The preconditions for the execution of program statements and predicates are abstracted by using symbolic execution and compared with the conditions of the specification. The statements whose preconditions are equivalent to the pre and postconditions of the functional abstraction are candidates for entry and exit points of the slice implementing the abstraction. Once the slicing criterion has been identified, the slice can be isolated using algorithms based on control flow graphs and dependence graphs.