\documentclass{llncs}
\usepackage{makeidx}
\usepackage[dvips]{graphicx}

\begin{document}

\tableofcontents

\mainmatter

\title{Towards Ontology Driven Software Design}

\titlerunning{Ontology Driven Software Design}

%%%%%%%%%%%%%

\author{P. Ciancarini \and V. Presutti \\
\email{\{ciancarini, presutti\}@cs.unibo.it}}

\authorrunning{Paolo Ciancarini et al.}   % abbreviated author list (for running head)

\tocauthor{P.Ciancarini, V.Presutti (University of Bologna)}
%


\institute{Dipartimento di Scienze dell'Informazione, University
of Bologna}


%%%%%%%%%%%%%


\maketitle

\begin{abstract}
We are studying the use of UML as a language for modeling
organization ontologies as a foundation for designing Web
applications which support organizations.

\end{abstract}

\section{Introduction}

During the last years the number of organizations which have
``faced'' themselves on the World Wide Web with their portals has
incredibly increased and this trend probably will continue in the
future. Organizations more and more rely upon these portals for
offering services to their members or to other people. The large
amount of information and services that these portals make
available is accessible through the specification of URI
addresses, the use of search engines, or following links from
related arguments.

In order to support this new usage of Web technologies, the
concept of a Semantic Web has been introduced by Tim Berners-Lee.
The goal of the Semantic Web initiative is to give to all
information available on the Web a machine processable form, so
that it can be used for several purposes, including more
interesting results when searching some specific information,
better data integration from different sources, and the automation
of organizational tasks across organizations.

The World Wide Web represents a new space through which any kind
of organization can offer services and data. The huge diffusion of
this Internet service has led to develop a new kind of software
systems, called \emph{Web applications}. Usually these are
collections of web pages and services, connected through
hypertextual links, and supporting a given domain. A Web
application describes an organization structure, and provides a
set of functionalities to its users which are members and have
specific roles in the organization.

With the new concept of the Semantic Web the development of web
applications should evolve including, in their implementation, the
use of knowledge representation technologies in order to obtain
all benefits offered by the semantics annotation of documents and
data. In fact, a \emph{Semantic Web application} is intended to be
a Web application, where all pages are annotated with semantics
information, useful for describing machine processable
organizational information.

In order to give a machine processable form to organizational
information, it is necessary to define {\em domain ontologies},
which are shared vocabularies suitable to provide say a Web page
with a semantic description of its content. To do this a set of
standard technologies has to be identified. The inclusion of a
standard semantics representation in a Web application enables the
automation of tasks through knowledge sharing.

For the purposes of this paper a Semantic Web application is
intended to be a Web portal that describes an organization
structure, provides a set of functionalities to its users, and
manages and shares knowledge on organizational information.

We investigate the design of a Semantic Web application from
scratch, focusing on

\begin{itemize}
    \item how the definition of the domain ontology affects
    design activities;
    \item the ontology lifecycle management, and its
    correspondence with system evolution;
    \item knowledge sharing among Web applications and automation of tasks;
    \item knowledge reuse in terms of ontology evolution.
\end{itemize}

The first issue concerns the technologies used to express a system
specification design. The challenge here is to use the same
paradigm to represent both the system design and the domain
ontology. In particular we focus on the object oriented paradigm
and the set of standard technologies it is associated to.

More specifically, in some recent papers Cranefield
\cite{Cra01a,Cra01b} has shown that UML class and object diagrams
can have a direct correspondence to ontology concepts. We are
expanding this approach, aiming at exploiting also activity
diagrams and state diagrams as related to ontology concepts.

Let us sketch the general method. When drawing a UML class diagram
for a Web application we are defining \textit{de facto} the
elements that characterize that domain ontology. For instance,
when we design the portal of a University, we have to represent
concepts like professor, student, faculty, etc. Then, via the XML
Diagram Interchange (XMI, the standard DTD for UML) \cite{XMI01}
we can obtain a translation from a UML class diagram to a
corresponding RDF schema. The Resource Description Framework (RDF)
\cite{RDF} is the technology that the World Wide Web Consortium
proposes to describe the data contained  in the Web pages and
services, thus actually implementing a Semantic Web. The RDF is a
syntax for metadata and provides interoperability between
applications that exchange machine understandable information on
the Web.

With state diagrams we can model the evolution processes of
knowledge. In particular a state represents the set of properties
that a resource has at a given time, and the addition of new
information to that resource is the event that causes a state
transition. Activity diagrams can be used to conceptually model
the ontology lifecycle, for instance the workflow necessary to
introduce new concepts in an ontology.

The choice of UML for describing organization ontologies has the
following motivations:

\begin{itemize}
    \item UML is a standard language for object oriented
    modelling;
    \item it is fastly expanding its user community;
    \item it can be integrated by OCL formulas for the
    expression of constraints;
    \item it is supported by several tools that facilitate
    the design process;
    \item it is based on a graphical notation
that is simpler and easier to read than most description logic
    formalisms, the usual choice to describe an ontology.
\end{itemize}

With an ontology-driven system development, several benefits can
be envisaged. For what concerns the ontology lifecycle management,
an ontology domain changes or evolves when new concepts are added,
or new elements replace existing ones to the language that
represents an environment. These concepts can be logically managed
with UML diagrams.

If the organization structure is linked to the domain ontology,
they are both involved in each other changes.

Ontology lifeycle management includes:

\begin{itemize}
    \item static aspects, reflecting the ontology model;
    \item dynamic aspects, influence that these changes
describing the organization process workflow that has direct
correspondence to a Web portal.
\end{itemize}

Directly connected to these arguments is the topic of knowledge
sharing across organizations. With such a knowledge representation
it is possible to integrate the domain ontology with knowledge
concepts from other applications. This allows the communication
between different sources of related environments, and leads to
the automation of tasks based on data-sharing.

\section{A case study}

In this section we will sketch a method for the ontology-driven
design of a Semantic Web application. This ontology-driven design
method will produce a model that will be used to obtain the
correspondent RDF specific schema expressed in XML format and will
also be used as a conceptual model for a Web portal. Actually, we
will take in account only a subset of the entire domain, but it
can be a starting point from which the representation of the
domain can be completed.

To explain the method we have chosen as a case study a domain that
is well known to all academics, namely the organizational
structure of a university.

A university is a large and complex educational and research
organization. Terms as student, professor, exam, research,
library, etc. are typical of this domain. For instance, the
University of Bologna (UniBO for short) is composed of faculties,
which coordinate teaching activities, and departments, which
coordinate research activities. These two structures are
autonomous but strictly interrelated. Each faculty offers several
courses and benefits of services from a certain number of
departments. Professors are employed and work for one faculty.
They are also affiliated to a department in which they act as
researchers. Professors can teach more that one topic within
different courses, etc.

Since UniBO is a large and complex organization the UML model
which describes its organizational structure consists of a set of
class diagrams each contained in a different package that
underlies a specific aspect.

At the top level there are two packages: the General and the
UniBOntology packages. The former one contains the model of a
General ontology. Here, concepts that can be used also for other
domains, completely different from the university one, are
defined. The General ontology is extended by the UniBOntology
through the use of UML specialization constructs that correspond
to the \texttt{rdfs:SubClassOf} property provided by the RDF
Schema.

The two packages are shown in figure \ref{topLevel}.

\begin{figure}
\centering
  \includegraphics[width=0.8\textwidth]{topLevel}\\
  \caption{Top level packages}\label{topLevel}
\end{figure}

In order to define an ontology for UniBO, we choose to describe
the university structure, its hierarchy and organization, using a
vocabulary that expresses its typical concepts and relationships.

The elements for the UniBOntology are modelled in the UniBOntology
package. The classes that it contains form a taxonomy for the
domain while relationships between them and their attributes
define the properties of the taxonomy's elements.

The figure \ref{packageClassDiag} shows the set of packages that
the UniBOntology one contains.


\begin{figure}
  \centering
  \includegraphics[width=0.8\textwidth]{packageClassDiag.eps}
  \caption{UniBO uml model: the UniBOntology packages}
  \label{packageClassDiag}
\end{figure}

The \texttt{University} package can be seen as an abstract model
of the UniBO organization that omits details, the \texttt{People}
package contains the classes describing the roles that people act
within the UniBO, the \texttt{Uni-Documents} package describes the
types of documents that can be created as reports of university
people's work, the \texttt{Teaching} and \texttt{Research}
packages describe all the elements that contribute to perform the
main activities of the UniBO. The \texttt{Relations} package
contains other packages, each showing the characteristic
relationships between classes of the various packages.

These collections of diagrams are useful when we will design the
navigational model, namely the descriptions of possible
interactions between a specific role and a Web application. In
fact, these diagrams provide a representation from a particular
class view that corresponds to a class of users (a user profile).
At the end of the design process we have a set of class diagrams
that describe the typical elements of our domain and how these
elements relates to each other. Thus, we have a specific schema to
express the entities composing the University of Bologna and make
them publicly available on the World Wide Web. The result should
be a web portal with all the pages composing it being annotated
with semantics information.

The other side of the development should be the specification of a
collection of pages and services. The Web portal system
specification will evolve with its navigational design, interface
definition and implementation. The ontology schema will be used to
annotate the pages. They both combined together will give the
aimed result.

This description seems to completely separate the two models,
suggesting the idea that the ontology serves to integrate the
portal with metadata, but it is separately defined. This situation
is realistic if we have an existing web portal and we want to
provide it with semantics annotations. On the other side, if we
are creating from scratch a novel Semantic Web application it is
appealing the idea of obtaining the desired ontology schema
without an increase of the design activity efforts.

%---------nuovo-------

This can be achieved considering that the ontology model is
essentially very similar to the conceptual model, in fact, the
latter can be obtained directly from the ontology model. In
particular, considering the Object-Oriented Hypermedia Design
Method (OOHDM) \cite{LRS99} it is possible to integrate it with
the production of an ontology schema without additional design
activity efforts.

The figure \ref{ont-driv-method} shows a schematized description
of the steps performed in the ontology-driven development process,
that extends the OOHDM, some of these steps can be iteratively
repeated.

\begin{figure}
\centering
  \includegraphics[width=0.7\textwidth]{ont-driv-method}\\
  \caption{The ontology-driven method for developing Semantic web applications}
 \label{ont-driv-method}
\end{figure}

The activities that this method comprises are: Ontology Design,
Conceptual Design, Navigational Design, Object Model, Interface
Definition, and Implementation.

For clarity of expression we have separated the Ontology Design
and the conceptual Design as two different steps but practically
they reduce to one single step that incorporates both the ontology
design and the conceptual design.

The conceptual model reflects objects and behaviors in the
application domain. It may not reflect the fact that the
application will be implemented in the WWW environment and this
fact make it derivable from the ontology model. This view allows
using the same strategy for implementing ''legacy'' applications
in the Web, by considering their conceptual model also as an
ontology model.

The object model is a collection of UML object diagrams that
describes an abstract representation of the knowledge information
that will be contained in the specific Semantic web application we
are developing. It can be constructed on the base of the ontology
and navigational models, that together give the structure of the
application. This abstract representation can be used to
automatically generate a serialization format to allow web
publication and transmission of the knowledge.

The object model will be integrated with diagrams every time new
information has to be added, so it can be seen as a component that
evolves during the application life cycle. In fact, the figure
\ref{ont-driv-method} shows that this is not really a process step
but that it uses the products of the development process as input
elements for producing its results.

The ontology-driven process comprehends the use of the UML as
modeling language for the design activities, and of tools that
allow the automatic translation from class diagrams and objects
diagrams to a correspondent serialization format that allows Web
publication and transmission of knowledge.

In the context of this work we have used for this purpose a
technology called UML Data Binding (UDB) \cite{Cra01b} together
with a Rational UML supporting tool.

As an example of the obtained code, the figure
\ref{UniBOntologyUDBex1} shows the definition of the class
\texttt{Professor}, its property \texttt{name}, that has been
modelled as an attribute and that it inherits from the class
\texttt{Person} of the general ontology, and its property
\texttt{tutorOf} that has been modelled as an association. In
order to make the code better readable, the following
abbreviations have been used:

\begin{itemize}
    \item \texttt{UniBOntology}, that stands for\\
    \texttt{http://www.cs.unibo.it/schema/UniBOntology\_rdf-schema}
    \item \texttt{General}, that stands for\\ \texttt{http://www.cs.unibo.it/schema/General}
    \item \texttt{rdf-schema}, that stands for\\\texttt{http://www.w3.org/2000/01/rdf-schema}
    \item \texttt{rdf} that stands for\\ \texttt{http://www.w3.org/1999/02/22-rdf-syntax-ns}
\end{itemize}


\begin{figure}
  \centering
  \includegraphics[width=0.8\textwidth]{UniBOntologyUDBex1.eps}
  \caption{UDB translation: The definition of a class and its attribute. The UML class diagram (a)
  and the correspondent code (b)}
  \label{UniBOntologyUDBex1}
\end{figure}

The UniBO Semantic Web application will then integrate its
realization with the semantic annotation of its pages. This will
allow, as said above, the communication between different sources
of related environments, and the automation of tasks based on
data-sharing. In the next section are described two possible
scenarios where knowledge representation features can be
exploited.


\section{Two example scenarios}

One of the main goal of a Semantic Web application is that of
enabling more exact results when a user performs a web searching
on that specific domain.

The possible benefits of the UniBO system are numerous. For
example, an undergraduate student that is writing his thesis needs
to collect documents about a certain topic. He could use the UniBO
system to inquire about which are the researchers working on a
particular area and the articles that they have written about that
topic. Or he could design an agent to search for articles on a
particular subject whose authors are member of a particular set of
institutions.

With such queries the student would obtain a large number of
uninteresting answers from current search engines because they
rank each page based upon how many of the query terms it contains.

With all the pages of the UniBO web portal annotated with metadata
describing semantics information, the result of the query could be
a graph of all possible pathways that match the query.

The figure \ref{graph} shows an example of such a graph that could
be the result of a searching about all the articles whose subject
is the ontology research area and whose authors are members of
UniBO departments.

\begin{figure}
\centering
  \includegraphics[width=1.0\textwidth]{graph}\\
  \caption{An example of searching result as a semantic graph}\label{graph}
\end{figure}

The nodes of the graph represent resources, and the arcs
connecting them represent properties. Each arc has a label
indicating the property name it represents. All nodes are
hypertextual links to the URL containing that resource
information. For example, in the case of an article the URL could
refer to a downloadable version of it (e.g. a pdf file) or to a
web page containing the article, in the case of a department the
URL could be the home page address of that department web site.
Thus, the user can follow the links he finds more interesting for
his purposes.

The second example concerns the interoperability aspect of
ontologies. A frequent scenario from the administrative viewpoint
is that of a student that asks for a transfer from the current
university he frequents to the UniBO. One of the main issues of
such a case is to identify which are the exams that the student
has taken in the old university and that will be considered valid
for the UniBO.

In a situation of ontology sharing, the ontology of the university
from which the student comes from has a non-empty intersection
with the UniBOntology. A possible way of addressing the validation
of exams issue could be the application of the following rule.

Each exam that the student has taken at the university of origin
and that has a corresponding one in the UniBOntology will be
consider valid and will be stored in the new student's profile
created for the University of Bologna.

The figure \ref{studentTransfer} shows a schematization of an
example instance of student transfer. In this case the student
''Pippo'' has taken four exams at the University of Pisa (UniPI
for short). By applying the rule described above it results that
two of these exams can be validated at the UniBO. Thus, these two
exams will be stored in a UniBO student profile for ''Pippo''.

\begin{figure}
\centering
  \includegraphics[width=0.8\textwidth]{studentTransfer}\\
  \caption{Exams validation for a student transfer from the UniPI to the UniBO}\label{studentTransfer}
\end{figure}

\section{Conclusion}

We have investigated the design of a Semantic Web application from
scratch, focusing on how the definition of the domain ontology
affects design activities. The challenge was to use the same
paradigm to represent both the system design and the domain
ontology. In particular we focused on the object oriented paradigm
and the set of standard technologies it is associated to.

More specifically, Cranefield \cite{Cra01a,Cra01b} has shown that
UML class diagrams and object diagrams have a correspondence to
ontology concepts and the Object-Oriented Hypermedia Design Method
(OOHDM) is an object-oriented-based technic for Web-based software
systems development.

In particular we have investigated the correspondence between the
Semantic web application conceptual design and the domain ontology
design finding that the former can be derived from the latter. We
think that when drawing a class diagram for a Web application we
are defining \textit{de facto} the elements that characterize that
domain ontology. Then, via the XML Diagram Interchange (XMI, the
standard DTD for UML) \cite{XMI01} we can obtain a translation
from a UML class diagram to a corresponding RDF schema and a set
of Java classes in order to annotate the web pages composing the
Web portal with semantics information about their content.

The result of these reasonings has been the definition of a
process for the development of Semantic web applications called
\emph{ontology-driven method} that consists of the OOHDM
integrated with two new activities concerning the ontology design
and the modeling of knowledge as object diagrams, and the use of
supporting technologies like the UDB for the semantics annotation
of web pages. Actually, this approach can be applied to all kind
of Object-Oriented development processes, the OOHDM has been taken
as a suitable example because it contains concepts that we found
interesting.

The real aspect that has been underlined is that the introduction
of an ontology design activity in a development process does not
add the introduction of new design efforts, and allows to exploit
knowledge representation in order to achieve the communication
between different sources of related environments, and the
automation of tasks based on data-sharing.

\section{Future works}

It could be interesting to investigate the use of the UML as a
language for modeling other aspects of ontologies as their
lifecycle, evolution and more general their management.

More specifically, it can be investigated the use of state
diagrams for modeling the evolution process of knowledge, and
activity diagram for modeling management aspects.

Furthermore, it is desirable the creation of a UML extension for
the treatment of Semantic Web concepts. An agent-base UML
extension has been already proposed to the OMG \cite{AUML}, so the
creation of a UML specific extension for ontology modeling would
make it easer to handle imported ontology schemas and the modeling
of interaction scenarios between agents and Semantic Web
applications. Such an extension could be associated to a UDB-like
procedure thus allowing the automatic translation from UML models
to a correspondent serialization format that allows Web
publication and transmission of knowledge. This format could be
based on DAML+OIL language that has been identified as a candidate
to became a standard for representing ontology \cite{WOLDraft}. A
mapping between UML diagrams and a DAML+OIL-based serialization
format also addresses an issue of the UML Based Ontology Toolset
(UBOT) \cite{UBOT} project.



%\begin{small}
%\bibliographystyle{abbrv}
%\bibliography{biblio}
%\end{small}

%--------------bibliography-----------------

\begin{thebibliography}{20}

\bibitem{CraPur99}
  Cranefield, S. and Purvis, M.: UML as an ontology modelling language,
  in Proc. Workshop on Intelligent Information Integration, 16th International Joint Conference on Artificial
  Intelligence (IJCAI-99),
  http://sunsite.informatik.rwth-aachen.de/Publications/CEUR-WS/Vol-23/cranefield-ijcai99-iii.pdf"

\bibitem{RDF}
  World Wide Web Consortium: Resource Description Framework (RDF) Model and
  Syntax Specification (1999), http://www.w3.org/TR/REC-rdf-syntax

\bibitem{UML01}
  OMG Unified Modeling Language Specification version 1.4,
  Object Management Group 2001 Recommendation,
  http://www.omg.org/cgi-bin/doc?formal/01-09-67

\bibitem{RDFS}
  RDF Core Working Group members:
  RDF Vocabulary Description Language 1.0: RDF Schema,
  World Wide Web Consortium,
  2002 Working Draft http://www.w3.org/TR/rdf-schema/

\bibitem{XMI01}
  Object Management Group: OMG XML Metadata Interchange Specification version 1.2,
  2001, Recommendation, http://www.omg.org/cgi-bin/doc?formal/2002-01-01


\bibitem{Cra01a}
  Cranefield, S.: UML and the Semantic Web,
  Department of Information Science, University of Otago, New
  Zeland, Discussion paper, 2001

\bibitem{Cra01b}
 Cranefield, S.: Networked Knowledge Representation and Exechange
 using UML and RDF. Journal of Digital Information, 1:8 (2001)

\bibitem{LRS99}
  Rossi, G. and Schwabe, and D. Lyardet, F.: Web Application Models are more than Conceptual Models.
  In Proceedings International Workshop on the World Wide Web and Conceptual
  Modeling, 239-252 (1999).
  http://www.dsic.upv.es/~west2001/iwwost01/files/contributions/ DanielSchwabe/WWWCM99.pdf

\bibitem{AUML}
Odell, J. and Van Dyke Parunak, H. and Bauer, B.: Extending UML
for Agents. In Proceedings of the Agent-Oriented Information
Systems Workshop at the 17th National conference on Artificial
Intelligence, AOIS Worshop at AAAI 2000, 3-17 (2000)

\bibitem{WOLDraft}
Web Ontology Working Group: OWL Web Ontology Language. W3C Working
Draft (2002). http://www.w3.org/News/2002\#item110

\bibitem{UBOT}
DAML/UML Based Ontology Toolset Home page:
http://ubot.lockheedmartin.com/
%-------------------------------------------

\end{thebibliography}
\end{document}
