Fundamentals Semantic Web & Model Driven Engineering

Download Report

Transcript Fundamentals Semantic Web & Model Driven Engineering

Fundamentals
Semantic Web &
Model Driven Engineering
Semantic Web
Semantic Web
To create a universal medium for the exchange of data.
It is envisaged to smoothly interconnect
personal information management,
enterprise application integration, and the global sharing
of commercial, scientific and cultural data.
Facilities to put machine-understandable data on
the Web are quickly becoming a high priority
for many organizations, individuals and communities.
(Semantic Web Activity Statement, 2006)
http://www.w3.org/2001/sw/Activity
5/22/2016
WWW2007, AB, Canada
3
What is an ontology?
Classic definitions
(Gruber, 1993), (Guarino, 1994)



5/22/2016
a specification of a conceptualization
an explicit specification of some topic
a formal and declarative representation of
some subject area
WWW2007, AB, Canada
4
What is an ontology?
Other important definitions
(Swartout and Tate, 1999)

the basic structure or armature
around which a knowledge base can be built
5/22/2016
WWW2007, AB, Canada
5
What is an ontology?
Other important definitions
(Hendler, 2001)


a set of knowledge terms, including the
vocabulary, the semantic interconnections,
and some simple rules of inference and logic
for some particular topic – linguistically view
this definition is currently predominant
in the Semantic Web community
5/22/2016
WWW2007, AB, Canada
6
Domain Ontologies
ALOCoM ontology (Jovanović et al, 2005)


5/22/2016
Learning object content structure
ProLearn NoE, LORNET
WWW2007, AB, Canada
(excerpt)
7
Examples of Ontologies
Upper-Level Ontologies
⊤
Entity
Physical
Object
SelfConnectedObject
ContinuousObject
CorpuscularObject
Collection
Process
Abstract
Set
Class
Relation
Proposition
Quantity
Number
PhysicalQuantity
Attribute
(a)
5/22/2016
Independent
Continuant
Physical
Relative
Abstract
Occurent
Mediating
(b)
WWW2007, AB, Canada
Thing
IndividualObject
Event
Stuff
Intangible
IntangibleObject
Collection
RepresentedThing
Collection
Relationship
(c)
8
Why Ontologies?
The role of ontologies in the architecture
of The Semantic Web

to establish further levels of interoperability
(semantic interoperability) on the Web
 syntactic interoperability:
reusability in parsing the data
 semantic interoperability: mappings between terms
within the data, which requires content analysis
5/22/2016
WWW2007, AB, Canada
9
Semantic Web "Layer Cake"
Sharing knowledge


additional level of interoperability – semantic
ontologies and rules
Web Ontology
Language (OWL)
recommendation
recommendation
recommendation
5/22/2016
WWW2007, AB, Canada
10
RDF
Example
OBJECT
ATTRIBUTE
VALUE
http://www.w3.org/
#anonymous_resource1
#anonymous_resource1
created_by
name
phone
#anonymous_resource1
"John"
"47782"
http://www.w3.org/
5/22/2016
name
John
phone
47782
created_by
WWW2007, AB, Canada
11
RDF Schema
Example
<rdfs:Class rdf:ID="herbivore">
<rdfs:subClassOf rdf:resource=”#animal”/>
<rdfs:subClassOf>
...
</rdfs:subClassOf>
</rdfs:Class>
RDF and RDFS define a standard
way for knowledge representation
5/22/2016
WWW2007, AB, Canada
12
Web Ontology Language
Good starting point:
Roger L. Costello, David B. Jacobs,
"A Quick Introduction to OWL Web
Ontology Language", presentation,
The MITRE Corporation, 2003.
http://www.xfront.org
5/22/2016
WWW2007, AB, Canada
13
Web Ontology Language
OIL
DAML
RDF
All were influenced by RDF
DAML = DARPA Agent Markup Language
OIL = Ontology Inference Layer
DAML+OIL
Credit:
Roger L. Costello
OWL
OWL is now a W3C Recommendation!
OWL Lite
5/22/2016
OWL DL
OWL Full
14
Web Ontology Language
Speaking in terms of XML
(a concrete syntax)

Credit:
OWL is
a set of XML elements and attributes, with
well-defined meaning,
that are used to define
terms and their relationships
Roger L. Costello
5/22/2016
WWW2007, AB, Canada
15
Web Ontology Language
OWL extends RDF and RDF Schema
Class
equivalentProperty
sameIndividualAs
...
subClassOf
resource
ID
...
OWL
OWL Vocabulary
RDF/RDF Schema
Credit:
Roger L. Costello
5/22/2016
WWW2007, AB, Canada
16
Web Ontology Language
Musician ontology
Musician
plays
Instrument
Admirer
records
plays at
attends
5/22/2016
Event
Album
<owl:Class rdf:ID="Event"/>
<owl:Class rdf:ID="Album"/>
<owl:Class rdf:ID="Instrument"/>
<owl:Class rdf:ID="Musician"/>
<owl:Class rdf:ID="Admirer"/>
<owl:ObjectProperty rdf:ID="plays">
<rdfs:range rdf:resource="#Musician"/>
<rdfs:domain rdf:resource="#Instrument"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="loudness">
<rdf:type rdf:resource=
"http://www.w3.org/2002/07/owl#FunctionalProperty"/>
<rdfs:domain rdf:resource="#Instrument"/>
</owl:ObjectProperty>
<!--…-->
WWW2007, AB, Canada
17
Tools for Building Ontologies
Ontology-development tools





5/22/2016
Protégé
OntoEdit
OilEd
Chimaera
…
WWW2007, AB, Canada
18
Ontology-development
environments
Protégé
5/22/2016
WWW2007, AB, Canada
19
Semantic Web "Layer Cake"
Sharing knowledge


Semantic
Web Rule
Language
(SWRL)
additional level of interoperability – semantic
ontologies and rules
Web Ontology
Language (OWL)
recommendation
recommendation
recommendation
5/22/2016
WWW2007, AB, Canada
20
Semantic Web Rules
Efforts in two directions

General rule interchange standard
 Rule Interchange Format

Semantic Web reasoning layer over
the Semantic Web ontologies
 Semantic Web Rule Language
5/22/2016
WWW2007, AB, Canada
21
General Rule Interchange
Rule Interchange Format (RIF)


W3C initiative
Identified ten use-cases the standard should support
 A buyer must provide credit card information together with
delivery information
(address, postal code, city, and country).
 A wireless device can transmit on a 5 GHz band
if no priority user is currently using that band.
 If inspector believes vehicle is repairable
then process as repair
otherwise process as total loss.

Main efforts related
 RWERSE Rule Interchange Format (R2ML)
 RuleML
5/22/2016
WWW2007, AB, Canada
22
Semantic Web Rules
A brother of a person’s parent
is the person’s uncle.
<ruleml:imp>
There is no standard
<ruleml:_rlab ruleml:href="#example1"/>
<ruleml:_body>
There is no consent
whether this language
<swrlx:individualPropertyAtom swrlx:property="hasParent">
should based on<ruleml:var>x1</ruleml:var>


<ruleml:var>x2</ruleml:var>
</swrlx:individualPropertyAtom>
<swrlx:individualPropertyAtom swrlx:property="hasBrother">
<ruleml:var>x2</ruleml:var>
<ruleml:var>x3</ruleml:var>
</swrlx:individualPropertyAtom>
</ruleml:_body>
<ruleml:_head>
<swrlx:individualPropertyAtom swrlx:property="hasUncle">
<ruleml:var>x1</ruleml:var>
<ruleml:var>x3</ruleml:var>
</swrlx:individualPropertyAtom>
</ruleml:_head>
WWW2007, AB, Canada
23
</ruleml:imp>
Open-world assumption
Close-world assumption
Semantic Web Rule Language (SWRL)

5/22/2016
“…a combination of
the OWL DL and OWL Lite sublanguages with
the Unary/Binary Datalog RuleML sublanguages…”
Model-Driven Engineering
Modeling-Driven
(Software) Engineering
Modeling-Driven Engineering addresses
platform complexity and the inability of
third-generation (programming) languages
to alleviate this complexity and
express domain concepts effectively.
(Schmidt, 2006)
Modeling is the future …
And the promise here is that you write a lot less code,
that you have a model of the business process …
(Bill Gates, 2004)
5/22/2016
WWW2007, AB, Canada
25
Model Driven Engineering
Developing in parallel with Semantic Web
Object Modeling Group effort
The latest paradigm shift in
software engineering (Bézivin, 2002)


from OO technology…
…to model technology
Model Driven
Development
(Mellor et al, 2003)
5/22/2016
WWW2007, AB, Canada
26
Model-Driven Engineering
[Favre, 2004]



5/22/2016
Model engineering is the disciplined and
rationalized production of models
MDE is a subset of system engineering
in which the process heavily relies on
the use of models and model engineering
Model Driven (Software) Development is
the intersection between MDE and software
engineering, that is, it is the subset of MDE which
is concerned with software production
WWW2007, AB, Canada
27
Model-Driven Engineering
Key concepts

Rising level of abstraction


From platform specific low-level details to
high level concepts closely related to domains under study
Domain Specific Modeling Languages (DSMLs)



Model transformations


5/22/2016
Language engineering by using metamodeling
Contrary to
general purpose modeling languages such as UML
Model to model
Model to Text and Text to Model – round-trip engineering
WWW2007, AB, Canada
28
What is a model?
Model – a simplified view of reality
More formally: A model is a set of
statements about some system under study

(Seidewitz, 2003)
OMG is about models
5/22/2016
WWW2007, AB, Canada
29
Why do we need models?
We express models using concepts that
are much less bound to the underlying
implementation technology and are
much closer to the problem domain
relative to most popular programming
languages.
Selic, 2003
5/22/2016
WWW2007, AB, Canada
30
Model characteristics
To be useful and effective,
a model must have
the following characteristics:





5/22/2016
abstraction
understandability
accuracy
predictiveness
inexpensive
WWW2007, AB, Canada
31
Models
Example
1
1
1
1
1
5/22/2016
1
WWW2007, AB, Canada
32
Why do we need models?
J2EE
.NET
WS
…
Use of platform independent models (PIM) as
specifications
Transform specifications into platform specific
models (PSM) using tools
5/22/2016
WWW2007, AB, Canada
33
What is a metamodel?
A metamodel makes statements about
what can be expressed in
the valid models of
a certain modeling language.
Seidewitz, 2003
5/22/2016
WWW2007, AB, Canada
34
What is a metamodel?
In fact, a metamodel:


is a model of a modeling language, or
makes statements about what can be expressed in the valid
models of a certain modeling language
The correspondence
between a model, a metamodel,
a modeling language, a system under study
►
e
c
m:RepresentationOf
e:ElementOf
c:ConformantTo
Modeling Language
►
m
Metamodel
m
►
Model
5/22/2016
WWW2007, AB, Canada
SUS
►
35
Metametamodel
Example
5/22/2016
WWW2007, AB, Canada
36
Model-Driven Architecture:
The most known MDE incarnation
EMF (
Modeling Framework)
•Ecore <=> MOF
Model
transformations:
MOF2 Query/View
Transformation (QVT)
Object Constraint
Language (OCL)
5/22/2016
WWW2007, AB, Canada
37
UML Profiles
Extension mechanism


5/22/2016
stereotypes, tagged values, and
OCL constraints
UML2 improved support for profiles
WWW2007, AB, Canada
38
UML Profiles
Why do we need UML Profiles?




5/22/2016
we can develop a new domain language
(i.e. a metamodel) using MOF
it is rather expensive to develop new tools
so, we try to use existing, well-known tools
most of MDA tools are oriented towards UML
WWW2007, AB, Canada
39
UML Profiles
Example – UML Profile for XML Schema
5/22/2016
WWW2007, AB, Canada
40
Object Constraint Language
(OCL)
Example
*
*
+/hasUncle
*
Person
*
<<invariant>>
{Person.allInstances()->forAll( c1, c2 |
(self.hasFather = c1 and c1.hasBrother = c2) implies
self.hasUncle = c2)}
+hasBrother
*
+hasFather
5/22/2016
1
WWW2007, AB, Canada
41
XML Metadata Interchange (XMI)
XMI Schema production rules


see [Grose et al, 2002] for details
some important documents from the OMG’s site
 XML schema for MOF metamodels
 XMI document of the MOF metamodel
 XMI document of the UML metamodel
 XML schema for UML models
5/22/2016
WWW2007, AB, Canada
42
Model Transformations
Technical Spaces
Model-to-Model
Transformations



Query / View /
Transformation (QVT)
Atlas Transformation
Language (ATL)
Model-to-Text and
Text-To-Model
 Textual Concrete
Syntax (TCS)

Model-to-XML and
XML-to-Model
 ATL Injector and
ATL Extractor
5/22/2016
WWW2007, AB, Canada
43
Why marriage?
Credit: Elisa Kendall
Semantic Web – reasoning
MDE – automation
5/22/2016
WWW2007, AB, Canada
44
Why marriage?
Credit: Elisa Kendall
Knowledge Representation supports
reasoning about resources




Supports semantic alignment among differing vocabularies
and nomenclatures
Enables consistency checking and model validation, business
rule analysis
Allows us to ask questions over multiple resources that
we could not answer previously
Enables policy-driven applications MOF provides no help with
reasoning
KR is not focused on the mechanics of
managing models or metadata
Complementary technologies – despite some overlap
5/22/2016
WWW2007, AB, Canada
45
Ontologies and Software
Defining a formal domain ontology is a useful and
often necessary step in almost any software project.
This is because software deals principally with ideas
rather than physical artifacts.
Whereas the nature of physical artifacts is generally self-evident,
this is not the case with conceptual entities,
which are products of the mind.
As we all know, different minds see the same thing differently.
Bran Selic, IBM Rational Software, 2006
5/22/2016
WWW2007, AB, Canada
46
Ontologies and
Software engineering
An approach



Ontology Driven Architecture (ODA)
Trying to improve the state of the art in software
engineering by using ontologies
W3C’s effort




5/22/2016
http://www.w3.org/2001/sw/BestPractices/SE/
Ontology Driven Architectures and
Potential Uses of the Semantic Web in Software
Engineering
A Semantic Web Primer for
Object-Oriented Software Developers
Still, vague and unclear definition
WWW2007, AB, Canada
47
Ontologies in
Software engineering
Happel, H.J. & Seedorf, S.,
“Applications of Ontologies in Software Engineering,”
In Proceedings of the 2nd International Workshop on
Semantic Web Enabled Software Engineering, Athens,
GA, USA, Nov 6, 2006.
Start from the SE definition

application of
a systematic, disciplined, quantifiable approach to
the development, operation, and maintenance
of software

captures software life-cycle
5/22/2016
WWW2007, AB, Canada
48
Ontologies in
Software engineering
Using ontologies instead of MOF-based models
Ontology-based architectures (OBA)


Ontologies are used in run-time
Business logic based on OWL classes and/or
business rules
Ontology-enabled development (OED)

Using ontologies to enable software
development – collaboration, documentation,
search for components
Software

ODD
OBA
Infrastructure
Ontology-driven development (ODD)
OED
OEA
Development
time
Run-time
Ontology-enabled architectures (OEA)

Ontologies for the run-time infrastructure

5/22/2016
Semantic Web Services
WWW2007, AB, Canada
49
So, where do we go today?!
The focus of the tutorial




5/22/2016
How to integrate
Semantic Web technologies into
(model-driven) software engineering
development process
How to use MDE principles to manage definitions of
Semantic Web technologies
How to use MDE principles to develop
Semantic service-oriented architectures
How to employ MDE principles to develop
semantic service-oriented Web applications
WWW2007, AB, Canada
50