Professional Documents
Culture Documents
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
737
INTRODUCTION
HE
require taking into account the various types of dependencies that might exist among different model elements. This
analysis can become even more complex when one tries to
consider the relations among objects that get dynamically
formed and dissolved during a run of the system. On the
other hand, development of an impact analysis technique can
help understanding, testing, reengineering, maintenance,
and reuse of large software architectures.
In this context, researchers have proposed using dynamic program slicing techniques to decompose large
architectures into manageable portions. These techniques
not only facilitate comprehending large architectures, but
also help perform impact analysis and reliability prediction
based on architectural models [19], [30], [45], [46]. Besides,
architecture model slicing can also be used to compute
various types of metrics to characterize software architectures. Static slicing techniques can also be used for similar
purposes, but the computed static slices would be relatively
conservative. This poses a serious limitation on the
applicability of such static model slices.
738
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
2.
RELATED WORK
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
739
740
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
741
742
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
743
Fig. 5. A partial view of an example UML model. (a) Classes depicted using a class diagram, (b) and (c) interactions depicted using two sequence
diagrams.
744
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
1.
2.
3.
4.
5.
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
745
746
5.1
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
747
Fig. 8. Four scenarios for the interactions in the UML model of Fig. 5.
2.
5.5
3.
748
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
The data initializing the class attributes get associated with an attribute (AT) node.
The data initializing the operation parameters get
associated with a parameter (PR) node.
The data in the operation return value get associated
with a return (RT) node.
The data defining a fragment condition(s) get
associated with the corresponding predicate class
(PC) node.
The data in interaction use parameters get associated
with an interaction (IT) node.
4.
5.
749
750
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
Fig. 12. An example UML model. (a) Classes depicted using a class diagram and (b) an interaction depicted using a sequence diagram.
Fig. 13. MDG representation for the example UML model given in Fig. 12. (a) View before slicing and (b) view on slicing.
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
751
752
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
corresponding to Im k 2 ScenarioMsgList
based on DM during execution of scenario Smj do
TraverseMDGMDG; Im k; DM ;
DAMS(SCd )=Track DynSliceMDG; Im k; DM ;
end for
DisplaySlice(DAMS(SCd ));
End DSUAM
After the slicing criterion is given as an input, DSUAM
computes a dynamic slice on the fly by executing Phase 2 of
the algorithm.
SetClass and SetInteraction are first initialized to
fCL1 . . . CLng and fI1 . . . Im g, respectively, indicating
that initially the architectural model consists of n classes
and m interactions. The MDG is initialized to NULL,
indicating that initially no nodes or edges exist in the
MDG. The loop of Phase 2 traverses the MDG for any given
slicing criterion. This loop calls two other procedures, viz.,
TraverseMDG() and Track_DynSlice(). Next, Phase 2
of the algorithm ends with a call to the procedure
DisplaySlice(). A detailed description of the various
procedures called during execution of DSUAM is available
in [23], including the pseudocode representation. The
different procedures called in Phases 1 and 2 of DSUAM
perform the following tasks:
.
753
754
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
8nt
nT
nt
S1 DSUAM sizeGM
S2 DSUAM OjMEDS j:
sizeGM OjMEI j2 :
OjMEI j :
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
OjMEI j OjMEDS j
OjMEI j2 :
10
T1 DSUAM OT ;
11
12
13
OT2 OT
OT2 :
14
755
756
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
Fig. 15. (a) MDG showing dynamic architectural model slice computed for the slicing criterion PCC ; S12 ; DM fattrib a1 1; attrib a2
xxy; attrib c1 0; attrib c2 5 during the execution of Phase 2 of DSUAM, and (b) MDG showing dynamic architectural model slice computed
for the slicing criterion PCC ; S12 ; DM NULL during the execution of Phase 2 of DSUAM.
Fig. 16. (a) MDG showing dynamic architectural model slice computed for the slicing criterion NULL ; S12 ; DM fattrib a1 1; attrib a2 xxy,
attrib c1 0; attrib c2 5g during the execution of Phase 2 of DSUAM, and (b) MDG showing dynamic architectural model slice computed for
the slicing criterion CAF ; S21 , DM fattrib d1 aaa, attrib d2 1; attrib f1 1; attrib f2 2; attrib f3 xyx, attrib e1 aba during the
execution of Phase 2 of DSUAM.
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
6.5
2.
757
758
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
PROOF OF CONCEPT
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
TABLE 1
Artifacts for Classes Considered in Each System Model
759
TABLE 2
Artifacts for Interactions Considered in Each System Model
760
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
761
TABLE 3
Model Specification in Terms of Model Elements and Their Corresponding MDG Size
in Terms of Different Node and Dependency Types
762
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
TABLE 4
Sizes and Descriptions of Models and Slicing Criteria Used in Experiments
TABLE 5
Effect of Slicing Criteria on the DSUAM Slice Size with Varying DM
TABLE 6
Models and Their Corresponding MDG Sizes (Consolidated), and Impact of Slicing Criteria on DSUAM Slice Size
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
763
TABLE 7
Average Runtime Requirements of DSUAM Algorithm
TABLE 8
Memory Requirements of DSUAM Algorithm
needed for execution of Archlice, which for our implementation is 149 KB and remains almost constant for all cases.
Moreover, our technique represents every class using a
unique class access (CA) node in the MDG. This is irrespective
of the number of objects of a class existing across various
interactions. This obviates the necessity to create additional
nodes in case of repeated instantiation of any architecture
classes and their objects. This ensures that the data structures
TABLE 9
Summary of Results on Handling Large-Sized UML Models Using Our Four Approaches Proposed in Section 6.6
764
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
765
Fig. 20. Plots based on experimental data presented in Tables 3 and 6. (a) Increase in MDG size with increase in model size and (b) decrease in
relevant model elements due to slicing.
Fig. 22. Change in average slice size with increase in number of slicing
criteria used with parameter DM NULL .
766
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
Fig. 23. Change in average slice size with increase in number of slicing
criteria used with parameter DM FEW .
Fig. 24. Change in average slice size with increase in number of slicing
criteria used with parameter DM ALL .
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
767
768
.
.
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
769
TABLE 10
Summary of Comparison with Related Work
770
VOL. 37,
NO. 6,
NOVEMBER/DECEMBER 2011
ACKNOWLEDGMENTS
The authors are grateful to the anonymous referees for their
detailed comments and insightful suggestions, which
helped in refining and improving the presentation of the
paper. The authors thank the staff of the Software Lab,
Computer Science and Engineering Department of the
Indian Institute of Technology Kharagpur, West Bengal,
India, for extending all support to implement Archlice and
to perform model slicing experiments. Aritra Nayak of
MNIT, Allahabad, India, also deserves a big thank for his
programming support.
REFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
LALLCHANDANI AND MALL: A DYNAMIC SLICING TECHNIQUE FOR UML ARCHITECTURAL MODELS
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22]
[23]
[24]
[25]
[26]
[27]
[28]
[29]
[30]
[31]
[32]
[33]
771