Software Maintenance: An Approach To Impact Analysis of Objects Change
Software Maintenance: An Approach To Impact Analysis of Objects Change
SAMUEL AJILA∗
CRIN-CRNS, Bâtiment LORIA, Campus scientifique, BP 239, 54506 Vandouvre-lès-nancy, France
(e-mail: [email protected])
SUMMARY
The maintenance of a software system requires a tool for impact analysis and the propagation of change.
This paper presents a knowledge-based model for both. This model is generic because it is not based on
any language or design method. Therefore, it can be applied on the basis of a ‘problem’ to be solved. It
also captures four life-cycle phases: requirement, specification, design and programming. We also provide a
domain-specific view that allows the dependency analysis of fine-grain objects. Two kinds of dependencies
are identified: inter-phase dependencies, these are dependency relations between the objects of one phase
and another; and intra-phase dependencies, these are dependency relations between the objects of the same
phase. In order to validate this model, we also present a prototype based on two life-cycle phases: design
and programming.
KEY WORDS: software maintenance; impact analysis; objects change; dependency relations; software life cycle; knowledge
based model
1. INTRODUCTION
Software maintenance is generally considered11,14,17,18,24,27,30 to be expensive, difficult and
time consuming. One of the reasons for this is that it is difficult for software maintenance
engineers to fully understand a software system that they did not design or implement. Even
when they develop their own system, it is easy to forget the details of the design or code;
even more so if there is little or no documentation. Another reason is that any change in
part of the software must take into consideration the inter-relationships between the change
and the rest of the system. There are complex inter-dependent relationships between the
different components of the software.12,19
There are various reasons for changes in a software system:3,26,28,29
1. To estimate the cost of a change. If a proposed change has the possibility of affecting
large disjoint sections of the software, then the change might need to be re-examined
and if possible abandoned in order to design another safer change.
2. To understand the meaning and the relationship between the item of change and the
structure of the software. The impact analysis tool can use the notion of conductivity
because there are some dependency relations that are better conductors of changes.
These types of relation allow the identification of the parts of the software that must
be modified and that parts may be modified for a given change-type.
3. To record the history of change related information and to evaluate the quality of
a particular change. Examining the feedback information from users of the changed
product helps in maintaining the quality of the software.
4. To determine the parts of the software that may need to be regression tested after a
change is carried out and to point out the vulnerability of some critical sections of the
software in order to determine whether the functionality of those parts of the software
is susceptible to changes made to the software.
in such a way that some system properties in S remain invariant if the change is finally
SOFTWARE MAINTENANCE 1157
carried out and the affected objects {o1 , . . . , oi , ok , . . .} are also modified accordingly and
where:
—the objects in OS are linked by explicit dependencies (a set of ordered pairs);
—Ts depend on the software system view;
—fimpact is the impact analysis function; and
—{o1 , . . . , oi , ok , . . .} are the ‘direct victims’ of the change, i.e. those objects that have
direct relationships with oj . The ability to estimate the impact of a change (in terms of
objects that may be affected by a change) and perform change propagation depends on the
following factors:
1. software system views;
2. change types;
3. set of objects to be manipulated;
4. dependency relationships between objects of S ; and
5. fimpact and its properties.
Therefore, there is the need for us to explicitly define these factors which are in the
sub-sections that follow.
view. In some cases, such changes may be trivial such as type change (variable, function,
etc) in the programming view, merging and deletion in the design-programming view or
modification and elimination in the requirement-specification view. It may be complex in
some cases and this may require the intervention of specialists and users of the system
before the change type can be specified.
The most basic object-oriented concept is the ‘object’ itself. An object may be described
as an entity which can be observed. This observation creates and distinguishes the object
from its environment. Our notion of object in this work is based on the notion of object in
a conventional programming language. An object in a conventional programming language
can be defined as a collection of routines, types, and/or data items.28 Routines implement
the methods associated with the object; types structure the data it processes; and data items
represent the instance of the object class.
The objects manipulated by WHAT-IF are described by the following hierarchy:
1. requirement objects, e.g. chapters, sections, sub-sections, etc, in the requirement doc-
ument;
SOFTWARE MAINTENANCE 1159
where
{(o11 (o12 , . . . , o1n ), . . . , (ok1 , ok2 , . . . , okn ), . . .}
are the objects that are indirectly concerned by the change.
In this case we can compute both the direct and indirect ‘victims’ of change. In order to
do this we have a choice between two methods of representation:32 the ‘shallow method’
and the ‘deep method’. Generally speaking, the shallower a representation (i.e. the less in-
formation it represents explicitly), the easier it is to implement. However, the less explicitly
information is represented, the harder it is for a tool to manipulate it. For example, it is
impossible for a tool that represents requirements merely as textual documents to detect
logical inconsistencies. Therefore, if a tool is to provide comprehensive support for a com-
plex software task that requires the deep understanding of a software artifact, then it must
represent the artifact in such a way that all of the relevant information is available to it. An
important benefit of deeper representations is that they allow a deeper level of integration
between tools.32
Therefore to represent fimpact , do impact analysis and change propagation, we adopt the
following:
1. A graph is used to represent the structure of each view. The nodes of the graph
correspond to the objects of the view while the arcs correspond to the dependencies
between the objects. Therefore, for the entire system, we have a ‘multi-graph’10,15,40
1160 S. AJILA
Figure 7 shows a simplified version of the data structure produced by the processor for
the Ada software system. The Ada object table contains the names of objects in an Ada
software system and for each object it contains the following lists: files-list, sub-programs-
list, packages-list, tasks-list, variables-list, import-list, use-list, generic-list, renaming-list
and sub-program-call-list.
The Ada object table summarizes several direct relations. To specify these relationships,
we define the following entities:
Given the previous entities and the Ada object table, we specify the following direct
relations for the Ada software system:
(R1) is-parameter-of :- {S, V, N} The relation is-parameter-of(obj, var, i), obj ∈ S ,
var ∈ V , i ∈ N exists if and only if the variable var is declared in the module obj
as a formal parameter at position i.
(R2) calls :- {X, S} The relation calls(obj1 , obj2 ), obj1 ∈ X, obj2 ∈ S exists if and only
if obj1 directly calls the sub-program obj2 .
(R3) type-return-value :- {S, T} The relation type-return-value(obj, t), obj ∈ S , t ∈ T
exists if and only if the function obj returns t as its value after its invocation.
(R4) obj-is-declared-in :- {X, X} The relation obj-is-declared-in(obj1 , obj2 ), obj1 obj2 ∈
X exists if and only if the module obj2 is declared inside obj1 .
(R5) var-is-declared-in :- {X, Vt }, Vt ∈(V, C) The relation var-is-declared-in(obj, var),
obj ∈ X , var ∈ Vt exists if and only if the variable var is declared inside module
obj .
† Ada enumeration type.
1164 S. AJILA
Given the entities above and the HOOD object table, we specify the following direct
relations for HOOD design system:
(R13) defines :- {H, O} The relation defines(obj, op), obj ∈ H , op ∈ O exists if and only
if the operation op is defined inside the object obj. obj can be active or passive.
(R14) includes :- {H, H} The relation includes(obj1 , obj2 ), obj1 , obj2 ∈ H exists if and only
if obj1 is the father of obj2 . Therefore, obj2 is the child of obj1 .
(R15) implemented-by :- {O, O} The relation implemented-by(op1 , op2 ), op1 , op2 ∈ O
exists if and only if there are two objects obj1 , obj2 ∈ H such that defines(obj1 , op1 ),
defines(obj2 , op2 ) and includes(obj1 , obj2 ).
(R16) uses :- {H, H} The relation uses(obj1 , obj2 ), obj1 , obj2 ∈ H exists if and only if there
are two operations op1 , op2 ∈ O such that implemented-by(op1 , op2 ) and [(either obj1
and obj2 are active objects) or (obj1 is active and obj2 is passive) or (obj1 and obj2
are passive objects)].
We have also created a table of correspondences between the Ada objects and HOOD
objects (cf Figure 9). Given the entities defined for the Ada software system, the HOOD
design system and the table of correspondences, we specify the following relation:
(R17) corresponds-to :- {H, X} The relation corresponds-to(obj1 , obj2 ), obj1 ∈ H , obj2 ∈ X
exists if and only if obj2 is an Ada object (package, task, procedure, or function)
1166 S. AJILA
and obj1 is a HOOD object (class, object, operation, opcs, obcs) and that the corre-
spondence between obj1 and obj2 is based on the rule of correspondence defined in
Figure 7. The inverse of this relation (i.e. corresponds-to−1 (obj2 , obj1 )) is also true.
Table I.
1168 S. AJILA
Table II.
existing ones in such a way as to prove some assertions or to create personal queries. At
present, it is implemented to give real-time answers to some pre-defined queries.
The abstractor consists of three parts: the user interface, query manager and the inference
engine (cf Figure 10).
The query manager is implemented in PROLOG. The inference engine is essentially the
PROLOG inference engine and it is completed by a function that allows the interrogation
of the engine from the interface and the activation of the engine based on the type of query
(cf see sections 3.3.1–3.3.3).
SOFTWARE MAINTENANCE 1169
1. WHAT-IF-Ada(object-name, change-type),
2. WHAT-IF-HOOD(object-name, change-type),
3. WHAT-IF-Local(object-name, level), and
4. WHAT-IF-Global(object-name, level).
The query WHAT-IF-Ada acts on the Ada software system objects while the query
WHAT-IF-HOOD acts on the HOOD design system objects. We have defined these two
versions of WHAT-IF query in order to take care of the differences between the types of
change in Ada and HOOD.
The query WHAT-IF-Local acts on all the objects at the two levels (Ada and HOOD).
This query takes care of all the objects that are not constrained by any type of change and
the objects that do not have any correspondence. The query WHAT-IF-Global also acts
on all the objects at the two levels. In fact this is the propagation query. It analyses the impact
1170 S. AJILA
Table III.
of a change at a given level and propagates the impact to the other level (cf Example 4 in
Table VI).
Table V.
1174 S. AJILA
Table V an example of the activation of this query. This example is based on the HOOD
design diagram in Figure 9. This diagram is the HOOD design for the Ada example shown
in Table II.
In this example, we note that we have two types of conclusion: micro-conclusion and
global-conclusion. The reason for this is that the conclusions given by the impact analysis
function may be ‘contradicting’ because each conclusion (micro-conclusion) is based on the
facts, the rules and the objects at hand (i.e. what the impact analysis function is working with
at the time of giving the conclusion). This working set may change for the next analysis; for
example, the facts and the rules may remain the same while the objects may be changed.
In this case the next conclusion may not be the same as the previous one. To resolve this
seeming contradiction, we have introduced the global conclusion which actually gives a
condition in the form of a conclusion.
Table VI.
1176 S. AJILA
Table VII.
often not performed. We believe that, with the WHAT-IF impact tool, the cost of regression
testing can be reduced.
At present, the WHAT-IF Impact Analysis Tool has not been integrated into any software
development environment neither has it been tested with a ‘big’ software project (an indus-
trial type of project) but the results of the laboratory tests (examples of which are given in
Section 3) are very encouraging.
ACKNOWLEDGEMENTS
The author would like to thank Professor Jean Claude DERNIAME of CRIN-CNRS, Nancy,
France, Dr Henri Basson at the University of Littoral, Calais, France and Dr Amos David
of CRIN-CNRS, Nancy, France for their helpful discussions. The author would also like to
thank the reviewers for their comments and suggestions on the paper.
REFERENCES
1. S. Ajila, H. Basson and N. Boudjlida, ‘Software process assistance: a case study of the impact of object
modification during software development’, 1st African Conf. on Research in Computer Science, Yaoundé,
Cameroun, 14–20 October, 1992, Vol 1, pp. 73–84.
2. S. Ajila, ‘Software process assistance: management of objects modifications in an integrated software
engineering environment’, Nigerian Journal of Science, 28, (1993).
3. S. Ajila, H. Basson and J. C. Derniame, ‘WHAT-IF: a function to estimate the impacts of potential changes
in a software’, Second Int. Conf. on Software Quality Management (SQM 94), Vol. 2, 26–28 July 1994,
Computational Mechanics Publications, Southampton Boston, UK, pp. 379–394
4. S. Ajila, J. C. Derniame and H. Basson, ‘A logic-based approach to impact analysis of objects change’,
Third Int. Conf. on the Practical Application of Prolog, 3–7 April, 1995, Paris, France.
5. J.-M. Alliot and T. Schiex, Intelligence Artificielle et Informatique Théorique, Collection Intelligence Ar-
tificielle, Cépadués Editions, Paris, France, 1994.
6. Robert S. Arnold and Shawn A. Bohner, ‘Impact analysis – towards a framework for comparison’, Proc.
Conf. Software Maintenance, 27–30 September, 1993, Montreal, Quebec, Canada.
7. G. Avellis, ‘Software evolution expert system – requirement analysis’, Delivery Report,
WD/RE/SEES/151089-3, 15 December, 1989.
8. G. Avellis, ‘Specifications of SEES knowledge base model’, Delivery Report, WD/RE/SEES/150591, 15
May 1991.
9. G. Avellis, ‘CASE support for software evolution: a dependency approach to control the change process’,
5th Int. Workshop on CASE, 6-10 July, 1992, Montréal, Québec, Canada, pp. 62–73.
10. Henry Basson, M. C. Haton and J. C. Derniame, ‘Characteristics graph of software quality’, Int. Symp. on
Computer and Information Sciences VII, November, 1992, pp. 455–461.
11. Lionel C. Briand, Sandro Morasca and Victor R. Basili, ‘Measuring and assesing maintainability at the end
of high level design’, Proc. Conf. on Software Maintenance, 27–30 September, 1993, Montréal, Quebec,
Canada.
12. S. D. Cooper and M. Munro, ‘Software change information for maintenance management’, Proc. IEEE
Conf. on Software Maintenance (CSM89), Miami FL, 1989, pp. 279–289.
13. C. G. Davis and P. J. Layzell, ‘Rules to govern change in JSD-based cystems’, Proc. IEEE Conf. on
Software Maintenance (CSM88), Phoenix AZ, 1988, pp. 34–40.
14. D. Sandra Fay and G. Denise Holme, ‘Help! I have to update an undocumented program’, Proc. Conf. on
Software Maintenance, IEEE Computer Society Press, 1985, pp. 194–202.
15. J. Ferrante, Karl J. Ottenstein and Joe D. Warren, ‘The program dependence graph and its use in optimiza-
tion’, ACM Trans. Programming Languages and Systems, 9(3), 319–349 (1987).
16. P. Fillon, N. Mitsuda, A. Sawada, T. Ajisaka and Y. Matsumoto, ‘A facility to trace dependencies between
PCTE objects for software maintenance, Proc. PCTE ’94 Conf., California, USA, December, 1994.
17. L. Daniel Freedman and M. Gerald Weinberg, Maintenance Reviews, Techniques of Program and System
Maintenance, Winthrop Publishers, Cambridge, MA, 1982.
18. R. Gopal and S. R. Schach, ‘Using automatic program decomposition techniques in software maintenance’,
Proc. IEEE Conf. on Software Maintenance (CSM89), Miami FL, 1989, pp. 132–141.
19. M. T. Harandi and J. Q. Ning, ‘Knowledge-based program analysis’, IEEE Software, January 1990.
20. J. Hartman and D. Robson, ‘Techniques for selective revalidation’, IEEE Software, January 1990.
21. Jean Paul Haton, Les systèmes à base de connaissances, Intelligence Naturelle et Intelligence Artificielle,
Symposium de l’association de Psychologie Scientfique de Langue Française, Rome, 1991, Presse Univer-
sitaires de France, pp. 19–42
22. E. Horowitz and R. Williamson, ‘SODOS: a software document support environment - its definition’, IEEE
Trans. Software Engineering, SE–12(8), 1986.
23. M. Lai, Conception Orienté Objet: Pratique de la Méthode HOOD, DUNOD, Paris, 1991.
SOFTWARE MAINTENANCE 1181
24. Janusz Laski and Wojciech Szermer, ‘Identification of program modifications and its application in software
maintenance’, Proc. Conf. on Software Maintenance, 9–12 November, 1992, Orlando, Florida.
25. Cécile Legout, ‘Electre, un langage cible pour la methode HOOD dans le cadre de l’atelier de génie logiciel
CONCERTO’, 5th Int. Conf. on Software Engineering & Its Applications, Toulouse 1992, 7–11 December,
1992.
26. M. M. Lehman and L. A. Belady, ‘Program evolution: processes of software change’, APIC Studies in
Data Processing No. 27, Academic Press, New York, 1985.
27. K. J. Lieberherr and I. M. Holland, ‘Tools for preventive software maintenance’, Proc. IEEE Conf. on
Software Maintenance (CSM89), Miami FL, 1989, pp. 2–13.
28. Panos E. Livadas and Pradal K. Roy, ‘Using dependence analysis’, Proc. Conf. on Software Maintenance,
9–12 November, 1992, Orlando, Florida.
29. Joseph P. Loyall and Susan A. Mathisen, ‘Using dependence analysis to support the software maintenance
process’, Proc. Conf. on Software Maintenance, 27–30 September, 1993, Montréal, Quebec, Canada.
30. Girish Parikh, ‘Restructuring your Cobol programs’, Computerworld Focus, 20(7A), 39–42 (1986).
31. S. L. Pfleeger and S. A. Bohner, ‘A framework for software maintenance metrics’, Proc. IEEE Conf. on
Software Maintenance (CSM90), 1990, pp 320–327.
32. Charles Rich and Richard C. Waters, ‘Knowledge intensive software engineering tools’, IEEE Trans.
Knowledge and Data Enginering, 4(5), (1992).
33. N. Schneidewind, ‘Software maintenace: the need for standardization’, Proc. IEEE, 77(4), 618–624 (1989).
34. A. Taha and S. Thebaut, ‘Program change analysis using incremental data flow techniques’, SERC-TR-14-F,
CIS Department, University of Florida, Gainesville, FL 32611, USA, 1987.
35. Mats Weber, ‘Elaboration order issues in Ada 9X’, ACM Ada Letters, XIII(1), (1993).
36. B. Westfechtel, ‘A graph-based approach to the construction of tools for the life cycle integration between
software documents’, 5th Int. Workshop on CASE, Montréal, Québec, Canada, 6–10 July, 1992.
37. N. Wilde and Allen Chapman, ‘Describing object oriented software: what maintainers need to know’,
SERC Purdue University and University of Florida, Technical Report No. SERC-TR-54-F, 1992.
38. N. Wilde and R. Huitt, ‘A data-base program representation for software maintenance tools’, SERC-TR-
25-F, CIS Department, University of Florida, Gainesville, FL 32611, USA, 1988.
39. N. Wilde, R. Huitt and S. Huitt, ‘Dependency analysis tools: reusable components for software mainte-
nance’, Proc. IEEE Conf. on Software Maintenance (CSM89), Miami FL, 1989, pp. 126–131.
40. S. S, Yau and P. C. Grabow, ‘A model for representing programs using hierarchical graphs’, IEEE Trans.
Software Eng., SE7, 556–574 (1981).