Model Driven Development with Semantic Web Technologies
Tutorial at the 6th European Conference on Modeling Foundations and Applications ECMFA 2010, Paris, France, June 15-18
Fernando Silva Parreiras, Tobias Walter, Christian Wende, Edward Thomas
Abstract
With the expansion of Model Driven Development (MDD), semantic web
and ontology technologies like knowledge representation, automated reasoning,
dynamic classification and consistency checking play an important role in
leveraging disciplines like metamodeling and domain-specific languages. This
tutorial enlightens the application of semantic web and ontology technologies
in Model Driven Development and provides application scenarios in areas like software design
patterns, domain-specific languages and variability management.
- Keywords:
OWL, Model Driven Development, UML, Model Transformation.
1 Introduction
Ontologies provide shared domain conceptualizations representing knowledge by a
vocabulary and, typically, logical definitions [1,2] to
model the problem domain as well as the solution domain. The Web Ontology
Language (OWL) [3] is the most prominent for Semantic Web
applications among ontology languages, providing a class definition language
for ontologies.
Indeed, OWL provides important features complementary to UML class-based
modeling and OMG that improve software modeling: it allows different ways of
describing classes; it handles these descriptions as first-class entities; it
provides additional constructs like transitive closure for properties; and it
enables dynamic classification of objects based upon class descriptions.
OWL has been applied into Software Engineering in the form of Description Logic
languages to achieve improvements on the maintainability and
extensibility [4]. For example, the knowledge encoded in OWL
evolves independently of the execution logic, i.e., developers maintain class
descriptions in the ontology and not in the software. Moreover, developers may
use class descriptions to semantically query the domain, which plays an
important role in large domains.
The success of the two editions of the workshop on Transforming and Weaving
Ontologies and MDE (TWOMDE) at MoDELS'08 and MoDELS'09 has shown an increasing
interest of the modeling community for semantic web and ontology technologies
as many practitioners are interested in identifying when and how apply semantic
web and ontology technologies in Model Driven Development.
1.1 Goal and Objectives
This tutorial aims at enabling attendees to fully appreciate the application of
semantic web and ontology technologies in Model Driven Development. More specifically, the
objectives of the tutorial are:
- to demystify semantic web and OWL subjects like open world assumption, close
world assumption, complexity and performance issues;
- to enlighten the role of OWL in Model Driven Engineering, positioning it
among other languages like UML, MOF and OMG.
- to provide application scenarios of semantic web and ontology technologies.
The intended audience embraces researchers and practitioners with interest in
improving Model Driven Development with knowledge representation
techniques. We assume that the participants have knowledge of basic concepts of
UML.
1.3 Skills Developed
After concluding this tutorial, attenders will be able to:
- Understand the main concepts of semantic web and ontology technologies.
- Identify the valued added by semantic web in Model Driven Development.
- Identity potential applications of semantic web technologies in Model Driven Development.
- Apply semantic web tools to transform or validate software models.
1.4 Teaching Method
We rely on a mix of teaching methods as follows:
- We use videos to illustrate demos of related tools;
- Lecture to present the main concepts;
- Case Studies to present the value added of semantic web and ontology technologies in
software engineering;
- A hands-on section for trying the tools presented in the tutorial.
2 Presenters
MSc. Fernando Silva Parreiras, University of
Koblenz-Landau1,
pursues his PhD since the beginning of 2006 (until March 2010) under the
supervision of Prof. Steffen Staab and is the leader of the focus group
Software Web 2 at the Web
Science and Technology Institute (WeST)
3 at the University of
Koblenz-Landau, Germany, and has been investigating the integration of Model Driven Development and
Ontology in the scope of the EU project MOST
4 ever since. His related publications
include papers in ESEC/FSE'2007, Modellierung'2008, ER'2008, ICSC'2009,
MoDELS'2009. He has been served as program committee member of workshops like
WOMSDE, ONTOSE and SWESE and as organizer of the
TWOMDE5 workshop.
Dipl.-Inf. Christian Wende is PhD. student of Prof. Uwe Aßmann at
the Software Technology Group at Dresden University of Technology, Germany. From
2007 till the beginning of 2009 he was involved in the German national project
feasiPLe, investigating the application of domain-specific languages and
model driven techniques within product-line engineering. Christians research
focuses the combination of techniques from product-line engineering, role-based
modeling and software composition for the modular design and implementation of
languages and language tooling. In the beginning of 2009 he joined the MOST
project where he is investigating the integration of ontologies with software
and language engineering. His related publications include papers and tool
demonstrations in AOPLE'2007, VISPLE'2008, ICSE'2008, ECMDA-FA'2009, GPCE'2009
and SLE'2009.
Dr. Edward Thomas is a research fellow under Prof. Jeff Z. Pan in the
Knowledge Technologies group in the Department of Computer Science, University
of Aberdeen. He was employed as a Research Assistant on the AKT project, a
major interuniversity research project. His thesis work made heavy use of
tractable reasoning for OWL ontologies, using a technique developed with Prof.
Pan, which was published at AAAI'2007. He was the lead researcher on the
ONTOSEARCH2 project, which supports scalable structured semantic searches over
large repositories of OWL ontologies. This has spawned the TrOWL project, which
is a reasoner and query engine for storing and reasoning over large OWL2
ontologies. He has spent the last 12 months working on the MOST project,
working on providing tractable reasoning services to support the use cases
being investigated under the project. Other related publications include papers
at OWLED-2007, DL'2007, WWW'2008, DL'2009, WebSci'09, ESWC'2009.
Dipl.-Inf. Tobias Walter6 is PhD. student at the University of Koblenz-Landau under the supervision of Prof. Dr. Jürgen Ebert and Prof. Dr. Steffen Staab. Currently he is member of the Institute for Software Technology and the Institute for Web Science and Technology. Here, his research focuses on the combination of domain-specific modeling languages and different ontology technologies. Further he is interested in the design and use of new software modelling languages and its implementation in tools. From 2008 he is contributing to the MOST project where he is investigating the conceptual integration of Model Driven Architecture (MDA) and Ontologies. His related publications include papers at MoDELS'2009, WC-DSL'2009, ICSC'2009 and different workshops.
3 Structure of Contents
In the following, we present the extended outline for the tutorial:
- What are OWL ontologies and what can they do for Model Driven Development?
- OWL as class description language.
- UML vs. OWL.
- Areas of application.
- Demystifying OWL.
- Contextualizing OWL in Model Driven Development.
- Introduction OWL in the context of model driven development .
- OWL's role in the software development
- Reasoning capabilities
- The role of world assumption.
- The open world assumption
- A locally closed domain
- A locally closed world
- Negation as failure
- Performance.
- OWL2-QL
- OWL2-EL
- OWL2-RL
- OWL2-DL
- Quality Guaranteed Transformations
- Expressiveness.
- Reasoning with OWL in Model Design.
- Reasoning Services.
- Query languages.
- Integrating OWL in Model Driven Development.
- The TwoUse Approach
- Validation of UML Models
- Explanation of Domain Concepts
- Enriching UML models with OWL
- Modeling DSLs with OWL
- Case Studies.
- Improving Software Design Patterns
- Strategy Pattern
- Abstract Factory
- Bridge Pattern
- Metamodeling
- Ontology-based Domain Specific languages
- Modeling Physical Devices
- Suggesting Concepts
- Ontology-based variability management
- Variability Management in product-line engineering
- Ontologies in the problem space
- Ontologies in the solution space
- Product Variant Validation
- Example: MOST TOPF
- Example: OWL Language Family
- Validating Process Refinements
- Executing Sets
- Translating BPMN to OWL
- Examples
Appendix A: Summary of Contents
3.1 OWL Ontologies in Model Driven Development
UML class-based modeling and OWL comprise some constituents that are similar in
many respects like classes, associations, properties, packages, types,
generalization and instances [5]. Despite of the
similarities, both approaches present restrictions that may be overcome by an
integration.
On the one hand, a key limitation of UML class-based modeling is that it allows
only static specification of specialization and generalization of classes and
relationships, whereas OWL provides mechanisms to define these as dynamic. In
other words, OWL allows for recognition of generalization and specialization
between classes as well as class membership of objects based on conditions
imposed on properties of class definitions.
Among ontology languages, the Web Ontology Language (OWL) [3] is
the most prominent for Semantic Web applications. OWL offers a more expressive
and extensible manner of modeling data and provides flexible ways to describe
classes and, based on such descriptions, it enables type inference.
Indeed, OWL provides various means for describing classes, which may also be
nested into each other such that explicit typing is not compulsory. One may
denote a class by a class identifier, an exhaustive enumeration of individuals,
property restrictions, an intersection of class descriptions, a union of class
descriptions, or the complement of a class description.
OWL provides important features complementary to UML and OMG that would improve
software modeling: it allows different ways of describing classes; it handles
these descriptions as first-class entities; it provides additional constructs
like transitive closure for properties; and it enables dynamic classification
of objects based upon class descriptions.
OWL ontologies can be operated on by reasoners providing services like
consistency checking, concept satisfiability, instance classification and
concept classification. To illustrate application of these services,we present
case studies being developed under EU STReP MOST that use ontology
technologies. More specifically, we present the case studies as follows:
- Improving General Purpose Software Design Patterns. We have
explored how to improve the Strategy Pattern and Abstract Factory with
ontologies in [6] and we are able to provide
improvements to the Visitor Pattern and to the Bridge Pattern as well.
- Metamodeling. OWL facilitates the way of defining
expressions that are not expressible in OMG when property transitivity is
required, e.g., in specifying constructs like Activity, State,
StateMachine and Transition.
- Ontology-based domain-specific languages. Domain
specific languages (DSL) may apply dynamic classification to recommend
domain concepts to novice DSL users (who may not be aware of suitable
domain classes). DSL users may execute queries that, based on OWL
classes, dynamically classify content [7].
- Using ontologies with variability management at runtime. In
software product line engineering, ontologies describe variants and
variant constraints and tools like the
featureMapper7 use owl
reasoners to check the validity of variants. We currently investigate
this and other application scenarios under the EU project
MOST8.
- Validating Process Refinement with Ontologies.
A crucial task in process management is the validation of process
refinements. A process refinement is a process description in a more
fine-grained representation. The is either with respect to an abstract
model or with respect to component's principle behaviour model. We
define process refinement based on the execution set
semantics [8]. Predecessor and successor relations of the
activities are described in an ontology in which the refinement is
represented and validated by concept satisfiability checking.
3.2 Demystifying OWL
We compare how the Semantic Web and
Software Engineering worlds differ in terms of their world assumption
(respectively, open world versus closed world). We show how an
ontology can, either in whole (as locally closed world) or in part
(locally closed domain) be made to behave under the closed world
assumption. We also look at negation as failure in the context of
ontologies.
The Semantic Web adopts an open world assumption, this extends to the
ontology language OWL, and to the reasoners and tools which work with
it. In simple terms, this means that any fact that cannot be proven to
be true by the known data, cannot be assumed to be false unless it is
directly contradicted by other data in the ontology. For example,
given an OWL axiom which states that all cows eat only plants, and
that sheep are animals (in DL syntax: Cows \sqsubseteq " eats.Plant and Sheep \sqsubseteq Animals), asserting that some cow
eats some sheep does not cause a contradiction, since it has not been
stated anywhere that animals cannot also be plants (Animals \sqsubseteq \not Plants). In fact, a reasoner will infer exactly this
fact from the given knowledge.
It is possible in OWL to close the domain of a particular class, by
asserting that that class is equivalent to exactly the set of all its
members. This prevents the reasoner from inferring that any other
individual (either a named individual, or an inferred individual) is a
member of this class. During this section, we will demonstrate how to
use a reasoner to close the domain of a class or a property, and show
examples of the different ways that this can affect the outcome of
various reasoning tasks on the ontology.
By closing the domain of an entire ontology, we can simulate a closed
world assumption. This involves closing the domain of every class and
property in an ontology. We will show how this compares to the closed
world assumption in Software Engineering, and also briefly touch on
the performance implications of closing the domain of a complex
ontology.
An alternative to closed world assumption is to use negation as
failure (NAF) in the Semantic Web context. We will show how the
results from using NAF can differ from using a true (locally) closed
world (or domain) approach, and also how both a closed domain and NAF
can be combined in ontology reasoning to allow default behaviour and
other techniques to be performed.
The specification of OWL2 contains several sub-languages, or
profiles [9], which offer increased tractability at the
expense of expressivity. During this part of the tutorial we will compare
the expressivity and performance of each profile, and show how each can be
used. We will also introduce the concept of quality guaranteed
transformations between these profiles.
OWL2 comprises a family of description logic languages, called profiles,
which offer different levels of expressiveness and
tractability. By using different language profiles where different levels of performance and expressivity are required, and by exploiting quality-guaranteed transformations between these languages, hybrid reasoners such as TrOWL 9 can reduce the
complexity of a given domain model, increasing performance.
- OWL2-QL
We will introduce the Query Language profile for OWL2, OWL2-QL. The
primary application for this are for ontologies with large abox
datasets. It supports storing and querying this data using an SQL
database, using query expansion to perform complete query answering
with respect to the semantics of OWL and the tbox of the ontology.
- OWL2-EL
OWL2-EL is a profile of OWL2 specifically designed for high
performance TBox reasoning. It supports consistency, classification,
class expression subsumption and instance checking in polynomial time
(cf. 2NexpTime for OWL2-DL).
- OWL2-RL
OWL2-RL is the subset of OWL2 which amenable to expression as a set of
rules. These rules are run over a set of ground facts (the concrete
axioms given in the ontology file) to infer every axiom which can be
derived from those facts under OWL2 RDF semantics.
- OWL2-DL
OWL2-DL can be regarded as the full expressivity of OWL2 available
under OWL2 direct semantics. It is the most expressive profile in OWL2
and it corresponds to the description logic SROIQ.
OWL presents complementary constructs to UML and OMG,
allowing, for example, property transitivity, which is very useful
for querying large and complex models.
By targeting different profiles of OWL2 to different aspects of a
reasoning problem, improved performance can be achieved. For example,
taking a very large ontology, classifying it, and performing query
answering in OWL2-DL may be too costly in time and memory. By
transforming that ontology into an OWL2-EL and OWL2-QL
representations, these tasks become much more tractable
(PTIME-complete and NLogSpace-complete, instead of
2NEXPTIME-complete). We will present two such quality-guaranteed
transformations [10], a soundness guaranteed transformation
from OWL2-DL to OWL2-QL, and a soundness-guaranteed transformation
from OWL2-DL to OWL2-EL.
3.3 Reasoning with OWL in Model Design
OWL ontologies can be operated on by reasoners
providing services like consistency checking, concept
satisfiability, instance classification and concept classification. The
reasoner performs model checking such that entailments of the
Tarski-style model theory of OWL are fulfilled.
4 Integrating OWL in Model Driven Development
Developers have many languages for modeling OWL ontologies, like textual
notations [11,12] or visual
notations [13,5]. Additionally, we
present an UML-based approach to model OWL ontologies together with UML Class
Diagrams - the TwoUse approach.
We build the TwoUse approach based on four core ideas:
- As abstract syntax, it provides an integrated MOF based metamodel
as a common backbone for UML (including OMG) and OWL modeling.
- As concrete syntaxes, it uses pure UML, an UML profile supporting
standard UML extension mechanisms, a weaving metamodel for integrating
existing UML and OWL models, and a textual concrete syntax to write
UML-based class and OWL descriptions.
- It provides a canonical set of transformation rules in order to
deal with integration at the semantic level.
- It provides a novel OMG-like language to write queries and constraints over OWL ontologies, OMG-DL.
Additionally, we report on a novel approach that allows the use of ontologies
to describe DSLs. The formal semantics of OWL together with reasoning services
allows for addressing constraint definition, progressive evaluation,
suggestions, and debugging. The approach integrates existing metamodels,
concrete syntaxes and a query language. A scenario in which domain models for
network devices are created illustrates the development environment.
References
- [1]
-
Gruber, T.R.:
A translation approach to portable ontology specifications.
Knowledge Acquisition 5(2) (1993) 199-220
- [2]
-
Staab, S., Studer, R., eds.:
Handbook on Ontologies.
International Handbooks on Information Systems. Springer (2004)
- [3]
-
W3C OWL Working Group:
OWL 2 Web Ontology Language Document Overview.
W3C Working Draft 27 March 2009 Available at
http://www.w3.org/TR/2009/WD-owl2-overview-20090327//.
- [4]
-
McGuinness, D.L.:
Configuration.
In: The Description Logic Handbook. Cambridge University Press (2003)
397-414
- [5]
-
OMG:
Ontology Definition Metamodel.
Object Modeling Group. (September 2008)
- [6]
-
Silva Parreiras, F., Staab, S., Winter, A.:
Improving design patterns by description logics: A use case with
abstract factory and strategy.
In: Modellierung 2008. Volume P-127 of LNI., GI (2008) 89-104
- [7]
-
Walter, T., Silva Parreiras, F., Staab, S.:
Ontodsl: An ontology-based framework for domain-specific languages.
In: Model Driven Engineering Languages and Systems, 12th
International Conference, MODELS 2009. Volume 5795., Springer (2009)
408-422
- [8]
-
Ren, Y., Gröner, G., Lemcke, J., Rahmani, T., Friesen, A., Zhao, Y., Pan, J.Z.,
Staab, S.:
Validating process refinement with ontologies.
In: Int. Workshop on Description Logics (DL). (2009)
- [9]
-
Calvanese, D., Carroll, J., Giacomo, G.D., Hendler, J., Herman, I., Parsia, B.,
Patel-Schneider, P.F., Ruttenberg, A., Sattler, U., Schneider, M.:
Owl 2 web ontology language profiles.
http://www.w3.org/TR/owl2-profiles/ (September 2009)
- [10]
-
Pan, J.Z., Thomas, E.:
Approximating OWL-DL Ontologies.
In: the Proc. of the 22nd National Conference on Artificial
Intelligence (AAAI-07). (2007) 1434-1439
- [11]
-
Horridge, M., Drummond, N., Goodwin, J., Rector, A., Stevens, R., Wang., H.:
The Manchester OWL Syntax.
In: OWL: Experiences and Directions (OWLED) 2006, Athens, Georgia,
USA (November 2006)
- [12]
-
Motik, B., Patel-Schneider, P.F., Parsia, B.:
OWL 2 Web Ontology Language: Structural Specification and
Functional-Style Syntax.
W3C Working Draft 02 December 2008
- [13]
-
Brockmans, S., Haase, P., Hitzler, P., Studer, R.:
A metamodel and UML profile for rule-extended OWL DL ontologies.
In: Proc. of ESWC 2006. Volume 4011 of LNCS., Springer (2006)
303-316
Footnotes:
1http://userpages.uni-koblenz.de/~parreiras/
2http://west.uni-koblenz.de/softwareweb
3http://west.uni-koblenz.de/
4http://most-project.eu
5http://www.uni-koblenz.de/confsec/twomde2009
6http://walter.semanticsoftware.eu/
7http://www.featuremapper.org
8http://www.most-project.eu
9http://trowl.eu/
File translated from
TEX
by
TTH,
version 3.86.
On 03 Feb 2010, 02:46.