Now, we say that a method
J
Mm ∈
that can affect
or affecting a variable set
V is
)()(., sHmsMVv
J
Ss ∧=∈∈∃ and a class
J
Cc ∈
that
can affect or affecting a variable set is
)()(., sHcsCVv
J
Ss ∧=∈∈∃ and a package
J
Pp∈
that can affect or affecting by a variable
V is )()(., sHpsPVv
J
Ss ∧=∈∈∃ .
Thus , all the methods that can affecting on or affected
by a variable set
V is given by
)}()(.,|
,
{ sHmsMVv
J
Ss
VM
m ∧=∈∈∃
∑
= . All the
classes that can affecting on or affected by a variable set
V is given by
)}()(.,|
,
{ sHcsCVv
J
Ss
VC
c ∧=∈∈∃
∑
= and all
packages that can affecting on or affected by a variable set
V is given by
)}()(.,|
,
{ sHpsPVv
J
Ss
VP
p ∧=∈∈∃
∑
= .
Given a program
J , The slicing criterion for a program
J with respect to a variable V in a statement
is a turple
),(
ξξ
ζ
vs= ,where
J
Ss ∈
ξ
and
J
Vv ∈
ξ
.
5.1 Statement Slicing
The statement level concerns about program
statements, control predicates and different kinds of
variables. Given a program
J and a slicing
criterion
, we get the statement slicing for J with
respect to the slicing criterion
),(
ξξ
ζ
vs= , where
ξ
vV ∈ .
5.2 Method Slicing
The method level contains the methods or variables
defined in a class. Given a program J and a slicing
criterion
, we get the method slicing for J with
respect to the slicing criterion is
= >< VsM ),( ,
where
ξ
vV ∈ .
5.3 Class Slicing
The class level composed of a set of top level classes
or interfaces. Given a program J and a slicing
criterion
, we get the class slicing for J with respect
to the slicing criterion is
= >< VsC ),( , where
ξ
vV ∈ .
5.4 Package Slicing
Java programs are composed of a set of packages,
whose naming structure is hierarchical. Given a
program J and a slicing criterion
, we get the
package slicing for J with respect to the slicing
criterion is
= >< VsP ),( , where
ξ
vV ∈ .
6 CONCLUSION
Many software maintainers are used to extract the
affected portion of the program that he wants to
debug or test this program segment. It was sound for
the procedural base language but it will be difficult
for the object based programming language such as
java. In our system, we proposed new program
slicing techniques for object oriented java programs
based on their hierarchical structure. Statement
slicing enables the user to inspect the effects of the
particular statement on the slicing criteria. Method
slicing identifies the methods that are directly effects
on the given slicing criteria. Class slicing can make
the data members and statements in methods of the
class that might affect the slicing criteria. Package
slicing enables user to extract the sub packages,
import packages that also affect the slicing criteria.
Base on the resulted slice, we can easily examine the
affected portions of the program and can also be use
in the software metric, testing and maintenance
processes.
REFERENCES
Barros, S., Bodhun, T., Escudie, A., Quille, J., and Voidrot,
J., 1995. Supporting impact analysis: A semi-
automated technique and associated tool.
Chaumun, A., Kabaili, H., Keller, R., and Lustman,
F.,1999.A change impact model for changeability
assessment in object-oriented systems.
Chen, J., Wang, F., and Chen, Y.,1997. Slicing Object
Oriented Programs. Proceeding of IEEE Conference.
Fan, J., 2001. JATO: Slicing Java program hierarchically,
TUCS Technical Reports , Turku, Finland.
Horwitz, S., Reps, T., and Brinkly, D., 1990.
Interprocedural slicing using dependence graph. ACM
Transaction on Programming Languages and System.
Karstu, S., 1994. An examination of the behavior of Slice-
Based Cohesion Measures,Michigan Technological
University.
Kung, D., Gao, J., Hsia, P., Wen, F., Toyoshima, Y., and
Chen, C., 1994.Change impact identification in object-
oriented software maintenance. In Conference on
Software Maintenance, Piscataway,NJ, IEEE.
Larsen, L., and Harrold, M., 1996. Slicing Object oriented
Software. In the 18
th
International conference on
Software Engineering.
Ottenstein, K., and Ottenstein, L., 1984. The program
dependence graph in a software development
environment ,ACM Software Engineering Notes.
Peeger, S., and Bohner, S.,1990. A framework for software
maintenance metrics. IEEE Transactions.
Weiser, M., 1984. Program Slicing", IEEE Transaction on
Software Engineering.
ICEIS 2005 - DATABASES AND INFORMATION SYSTEMS INTEGRATION
468