a Java clone of CLIPS (CLIPS, 2005) that is one of
the most known and used expert system generator.
The KBS provides facilities for writing rules
dedicated to software evolution. As illustration
example of a rule: If a method is deleted then all the
methods calling it are impacted by this deletion.
IFSEM has been experimented as a workbench
to implement four engineering tools that are: a
graphical software browser, a change impact
propagator, a source code profiler and the
cartography of legacy systems
.
2.1 Limits and Drawbacks of
IFSEM
The use of object-oriented concepts in our
experimentations appeared as a good way to build
reusable components and to enrich an existing
platform with new developed tools. However, it is
expensive to integrate tools that are not developed in
Java or using different artefact representation
models. There is also another fundamental problem
concerning the impedance mismatch. In fact, the
software artefacts are represented by three different
concepts: persistent objects, graph elements and
predicates. So, a same artefact may have three views
following the tool manipulating it. The KBS
represents the artefacts by predicates, the repository
stores them as persistent objects and algorithms
consider them as graph elements. The impedance
mismatch increases the complexity of the platform
and underlying tools and then decreases the
flexibility of implementing such tools. To achieve
more interoperability and flexibility, we decided to
redevelop the platform by means of an intensive use
of graph rewriting systems and GXL (Graph
eXchange Language) that is a standardized format
especially defined to improve interoperability of
software engineering tools. The resulting platform
has been used to develop three main tools that are: a
change propagation tool, a program refactoring tool
and an architecture recovery tool. We show further
the new platform and the implementation of the
change impact propagation and the architecture
recovery processes under this platform.
3 GRAPHS, GRAPH REWRITING
SYSTEMS AND GXL
The model we use to both represent and manage
software artefacts is based on typed and attributed
graphs where the nodes represent the different kind
of software artefacts and the edges the various
relationships relating them. The nodes and edges are
typed making it possible to produce different views
of the software following the considered types of
nodes and edges. For instance, one can consider only
classes and the inheritance relationship or functions
and the calling relationship, etc. In our model all the
granularity levels may be considered. So, it is
possible to deal with artefacts like statements and
symbols (fine grained) or files (coarse grained). The
same model is used to represent also architectural
artefacts like components, roles and ports, etc.
The graphs are represented by means of GXL
(Graph eXchange Language). GXL has been
defined and adopted by the software engineering
community as a standard format for graph exchange.
The goal of such a model is to improve the
interoperability of the software engineering tools
that represent the software by graphs. GXL is based
on XML. In fact, graphs are represented by XML
hyper-documents defining special tags to represent
nodes, edges, hierarchical graphs, etc. As the MOF
(Meta Object Facilities) (OMG, 2002) GXL defines
three abstract levels of models. The first level
corresponding to a meta-meta-model defines all the
predefined concepts of GXL including the definition
of graph, node and edge tags, etc. The second level
corresponding to a meta-model represents a graph
type or schema. In fact, the GXL graphs may be
typed. The third level is the graph itself as an
instantiation of the graph type.
Graph rewriting systems are based on the use of
graph rewriting rules (Ermel, 1999). These consist of
transforming a sub graph or a part of a graph by
another sub graph. Each rule may be expressed by
two graphs called LHS (Left hand side) and RHS
(Right hand Side). The execution of a rule in a given
graph H (called the host graph) consists of matching
the LHS of the rule with a sub graph L of H and then
replacing L by the RHS of the rule.
As example, the figure 2 shows a rule
implementing variable deletion in an object-oriented
program. In this figure, the nodes are labeled by
their types prefixed by an integer used to match the
nodes of the host graph with those of the LHS of the
rule. The LHS of the rule shows a class defining a
method that uses a variable. The method (2:method)
is called by another method (3:method). In the RHS
of the rule the node (4:variable) has been deleted and
a new node of type Impact has been created. This
means that when a variable is deleted all the
methods m using this variable are impacted and then
all the methods using m are also impacted.
ON IMPLEMENTING INTEROPERABLE AND FLEXIBLE SOFTWARE EVOLUTION ACTIVITIES
255