Extracting reusable functions by flow graph based program slicing
- 1 April 1997
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 23 (4) , 246-259
- https://doi.org/10.1109/32.588543
Abstract
An alternative approach to developing reusable components from scratch is to recover them from existing systems. In this paper, we apply program slicing, a program decomposition method, to the problem of extracting reusable functions from ill-structured programs. As with conventional slicing first described by Weiser, a slice is obtained by iteratively solving data flow equations based on a program flow graph. We extend the definition of program slice to a transform slice, one that includes statements which contribute directly or indirectly to transform a set of input variables into a set of output variables. Unlike conventional program slicing, these statements do not include either the statements necessary to get input data or the statements which test the binding conditions of the function. Transform slicing presupposes the knowledge that a function is performed in the code and its partial specification, only in terms of input and output data. Using domain knowledge we discuss how to formulate expectations of the functions implemented in the code. In addition to the input/output parameters of the function, the slicing criterion depends on an initial statement, which is difficult to obtain for large programs. Using the notions of decomposition slice and concept validation we show how to produce a set of candidate functions, which are independent of line numbers but must be evaluated with respect to the expected behavior. Although human interaction is required, the limited size of candidate functions makes this task easier than looking for the last function instruction in the original source codeKeywords
This publication has 42 references indexed in Scilit:
- Extracting application domain functions from old code: a real experiencePublished by Institute of Electrical and Electronics Engineers (IEEE) ,2002
- Using dependence analysis to support the software maintenance processPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2002
- Automating the detection of reusable parts in existing softwarePublished by Institute of Electrical and Electronics Engineers (IEEE) ,2002
- A reverse engineering method for identifying reusable abstract data typesPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2002
- Software salvaging and the call dominance treeJournal of Systems and Software, 1995
- Interprocedural def-use associations for C systems with single level pointersIEEE Transactions on Software Engineering, 1994
- Domain analysis and reverse engineeringPublished by Institute of Electrical and Electronics Engineers (IEEE) ,1994
- A precise method for identifying reusable abstract data types in codePublished by Institute of Electrical and Electronics Engineers (IEEE) ,1994
- A formal model of program dependences and its implications for software testing, debugging, and maintenanceIEEE Transactions on Software Engineering, 1990
- Extracting and restructuring the design of large systemsIEEE Software, 1990