stores, i.e. files or tables in the database, while pro-
gram units, i.e. programs and subroutines, are used
to derive object methods. Metrics for object-oriented
design (Chidamber and Kemerer, 1994) are used in
assigning program units as object methods, trying to
minimize the coupling among the discovered objects.
However, the problem of reengineering is left open,
as the authors conclude that further work is needed
to understand how the proposed decomposition can
be actually used in reengineering. In (DiLucca et al.,
2000) the method of (Cimitile et al., 1999) is extended
so as to recover also relationships among objects and
produce the system class diagram. The construc-
tion of the class diagram proceeds through a number
of steps, including the identification of relationships
among candidate classes, as well as the validation of
the model. A classification of different cases in map-
ping relational tables onto objects is in (Canfora et al.,
1998).
In (de Guzman et al., 2005) a tool is pre-
sented which, starting from the physical schema of
a (relational) database, translates it into a vendor-
independent metamodel which, in turn, is translated
into a class diagram representing the possible con-
ceptual schema used during the development of the
database. The criterion enforced by the tool is to de-
vise one class for each table of the data database. The
class diagram, i.e. the OO model of the systems, is
then used as the basis of a forward engineering stage,
which is carried out automatically by the tool, pro-
ducing a reengineered version of the systems.
In (Dugerdil, 2006) and (Dugerdil and Jossi,
2007) a method is proposed for reconstructing an ar-
chitecture whose elements are mapped to concepts of
the business domain. The method is strongly influ-
enced by the Unified Process (UP). It begins building
a representation of the business process in terms of
use-cases. These are reconstructed by gathering in-
formation of the system usage from all the involved
people. The recovered use-cases are then analyzed to
produce the analysis model of the system in standard
UP analysis class stereotypes (Boundary, Control and
Entity classes). The resulting analysis model repre-
sents the hypothetical architecture of the software. El-
ements of this architecture are related to visible par-
titions of the existing system (files, tables, etc.). The
next step is a dynamic analysis of the source code; this
is performed by executing the recovered use-cases on
the existing system. Recorded execution traces are
then examined to identify the classes involved in the
execution of each use-case. Finally, identified classes
are mapped to the analysis model, leading to what
could be called the model for forward engineering.
A relevant result of (Dugerdil and Jossi, 2007) is that
it confirms that the pure bottom-up approach, based
on the static analysis of source code, may be waste-
ful of time and effort. In fact, the experimental data
of (Dugerdil and Jossi, 2007) reveal that only a small
fraction of the overall program modules are involved
in the processing of the use-cases. Being driven by
user requirements, the method of (Dugerdil, 2006)
produces an analysis model that represents what the
users want from the system. As such, the model
includes only those parts of the legacy system that
call for reengineering, excluding unused or irrelevant
code. In addition, the recovered model captures the
new user requirements, thus leading to improvements
over the old system.
The agile reengineering process described in
(Stevenson and Pols, 2004) was motivated by fail-
ure of an initial attempt to rewrite existing code (in
Java). The authors maintain that the reengineering
process should be driven by the actual user require-
ments and carried out incrementally, by reimplement-
ing selected functionalities separately, skipping alto-
gether the analysis of legacy code.
3 OUTLINE OF THE METHOD
The objective of reverse engineering and modification
stages (section 1) is the definition of an architecture
of the target system, so as to incorporate actual user
requirements and to take into account actual system
operations. Rather than relying on tools that automat-
ically generate model classes from the existing code,
we follow the guidelines of iterativedevelopment pro-
cesses such as UP, starting from current user require-
ments.
As a result, the first step of the method is to re-
coverall possible use-cases. This is done by gathering
information from the users, so as to identify the key
problems and to incorporate in the analysis what the
users want, avoiding those aspects that have no value
for them.
Once the use-cases are recovered, they can be exe-
cuted on the existing system in order to identify which
are the persistent legacy data involved in their exe-
cution – this corresponds to the dynamic analysis of
(Dugerdil and Jossi, 2007). To better understand sys-
tem behavior, this activity can be supplemented with
inspection of source code.
The data structures identified in the legacy data
base is the starting point for deriving the classes to
be implemented in the target system and for build-
ing the OO model of the business domain. To derive
the OO model of the business domain, we follow the
meet in the middle approach of (Fowler, 2003), mov-
AN INCREMENTAL APPROACH TO SOFTWARE REENGINEERING BASED ON OBJECT-DATA MAPPING
167