You are on page 1of 4

An Improved Efficient Software Maintenance with Semantic Web

Rab Nawaz, Mehtab Afzal, Jawad Usman

Department of Computer Science
COMSATS Institute of Information Technology, Abbottabad, Pakistan
{rabnawaz, mehtabafzal, jawadusman}

Abstract The maintenance process can be well illustrated from the

Software maintenance is an important phase following Fig. 1.
of software engineering process. For efficient
maintenance, software professionals should know Problem
first about the components and information about Found
them i.e. Metadata or data dictionary. One of the
important information that needs to be known by the
maintainers first of all is the versioning information.
In this paper software components and information
about them i.e. metadata about those components are
represented in OWL Ontology. After creation of
OWL, this created Ontology is mapped with a
Fix it
standardized Software Engineering Concept
Ontology (SEC Ontology) and then SPARQL Query
Figure 1. Software Maintenance Process.
Languages are used to query the RDF graph in order
to extract useful information about software
Whenever a problem is found then there is a try to fix it.
components. The proposed methodology empowers
The problem found may be in the form of new elaborated
the software developers and professionals, to perform
requirements in the organization or any other
software maintenance with little efforts as for as time
modification in the software [2].
and cost are concerned.
It is notify that the total cost on system maintenance is
I: INTRODUCTION estimated to comprise at least 50% of total life cycle
costs [2]. So maximum cost is to be observed on the
Software maintenance is the modification of a maintenance.
software product after delivery to correct faults, to In this paper one thing is to address that how to empower
improve performance or other attributes, or to adapt the the software maintainers that performs software
product to a modified environment [1]. It is the important maintenance very effectively with less time and cost.
phase of software engineering life cycle. This phase is Once a software is handed over to any developer or
consulted only when there are newly elaborated programmer for maintenance, he/she first consult with
requirements in the organization or some modification in the documentation of the software that contains all the
the existing software. Software maintenance can be information about the software component and
classified into four main categories [2]. information about them which means the functional and
The first one is corrective maintenance dealt with non functional requirements.
reactive modification of a software product performed If this type of information is not available at that time,
after delivery to correct discovered problems. It is just then it is bit difficult for that developer or programmer to
only deal to fix the identified error. perform maintenance efficiently. So maintenance is
The second one is the adaptive maintenance which is concerned with time and cost. Both these factors are
performed only when there is a need of modification in directly proportional to each other. If time increases, cost
the software product performed after delivery to keep a automatically increases.
software product usable in a changed or changing The proposed technique also reduces the cost on
environment. software maintenance up to some extent. Basically this
Modification of a software product after delivery to comes across when there is divergence between the
improve performance or maintainability comes in software components and information about them. This
perfective maintenance. This maintenance is done only divergence is due to loss of coupling between software
when there is new requirements are elaborated. This components and information about them. Totally a new
maintenance is carried out most of the time [3]. methodology is adopted in this paper for software
Modification of a software product after delivery to maintenance using semantic web. For this purpose three
detect and correct latent faults in the software product main elements of the semantic web are used to overcome
before they become effective faults, this is done in the the above mentioned problem.
preventive maintenance. In [4], RDF (Resource description Framework),
Ontology Web Language (OWL-DL) and SPARQL
Query Languages.The Resource Description Framework The SEC ontology is different from other modeling
(RDF) is a family of World Wide Web Consortium languages, such as UML or OCL, as for as
(W3C) specifications, originally designed as a metadata implementation is concerned [4].
data model, which is used as a general method for The SEC ontology has only one way to represent
modeling information through a variety of syntax relationship between two object oriented classes [8].
formats. Those classes may have different set of methods that can
SPARQL stands for SPARQL Protocol and RDF Query implement other methods in other classes such as parent
Language. This is used on the RDF graph in order to class relationships. The direct relationship between
extract useful information regarding the state of the classes can be inferred but are not explicitly stated.
software system [4]. The SEC ontology was created on SWOOP ontology
And an OWL-DL is used in the proposed technique to editor [11], whose ontology debugging features [16] are
represent the meaningful relationships between the highly useful. The debugging features are based on Pallet
software components. OWL-DL reasoned [17]. The online version of Pallet
[15] was used to validate the design of the ontology by
II. WEB SEMANTIC TECHNIQUES performing SPARQL query languages against it.
HTML documentation for the ontology is created using
Software systems and information about them the Protégé ontology editor with its OWL plug-in [12]
diverge quickly in time. Basically this divergence is due and OWLDoc Plug-in [7]. The generated OWLDoc for
to loss of coupling between the software components and SEC ontology is available online at [9].
information about them [4]. The SEC ontology is used to represent the generic
According to this technique capturing the system software engineering concepts in order to facilitate its
metadata coupling it with software components and then potential reuse.
relating it to software engineering concept
ontology(SEC) and maintaining it over time. Metadata IV. EXAMPLE DATA
basically includes functional and non functional
requirements documentations, metrics and success or The example data based on SEC ontology is
failure of tests. available online at [10]. The example data represents a
small portion of a real world software package of the
ONTOLOGY (SEC) The example data consists of two object oriented classes
having four methods. They belong to a package, which
Software Engineering Concept ontology is belongs to a program. Each class has an associated unit
available on the internet in a standard (OWL-DL) format test. A simple metric is associated with one of its class.
just only to facilitate its potential reuse [7]. Each class has a requirement associated with it to
SEC ontology describes the relationship between the implement.
object oriented software components. This has the The OWLDoc for the example data is available at [13].
similarity to java and other object oriented languages like The example data is loaded first into Redland
C++ or C# etc. Application Framework [5] and SPARQL Queries are
Software tests, metrics and requirements are also made against it. The SQPARQL queries are just only to
represented in OWL and their relationship defined to use to answer the following questions as in [4].
various components. Two types of tests are represented 1. Whether or not the requirements are currently
here, unit tests and integration tests. Tests have results; validated?
and discusses the success or failure of the last run. Tests 2. Which of the requirements require revalidation?
are associated with software components and are 3. which tests have failed/success?
themselves implemented as software components. 4. Which are the requirements that are associated
Descriptions about every software components are held with the failed tests?
in a generic rdfs: comment annotation property [4]. 5. Which object oriented class had associated
Each software component basically represents some tests?
requirement, and these requirements can be encoded by The success of these queries show that the semantic web
one or more object oriented classes. A particular method technique can be used to implements relational
may be designated as an “entry point” for the navigation of software collaboration graphs and system
requirements. An entry point provides a clue as to where metadata as described in [14].
to begin tracing the implementations in the source code. The SPARQL can also be run through the Pallet OWL-
The key to using the SEC ontology is capturing when DL reasoner. A portion of the example data is shown in
information changes. This is done via an object owl the following graph. At the center a java class from the
property “LastModifiedAt”, a date time property that JRDF project called DefaultSparqlConnection. It is of
may be used on any software component, tests, metrics type OOClass which is from SEC ontology. It has one
and requirements and denotes when it was last modified. method called ExecuteQuery () [14]. The “has method”
The entire SEC ontology is available at [14]. relationship also shown in the graph. The OOClass has
an associated requirement REQ1001 and a unit test also.
constitute the SEC ontology were analyzed whether the
Req1001 proposed approach can be implemented within integrated
hasEntryPoint development environments or project management tools
rdf:Type hasMethod
OOClass executeQuery()
For software maintenance versioning
DefaultSparqleConnection information of the actual application framework on
hasTest which the software is developed, is most important to
know for the actual software maintainer/developer.
UnitTest So providing versioning information of the platform in
DefaultSparqleConnectionUnitTest the ontology is most critical at this stage.
Once the software is handed over to the programmer or
Figure 2. RDF graph on the Example Data
developer, the first thing the software maintainer or
developer should know the versioning information about
In the above Fig 2. a relationship Methodof exists from
the application on which the actual software was
the ExecuteQuery() method to its parent class
DefaultSparqlConnection. Only one such relationship is
The following Fig. 3 shows the proposed model.
shown here for clarification.


The following is made against the example data

to show only those classes which have associated tests. System Metadata and
Software System
Basically this query returns two columns defined in the information about the
Application Framework
SELECT command, one for the Class and other for the
associated test. The Syntax of the query is as follow as
Relating It
described in [4].
Software Engineering Concept
Prefix sec: Ontology(SEC)
ec.owl#> Figure 4. Proposed Model.
Prefix rdf:
All the relevant information about the software
SELECT? Class? test
components, it will capture from the metadata means that
requirements (Functional and Non Functional) and
information about them. The work done in this
?class rdf: type sec: OOClass.
methodology focusing on the metadata and coupling this
OPTIONAL {? test sec: isTestOf? class}
metadata with SEC ontology, but no information about
the application framework is mentioned out. Information
about the software components and information about
After executing the query, results will be look like as,
the application framework, both these things are
represented in OWL and then relating this ontology to
CLASS TEST already built-in SEC ontology available at [7]. This will
sec-example: help the maintainer to know about the original software
SparqlQueryBuilderUnitTest that is going to be modified with addition to the
application framework on which this software is
sec-example: sec-example: developed. During maintenance the first thing to know
SparqlQueryBuilder SparqlQueryBuilderUnitTest
by the maintainer before going to metadata, is of the
sec-example: sec-example: versioning information about the framework on which
DefaultSparqlConnection DefaultSparqlConnectionUnitTest the software is developed. The proposed technique
empowers the maintainers for better understandability of
the software components and all other potential relevant
information about the software.

Figure 3. Output Data

Output retrieves the four classes and two associated tests

with them. The OWL classes and properties that
VII. CONCLUSION [9] Hyland-Wood, D.: OWLDoc for an Ontology of
Software Engineering Concepts, version 0.1,
Software system and information about them diverge
quickly in time; understandability is bit difficult in such sec/index.html (2006)
scenarios. The proposed methodology empowers the
software maintainers and developers in every aspect of [10] Hyland-Wood, D.: Example Data for an OWL-DL
software understandability and maintaining them. Ontology of Software Engineering Concepts, version 0.1,
The created ontology separate software engineering
domain knowledge from software components and example.owl (2006).
system metadata, and make the domain assumptions
explicitly. Software Engineering Concept (SEC) [11] Kalyanpur, A., Parsia, B., Sirin, E., Cuenca-Grau,
ontology is used in this paper to represent generic B.,Hendler, J.: Swoop: A 'Web' Ontology Editing
software engineering concepts in order to facilitate its Browser, Journal of Web Semantics Vol 4(2), (2005)
potential reuse.
This technique can be applied to existing systems during [12] Knublauch, H., Fergerson, R., Noy, N., Musen, M.:
re engineering, reverse engineering or routine The Protégé OWL Plugin: An Open Development
maintenance. This proposed technique can be used at any Environment for Semantic Web Applications, Third
time during software system’s life cycle. The technique International Semantic Web Conference (ISWC 2004)
discussed in this paper may be implemented in an (2004)
integrated development environment or project
management tool. Little human efforts required to do the [13] Hyland-Wood, D: OWLDoc for Example Data for
maintenance using this technique. an Ontology of Software Engineering Concepts, version
0.1, HTTP://
REFERENCES /secexample/index.html (2006)

[1] IEEE Standard Glossary of Software Engineering

Terminology. New York, NY: Institute of Electrical and [14] Jarrott, D., MacDonald, A.: Developing Relational
Electronic Engineers (1990). Navigation to Effectively Understand Software, Proc.
10th Asia- Pacific Software Engineering Conference
[2] (APSEC'03) (2003), 144-153

[3] Prof. Stafford, Kagan Erdil, Emily Finn, Kevin [15] Parsia, B., Sirin, E., Grove, M., Alford, R.: Online
Keating, Jay Meattle, Sunyoung Park Deborah Yoon,” OWL Consistency Checker with SPARQL Query,
Software Maintenance as Part of the Software Life
Cycle” Comp180: Software Engineering, December 16, (as updated 2006)
[16] Parsia, B., Sirin, E., Kalyanpur, A.: Debugging
[4] D. Hyland, D. Carrington and S. Kaplan “Enhancing OWL Ontologies, Proc. 14th International World Wide
Software Maintenance by Using Semantic Web Web Conference (WWW2005) (2005) 633 – 640.
[17] Sirin, E., Parsia, B., Cuenca Grau, B., Kalyanpur,
[5] Beckett, D.: The Redland RDF Application A. Katz, Y.: Pellet: A Practical OWL-DL Reasoner.
Framework, (updated 2006). Submitted for publication to Journal of Web Semantics. (2005).
[6] Bontas, E., Mochol, M., Tolksdorf, R.: Case Studies
on Ontology Reuse, Proc. 5th International Conference
on Knowledge Management (I-Know 2005)

[7] Horridge, M.: OWLDoc,

[8] Hyland-Wood, D.: An OWL-DL Ontology of

Software Engineering Concepts, version 0.1,