Metamodeling by J'P'Nytun, page 1 - PowerPoint PPT Presentation

1 / 80
About This Presentation
Title:

Metamodeling by J'P'Nytun, page 1

Description:

of termite infestation. in France. The System. Models. France in 1453. The cheese. french map ... by termites in France. First round of political. election in ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 81
Provided by: janpetter
Category:

less

Transcript and Presenter's Notes

Title: Metamodeling by J'P'Nytun, page 1


1
Metamodeling
  • What is a concept?
  • The Semantic triangle.
  • Isomorphism and Douglas Hofstadter
  • What is a model?
  • Interpretation of a model
  • describedBy or specifiedBy
  • What is Metalinguistics / Metamodeling
  • BNF
  • Strict Metamodeling
  • The Four-Layered Metamodel Architecture of UML
  • The UML metamodel /Abstract syntax
  • Clabject
  • InstanceSpecification
  • Meta Object Facility (MOF)
  • Multilanguage Integration

René Magritte "this is not a pipe" 
2
Concept Class
  • From Merriam-Webster Online Dictionary, Concept
  • Something conceived in the mind thought,
    notion.
  • An abstract or generic idea generalized from
    particular instances.
  • From Cambridge Advanced Learner's Dictionary
  • conceptual (adjective)based on ideas or
    principles.
  • conceptualize (verb)to form an idea or
    principle in your mind.

3
The Semantic Triangle(The Meaning-/Sign-/Ogden-
Triangle)
  • Concept (meaning / thought) in the mind, the
    meaning of a word is found in the minds of
    people.
  • The reference is the meaning that an individual
    assigns to a word.
  • A concept can describe one single entity (e.g.
    the White House) or a set of entities (e.g.
    houses).

- One can think of a concept as something
abstract, even if ones understanding of it must
be represented in a concrete way. -
Representation of a concept will be different
from one person to another, but we often think
that we have the concepts in common through a
common language.
concept/ Reference e.g. the concept of a house
conceptualization
Referent
Sign/Symbol/Represent e.g. The White House
referencing
- Symbols makes it possible to operate on an
abstract level. - Note the following for a
symbol to appear it must have a concrete
representation. Sometimes the symbol is hinting
at what it means by its appearance (e.g.
).
- E.g. a physical object or some other
concept(s)
4
Classification
Often a concept is a classification of objects,
which can be mathematically handled with set
theory.
The cat-concept
The concept of this specific (good-looking)
individual
Cat
Animal
Cat
The Beckham look-alike cat
The Beckham look-alike cat
5
In A Computer/UML Context
Computer representation of class Cat
UML concrete- representation
Computer representation of a specific cat
Cat
Sometimes there are a real world instance
UML concrete representation
The Beckham look-alike cat Cat
6
The Kant Approach
Reality - Noumenon or the thing-in-itself
isomorphic
mini-worldRepresentation in the computer system
mini-worldRepresentation in the brain
phenomenon
noumenon
Ref http//www.arts.uwaterloo.ca/PHIL/cpshelle/ga
llery/gallery.html
A mini-world has its own substance which can be
formed to statements in a language this is how
concepts are represented.
7
NoumenonFrom Wikipedia, the free encyclopedia
  • In the philosophy of Immanuel Kant, a
    noumenon or thing in itself (German Ding an sich)
    is an allegedly unknowable, undescribable reality
    that, in some way, lies "behind" observed
    phenomena. Noumena, plural, are sometimes spoken
    of, though the very notion of individuating items
    in "the noumenal world" is problematic, since the
    very notions of number and individuality are
    among the categories of the understanding, which
    are supposed to apply only to phenomena, not
    noumena. "Phenomenon" is another technical term
    in Kant's philosophy, meaning the world as
    experienced.
  • One of the most difficult problems
    for Kant's philosophy is explaining the
    relationship between the noumenal and phenomenal
    worlds........

8
Isomorphic
  • From Free On-line Dictionary of ComputingTwo
    mathematical objects are isomorphic if they have
    the same structure, i.e. if there is an
    isomorphism between them. For every component of
    one there is a corresponding component of the
    other.
  • Douglas Hofstadter provides an informal
    definition
  • The word "isomorphism" applies when two
    complex structures can be mapped onto each other,
    in such a way that to each part of one structure
    there is a corresponding part in the other
    structure, where "corresponding" means that the
    two parts play similar roles in their respective
    structures. (From his book Gödel, Escher, Bach,
    p. 49)
  • From Wikipedia, the free encyclopediaFormally,
    an isomorphism is a bijective map f such that
    both f and its inverse f -1 are homomorphisms,
    i.e. structure-preserving mappings.

9
Observer Neutral Observations?
FURTHER ABSTRACTIONS OBJECTS
SUBJECT
PHEMENON
impression
expression
OBJECT
REALITY
NOUMENON
(a)
(b)
(c)
  • Fig.(a) shows an observation (done by
    some instrument / sense organ) where the subject
    (observer) cause no effect on the observed
    object. According Immanuel Kant we can not
    know the thing-in-itself (noumenon), the subject
    can only know the phenomenon which is the
    "impact" noumenon does on the subject Fig.(b)
    show a sketch of the Kant view.
  • Fig.(c) shows the more true story that
    an observer always causes an perturbation of some
    kind onto the observation. Subject must be in
    some sort of interaction with reality to receive
    information the influence of the observer
    generate a sort of response from the "thing"
    being observed - the response generates the
    impression experienced by the observer. As we
    understand from this an observer independent
    observation is not possible. This problem has
    also been discussed i quantum mechanics
  • The Copenhagen Interpretation makes
    a distinction between the observer and the
    observed when no one is watching, a system
    evolves deterministically according to a wave
    equation, but when someone is watching, the
    wave-function of the system "collapses" to the
    observed state, which is why the act of observing
    changes the system.

10
All Classes Are Abstract
All classes are abstract, it is not possible to
"point to" a class and say "there it is", but
it might be possible to point to the instances of
a class and also to a description of a class.
It is common to confuse the description of a
class with the class itself, but something
abstract can not suddenly be concrete that would
be a self-contradiction. Concepts that have no
representation does not matter and can at best
be seen as potentially existing.
11
Summing upConcept Representation
  • Perception can be seen as giving representation -
    making a model.
  • A representation implies three things the
    referent (what is represented), the represent
    (e.g. a symbol), and the complete representation
    which includes the two first and the reference
    between ("I-represent-you") we have the meaning
    triangle which describes conceptualization.
  • Concepts that are given representation can again
    be refereed and used in new conceptualizations.

12
Summing up continues...
  • For a concept to appear in our world it must be
    represented in the world it must have a
    concrete representation, e.g. ink on paper.
    Electronics are used to represent concepts in the
    computer.
  • The brain and the computer are both used to
    represent concepts (As I see it one difference
    being that we have consciousness (whatever that
    might be) which the computer do not have).
  • Typically a symbol is part of a languages the
    languages defines how the different types of
    symbols can be put together to shape well-formed
    sentences, this is called syntax .

13
Metamodeling
  • What is a concept?
  • The Semantic triangle.
  • Isomorphism and Douglas Hofstadter
  • What is a model?
  • Interpretation of a model
  • describedBy or specifiedBy
  • What is Metalinguistics / Metamodeling
  • BNF
  • Strict Metamodeling
  • The Four-Layered Metamodel Architecture of UML
  • The UML metamodel /Abstract syntax
  • Clabject
  • InstanceSpecification
  • Meta Object Facility (MOF)
  • Multilanguage Integration

René Magritte "this is not a pipe" 
14
What is a model?
  • From Wikipedia, the free encyclopedia
  • Model, models, or modeling may refer to An
    abstract representation of an object or system
    from a particular viewpoint.
  • Some other definitions
  • "A model is an abstraction of a physical system,
    with a certain purpose.
  • "A model is a simplification of a system built
    with an intended goal in mind. The model should
    be able to answer questions in place of the
    actual system.
  • "A model is a set of statements about some system
    under study (SUS)."

15
Modeling is essential 11
  • Modeling is essential to human activity because
    every action is preceded by the construction
    (implicit or explicit) of a model.
  • The medical technique of bloodletting was based
    on an incorrect model of the body. If the model
    is incorrect, the action may be inappropriate.
  • Hyppocrates and many others believed that the
    four crucial elements earth, air, water and fire
    were balanced within the human body as the four
    humors blood, phlegm, and black and yellow bile.
    In this context, disease was due to an imbalance
    in the four humors and treatment involved
    restoring their balance through bloodletting.
  • Georges Washington died after heavy blood loss
    sustained in a bloodletting treatment for
    laryngitis.

16
Model and Model Instance
Model
Model
specifiedBy
describedBy
The specifiedBy role is a specialization of
the describedBy role.
given
specifies
System
System
In physics the system under study is nature
(which is given) the mission is to come up with
a description (model) that is so good that it can
be used to predict and explain natural phenomenon.
The specification of a software systemthe
implementation (system) must conform to the model.
A system is a group of interacting, interrelated,
or interdependent elements that form a
complex whole.
Person
Car
Car
Person

1
nameBob
name
Car
Model
A Model Instance snapshot
17
A very popular model geographical maps 11
France in 1453
The cheese french map
The System
Railroad map in western fFrance
Models
18
Multiples views 11
Each view is expressed in a given domain
language. Vocabularies of different corporations
are different However they allow talking about a
common building.
Plumber's view
Architect's view
Landlord's view
Renter's view
Mason's view
Interior Designer's view
Carpenter's view
Tax Collector's view
Electrician's view
19
Abstraction
  • A model is an abstraction of a system,
    with a certain purpose.
  • Abstraction involves extracting the
    essence in regards to some aspect but often
    also a generalization is performed!

20
At least two types of models
  • A model is to a large extent defined by
    the role it plays in relation to what it models
    two basic roles are defined by Thomas Kühne 12
    token and type.
  • A token model captures the singular
    aspects, while a type model captures the
    universal aspects of what it models.
  • A class Building might capture the
    universal property that buildings have owners. An
    object that models one specific building is a
    token model for this building, e.g. it might
    capture the name of the owner.

Building Concept
Topographic map
Building register
token- ModelFor
TMBuilding
Building
id shape
id owner
token- ModelFor
level N1
level N
type- ModelFor
type- ModelFor
token- ModelFor
Building
id b1 owner Tom
Toms perception of the Building
21
A model an the meaning triangle
  • A model representation together with a
    model instance is part of a rather similar
    triangle as the meaning triangle
  • The two relations "I-represent-you" and
    "I-am-a-model-for-you" is much the same.A model
    is typically complex and tells much about what
    it represent (e.g. its structure). A model for an
    information system typically contains several
    related concepts so a model is more like a
    complex structure than a simple symbol.
  • Basically A model is a description of the model
    instance!

the model understanding(one model can have
many representations)
model representation (represent)
model instance (referent)
22
An interpretation of a model
  • 1 defines an interpretation of a model as
    being A mapping of elements of the model to
    elements of the
  • system under study such that the truth-value of
    statements in the model can be determined from
    the system under study, to some level of
    accuracy.
  • In this way a model is given meaning - an
    example of
  • what it means is explicitly shown.

Person
Car
Person
Car

1
nameBob
name
Car
Model
A Model Instance snapshot
23
Model Transitivity 12
In logic and mathematics, a binary relation R is
transitive if xRy and yRz together imply xRz. In
predicate logic For example, the
less-than relation is transitive. On the other
hand, "is the mother of" is not a transitive
relation, because if Alice is the mother of
Brenda, and Brenda is the mother of Claire, then
Alice is not the mother of Claire.
Also subclassing is transitive
24
A Simplified Model of the Mind
  • According to Korzybski "reality" can
    be seen as a set of "worlds (dimensions/aspects)
    that we participate in, all worlds except the
    first one can be seen as levels of
    abstractions20
  • The first of these worlds is the physical
    world as postulated by natural science...
  • Korzybski referred to the theoretically
    understood physical world as the "event" level of
    existence...
  • The second world is that of
    sensations/perceptions which we abstract
    (select-construct) from events within and around
    us. As infants we experience ourselves fully in
    this sensory-perceptual world which includes
    tastes, smells, sights, feelings, etc.
  • Korzybski referred to this world as the
    "silent, un-speakable, objective" level... What
    we know at this level is not theoretical and has
    a direct aesthetic value.
  • As we mature, we enter the third world
    that we function in as "multiple amphibians"
    language. Korzybski referred to world3 as the
    "verbal level". Language allows us to further
    abstract from or symbolize our world2 sensory
    experiences. The world of language contains
    within it many successive levels everyday
    conversation about particulars, as well as the
    higher-order abstractions of science,
    mathematics, philosophy, etc.
  • The author realize that this view is
    a simplified and a schematic description of the
    mind. The schematic nature of the view makes is
    possible to see similarities with models and
    model instances "built up inside" a computer.
  • The mind is connected to the outside
    world (world1 of Korzybski) through sense organs
    a computer is connected to the same world through
    its input and output devices.

25
The Levels of Abstractions and Metalevels
The concept of a class and property are associated
Class
Property
Class
Property
.
.
.
Animals have weight
Animal
A4
weight
A dog is a special type of animal
Dog
A3
weight
A2 Labels(Symbols)
Dog
Animal
Dog
Representation of a dog
Abstraction level 1 - Object Level
weight 23
23
(a)
(b)
(c)
26
A map is not the territory it represents.
  • Norwegian saying If the map does not fit the
    territory trust the territory!

Representation of the representation
René Magritte "this is not a pipe" 
27
Every map has a legend (implicit or explicit)
11
The legend
28
a Model has no meaning when separated from its
legden (metamodel) 11
Percentage of places infested by termites in
France.
First round of political election in France in
2002.
?
29
Metamodeling
  • What is a concept?
  • The Semantic triangle.
  • Isomorphism and Douglas Hofstadter
  • What is a model?
  • Interpretation of a model
  • describedBy or specifiedBy
  • What is Metalinguistics / Metamodeling
  • BNF
  • Strict Metamodeling
  • The Four-Layered Metamodel Architecture of UML
  • The UML metamodel /Abstract syntax
  • Clabject
  • InstanceSpecification
  • Meta Object Facility (MOF)
  • Multilanguage Integration

René Magritte "this is not a pipe" 
30
Metalinguistics
  • The use of languages to define other languages.
  • John Backus and Peter Naur were the first to
    introduce a formal notation to describe the
    syntax of a given language.
  • Exampleltprogramgt program
    ltdeclaration_sequencegt
    begin ltstatements_sequencegt
    end

31
Metamodeling
  • The use of models to define other models.
  • The metamodel defines possible structures and
    defines the meaning to elements in a model the
    metamodel is by itself another model.
  • Example 4-layer metamodel architecture.

32
A Four-layer Metamodel Architecturefor BNF (or
EBNF)
4 A BNF specification is a set of derivation
rules, written as ltsymbolgt ltexpression with
symbolsgt where ltsymbolgt is a nonterminal, and the
expression consists of sequences of symbols
and/or sequences separated by '', indicating a
choice, the whole being a possible substitution
for the symbol on the left. Symbols that never
appear on a left side are terminals. Symbols
inside brackets are optional...
Description of BNF or the definition of BNF
itself
Meta Level M3
Example ltprogramgt Program ltidentifiergt
ltdeclaration_sequenc
egt begin
ltstatements_sequencegt end
This is also called metasyntax which is a syntax
used to describe the syntax of a languages.
Meta Level M2
Example Program DoSomethingWeLike(...)
....
begin .......
end
Sentences in the define language,e.g. a program
if a programming language has been defined
Meta Level M1
Example A program under execution a process
33
Extended Backus-Naur Form Self-description11
  • syntax rule
  • rule identifier "" expression
  • expression term "" term
  • term factor factor
  • factor identifier
  • quoted_symbol
  • "(" expression ")"
  • "" expression ""
  • "" expression ""
  • identifier letter letter digit
  • quoted_symbol """ any_character """

34
UML ModelingTwo Levels
Person
Car
Model Level Level M1

1
name
instanceOf
instanceOf
instanceOf
Model Instance Level Level M0
Car
Person
Car
nameBob
  • We have already seen two levels Model and Model
    Instance.
  • In the UML context this levels are named M1 and
    M0 respectively.
  • Level M0 in the figure above is shown with the
    help of some Quasi-UML-notation, e.g. the
    instanceOf-relation has not been formally
    defined in UML.

35
MetamodelingE.g. Three Levels
  • Level M1 represent a UML model that is
    made of two classes and one association.
  • The two concepts class and association are
    not defined by the model (M1) one could insert
    the two concepts as part of the model, but
    according to strict meta-modeling (UML is defined
    by strict meta-modeling.) they should be placed
    on a level above, which would correspond to the
    UML metamodel level.
  • Are there other concepts used on M1 that are
    not defined?

Class
Association
M2
M1
Person
Car

1
name
M1
M0
Car
Person
Car
nameBob
It could be on same level if the model was
made reflexive.
36
Strict Metamodeling
  • You have strict metamodeling if all elements
    of model X is an instance-of some element of this
    models metamodel.
  • The only way to introduce a model element at
    a level is to use the instance-of (also called
    meta-instance-of) relationship to some modeling
    element at the level above.
  • Formally2
  • In an n-level modeling architecture, M0,
    M1,,Mn-1, every element of an Mm level model
    must be an instance-of element of an Mm1 level
    model, for all mltn-1.

Class
M2
instanceOf
M1
Person
37
Loose Metamodeling
  • Each modeling element at level N might not be an
    instance of an modeling element at level N1.
  • Loose metamodeling is a more general concept than
    strict metamodeling strict metamodeling is a
    specific type of loose metamodeling.

38
Metamodeling
  • What is a concept?
  • The Semantic triangle.
  • Isomorphism and Douglas Hofstadter
  • What is a model?
  • Interpretation of a model
  • describedBy or specifiedBy
  • What is Metalinguistics / Metamodeling
  • BNF
  • Strict Metamodeling
  • The Four-Layered Metamodel Architecture of UML
  • The UML metamodel /Abstract syntax
  • Clabject
  • InstanceSpecification
  • Meta Object Facility (MOF)
  • Multilanguage Integration

René Magritte "this is not a pipe" 
39
The Four-Layered Meta-Model Architecture of UML
  • Today the metamodeling approach is a
    common way of organizing models, a way that
    involves descriptions on levels placed on top of
    each other.The concepts of one level have
    corresponding descriptions on a next level (the
    level above, meta-level). Stated differently, a
    level is a model and the level below is an
    instance of this model (except the lowest which
    have no instance).

MOF (meta-metamodel)
M3
instanceOf
UML metamodel
M2
instanceOf
M1
User model
instanceOf
model instance
M0
40
The UML Four-Layered Meta-Model Architecture M0
meta-metamodel
metamodel
model
user objects(user data)
41
The UML Four-Layered Meta-Model Architecture M1
meta-metamodel
metamodel
model
user objects(user data)
42
The UML Four-Layered Meta-Model Architecture M2
meta-metamodel
metamodel
model
user objects(user data)
43
The UML Four-Layered Meta-Model Architecture M3
meta-metamodel
metamodel
model
user objects(user data)
44
From one to Many
MOF is one pattern that describes an
infinite set of patterns that we
call metamodels. One meta-
model defines an infinite set
of patterns that we call
models, which again defines
an infinite set of instances.
M3
meta-metamodel
...
M2
metamodel
metamodel
...
M1
model
model
  • A level can be described with a graph
    structure (e.g. a UML model) this graph
    constitute a pattern that defines a set of
    concepts, like how they relates to each other and
    how they are structured. The next level
    constitute an example of how this concepts can be
    used.

...
user data
M0
45
6 Some Definitions
  • Metaclass
  • A class whose instances are classes.
    Metaclasses are typically used to construct
    metamodels.
  • Metaobject
  • A generic term for all metaentities in a
    metamodeling language. For example, metatypes,
    metaclasses, metaattributes, and
    metaassociations.
  • Language syntax semantics
  • syntax rules by which language elements
    (e.g., words) are assembled into
    expressions (e.g., phrases, clauses)
  • semantics rules by which syntactic
    expressions are assigned meanings.

46
6 Some More Definitions
  • The syntax defines what constructs exist in the
    language and how the constructs are built up in
    terms of other constructs.
  • Sometimes, especially if the language has a
    graphic syntax, it is important to define the
    syntax in a notation independent way (i.e., to
    define the abstract syntax of the language). The
    concrete syntax is then defined by mapping a
    mapping onto the abstract syntax.

47
6 Some More Definitions
  • The static semantics of a language define how an
    instance of a construct should be connected to
    other instances to be meaningful, and the dynamic
    semantics define the meaning of a well-formed
    construct in relation to behavior.
  • The meaning of a description written in the
    language is defined only if the description is
    well formed (i.e., if it fulfills the rules
    defined in the static semantics).

Person
Car

1
name
instanceOf
instanceOf
instanceOf
Car
Person
Car
nameBob
48
Formal Operational and Denotational Semantics
  • A modeling language can be provided with formal
    dynamic semantics in different ways. The most
    common ones are operational semantics and
    denotational semantics.
  • Operational semantics is given by some kind of
    abstract state machine that extend the abstract
    syntax of the language.
  • Denotational semantics is given by a mapping into
    a separate semantic domain, e.g. mathematics.

49
Metamodeling
  • What is a concept?
  • The Semantic triangle.
  • Isomorphism and Douglas Hofstadter
  • What is a model?
  • Interpretation of a model
  • describedBy or specifiedBy
  • What is Metalinguistics / Metamodeling
  • BNF
  • Strict Metamodeling
  • The Four-Layered Metamodel Architecture of UML
  • The UML metamodel /Abstract syntax
  • Clabject
  • InstanceSpecification
  • Meta Object Facility (MOF)
  • Multilanguage Integration

René Magritte "this is not a pipe" 
50
The UML MetamodelConsists of
  • Abstract Syntax
  • Is presented in a UML class
    diagram showing the metaclasses defining the
    constructs and their relationships.
    Well-formedness rules is a set of invariants of
    an instance of the metaclass. The invariants have
    to be satisfied for the construct to be
    meaningful. Each invariant is defined by an OCL
    expression.The well-formedness rules of UML
    limits or constrain the number of possible
    models.
  • Concrete syntax
  • Defines the diagrammatic and
    grammar aspects of UML this is the way the
    language is exposed to the user, e.g. rectangles
    for classes.
  • The concrete syntax is defined by a
    mapping from the notation onto the abstract
    syntax.
  • The concrete syntax is defined in
    natural language.
  • Semantics
  • The meanings of the constructs are
    defined using natural language.

51
Example Metaclass ClassFrom 6 Classes diagram
Abstract Syntax
NamedElement
name String0..1
0..1
Type
TypedElement
DataType
0..1
primitive
ownedMember
Class
Property
PrimitiveType
Integer

isAbstractBoolean
Semantics
The purpose of a class is to specify a
classification of objects and to specify the
features that characterize the structure and
behavior of those objects. Objects of a class
must contain values for each attribute that is a
member of that class, in accordance with the
characteristics of the attribute, for example its
type and multiplicity. ..... Operations of a
class can be invoked on an object, given a
particular set of substitutions for the
parameters of the operation. An operation
invocation may cause changes to the values of the
attributes of that object.......
52
Example Metaclass ClassContinues
Notation / Concrete Syntax
The default notation for a classifier is a
solid-outline rectangle containing the
classifiers name, and optionally with
compartments separated by horizontal lines
containing features or other members of the
classifier. The specific type of classifier can
be shown in guillemets above the name. Some
specializations of Classifier have their own
distinct notations. A class is shown using the
classifier symbol. As class is the most widely
used classifier, the word class need not
be shown in guillemets above the name. A
classifier symbol without a metaclass shown in
guillemets indicates a class.
Person
name
E.g. Class Person
53
The Instantiation Theoryof UML (Static
Semantics)
Instantiation of central UML concepts
(semantics) The class concept is instantiated
to a specific class, which again can be
instantiated to an object. The property concept
can be seen as part of the class concept since a
specific property will be attached to a specific
class and also a specific property get
instantiated to a slot that is attached to an
object. The association concept is also
interweaved with the class concept classes of
objects gets associated and a specific
association can be instantiated to a link between
objects.
54
Well-Formedness Rules
6 The well-formedness rules of a metaclass,
except for multiplicity and ordering constraints
that are defined in the diagram at the beginning
of the package section, are defined as a
(possibly empty) set of invariants for the
metaclass, which must be satisfied by all
instances of that metaclass for the model to be
meaningful. The rules thus specify
constraints over attributes and associations
defined in the metamodel. Most invariant
is defined by an OCL expression together with an
informal explanation of the expression, but in
some cases the invariant is expressed by other
means (in exceptional cases with natural
language).
55
Instantiation of Class Class
NamedElement
Association
name String0..1
name String0..1
0..1
0..1
TypedElement
Type
M2
member- end
2..
owned- Attribute
Class
Property
0..1
0..1

Class
Property
name String0..1 isAbstractBooleanfalse
name
owned- Attribute

isAbstractBooleanfalse
instanceOf
instanceOf
instanceOf
instanceOf
instanceOf
C
CClass
iProperty
M1
i
isAbstractfalse
(a)
(b)
56
A Metamodel Example
Relationship
g1
Association
Generalization

name
g2

a
0..1
g2_s
a_m
member- End
g1_g
1
specific
2
Class
Property
1
c_o
name isAbstract

name isComposite multiplicity
1
owned- Attribute
c
general
57
You can per definition only display modeling
elements by using concrete representation.
  • Abstract syntax is usually shown as class
    diagrams - this is like defining the syntax of
    English with the help of English, e.g. the class
    diagrams of the UML metamodel specification.
  • An instance of the UML metamodel can
    be shown as an object diagram or as a class
    diagram both are instances of the abstract
    syntax and they conform to each other. In a sense
    the class diagram notation use syntactic sugar
    e.g. an attribute is shown inside a compartment
    and not as an instance of Property. A class
    diagram is a natural choice when you see the
    level from the level below, while an object
    diagram shows how the level has been instantiated
    from the level above.

58
Metamodeling
  • What is a concept?
  • The Semantic triangle.
  • Isomorphism and Douglas Hofstadter
  • What is a model?
  • Interpretation of a model
  • describedBy or specifiedBy
  • What is Metalinguistics / Metamodeling
  • BNF
  • Strict Metamodeling
  • The Four-Layered Metamodel Architecture of UML
  • The UML metamodel /Abstract syntax
  • Clabject
  • InstanceSpecification
  • Meta Object Facility (MOF)
  • Multilanguage Integration

René Magritte "this is not a pipe" 
59
Clabject 8,9
  • In 8,9 an entity with class and object nature
    is called a clabject, in fact all classes are
    clabjects. The clabject-notation allows you to
    see the attributes and the slots of a class, this
    can be shown in separate compartments as done in
    the figure.

PropertyClass
isAbstract falsenameProperty
nameString
60
Class and Clabject8,9 Notation
owned- Attribute
Class
ClassClass

isAbstractBoolean name String
name String isAbstractBoolean
PropertyClass
isAbstract falsenameProperty
name Class
isAbstract false

Property
owned- Attribute
nameString
nameString
M3
M3
ClassClass
Class
name Class isAbstract false
name String isAbstractBoolean
name String isAbstractBoolean
M2
M2
PersonClass
Person
isAbstract false name Person
M1
M1
Person
Person
M0
M0
Class Notation
Class/Object Notation
61
Only Instances(Simplified)
Property
ClassClass
PropertyClass
nameisAbstract
name Class isAbstract false
name Propery isAbstract false
Property
Property
namename
namename
M3
Property
ClassClass
namename
name Class isAbstract false
Property
name isAbstract
M2
PersonClass
name Person
isAbstract false
M1
Person
M0
Object Notation
62
Only Instances More Details
Class3
Association3
Class3
name
nameProperty3
nameClass3 isAbstractfalse
association
association
owned- Attribute
member- End
owned- Attribute
member- End
owned- Attribute
owned- Attribute
Property3
owned- Attribute
..
Property3
namename
Property3
Property3
Property3
Property3
namedefault
Property3
upper 1
upper
namename
nameisAbstract default false
nameupper
M3
MLB3
Class3
Property3
nameClass2 isAbstractfalse
nameisAbstract default false upper 1
Property3
namename default upper 1
M2
MLB2
Class2
M1
namePerson isAbstractfalse
63
Metamodeling
  • What is a concept?
  • The Semantic triangle.
  • Isomorphism and Douglas Hofstadter
  • What is a model?
  • Interpretation of a model
  • describedBy or specifiedBy
  • What is Metalinguistics / Metamodeling
  • BNF
  • Strict Metamodeling
  • The Four-Layered Metamodel Architecture of UML
  • The UML metamodel /Abstract syntax
  • Clabject
  • InstanceSpecification
  • Meta Object Facility (MOF)
  • Multilanguage Integration

René Magritte "this is not a pipe" 
64
CoreAbstractionInstances Package
NamedElement (from NameSpaces)
Element (from Ownerships)
The UML specification states "An instance
specification is a model element that represents
an instance in a modeled system... An instance of
an InstanceSpecification is defined in a model at
the same level as the model elements that it
illustrates".
OwningInstance
InstanceSpecification

Slot
1
instance
1
0..1
0..1
1..
Classifier(from Classifiers)
specification
0..1
value
ValueSpecification (from Expressions)

definingFeature
1
Person
StructualFeature (from StructureFeatures)
InstanceValue
nameBob
Concrete notation for InstanceSpecifications
Constraints / Well-formedness rule The defining
feature of each slot is a structural feature
(directly or inherited) of a classifier of the
instance specification. slot-gtforAll(s
classifier-gtexists(c c.allFeatures()-gtincludes(s
.definingFeature) )
65
Snapshot of Object
snapshot
Concrete
InstanceSpecification
C1Class
classifier
name C1
Abstract
Property
Slot
definingFeature
nameattr
value
LiteralInteger
type
Integer
value 44
66
Snapshot of Objects and Association
classifier
Class
Instance- Specification
name C2
type
definingFeature
value
ownedEnd
Instance- Value
Property
Slot
memberEnd
classifier
Instance- Specification
Association
snapshot
name assoc
C2
C2
memberEnd
ownedAttribute
value
snapshot
Instance- Value
assoc
assoc
Property
Slot
definingFeature
type
classifier
snapshot
Instance- Specification
Class
name C1
ownedAttribute
definingFeature
Property
Slot
name attr
value
type
LiteralInteger
value 44
(a) concrete
(b) abstract
67
Metamodeling
  • What is a concept?
  • The Semantic triangle.
  • Isomorphism and Douglas Hofstadter
  • What is a model?
  • Interpretation of a model
  • describedBy or specifiedBy
  • What is Metalinguistics / Metamodeling
  • BNF
  • Strict Metamodeling
  • The Four-Layered Metamodel Architecture of UML
  • The UML metamodel /Abstract syntax
  • Clabject
  • InstanceSpecification
  • Meta Object Facility (MOF)
  • Multilanguage Integration

René Magritte "this is not a pipe" 
68
Meta-Metamodel
  • If you want to make a metamodel you need a
    language in which this metamodel can be
    expressed, the definition of the meta-metamodel
    is that language. The meta-metamodel relates to a
    metamodel the same way as a metamodel relates to
    a model.
  • A model can play different roles (metamodel,
    meta-metamodel, .) depending on context. So the
    meta term describe the role the model plays in
    relation to another model.

69
Once Again 3 Four Layer Meta-data Architectures
  • The meta-metamodel level is typically hard-wired,
    and defines the machinery that supports the
    meta-data frameworks metamodeling constructs
    e.g. meta-Classes and meta-Attributes.

70
From the Meta Object Facility (MOF) 2.0 Core
Specification (o3-10-04)
  • The Internet has connected data sources ....
    Incompatible metadata across different systems
    have been a primary limitation on data exchange.
    Metadata are data about data. They are the data
    used by tools, databases, middleware, etc. to
    describe structure and meaning of data.
  • Unfortunately, many applications use proprietary
    models of metadata....... Resolving these
    differences will accelerate integration of
    important applications that require interchange,
    such as data warehousing, business intelligence,
    e-commerce, and information portals.
  • The Meta Object Facility (MOF), an adopted OMG
    standard, (latest revision MOF 1.4) provides a
    metadata management framework, and a set of
    metadata services to enable the development and
    interoperability of model and metadata driven
    systems.... A number of technologies standardized
    by OMG, including UML, MOF, CWM, SPEM, XMI, and
    various UML profiles, use MOF and MOF derived
    technologies (specifically XMI and more recently
    JMI which are mappings of MOF to XML and Java
    respectively) for metadata-driven interchange and
    metadata manipulation.
  • MOF has contributed significantly to some of the
    core principles of the emerging OMG Model Driven
    Architecture.
  • Building on the modeling foundation established
    by UML, MOF introduced the concept of formal
    metamodels and Platform Independent Models (PIM)
    of metadata (examples include several standard
    OMG metamodels including UML, MOF itself, CWM,
    SPEM, Java EJB, EDOC, EAI etc.) as well as
    mappings from PIMs to specific platforms
    (Platform Specific Models and mapping examples
    include MOF-to-IDL mapping in the MOF
    specification, MOF-to-XML DTD mapping in the XMI
    specification, MOF-to-XML Schema mapping in the
    XMI production of XML Schema specification, and
    MOF-to-Java in the JMI spec).

71
Meta Object FacilityMOF
  • MOF is reflexive, meaning that the concepts
    described are the ones used when doing the
    description.
  • MOF and UML are both object-oriented and the core
    of MOF and UML are structurally equivalent.
  • MOF defines among other thing reflexive
    interfaces for introspection.
  • If UML was the only interest than MOF could be
    dropped and the UML metamodel could be made an
    instance of itself, but MOF is important when
    doing language integration and is meant as an
    offspring for several metamodels.

72
I. The Number of Metalevels
  • The UML metamodeling approach has been inspired
    by the CASE Data Interchange Format (CDIF) which
    is a standard (actually several standards)
    defning a metamodeling architecture for
    exchanging information between modeling tools.
  • CDIF describes the different modeling languages
    in terms of a fixed core model, in effect the
    core model function as a meta-metamodel.
  • A tool that understands the core model can read
    the description of a specific modeling language,
    and understand any models written in that
    language.
  • The number of levels is four which is sucient
    for achieving CASE tool interoperability each
    level corresponds to the levels found in the OMG
    four-layer metamodel architecture and establish a
    linear model hierarchy.

73
II. The Number of Metalevels
  • The top level of the four-layer metamodel
    architecture has been used to define several
    different metamodels and plays an important role
    when it comes to integration of the different
    languages defined.
  • The very top level of a metamodeling architecture
    does not use any other concepts than it describes
    itself - it is self-described or reflexive. Since
    the top level is an instance of itself one might
    imagine an infinite number of levels equal to the
    top level stacked on top of each other - a sort
    of infinite regression.
  • Another view would be to imagine a mirror at the
    top - in this way the top level could reference
    itself like see through the mirror the part of
    itself which was needed as a description. At the
    top level this reflection is "turned on" and true
    self description arise by reflection, the dotted
    arrows indicating the instanceOf-relationships
    would then be going up and then reflected back
    down to the same level.
  • As long as the top level is unchanged the
    mentioned views would in practise be the same.
  • The top level defines a set of modeling elements
    that can be instantiated.
  • This set is what is needed to define the level
    itself and consequently the content of the level
    can easily be reproduced on the next level and so
    on. One can manage with only one level if "the
    reflection is turned on above it", the contents
    of the other levels are "projected down" to this
    lowest level. By this we understand that a
    metamodeling architecture is a chosen way of
    organizing once knowledge.
  • In object-oriented modeling the top level
    typically defines the object-oriented concepts
    like class and property the top level is
    reflexive which means that the concepts used at
    this level are the same concepts that are being
    defined. The top level is also minimal reflexive
    in regard to what it defines, this means that a
    minimum number of elements are used - if some
    elements were removed then some relevant
    information would be lost. By letting the top
    level be minimal reflexive the one level approach
    is ruled out.

74
Metamodeling
  • What is a concept?
  • The Semantic triangle.
  • Isomorphism and Douglas Hofstadter
  • What is a model?
  • Interpretation of a model
  • describedBy or specifiedBy
  • What is Metalinguistics / Metamodeling
  • BNF
  • Strict Metamodeling
  • The Four-Layered Metamodel Architecture of UML
  • The UML metamodel /Abstract syntax
  • Clabject
  • InstanceSpecification
  • Meta Object Facility (MOF)
  • Multilanguage Integration

René Magritte "this is not a pipe" 
75
Multilanguage Integration - 1
MOF
instanceOf
instanceOf
ODM
UML Metamodel
instanceOf
instanceOf
Using two different languages to talk about the
same ting.
User Defined UML Model
User Defined Ontology
Domain
The OMG recommendations 7 state that the
Ontology Definition Metamodel (ODM) should be an
instance of MOF this places the ODM at the same
level as the UML metamodel.
76
Multilanguage Integration - 2
MOF
instanceOf
instanceOf
Transformation Described
ODM
UML Metamodel
instanceOf
instanceOf
Transformation
User Defined UML Model
User Defined Ontology
77
Multilanguage Integration - 3
MOF
instanceOf
UML Metamodel ODM
instanceOf
User Defined UML Ontology Model
There is a semantic overlap between the UML
metamodel and the ODM, but they are not subsets
of one another, and a combination of the two
might be worth investigating.
78
Multilanguage Integration - 4
Ext- ention
MOF
Metamodel 1
Ext- ention
Ext- ention
Metamodel 2
Model 1
Ext- ention
Model 2
Ext- ention
79
5 Transformations Based On Metamodels
UML Class SQL Table
1
SQLDataType
Classifier
type
Interface
Node
Class
Column
column
Table
name String
name String
isActiveBoolean

nullable Boolean
table
column
1..
1..
1
column
1..
candidate
primary
Key

key
name String
1
referencedKey
key

1
foreign

foreign
ForeignKey
foreign
name String


80
References
  • 1 Ed Seidewitz. What do models mean?, omg
    document ad/03-03-31. March 2003.And also Ed
    Seidewitz. What models mean. IEEE SOFTWARE, pages
    26-32, October 2003.
  • 2 Colin Atkinson, Thomas Kuhne Strict
    Profiles Why and How. In UML2000 (2000)
  • 3 Unified Modeling Language (UML), version
    1.4http//www.omg.org/technology/documents/formal
    /uml.htmAccessed 21 August 2002
  • 4 Addison-Wesley, MDA Explained The Model
    Driven Architecture Practice and PromiseAnneke
    Kleppe, Jos Warmer, Wim Bast(Klasse Objecten,
    Soest, the Netherlands http//www.klasse.nl/englis
    h/mda/mda-introduction.html)
  • 5 Meta Object Facility (MOF) 2.0 Core
    Specification (o3-10-04)Accessed August 2004
    http//www.omg.org/
  • 6 Unified Modeling Language (UML)
    Specification Infrastructure version 2.0
    ptc/03-09-15Accessed August 2004
    http//www.omg.org/
  • 7 OMG Editor. Ontology Definition Metamod.RFP,
    OMG Documentad/2003-03-40.http//www.omg.org/
  • 8 Colin Atkinson and Thomas KÄuhne. Meta-Level
    Independent Modelling. In International Workshop
    on Model Engineering, Nice/Sophia Antipolis,
    France, ECOOP 2000,Accessed June 2000
    http//www.metamodel.com/IWME00/program.html
    (February 2004)
  • 9 Colin Atkinson and Thomas KÄuhne.
    Rearchitecting the UML infrastructure. ACM
    Transactions on Computer Systems, October 2002.
  • 10 Alfred Korzybski. Science and Sanity An
    Introduction to Non-Aristotelian Systems and
    General Semantics.
  • Institute of General Semantics, 1933.
  • 11 Jean Bézivin. On the unification power of
    models http//www.sciences.univ-nantes.fr/lina/at
    l/www/papers/OnTheUnificationPowerOfModels.pdf
  • 12 Kühne, T. (2005). What is a model? Dagstuhl
    Seminar Proceedings. Available athttp//drops.da
    gstuhl.de/opus/volltexte/2005/23.
Write a Comment
User Comments (0)
About PowerShow.com