Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
<is web> Information Systems & Semantic WebUniversity of Koblenz ▪ Landau, Germany
Ontologiesand
Model-driven Software Engineering
Steffen Staab
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna2 of 48
Andreas Winter
Fernando Parreiras
Ontologies & Software Tech: Starting Point
Ontologies
OWL
F-Logic
Model theory
Well-foundedsemantics
RDF
<is web>@Koblenz
IST – Institute forSoftware Technology
@Koblenz
UML
MDA
XMI
Metamodeling
Semantics
Grammar
Metamodeling
RDF
OWLMDA
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna3 of 48
Andreas Winter
Fernando Parreiras
Schism?
Ontologies
OWL
F-Logic
Model theory
Well-foundedsemantics
RDF
<is web>@Koblenz
IST – Institute forSoftware Technology
@Koblenz
UML
MDA
XMI
Metamodeling
Seman-tics
Grammar
Metamodeling
RDF
OWLMDA
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna4 of 48
Andreas Winter
Fernando Parreiras
Synthesis!
Ontologies
OWL
F-Logic
Model theory
Well-foundedsemantics
RDF
<is web>@Koblenz
IST – Institute forSoftware Technology
@Koblenz
UML
MDA
XMI
Metamodeling
QVT
Grammar
Metamodeling
RDF
OWLMDA
RDF Semantics
It‘sthe
process, stupid!
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna5 of 48
Agenda of this Talk
Model-driven Engineering
Ontology
A Use Case of Ontology Technology in MDE
Joint Metamodels
Case 1:Use Ontology Technology in a Design Pattern
Case 2: Using MDE for Translating between Ontologies
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna6 of 48
Model-driven Architecture
Classical MDA
PIM PSM Code
JAVAUML UML
MDA is an instance of Model-Driven Engineering
Transformations:Adapt to the target platformAdd additional modeling
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna7 of 48
Agenda of this Talk
Model-driven Engineering
Ontology
A Use Case of Ontology Technology in MDE
Joint Metamodels
Case 1:Use Ontology Technology in a Design Pattern
Case 2: Using MDE for Translating between Ontologies
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna8 of 48
Definition: What is an ontology?(in computer science)
Based on Gruber 93:
An Ontology is aformal specificationof a sharedconceptualizationof a domain of interest
⇒ Executable, Discussable⇒ Group of persons⇒ About concepts⇒ Between application
and „unique truth“
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna9 of 48
Purpose: What is an ontology?
To make domain assumptions explicitEasier to change domain assumptionsEasier to understand and update legacy data
To separate domain knowledge from operational knowledge
Re-use domain and operational knowledge separately
A community reference for applications
To share a consistent understanding of what information means
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna10 of 48
Usage: What is an ontology?
Front-End
Back-End
Topic Maps
Extended ER-Models
Thesauri
Predicate Logic
Semantic Networks
Taxonomies
Ontologies
Navigation
Queries
Sharing of Knowledge
Information Retrieval
Query Expansion
Mediation Reasoning
Consistency CheckingEAI
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna11 of 48
lightweight heavyweight
Text Corpora
DataDictionaries
(EDI)
Ad-hocHierarchies(Yahoo!)
Folks-onomies
Glossaries
Thesauri
XMLDTDs
PrincipledInformal
Hierarchies
DBSchema
XMLSchema
Data Models(UML, STEP)
FormalTaxonomies
Frames(OKBC)
DescriptionLogics
Glossaries &Data Dictionaries Thesauri,
Taxonomies
MetaData,XML Schemas,Data Models
Formal Ontologies& Inference
First-order,Higher-order,Modal Logic
F-Logic
Formality: What is an ontology?
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna12 of 48
Example: What is an ontology?
Foundational Model of AnatomyRepresents structures ranging from macromolecular complexes to body partsContains
~70,000 distinct concepts~ 110,000 terms140 relationsMetaclasses to define class-level propertiesAttributed relationsDifferent types of part-whole, location, and other spatial relationsSynonyms
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna13 of 48
Agenda of this Talk
Model-driven Engineering
Ontology
A Use Case of Ontology Technology in MDE
Joint Metamodels
Case 1:Use Ontology Technology in a Design Pattern
Case 2: Using MDE for Translating between Ontologies
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna14 of 48
MDA & Ontology Case: Model Checking
Reasoning on UML class diagrams
Classical MDA
PIM PSM Code
Translation
OWL
JAVAUML UML
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna15 of 48
Model Checking
Reasoning on UML class diagrams allows for checking:
Consistency of the diagram: Can the classes be populated?
Classification to identify the possible omission of an explicit generalization.
Equivalence among classes to discover redundancy.
Refinement of properties to apply stricter multiplicities or typing than the ones explicitly specified in the diagram.
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna16 of 48
Model Checking: Example
Every
WebPortalAccount
is used by at
most one Researcher
UserAccount User0..n 10..n 1Owns
Student
Uses {complete, disjoint}
WebPortalAccount Researcher1..n0..1
Researcheris disjoint from
Student
if Researcher is empty, User and Student will be
redundantINCONSISTENT
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna17 of 48
Model Checking: Example
UserAccount User0..n 10..n 1Owns
Student
Uses {complete, disjoint}
WebPortalAccount Researcher1..n0..1
INCONSISTENT
Advantage for SE:
Models with provably higher quality
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna18 of 48
Agenda of this Talk
Model-driven Engineering
Ontology
A Use Case of Ontology Technology in MDE
Joint Metamodels: TWOUSE
Case 1:Use Ontology Technology in a Design Pattern
Case 2: Using MDE for Translating between Ontologies
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna19 of 48
Structure: Metamodels
TWOUSE: Transforming and Weaving Ontologies and UML for Software Engineering
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna20 of 48
TwoUse Models (excerpt)
M2
M1
ClassDataType AnyType
OwlAnyowlIsInstanceOf()
OclAnyoclIsKindOf()oclIsTypeOf()
PuchaseOrder
Product
TUClass
OWLClass
CustomerFromEUCountry
Classifier
InstanceOf
context PurchaseOrder::getCharges() : Realbody: if self.owlIsInstanceOf(DutyFreeOrder)then 0.00 else 0.60 endif}
getCharges()
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna21 of 48
Agenda of this Talk
Model-driven Engineering
Ontology
A Use Case of Ontology Technology in MDE
Joint Metamodels: TWOUSE
Case 1:Use Ontology Technology in a Design Pattern
Case 2: Using MDE for Translating between Ontologies
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna22 of 48
Running Example: E-Commerce Shop
7%7%
7%
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna23 of 48
Running Example: E-Commerce Shop
19%35%
5%
Free trade zones
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna24 of 48
FreeTradeZone
Country
Customer PurchaseOrder
getCharges()
ProductName: String
UML
+hasProduct
+hasResident
+memberOfTradeZone+hasMember
+hasOrder
+hasCustomer
+livesIn
Hybrid Model: Example UML
1 0..n1..n
1
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna25 of 48
FreeTradeZone
Country
Customer PurchaseOrder
getCharges()+has
Resident+memberOfTradeZone
+hasMember
+hasOrder
+hasCustomer
+livesIn
Hybrid Model: Example OWL
<<owlValue>>+{someValuesFrom = CountryFromEU}
<<owlRestriction>> CountryFromEU
<<owlValue>> {hasValue = eu} memberOfTradeZone : FreeTradeZone
livesIn
<<owlRestriction>> OrderFromEUCustomers
<<equivalentClass>>
+{someValuesFrom= CustomersFromACountry } <<owlValue>>
<<owlRestriction>> CustomerFromEUCountry
DutyFreeOrder = OrderFromEUCustomer
1 0..n1..n
1
<<owlRestriction>> DutyFreeOrder
hasCustomerOrdersFromEUCustomers hasCustomer SOME
CustomerFromEUCountries
OWL (ODM)
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna26 of 48
FreeTradeZone
Country
Customer PurchaseOrder
getCharges()
TwoUse
Hybrid Model: Example TwoUse
<<owlValue>>
<<ocldlExpression>>{context PurchaseOrder::getCharges() : Realbody: if self.isOwlInstanceOf(DutyFreeOrder)
then 0% else 60% endif}
+{someValuesFrom = CountryFromEU}
<<owlRestriction>> CountryFromEU
<<owlValue>> {hasValue = eu} memberOfTradeZone : FreeTradeZone
livesIn
<<owlRestriction>> OrderFromEUCustomer
<<equivalentClass>>
+{someValuesFrom= CustomerFromACountry } <<owlValue>>
<<owlRestriction>> CustomerFromEUCountry
<<owlRestriction>> DutyFreeOrder
hasCustomer
ProductName: String
OWL
UML
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna27 of 48
OCL-DL in TWOUSE
Co-generation of OWL models from UML
PIM
Generation & OCL-DL
UML UML
OWL
Classical MDA
PSM Code
JAVAUML
Java calls to reasoner
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna28 of 48
OCL-DL can do more!
PIM
UML UML
OWL
Classical MDA
PSM Code
JAVAUML
OCL-DL Queries
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna29 of 48
OCL-DL Example
UML
OWL
TwoUse
+hasResident
<<ocldlExpression>>{context PurchaseOrder::getCharges() : Real body: if self.isOwlInstanceOf(DutyFreeOrder) then 0.00 else 0.60 endif}
DutyFreeOrder<<owlClass>>
FreeTradeZone<<owlClass>> Country
<<owlClass>>
name : String
0..12..n
+memberOfTradeZone0..1 +hasMember
2..n Customer<<owlClass>>
1 1..n+livesIn1 1..n
Productname : String
PurchaseOrder<<owlClass>>
getCharges()
0..n1
+hasOrder0..n+hasCustomer
11..n1..n
+hasProduct
1..n1..n
CountriesFromEU<<owlRestriction>>
<<owlValue>> {hasValue = eu} memberOfTradeZone : FreeTradeZone
CustomersFromEUCountries<<owlRestriction>>
+{someValuesFrom = CountriesFromEU } livesIn<<owlValue>>
OrdersFromEUCustomers<<owlRestriction>>
+{someValuesFrom= CustomersFromACountry } hasCustomer
<<owlValue>>
<<equivalentClass>>
self.owlIsInstanceOf(DutyFreeOrder) ? Type (?self, DutyFreeOrder)self.owlAllTypes() Type (?self, ?x)self.owlAllInstances() Type (?self,?x), Type (?y, ?x)
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna30 of 48
Summary of OCL-DL
“Dialect” of OCL Specification of
QueriesInvariantsGuards
OCL Library with new operationsowlIsInstanceOf(typespec: OclType)owlAllTypes() owlAllInstances()
OWL SupportOWL-DLOWL2, DL Rules
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna31 of 48
Agenda of this Talk
Model-driven Engineering
Ontology
A Use Case of Ontology Technology in MDE
Joint Metamodels
Case 1:Use Ontology Technology in a Design Pattern
Case 2: Using MDE for Translating between Ontologies
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna32 of 48
Use Case 2: Using MDE for Translating between Ontologies
Translation of ontology datasets
Input OutputTranslation
Semantic
Syntactic, Lexical
Lexical
SemanticF-Logic
+
Ontobroker
(Java)SPARQL
+
Jena(Java)
MBOTL
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna33 of 48
State of the Art: Neon Toolkit
visual mapping of ontologies
Plug-ins must be written separately
Input Output
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna34 of 48
Problem
Semantic
Syntactic {
Lexical {
{PIM
Code
All three layers are platform independent
A PIM focus on the operation of a system and hides the details necessary for a particular platform (MDA Guide)
MDA Modeling
Transf.
LayersSPARQL
Jena
(Java)
F-Logic
Ontobroker
(Java)
Problem:Why to use two languages? Instead of general purpose programming language, specific language?
InputInBook
ChaptergMonth
title
OutputInbook
StringupperCase(title)
Tools
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna35 of 48
The MBOTL Solution
Semantic
Syntactic {
Lexical {
{mbotl: PIM
jena
MDA Modeling
sparql
} Transformation
java
f-logic
Advantages:Productivity: focus on business and not on platform detailsPortability: Same PIM can be automatically transformed into multiple PSMs for different platforms Maintenance: higher level of abstraction than code
(MDA)
or
InputInBook
ChaptergMonth
title
OutputInbook
StringupperCase(title)
Layers
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna36 of 48
Addressing the Semantic Layer
Usage of OCL-like expressions to formulate queries.
Concrete Syntax of a Ontology Translation Rule:
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna37 of 48
Addressing the syntax and lexical layers
Application of predefined operations or helpers
Unified Representation
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna38 of 48
Metamodel
Reference Layer(EU STReP MOST)
MBOTL Extension
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna39 of 48
Translation Process
Source Ontology
Target Ontology
PlatformSpecific Model
java.ecoresparql.ecore
PlatformIndependent Model
mbotl.ecore
Code
query.javabuiltins.java Jena
Framework
ATL Model Transformation
ATL Model Transformation
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna40 of 48
Screenshot: Editing a MBOTL Translation
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna41 of 48
Screenshot: Generated SPARQL Model
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna42 of 48
Screenshot: Java Code with Jena API
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna43 of 48
Screenshot: Java Code of Built-In
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna44 of 48
Summary of Case 2
MBOTL provides an unified language to model different layers of ontology dataset translation problems.
At semantic level: OCL as query language.At syntactic and lexical levels: OCL predefined operations
and user-defined helpers.Improvements: productivity, portability, maintenance.Implementation: Eclipse, ATL Transformation Language,
Jena.Future Work: plug-in, SPARQL-like syntax, evaluation.
Download and test: isweb.uni-koblenz.de/Research/MBOTL
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna45 of 48
Conclusion
Joint metamodels
allow for joint querying of UML & OWL
provide synchronized reasoning calls
extend the power of UML with UWL
extend the power of SPARQL (or other ontology services) by programming language competencies
<is web> Information Systems & Semantic WebUniversity of Koblenz ▪ Landau, Germany
Thank You! http://isweb.uni-koblenz.de/Projects/twousehttp://isweb.uni-koblenz.de/Projects/MOST
Fernando Silva Parreiras, Steffen Staab, Andreas Winter: Improving Design Patterns by Description Logics: A Use Case with Abstract Factory and Strategy.
in Modellierung 2008, 12.-14. März 2008, Berlin. 2008. GI. LNI. 127.
Fernando Silva Parreiras, Steffen Staab, Simon Schenk, Andreas Winter: Model Driven Specification of Ontology Translations. In: Conceptual Modeling - ER 2008,
27th International Conference on Conceptual Modeling, 2008. Springer.
Fernando Silva Parreiras, Steffen Staab, Andreas Winter: On Marrying Ontologicaland Metamodeling Technical Spaces. 2007. ACM Press. Proceedings of the 6th jointmeeting of the European Software Engineering Conference and the ACM SIGSOFT
International Symposium on Foundations of Software Engineering, 2007.
Fernando Silva Parreiras, Steffen Staab, Andreas Winter: TwoUse: Integrating UML Models and OWL Ontologies. Universität Koblenz-Landau, Fachbereich Informatik.
2007. Arbeitsbericht.
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna47 of 48
Expressiveness of OCL, UML and DLs
limited complex role inclusion, reflexivity and irreflexivity, role disjointness
n-ary relations, functional dependencies on n-ary relations, and identification constraints on concepts
transitive properties
nominalsSROIQ(D)(OWL 2)
DLRifd(UML Class Diagrams)
SHOIN(D)(OWL-DL)
role hierarchy
qualified cardinality restrictions
ALCQI
cardinality restrictions DL-Lite
FOLOCL
<is web>
ISWeb - Information Systems & Semantic Web
Steffen [email protected]
Vienna48 of 48
OCL-DL Dialect
limited complex role inclusion, reflexivity and irreflexivity, role disjointness
n-ary relations, functional dependencies on n-ary relations, and identification constraints on concepts
transitive properties
nominalsSROIQ(D)(OWL 2)
DLRifd(UML Class Diagrams)
SHOIN(D)(OWL-DL)
role hierarchy
qualified cardinality restrictions
ALCQI
cardinality restrictions DL-Lite
FOLOCLOCL-DL