Semantic Web
Presentation
by
Patrick Emery
for
SWE 723 Precise Modeling
TOC
•
•
•
•
•
Semantic Web High Level
RDF
OWL
OMG/UML
ODM
Semantic Web Big Picture
• “This document is a plan for achieving a set of connected
applications for data on the Web in such a way as to form a
consistent logical web of data (semantic web).” – Tim
Berners-Lee, http://www.w3.org/DesignIssues/Semantic.html
• The “Semantic Web” is a metadata based infrastructure for
reasoning on the Web
• It extends the current Web (and does not replace it)
• Semantic Web - Goals
– Standardized machine processable Meta-data that facilitates
inferencing
– A layer cake of technologies providing an architecture for a
metadata enhanced web
See also http://www.w3.org/DesignIssues/Architecture.html
http://www.w3.org/DesignIssues/Semantic.html
Semantic Web Layer Cake
OWL
http://www.w3.org/Consortium/Offices/Presentations/RDFTutorial/Overview.html
Semantic Web – What is Needed
• A resource should provide information about
itself, called “metadata”
• metadata should be in a machine processable
format
• agents should be able to “reason” about (meta)data
• metadata vocabularies should be defined
http://www.w3.org/Consortium/Offices/Presentations/RDFTutorial/Overview.html
What is Needed (Technically)?
• Machine processable metadata:
– unambiguous names for resources (URIs)
– a common data model for expressing metadata (RDF)
– ways to access the metadata on the Web
• common vocabularies (Ontologies)
http://www.w3.org/Consortium/Offices/Presentations/RDFTutorial/Overview.html
Resource
• A resource can be anything that has identity. Familiar
examples include an electronic document, an image, a
service (e.g., "today's weather report for Los Angeles"),
and a collection of other resources.
• Not all resources are network "retrievable"; e.g., human
beings, corporations, and bound books in a library can also
be considered resources.
• The resource is the conceptual mapping to an entity or set
of entities, not necessarily the entity which corresponds to
that mapping at any particular instance in time.
• Thus, a resource can remain constant even when its
content---the entities to which it currently corresponds--changes over time, provided that the conceptual mapping is
not changed in the process.
What Can Be a Resource?
1.
2.
3.
4.
The name "http://x.org/love" itself. It is simply a string
that conforms to the URL syntax specified in RFC2396.
A particular concept of love. (Or other things that are
not directly on the Web, such as cars and people. )
A Web location, which is a logical source of document
instances that describe the concept of love. The Web
location is the abstract interface or endpoint from which
document instances can be obtained. This Web location
might be associated with a particular server, a file on a
server, or an executable program that creates and returns
the description dynamically. It may return the same or a
different document instance each time it is queried.
A document instance that describes the concept of love,
obtained at a particular point in time from the Web
location http://x.org/love.
http://www.w3.org/2002/11/dbooth-names/dbooth-names_clean.htm
URI, URL, and URN
RDF Model & Syntax
XML Query
XML
http://www.ietf.org/rfc/rfc2396.txt
URI/IRI
XML Schema
Namespaces
Unicode
Encryption
Signature
• A Uniform Resource Identifier (URI) is a compact string
of characters for identifying an abstract or physical
resource.
• "Uniform Resource Locator" (URL) refers to the subset of
URI that identify resources via a representation of their
primary access mechanism (e.g., their network "location"),
rather than identifying the resource by name or by some
other attribute(s) of that resource.
• The term "Uniform Resource Name" (URN) refers to the
subset of URI that are required to remain globally unique ProofTrusted SW
Logic
and persistent even when the resource ceases to exist
Rules/Query
or becomes unavailable.
Ontology
URI, URL, and URN (Cont.)
• URI BNF
– URI-reference = [ absoluteURI | relativeURI ] [ "#"
fragment ]
– absoluteURI = scheme ":" ( hier_part | opaque_part )
– hier_part = ( net_path | abs_path ) [ "?" query ]
– net_path = "//" authority [ abs_path ]
– abs_path = "/" path_segments
• URN BNF
– <URN> ::= "urn:" <NID> ":" <NSS>
• Example URL - http://www.ietf.org/rfc/rfc2396.txt
• Example URN - urn:uuid:44bc7776-a7d1-4fb5-88d5c636c4c4dc09
XML
• Extensible Markup Language (XML)
–
–
–
–
a markup specification language describing text or data
allows creation of domain specific markup
usually for storage, transmission, or processing by a program
says nothing about what you should do with the data
<?xml version="1.0" standalone="yes"?>
<!– This is a comment in XML -->
<conversation type="private">
<greeting>Hello, world!</greeting>
<response>Stop the planet, I want to get off!</response>
</conversation>
• XML namespaces
Trusted SW
<x xmlns:spc=http://www.company.com/company-schema
ex=http://www.example.org/security>
<spc:conversation ex:type=“private”>
Logic
Rules/Query
Ontology
RDF Model & Syntax
XML Query
XML
URI/IRI
XML Schema
Namespaces
Unicode
Encryption
Proof
Signature
– collection of element and attribute names identified by Uniform
Resource Identifier references. Each reference can declare a
prefix to be used by each name.
XML Schema
• Document Type Definition (DTD)
– optionally used to describe the markup in any specific type of document
– sets out names for the different types of element, where they may occur,
and how they fit together
• XML Schema
– describes structure and datatypes used in xml documents
– written as XML simplifying parsing requirements
• Style Sheets
– document with hints/algorithms for rendering/transforming data
• Cascading Style Sheets (CSS)
– used with HTML to aid in visual rendering
– associate with an XML document to allow visual rendering
Trusted SW
• Extensible Style sheet Language Transformations (XSLT)
Rules/Query
Ontology
Signature
Logic
– more complex and powerful style sheet language
– transform XML to other formats (HTML,other forms of XML, text)
RDF Model & Syntax
XML Query
XML
URI/IRI
XML Schema
Namespaces
Unicode
Encryption
Proof
Resource Description Framework
Rules/Query
Ontology
Signature
Logic
RDF Model & Syntax
XML Query
XML
URI/IRI
XML Schema
Namespaces
Unicode
Encryption
• Statements can be modeled (mathematically) with:
– Resources: an element, a URI, a literal, …
– Properties: directed relations between two resources
– Statements: “triples” of two resources bound by a
property
– usual terminology: (s,p,o) for subject, predicate, object
• RDF is a general model for such statements
– … with machine readable formats (e.g., XML or n3)
Trusted SW
• URI’s ground RDF into the Web
Proof
RDF is a Graph
• Tuples are a general form capable of representing most
anything
• An (s,p,o) triple can be viewed as a labeled edge in a graph
• i.e., a set of RDF statements is a directed, labeled graph
• both “objects” and “subjects” are the graph nodes
• “predicates” also referred to as “properties” are the edges
RDF is a Graph (Cont.)
• the formal semantics of RDF are also described using
graphs
• RDF-Schema (RDFS) define basic vocabulary terms
such as resource and class
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'
xmlns="http://my.example.org#"
xmlns:ex="http://my.example.org#"
xmlns:base="http://my.example.org#">
<rdf:Description rdf:about="http://my.example.org#aSubject">
<ex:aProperty rdf:resource="http://my.example.org#aObject"/>
</rdf:Description>
</rdf:RDF>
Representing RDF in XML
• Encode nodes and edges as XML elements or with literals
• Encode the property (i.e., edge) in its own namespace
• Blank Nodes are nodes without URIs
– “the vehicle is a «thing» that consists of wheels, an
engine and the breaks
• RDF Nodes can have type(s) using the property rdf:type
<rdf:RDF xmlns:axsvg=http://svg.example.org#
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="#FullSlide">
<axsvg:LabelledBy>
<rdf:Description rdf:about="#BottomLegend"/>
</axsvg:LabelledBy>
</rdf:Description>
<rdf:RDF>
Main RDFS Classes
http://www.w3.org/Consortium/Offices/Presentations/RDFTutorial/Overview.html
Ontologies on top of RDF/S
Rules/Query
Ontology
Signature
Logic
RDF Model & Syntax
XML Query
XML
URI/IRI
http://www.w3.org/Consortium/Offices/Presentations/RDFTutorial/Overview.html
XML Schema
Namespaces
Unicode
Encryption
• Ontology - defines the concepts and relationships used to
describe and represent an area of knowledge
• With Ontologies, you can construct new classes from
existing ones:
– enumerate its content
– through intersection, union, complement
– through property restrictions
• To do so, OWL introduces its own Class and Thing to
Trusted SW
differentiate the individuals from the classes
Proof
Web Ontology Language (OWL)
• 2004 W3C Recommendation
• Three layers of OWL are defined: Lite, DL, and
Full
• increasing level of complexity and expressiveness
– “Full” is the whole thing (Research Level)
– “DL (Description Logic)” restricts Full in some
respects (Decidable)
– “Lite” restricts DL even more (Easily implemented and
taught)
http://www.w3.org/Consortium/Offices/Presentations/RDFTutorial/Overview.html
OWL Full
•
•
•
•
•
•
No constraints on the various constructs
owl:Class is equivalent to rdfs:Class
owl:Thing is equivalent to rdfs:Resource
This means that, e.g., a Class can also be an individual
it is possible to talk about class of classes, etc
A real superset of RDFS
http://www.w3.org/Consortium/Offices/Presentations/RDFTutorial/Overview.html
OWL DL
• owl:Class, owl:Thing, owl:ObjectProperty,
owl:DatatypeProperty are strictly separated
– i.e., a class cannot be an individual of another class
• No characterization of datatype properties possible
• No cardinality constraint on transitive properties
• No mixture of owl:Class and rdfs:Class in
definitions
– essentially: use OWL concepts only!
• Some restrictions on annotations
• Goal: maximal subset of OWL Full against which
current research can assure that a decidable
reasoning procedure is realizable
http://www.w3.org/Consortium/Offices/Presentations/RDFTutorial/Overview.html
OWL Lite
• All of DL’s restrictions, plus some more:
• class construction can be done only through:
– intersection
– property constraints
• Goal: provide a minimal useful subset, easily
implemented
– simple class hierarchies can be built
– property constraints and characterizations can be used
http://www.w3.org/Consortium/Offices/Presentations/RDFTutorial/Overview.html
Example OWL
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE rdf:RDF [ <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> <!ENTITY
owl 'http://www.w3.org/2002/07/owl#'> <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
]>
<rdf:RDF xml:base="file://simple.owl"xmlns:rdf="&rdf;" xmlns:owl="&owl;"
xmlns:rdfs="&rdfs;">
<owl:Ontology rdf:about=""/>
<owl:Class rdf:ID="Class_0"/>
<owl:Class rdf:ID="Class_1">
<rdfs:subClassOf rdf:resource="#Class_0"/>
<rdfs:subClassOf rdf:resource="#OGr0"/>
</owl:Class>
<owl:Class rdf:ID="Class_2">
<rdfs:subClassOf rdf:resource="#Class_0"/>
<rdfs:subClassOf rdf:resource="#OGr3"/>
<rdfs:subClassOf rdf:resource="#OGr6"/>
</owl:Class>
<owl:Restriction rdf:ID="OGr0">
<owl:allValuesFrom rdf:resource="#Class_2"/>
<owl:onProperty rdf:resource="#Role_A"/>
</owl:Restriction>
Example OWL (Cont.)
<owl:Restriction rdf:ID="OGr3">
<owl:allValuesFrom rdf:resource="#Class_1"/>
<owl:onProperty rdf:resource="#Role_B"/>
</owl:Restriction>
<owl:Restriction rdf:ID="OGr6">
<owl:allValuesFrom rdf:resource="#Class_1"/>
<owl:onProperty rdf:resource="#the_Association"/>
</owl:Restriction>
<owl:ObjectProperty rdf:ID="Role_A">
<rdfs:subPropertyOf rdf:resource="#the_Association"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="Role_B">
<rdfs:subPropertyOf rdf:resource="#the_Association"/>
</owl:ObjectProperty>
<owl:DatatypeProperty rdf:ID="c2_attr1">
<rdfs:domain rdf:resource="#Class_2"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
</owl:DatatypeProperty>
<owl:ObjectProperty rdf:ID="the_Association"/>
<rdfs:Datatype rdf:about="http://www.w3.org/2001/XMLSchema#string"/>
</rdf:RDF>
UML of Example OWL
Other Semantic Web Links
• Open Source Semantic Web site
– http://www.semwebcentral.org/
• Semantic Web Service Ontology
– http://www.daml.org/services/owl-s/1.0/
• Semantic Web Rule Language
– http://www.daml.org/2003/11/swrl/
• OWL Query Language
– http://ksl-web.stanford.edu/KSL_Abstract/KSL-03-14.html
• OWL Validator
– http://phoebus.cs.man.ac.uk:9999/OWL/Validator/
• RDF Validator
– http://www.w3.org/RDF/Validator/
• Existing Ontologies such as OWL Time Ontology
– http://www.cs.rochester.edu/~ferguson/daml/
TOC Part II
• How AT&T Is Involved
• Who is the OMG and how are they involved
• What is the latest
DAML Program
• Sponsored by DARPA
• Developed DAML+OIL, precursor to OWL
• Developed as an extension to XML and the
Resource Description Framework (RDF)
• Provides a rich set of constructs for ontology
creation and information markup
• Machine readable and understandable
– Understandable means a machine's ability to solve a
well-defined problem by performing well-defined
operations on existing well-defined data
• AT&T’s DAML Contract,
– Components for Ontology Driven Information Push (CODIP)
– http://codip.grci.com/
OMG Basics
Object Management Group is the largest and longest standing
not-for-profit, open-membership consortium which develops
and maintains computer industry specifications.
•Founded April, 1989
•International Software Standards Consortium Headquartered in the U.S.
•Approximately 600 Member Companies
•Source and caretaker of specifications for:
–Model Driven Architecture (MDA)
–Meta Object Facility (MOF)
–Unified Modeling Language (UML)
–XML Metadata Interchange (XMI)
–Common Warehouse Metamodel (CWM)
–CORBA including Realtime, Embedded, Fault Tolerant
–CORBAservices, CORBAfacilities
OMG Technical Plenaries
Board of Directors
Architecture
Board (AB)
Liaison SC
Object & Reference
Model SC
Business Rules SIG
Java Community
Process SIG
MDA Users SIG
Security SIG
Test & Val. SIG
Web Services SIG
Technical Committees
Platform (PTC)
Product Std
Def SC
Architecture and
Design Task Force
(ADTF)
MARS TF
Real-time TF
Ontology SIG
Agent SIG
Japan SIG
…
Domain
Business Enterprise TF
C4I TF
Finance TF
Healthcare TF
Life Sciences TF
Space TF
Telecom TF
Transport. TF
…
eGov SIG
S/W Radio SIG
Systems Engineering
…
OMG Adoption Process
Where is the ODM now?
Board Approval
TC Recommendation
Responses, Letters
of Intent
from Industry
Request for
Information
PTC
AB
Finalization and
Revision
ADTF
Final Submission
Initial Submission Evaluation and Revision
ODM is in revision.
Onto
SIG
Subgroup Roadmap
Request for Proposal
OMG Technical Plenaries
meet at Technical Meetings
which occur five times
annually.
Ontology Definition Metamodel (ODM) RFP Scope
• A standard meta-model
for ontology modeling
• A UML2 Profile for
depicting Ontologies
• With at least mappings
–Between ODM and the
profile
–Between ODM and the
W3C OWL DL
Meta Object Facility
UML
Ontology
Profile
Mapping
Ontology
Definition
Metamodel
Language
User
Model
Mapping
Car
public class Car {}
Realizations
<owl:Class
rdf :ID=‘Car’/>
ODM RFP may be found at http://www.omg.org/cgi-bin/apps/doc?ad/2003-03-40
ODM RFP Initial Submissions Overview
Submitter
DSTC
ODM
Profile
Mapping(s)
Web-KB based;
beyond minimum
required
Not provided
Not provided
Gentleware
AT&T
Built from UML2
infrastructure
Reuses UML
infrastructure metamodel.
Default behavior for
Mapping to
stereotype packages plus OWL/DL based on
14 specific stereotypes. ODM entity and
stereotypes.
IBM
Corresponds
directly to OWL
constructs
Each ODM entity type
is also a UML
stereotype
Complete one-toone mapping of
ODM to OWL/DL
Sandpiper
Software
Supports FOL and
OWL; beyond
minimum required
Subset draft provided,
implicit in Visual
Ontology Modeler
Not provided, but
implicit in Visual
Ontology Modeler
Initial Submissions and ADTF Presentations may be found at http://www.omg.org/cgi-bin/apps/doc?
Joint Submission and Work Products
• All 4 initial submitters agreed to pursue a joint response
• They are working with Ontology SIG to define:
– Usage Scenarios & Goals for ODM document
• Posted to Ontology SIG Web page for public review & comment (1/15/04)
– ODM metamodel
• RDFS and OWL, XTM, SCL (Language mappings)
• Common Core if needed
• XMI artifacts
– JODM (Java API for ODM)
• Core, SCL, RDFS and OWL packages
– UML 2 vs OWL Full document
– ODM submission document
Usage Scenarios and Goals for ODM
• Intended to establish a set of usage scenarios and goals that
motivate development of an Ontology Definition Metamodel
(ODM) using the Meta-Object Facility (MOF) and an associated
Unified Modeling Language (UML) profile for creating,
managing and visualizing OWL ontologies as UML models.
• Business Applications
– Run Time Interoperation, Application Generation, Ontology Lifecycle
• Analytic Applications
– Emergent Property Discovery ,Exchange of Complex Data Sets
• Engineering Applications
– Information Systems Development, Ontology Analysis
http://www.omg.org/cgi-bin/doc?ontology/2004-01-01
Applications
Characteristic Perspective Values
Model Centric
Description
Authoritativeness
Structure Formality
Broad&Deep
From
Outside
From
Inside
Broad & Deep
From
Outside
Business Applications
Analytic Applications
Engineering Application
Formal
Model
Dynamics
Instance
Dynamics
Read-Only
Volatile
Application Centric
ChangeControl ability Coupling Focus
External
read-only
Volatile
Life
Cycle
Static
Dynamic
Flexible
Internal
real-time
designtime
•Three clusters of similar application perspectives
–Business Applications
• Transcendent source of structure, a high degree of formality, largely readonly.
• External control relative to nearly all users and slowly changing
–Analytic Applications
• Wide ranges of authoritativeness, internally defined and highly changeable
• Dynamic, flexible ontologies, using mostly large, read-only collections with
a real-time focus.
–Engineering Applications
• Wide ranges of authoritativeness, externally defined with volatile instances
• primarily internally control with a focus on design-time application.
Goals for the ODM
•
•
•
•
•
•
Support ontologies expressed in existing description logic, and
higher order logic languages
Provide a basis for information systems process descriptions to
support interoperability.
Support physical world concepts, including time, space, bulk
or mass nouns like ‘water’, and things that do not have
identifiable instances.
Provide a basis for describing multiple facets of
representations, stateful representations, and model-based
architectures.
Support efficient mechanisms and tools.
Support modules and version control.
ODM – Meta Model
Draft
TM
R D FS
O WL
Draft
S CL
ODM Core Package – Deleted but may return
Draft
Draft
ODM XML Topic Map Overview
Draft
ODM RDFS Overview
Draft
ODM OWL Overview
Draft
Simplified Common Logic (SCL)
Draft
• Next generation Knowledge Interchange Format (KIF)
• Going through ISO Process
• Semantically - First Order Logic
– a single homogenous universe (non-empty set) of individuals over which all
quantifiers range
– any expression that can be substituted for a quantified variable must denote
something in this universe
– Relations hold between finite sequences of individuals
– Individuals are 'logically atomic‘. All that can be said about them is the
relations they take part in
• mathematically, a first-order interpretation is a purely relational structure
Draft
http://www.ihmc.us/users/phayes/SCL_december_2.html
Expressions
Terms
Names and Terms
• The lexical syntax section of the SCL document has rules for what can be a
valid name.
• Some of these rules cannot be expressed in OCL. For example:
– name::= ((alpha | other) wordchar*) - specialname
which depends on preceding definitions of alpha and other
– A name may not contain a quoted string
• We can use OCL to rule out special names but not to state rules about what
kinds of ascii characters are allowed. Enforcing these rules has to be the
responsibility of the parser.
• The Name/CommentedTerm/Application partition is disjoint
context Term inv DisjointPartion:
(self.oclIsKindOf(Name) xor self.oclIsKindOf(CommentedTerm)) and
(self.oclIsKindOf(Name) xor self.oclIsKindOf(Application)) and
(self.oclIsKindOf(CommentedTerm) xor self.oclIsKindOf(Application))
– Note lack of simple “disjoint” declaration in MOF
Atoms
Sentences
Atoms and Sentences
• Holding and RoleSet form a disjoint partition
context Atom inv DisjointPartition:
self.oclIsKindOf(Holding) xor self.oclIsKindOf(RoleSet)
• The partition formed by the subclasses of Sentence is disjoint
context Sentence inv DisjointPartition:
(self.oclIsKindOf(and) xor self.oclIsKindOf(or)) and
(self.oclIsKindOf(and) xor self.oclIsKindOf(not)) and
(self.oclIsKindOf(and) xor self.oclIsKindOf(implies)) and
(self.oclIsKindOf(and) xor self.oclIsKindOf(iff)) and
(self.oclIsKindOf(and) xor self.oclIsKindOf(forall)) and
(self.oclIsKindOf(and) xor self.oclIsKindOf(exists)) and
(self.oclIsKindOf(and) xor self.oclIsKindOf(Atom)) and
(self.oclIsKindOf(and) xor self.oclIsKindOf(CommentedSentence)) and
(self.oclIsKindOf(or) xor self.oclIsKindOf(not)) and
(self.oclIsKindOf(or) xor self.oclIsKindOf(implies)) and
(self.oclIsKindOf(or) xor self.oclIsKindOf(iff)) and
(self.oclIsKindOf(or) xor self.oclIsKindOf(forall)) and …
Boolean (Logical) Sentences
boolsent ::= '(' (( 'and' | 'or' ) S) (sentence S?)* ')' | '(' ( 'implies' | 'iff' ) S? sentence S? sentence S? ')' | '(not' S? sentence S?')'
1
Sentence
2
0..*
2
0..*
0..1
0..1
and
or
0..1
not
0..1
implies
0..1
iff
Quantified Sentences
Phrases
Phrases
• A phrase contains an Import, a Sentence, or a
TextComment context SCLPhrase inv XOR:
(self.import->notEmpty( ) xor self.sentence->notEmpty( )) and
(self.import->notEmpty( ) xor self.textComment->notEmpty( )) and
(self.sentence->notEmpty( ) xor self.textComment->notEmpty( ))
Draft XMI for SCL
OWL Full and UML 2.0 Compared
• To compare the features of OWL and UML 2.0, in
order to
– facilitate translation of models between UML and
ODM
– Inform the design of features in the various layers of
the ODM
• Features more or less in common
– Class
– Property
• Features in UML not in OWL
• Features in OWL not in UML
UML
• Booch, Rumbaugh,
Jacobson
• Evolving Standard
• 1.3, 1.4, 1.5 (aka 1.4 with
Action Semantics, not
officially released ?)
•2.0
–Merge of 1.x with SDL/MSC
–More precise, Actions, Interfaces/Ports
–Attributes & Associations represent the concept of property
•Wiley released Tom Pender’s UML Bible, reported to do an
excellent job at presenting and comparing UML 1.4 and 2.0
http://www.taug2.com/learnmore/uml2explained/index.cfm
UML (Cont.)
UML models are organized in a series of 4 metalevels:
• M3 is the MOF, the universal modeling language in which
modeling systems are specified
• M2 is the model of a particular modeling system. The
UML metamodel is an M2 construct, as it is specified in
the M3 MOF.
• M1 is the model of a particular application represented in a
particular modeling system. The UML Class diagram
model of an order entry system is an M1 construct
expressed in the M2 metamodel for the UML Class
diagram.
• M0 is the population of a particular application. The
population of a particular order entry system at a time is an
M0 construct.
OWL vs UML Class
• Basic structures very similar
–
–
–
–
–
Both based on classes
A class is a set of instances
The set of instances of a class is its extent
Subclass relationship applies
A mandatory property specifies an existential
quantification at the M1 level
• But not that a concrete M0 instance exists
• All horses have color, but we may not know the
color of a particular horse.
– Both allow multiple superclasses and disjoint
subclasses
OWL vs UML Class
• Key difference
–In OWL, all classes are subclasses of Thing
• Individuals are instances of Thing
• But not necessarily any other class
–In UML, there is no universal superclass
• All instances are instances of non-universal classes
• Dynamic classification allows instances to move between
classes.
• But an OWL individual is outside the UML system
OWL vs UML Class
• Substantial difference
– Subclasses in both can be declared
• Given an instance of a subclass, we can infer the
membership in the superclass
– OWL allows a subclass to be defined by a
predicate
• Given an instance of a superclass, we can infer
which subclass it is an instance of.
– Predicate definition languages: Lite, DL and
Full
– All less expressive than UML OCL
OWL vs UML Class
• Substantial difference
– UML has strict separation of metalevels. An
M1 class cannot be an M0 instance
– OWL Full allows classes to be instances of
classes
Ontologies - Issues with Meta-Levels
Each occurrence of a type-of
or instance relation changes
meta-level.
RDFS, OWL/Full and DAML
allow instance in one metalevel to be treated as classes in
the level below. (OWL/L and
OWL/DL do not.)
This results in unexpected
situations for UML and most
OO languages:
– Entities with the same ID
(e.g. appl:Y) are treated as an
instance in one level and as
classes in another.
– A single ontology can define
several meta-levels within a
single “model”.
Meta-Level
UML RDF
M2 0
Application
Ontology
M1 1
Class Y extends Z {…} // Level 2
appl:X
appl:Y
M1 2
appl:Y
appl:Z
<owl:Class rdf:ID=“X”/>
<owl:Class rdf:ID=“Z”>
Application
Model
<X rdf:ID=“Y”>
< owl :subClassOf
rdf:resource=“#Z”/>
</X>
<Y rdf:ID=“Q”>
M0 3
X Y = new X(); // Level 2
Y Q = new Y(); // Level 3
OWL Full
owl:Class
appl:Q
Type-of
subClassOf
Class
Object
OWL vs UML Property
• Basic structure very similar
– Both have concept of property
• A property can be a class
– OWL property is binary, UML is n-ary
• But n-ary property can be expressed as a nested collection of binary
properties, so no difference in expressibility
– As a consequence of property as class
• Both support subproperties
• Both allow properties to have properties
– But only OWL Full allows properties of properties to have restrictions
OWL vs UML Property
• Basic structure very similar
– Both have distinguished ends for properties
• Domain and range for OWL
• Source and target for UML
– Target/Range can be a programming language literal
• Attribute in UML, datatype property in OWL
– Or a class
• Association or attribute in UML, object property in OWL
OWL vs UML Property
• Basic structure very similar
– Both have bi-directional properties
• UML bi-directional association
• OWL inverse-of
– Both allow a property to be common to all instances of
a class
• UML static property
• Two different methods in OWL
OWL vs UML Property
• Key difference
– in OWL a property by default relates Thing to Thing,
while in UML a property is tied to a non-top class.
– OWL most general declaration can be tied to a non-top
class in either domain or range or both
– So in OWL a property can be declared many times with
different restrictions, but is always the same property
– In UML a property applies only to subclasses of the
class for which it is declared.
– UML property name unique within a namespace.
OWL vs UML Property
• Substantial difference
– Both allow cardinality constraints on source/domain
and target/range
– OWL allows some cardinality on the most general
declaration
– But additional cardinalities when applied to a particular
class (subject to subclass consistency)
– Target class can be specified when applied to a class
(AllValuesFrom)
– Or Target can be constrained to intersect with a class
(SomeValuesFrom)
OWL vs UML Property
• Substantial difference
– OWL allows properties to be declared as
• Symmetric
• Transitive
– UML allows property to be derived
• But does not provide a derivation language
In UML but not OWL
• Methods and associated facilities
– Operations, responsibilities, static operations, interface
classes, abstract classes, qualified associations and
active classes
• Complex objects (part-of relationship) and
associated facilities
– Composition, aggregation, composite structures, ports,
connectors, collaboration, reference and value objects,
and template
• Access control, keywords and dependency
• Scoping (private, protected, public)
• Behavior, state, event models
In OWL not UML
• Predicate definition language
• Declaration that classes are equivalent
• Three versions of predicate language
– OWL Lite: intersection of named classes
– OWL DL: boolean combinations of classes
– OWL Full: arbitrarily complex descriptions
• Enumerated classes
• Property restrictions
• Boolean combinations
• But all are less expressive than OCL
– Eg can’t define square as subclass of rectangle where
length = width
In OWL not UML
• Names are M0 in UML, so not constrained
• OWL names by default do not satisfy the unique
name assumption
• So OWL provides features to discipline names
– AllDifferent (declared set of names satisfying unique
name assumption)
– SameAs (two names declared synonyms)
– DifferentFrom (two names declared not synonyms)
• Classes and properties can be declared equivalent
– Can include defining predicates.
UOP – Example Mapping
• The following OWL-UML mapping is used by Duet for translating OWL
Ontologies into UML models, and conversely, UML models into OWL Ontologies.
UML
OWL
D is c u s s io n
< < O W L o n to lo g y> > O n to lo g y
P a cka g e
C la ss
C la ss
P a cka g e s S te re o typ e d < < O W L o n to lo g y> > b e co m e O W L O n to lo g ie s.
P a cka g e n a m e b e co m e s O n to lo g y U R I.
U M L C la sse s w ith o u t ste re o typ e s b e co m e O W L C la sse s. U M L
C la ss o w n e rsh ip o f A ttrib u te s a n d A ss o cia tio n s is n o t stro n g ly
re p re se n te d in th e O W L C la sse s. N o o p e ra tio n s re p re se n te d .
< < O W L p ro p e rty> > P ro p e rty
U M L C la sse s ste re o typ e d < < O W L p ro p e rty> > b e co m e a O W L
C la ss
P ro p e rty o r o n e o f its su b cla sse s, w h ich su b cla ss is d e te rm in e d b y
a d d itio n a l co n te xtu a l in fo rm a tio n .
< < O W L d a ta typ e > > D a ta typ e
U M L C la sse s ste re o typ e d < < O W L d a ta typ e > > b e co m e a O W L
C la ss
d a ta typ e s.
D a ta T yp e
X M L S ch e m a o r
U M L d a ta typ e s a re g e n e ra lly m a p p e d in to X M L S ch e m a o r u se r
O W L d a ta typ e
d e fin e d O W L d a ta typ e s.
A sso cia tio n s a n d O b je ct P ro p e rty
U M L A sso cia tio n s a n d R o le s m a p to O b je ct P ro p e rtie s, a n d
R o le s
a n d R e strictio n
R e strictio n s.
A ttrib u te s
D a ta typ e P ro p e rty A ttrib u te s m a p to D a ta typ e P ro p e rtie s a n d R e strictio n s. A ttrib u te s
h a ve o n ly d a ta typ e s, a s o p p o se d to cla sse s, a s ra n g e s
G e n e ra liza tio n
su b C la ssO f o r
U M L g e n e ra liza tio n m a p p in g is d e p e n d e n t o n th e ste re o typ e o f th e
su b P ro p e rtyO f
U M L cla sse s in vo lve d .
Im p o rt
Im p o rt
P a cka g e im p o rts m a p d ire ctly to o n to lo g y im p o rts.
F u lly Q u a lifie d
Nam es
N a m e sp a ce s
A sso cia tio n s, R o le s, a n d C la sse s fro m d iffe re n t P a cka g e s a re
re fe re n ce d u sin g th e ir fu lly q u a lifie d n a m e s, th e p a cka g e co m p o n e n t
o f th e se n a m e s a re m a p p e d in to X M L N a m e sp a ce s a n d im p o rte d
O n to lo g ie s.
UOP – Example Mapping
OWL
O n to lo g y
C la s s
UML
< < O W L o n to lo g y> >
P ackage
C la s s
X M L S c h e m a < < O W L d a ta typ e > >
d a ta typ e
C la s s
O W L D a ta typ e < < O W L d a ta typ e > >
C la s s
O b je c tP ro p e rty < < O W L p ro p e rty> >
C la s s
O b je c tP ro p e rty < < O W L p ro p e rty> >
w ith
C la s s , A s s o c ia tio n
R e s tric tio n
a n d R o le
D is c u s s io n
O W L O n to lo g ie s b e co m e U M L P a c k a g e s w ith s te re o typ e s o f < < O W L o n to lo g y > > . T h e
O n to lo g y U R I b e c o m e s th e P a c k a g e n a m e .
O W L C la s se s b e c o m e U M L C la s s e s . T h e O W L C la s s ' lo c a l n a m e b e c o m e s th e U M L C la s s
nam e.
X S D typ e s m a p p e d in to a U M L C la s s w ith a < < O W L d a ta typ e > > s te re o typ e in th e X M L
S c h e m a n a m e sp a c e . T h e d a ta typ e ’s lo ca l n a m e b e co m e s th e U M L C la s s n a m e .
O W L d a ta typ e s a re m a p p e d in to a U M L C la ss w ith a < < O W L d a ta typ e > > s te re o typ e . T h e
d a ta typ e lo c a ln a m e b e c o m e s th e U M L C la s s n a m e .
O W L O b je c t P ro p e rtie s b e c o m e a t le a s t a U M L C la s s w ith a < < O W L p ro p e rty> > s te re o typ e .
A R e s tric tio n o n a n O b je c t P ro p e rty w ill b e c o m e a n U M L A s s o c ia tio n o r R o le . T h e
a s s o c ia tio n s o u rc e c la s s is a s u b c la s s o f th e R e s tric tio n , s ta te d o n P ro p e rty fo r th e O b je ct
P ro p e rty w ith th e to C la s s b e in g th e ta rg e t o f th e a s so c ia tio n . T h e O b je c t P ro p e rty’s lo c a l
n a m e b e c o m e s th e to C la s s ' ro le n a m e .
O b je c tP ro p e rty
w ith D o m a in
and Range
D a ta typ e
P ro p e rty
D a ta typ e
P ro p e rty w ith
D o m a in a n d
R ange
s u b C la s s O f o r
s u b P ro p e rtyO f
Im p o rt
< < O W L p ro p e rty> >
C la s s , A s s o c ia tio n
a n d R o le
< < O W L p ro p e rty> >
C la s s
< < O W L p ro p e rty> >
C la s s , a n d A ttrib u te
A n O b je c tP ro p e rty w ith a d o m a in a n d ra n g e b e c o m e s a U M L A s s o c ia tio n . T h e a s s o c ia tio n
h a s th e d o m a in a s th e s o u rc e U M L c la s s a n d th e ra n g e a s th e ta rg e t U M L C la s s . T h e
p ro p e rtie s lo c a l n a m e b e c o m e s th e ta rg e t c la s s ’ ro le n a m e .
O W L d a ta typ e P ro p e rtie s b e co m e a t le a st a U M L C la s s w ith a < < O W L p ro p e rty> > s te re o typ e .
G e n e ra liza tio n
O W L su b C la s s O f a n d s u b P ro p e rtyO f b e co m e U M L g e n e ra liza tio n s .
Im p o rt
O n to lo g y im p o rts m a p d ire c tly to P a c k a g e im p o rts .
N a m e sp a c e s
F u lly Q u a lifie d
Nam es
A s s o c ia tio n s , R o le s, a n d C la s s e s fro m d iffe re n t P a c k a g e s /O n to lo g ie s a re re fe re n ce d u s in g
th e ir fu lly q u a lifie d n a m e s . O f p a rtic u la r in te re s t a re p ro p e rtie s a n d c la s s e s fro m th e O W L
o n to lo g y a n d R D F .
A D a ta typ e P ro p e rty w ith a d o m a in a n d ra n g e b e c o m e s a U M L A ttrib u te . T h e D a ta typ e
p ro p e rty h a s th e c o n ta in in g c la s s a s th e d o m a in a n d th e d a ta typ e o f th e ra n g e .
Simple UML
Simple OWL
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE rdf:RDF [ <!ENTITY rdf
'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<!ENTITY owl
'http://www.w3.org/2002/07/owl#'> <!ENTITY
rdfs 'http://www.w3.org/2000/01/rdf-schema#'> ]>
<rdf:RDF
xml:base="file://simple.owl"xmlns:rdf="&rdf;"
xmlns:owl="&owl;" xmlns:rdfs="&rdfs;">
<owl:Ontology rdf:about=""/>
<owl:Class rdf:ID="Class_0"/>
<owl:Class rdf:ID="Class_1">
<rdfs:subClassOf rdf:resource="#Class_0"/>
<rdfs:subClassOf rdf:resource="#OGr0"/>
</owl:Class>
<owl:Class rdf:ID="Class_2">
<rdfs:subClassOf rdf:resource="#Class_0"/>
<rdfs:subClassOf rdf:resource="#OGr3"/>
<rdfs:subClassOf rdf:resource="#OGr6"/>
</owl:Class>
<owl:Restriction rdf:ID="OGr0">
<owl:allValuesFrom rdf:resource="#Class_2"/>
<owl:onProperty rdf:resource="#Role_A"/>
</owl:Restriction>
<owl:Restriction rdf:ID="OGr3">
<owl:allValuesFrom rdf:resource="#Class_1"/>
<owl:onProperty rdf:resource="#Role_B"/>
</owl:Restriction>
<owl:Restriction rdf:ID="OGr6">
<owl:allValuesFrom rdf:resource="#Class_1"/>
<owl:onProperty rdf:resource="#the_Association"/>
</owl:Restriction>
<owl:ObjectProperty rdf:ID="Role_A">
<rdfs:subPropertyOf rdf:resource="#the_Association"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="Role_B">
<rdfs:subPropertyOf rdf:resource="#the_Association"/>
</owl:ObjectProperty>
<owl:DatatypeProperty rdf:ID="c2_attr1">
<rdfs:domain rdf:resource="#Class_2"/>
<rdfs:range
rdf:resource="http://www.w3.org/2001/XMLSchema#
string"/>
</owl:DatatypeProperty>
<owl:ObjectProperty rdf:ID="the_Association"/>
<rdfs:Datatype
rdf:about="http://www.w3.org/2001/XMLSchema#stri
ng"/>
</rdf:RDF>
Roundtriped Simple UML
References
• Ivan Herman, Short Tutorial on RDF, RDFS and OWL,
http://www.w3.org/Consortium/Offices/Presentations/RDFTutorial/Ov
erview.html
• David Booth, Four Uses of a URL: Name, Concept, Web Location and
Document Instance, http://www.w3.org/2002/11/dboothnames/dbooth-names_clean.htm
• T. Berners-Lee, R. Fielding, L. Masinter, August 1998 Uniform
Resource Identifiers (URI): Generic Syntax,
http://www.ietf.org/rfc/rfc2396.txt
• Cris Kobryn, UML 2.0 Explained,
http://www.taug2.com/learnmore/uml2explained/index.cfm
• Visual Modelling With Rational Rose 2002 and UML, Terry Quatrani
• L.Hart, P. Emery, B. Colomb, K. Raymond, D. Chang, Y. Ye, E.
Kendall, M. Dutra, ODM Revised Submission, Working Papers and
Presentations, Jan 26 2004
References (Cont.)
• L.Hart, P. Emery, Components for Ontology Driven Information Push,
http://codip.grci.com/
• L.Hart, P. Emery, B. Colomb, K. Raymond, D. Chang, Y. Ye, E.
Kendall, M. Dutra, Usage Scenarios and Goals Motivating
Development of an Ontology Definition Metamodel,
http://www.omg.org/cgi-bin/doc?ontology/2004-01-01
• L.Hart, P. Emery, B. Colomb, K. Raymond S.Taraporewalla, D.
Chang, Y. Ye, E. Kendall, M. Dutra,
http://www.omg.org/cgi-bin/doc?ontology/2004-03-01
• Pat Hayes, SCL: Simple Common Logic,
http://www.ihmc.us/users/phayes/SCL_december_2.html *** Draft
***
• Pat Hayes, Simplified Common Logic A flexible framework for
information interchange based on first-order logic,
http://www.ihmc.us/users/phayes/SCL_for_Harry.ppt
Descargar

Usage Scenarios and Goals For Ontology Definition …