establishing a bridge from graph-based modeling languages to ontology languages

26
Institute for Software Technology University of Koblenz ▪ Landau, Germany Establishing a Bridge from Graph-based Modeling Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages Languages to Ontology Languages Tobias Walter Hannes Schwarz Yuan Ren (University of Aberdeen) 30.06.2010 TWOMDE 2010

Upload: tobias-walter

Post on 07-Dec-2014

913 views

Category:

Education


2 download

DESCRIPTION

Talk at the 3rd Workshop on Transforming and Weaving Ontologies in Model Driven Engineering (co-located with TOOLS), 30 June 2010, Malaga, Spain.

TRANSCRIPT

Page 1: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

Institute for Software Technology

University of Koblenz ▪ Landau, Germany

Establishing a Bridge from Graph-based ModelingEstablishing a Bridge from Graph-based ModelingLanguages to Ontology LanguagesLanguages to Ontology Languages

Tobias Walter

Hannes Schwarz

Yuan Ren (University of Aberdeen)

30.06.2010

TWOMDE 2010

Page 2: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 20102 of 26

Objectives

Introduction

Modeling of TGraphs and Schemas in OWL

Bridge

• Cardinality Expressions

• Quantified Expressions

• Boolean Connectives

• Path Descriptions

Advantages of the TGraph Approach and OWL

Conclusion

Page 3: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 20103 of 26

Introduction (TGraph Approach)

TGraph (Model)

Directed graphs, their edges and vertices are typed and attributed, and for each vertex the incident edges are ordered. In addition, the vertices and edges of the graph are ordered globally.

Example (M1 layer)

Process

abstract syntax concrete syntax

Page 4: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 20104 of 26

Introduction (TGraph Approach)

Graph Schema (Metamodel)

Schemas define types of edges and vertices, associates them with attributes, and structures them in generalization hierarchies

grUML (Metamodeling Language)

Metamodeling language used for modeling schemas corresponds to a subset of UML class diagrams

Example (M2 layer)

Page 5: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 20105 of 26

Introduction (GReQL)

Graph Repository Query Language• declarative, expression-based query language for TGraphs• FWR expressions

• from - declares variables• with - summarizes predicates which have to be fulfilled by the

variables• report - determines the result structure of the query

Example

Constraint in GReQL:

from v:Vwith reMatch(v.name, ".*Action.*")report v as “Action“;

forall n:V{ActivityNode} @ n.name <> ""

Page 6: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 20106 of 26

Description Logics

• Description Logics (DLs) are logics designed to represent and reason on structured knowledge

• The domain of interest is structured into (TBox):

• concepts, which correspond to classes, and denote sets of individuals

• roles, which correspond to associations, and denote binary relations on individuals

• The knowledge is asserted through so-called assertions (ABox)

• Provide formal semantics

• DLs provide the foundations for standard ontology languages, like OWL2

Page 7: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 20107 of 26

Modeling of TGraphs and Schemas in OWL

1. Each vertex class is represented as an OWL class

2. All vertex classes are subsumed by a super concept Vertex

Declaration(Class(ActivityNode))

Declaration(Class(Vertex))SubClassOf(ActivityNode Vertex)

Page 8: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 20108 of 26

Modeling of TGraphs and Schemas in OWL

3. Each edge class is represented by an OWL class. Two object properties which define the source (from) and target

(to) vertices of an edge An object property is declared as the chain of the two object

properties

Declaration(Class(HasNode))

Declaration(ObjectProperty(fromHasNode))ObjectPropertyDomain(fromHasNode HasNode)ObjectPropertyRange(fromHasNode ActivityDiagram)

Declaration(ObjectProperty(toHasNode))ObjectPropertyDomain(toHasNode HasNode)ObjectPropertyRange(toHasNode ActivityNode)

Declaration(ObjectProperty(HasNodeProperty))SubObjectPropertyChain(InverseObjectProperty(fromHasNode)

toHasNode) HasNodeProperty)

Page 9: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 20109 of 26

Modeling of TGraphs and Schemas in OWL

4. All OWL classes representing edge classes and their object properties to and from are subsumed by one single object property topEdgeProperty, topEdgeProperty has a transitive super object property

transitiveTopEdgeProperty

Declaration(ObjectProperty(topEdgeProperty))ObjectPropertyDomain(topEdgeProperty Vertex)ObjectPropertyRange(topEdgeProperty Vertex)SubObjectPropertyOf(HasNodeProperty topEdgeProperty)

Declaration(ObjectProperty(transitiveTopEdgeProperty))SubObjectPropertyOf(topEdgeProperty transitiveTopEdgeProperty)TransitiveObjectProperty(transitiveTopEdgeProperty)

Page 10: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201010 of 26

Modeling of TGraphs and Schemas in OWL

6. Each attribute is transformed to a data property in OWL

7. Specialization relationships relating vertex classes and edge classes, respectively, are transformed to OWL subclass axioms

Declaration(DataProperty(name))DataPropertyDomain(name ActivityNode)DataPropertyRange(name xsd:string)

SubClassOf(ObjectFlow ActivityEdge)SubClassOf(Action ActivityNode)

Page 11: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201011 of 26

Modeling of TGraphs and Schemas in OWL

8. TGraphs themselves are transformed to a set of assertions.

....Declaration(Individual(start))Declaration(Individual(process))Declaration(Individual(finish))ClassAssertion(start Initial)ClassAssertion(process ControlFlow)ClassAssertion(finish Final)ObjectPropertyAssertion(controlFlowProperty start process)ObjectPropertyAssertion(controlFlowProperty process finish)....

Page 12: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201012 of 26

Cardinality Expressions

grUML

• Cardinalities directly defined by annotating edge classes

OWL

• Defined by class expressions ObjectMinCardinality, ObjectMaxCardinality, and ObjectExactCardinality

SubClassOf(ActivityNode ObjectExactCardinality(1 InverseObjectProperty(HasNodeProperty) ActivityDiagram))

Page 13: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201013 of 26

Quantified Expressions

grUML+ GReQL

• Universal quantification:

• Existential quantification

OWL

• ObjectAllValuesFrom class expression for universal quantification

• ObjectSomeValuesFrom class expression for existential quantification

forall n:V{ActivityNode} @ n.name <> ""

forall f:V{Final} @ exists a:V{ActivityNode} @ a -->{ActivityEdge} f

SubClassOf(ActivityDiagram ObjectAllValuesFrom(HasNodeProperty ObjectIntersectionOf(ObjectComplementOf(DataHasValue(name ""))

ActivityNode)))

SubClassOf( Final ObjectSomeValuesFrom(InverseObjectProperty( ActivityEdgeProperty) ActivityNode))

Page 14: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201014 of 26

Boolean Connectives

grUML + GReQL

• operators and, or, not

OWL

• ObjectIntersectionOf, ObjectUnionOf, ObjectComplementOf class expressions.

forall ad:V{ActivityDiagram} @ (exists i:V{Initial} @ ad --> {HasNode} i) and (exists f:V{Final} @ ad -->{HasNode} f)

SubClassOf(ActivityDiagram ObjectIntersectionOf(ObjectSomeValuesFrom(HasNodeProperty Initial) ObjectSomeValuesFrom(HasNodeProperty Final)))

Page 15: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201015 of 26

Path Descriptions (Simple Path Description)

grUML+ GReQL

• -->(outgoing) , <-- (incoming), <-> (direction not important)

• optionally an edge type restriction in curly braces.

forall v:V{Action} @ exists w:V @ v --> w

forall w:V{ObjectNode} @ exists v:V @ w <--{ObjectFlow} v

OWL

•ObjectSomeValuesFrom class expressions

•topEdgeProperty or OWL class representing the edge type

SubClassOf(Action ObjectSomeValuesFrom(topEdgeProperty Vertex))

SubClassOf(ObjectNode ObjectSomeValuesFrom(objectFlowProperty Vertex)))

Page 16: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201016 of 26

Path Descriptions (Goal- and Start-Restrictions)

grUML+ GReQL

• Restriction of start and end vertices of a path description

• Vertex class expression which restricts the start or end vertex is separated from the path description with a &

forall o:V{ObjectNode} @ exists v:V @ o --> &{Action, ObjectNode} v

OWL

•Class expression to describe goal and start of edge

•for example: ObjectUnionOf

SubClassOf(ObjectNode ObjectSomeValuesFrom(topEdgeProperty ObjectUnionOf(ObjectNode Action)))

Page 17: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201017 of 26

Path Descriptions (Sequential Path Description)

grUML+ GReQL

• Simple concatenation of path descriptionsforall i:V{Initial} @ exists v:V @ i -->--> v

OWL

•Nested ObjectSomeValuesFrom class expressionsSubClassOf(Initial ObjectSomeValuesFrom(topEdgeProperty ObjectSomeValuesFrom(topEdgeProperty Vertex)))

Page 18: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201018 of 26

Path Descriptions (Exponentiated Path Description)

grUML+ GReQL

• Natural number to define exponents of path descriptions

forall i:V{Initial} @ exists v:V @ i -->^2 v

OWL

•Nested ObjectSomeValuesFrom class expressions

SubClassOf(Initial ObjectSomeValuesFrom(topEdgeProperty ObjectSomeValuesFrom(topEdgeProperty Vertex)))

Page 19: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201019 of 26

Path Descriptions (Optional Path Description)

grUML+ GReQL

• Marking a path as optional by surrounding it with bracketsforall o:V{ObjectNode} @ exists v:V @ o -->[-->] v

OWL

•ObjectUnionOf expression to represent the optional path

SubClassOf(Initial ObjectSomeValuesFrom(topEdgeProperty ObjectSomeValuesFrom(topEdgeProperty Vertex)))

Page 20: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201020 of 26

Path Descriptions (Alternative Path Description)

grUML+ GReQL

• Marking a path as alternative by separating them with a pipe

forall o:V{ObjectNode} @ exists v:V @ o --> &{Action}| --> &{ObjectNode} v

OWL

•ObjectUnionOf expression to represent alternative paths

SubClassOf(ObjectNode ObjectUnionOf(ObjectSomeValuesFrom(topEdgeProperty Action) ObjectSomeValuesFrom(topEdgeProperty ObjectNode)))

Page 21: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201021 of 26

Path Descriptions (Iterated Path Description)

grUML+ GReQL

• Use of Kleene operators * and + to define iterated path descriptions

forall i:V{Initial} @ exists f:V{Final} @ i -->+ f

OWL

•Iterated path expressions realized by transitive object properties

SubClassOf(Initial ObjectSomeValuesFrom(transitiveTopEdgeProperty ObjectSomeValuesFrom(transitiveTopEdgeProperty Vertex)))

Page 22: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201022 of 26

Reasoning (1)

Reasoning on at least 2 layers (TBox/ABox)

• Reasoning at schema layer

forall f:V{Final} @ exists v:V @ (f --> v) and not(f --> v)

SubClassOf(Final ObjectIntersectionOf( ObjectSomeValuesFrom(topEdgeProperty Vertex) ObjectComplementOf(ObjectSomeValuesFrom(topEdgeProperty Vertex))))

Final is unsatisfiable

Page 23: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201023 of 26

Reasoning (2)

• Reasoning at instance- and schema layer

Declaration(Individual(initial))Declaration(Individual(object1))Declaration(Individual(final))ClassAssertion(initial Initial)ClassAssertion(final Final)ObjectPropertyAssertion(objectFlowProperty initial object1)ObjectPropertyAssertion(objectFlowProperty object1 final)

object1

EquivalentClasses(ObjectNode ObjectUnionOf(ObjectSomeValuesFrom(objectFlowProperty Vertex) ObjectSomeValuesFrom(InverseObjectProperty(objectFlowProperty) Vertex)))

object1 has type

ObjectNode

Page 24: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201024 of 26

Explanations

Explanations of unsatisfiable classes

Explanations of inconsistent models/graphs

SubClassOf(Final ObjectIntersectionOf( ObjectSomeValuesFrom(topEdgeProperty Vertex) ObjectComplementOf(ObjectSomeValuesFrom(topEdgeProperty Vertex))))

Receive Order

Explanation from TwoUse Toolkit---------------------------------------Unsatisfiability of Final:Explanation: Final equivalentTo not topEdgeProperty some Vertex and topEdgeProperty some VertexSubClassOf(Initial ObjectSomeValuesFrom(transitiveTopEdgeProperty

ObjectSomeValuesFrom(transitiveTopEdgeProperty Vertex)))

Explanation from TwoUse Toolkit---------------------------------------CHECK CONSISTENCY

Consistent: No

Explanation: receiveOrder type Action Action subClassOf ActivityNode ActivityNode equivalentTo

transitiveTopEdgeProperty some Final

Page 25: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201025 of 26

Open World Assumption

Assumes incomplete information by default

Guidance and validation of incomplete models

Receive Order[orderaccepted]

Fill Order

Send Invoice

Close OrderShip Order

[orderrejected]

Query for possible model element types types after Send Invoice

Possible replacement of control nodes by one single object flow

Page 26: Establishing a Bridge from Graph-based Modeling Languages to Ontology Languages

IST - Institute for Software Technology

Tobias [email protected]

TWOMDE 201026 of 26

Conclusion

• Transformation bridge between Modelware and Ontoware

• Intersection of modelware and ontoware

• Standard modeling constructs

• Path Descriptions

• Differences

• Reasoning technologies of OWL

• Simplicity and Efficiency of TGraphs