the uml 2.0 meta model - technische universität münchen€¦ · the history of uml’s meta model...
TRANSCRIPT
![Page 1: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/1.jpg)
Software Engineering I: Software Technology
WS 2008/09
The UML 2.0 meta model
Prof. Bernd Bruegge, Ph.D.Florian Schneider
Applied Software EngineeringTechnische Universitaet Muenchen
© 2008 Bernd Brügge 1So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 2: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/2.jpg)
Outline for today
• From model instances to meta models
• MOF meta model hierarchy
• How UML relates to MOF
– Example: Use case diagram meta model
– Example: Class diagram meta model
• Different notaOons for the UML meta model describe the same language
• UML Profiles: Adding new members to the family
© 2008 Bernd Brügge 2So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 3: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/3.jpg)
From model instances to meta models
© 2008 Bernd Brügge 3So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 4: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/4.jpg)
From model instances to meta models
• Canonical model‐instance‐relaOonship:
© 2008 Bernd Brügge 3So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 5: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/5.jpg)
From model instances to meta models
• Canonical model‐instance‐relaOonship:
© 2008 Bernd Brügge 3So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 6: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/6.jpg)
From model instances to meta models
• Canonical model‐instance‐relaOonship:
© 2008 Bernd Brügge 3So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 7: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/7.jpg)
From model instances to meta models
• Canonical model‐instance‐relaOonship:
aPerson is an instance of the class Person.
© 2008 Bernd Brügge 3So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 8: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/8.jpg)
From model instances to meta models
• Canonical model‐instance‐relaOonship:
aPerson is an instance of the class Person.
Thus the class Person is a model for aPerson.
© 2008 Bernd Brügge 3So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 9: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/9.jpg)
From model instances to meta models
• Canonical model‐instance‐relaOonship:
aPerson is an instance of the class Person.
Thus the class Person is a model for aPerson.
© 2008 Bernd Brügge 3So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 10: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/10.jpg)
From model instances to meta models
• Canonical model‐instance‐relaOonship:
aPerson is an instance of the class Person.
Thus the class Person is a model for aPerson.
• Can we generalize this relaOonship?
© 2008 Bernd Brügge 3So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 11: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/11.jpg)
From model instances to meta models
• Canonical model‐instance‐relaOonship:
aPerson is an instance of the class Person.
Thus the class Person is a model for aPerson.
• Can we generalize this relaOonship? What is the model for the class Person?
© 2008 Bernd Brügge 3So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 12: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/12.jpg)
From model instances to meta models
© 2008 Bernd Brügge 4So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 13: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/13.jpg)
From model instances to meta models
• Canonical model‐instance‐relaOonship:
© 2008 Bernd Brügge 4So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 14: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/14.jpg)
From model instances to meta models
• Canonical model‐instance‐relaOonship:
© 2008 Bernd Brügge 4So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 15: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/15.jpg)
From model instances to meta models
• Canonical model‐instance‐relaOonship:
– The instance aPerson and the class Person are on different levels of abstracOon
– The class Person specifies features that characterize the structure and behavior of Persons
The model for the class Person must characterize the structure and behavior of classes
© 2008 Bernd Brügge 4So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 16: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/16.jpg)
From model instances to meta models
© 2008 Bernd Brügge 5So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 17: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/17.jpg)
From model instances to meta models
© 2008 Bernd Brügge 5So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 18: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/18.jpg)
From model instances to meta models
• RelaOonship between model and meta‐model:
© 2008 Bernd Brügge 5So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 19: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/19.jpg)
From model instances to meta models
• RelaOonship between model and meta‐model:
© 2008 Bernd Brügge 5So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 20: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/20.jpg)
From model instances to meta models
• RelaOonship between model and meta‐model:
© 2008 Bernd Brügge 5So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 21: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/21.jpg)
From model instances to meta models
• RelaOonship between model and meta‐model:
– The meta class Class is a model for the class Person
© 2008 Bernd Brügge 5So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 22: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/22.jpg)
From model instances to meta models
• RelaOonship between model and meta‐model:
– The meta class Class is a model for the class Person
– Since Person is a model (for the instance aPerson), Class is a meta model (model for models)
© 2008 Bernd Brügge 5So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 23: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/23.jpg)
From model instances to meta models
© 2008 Bernd Brügge 6So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 24: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/24.jpg)
From model instances to meta models
At first this might be confusing, so:
© 2008 Bernd Brügge 6So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 25: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/25.jpg)
From model instances to meta models
At first this might be confusing, so:– Think of the different layers of abstracOon:
© 2008 Bernd Brügge 6So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 26: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/26.jpg)
From model instances to meta models
At first this might be confusing, so:– Think of the different layers of abstracOon:• Instances are concrete
© 2008 Bernd Brügge 6So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 27: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/27.jpg)
From model instances to meta models
At first this might be confusing, so:– Think of the different layers of abstracOon:• Instances are concrete• Models are an abstract descripOon of the instances
© 2008 Bernd Brügge 6So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 28: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/28.jpg)
From model instances to meta models
At first this might be confusing, so:– Think of the different layers of abstracOon:• Instances are concrete• Models are an abstract descripOon of the instances
• Meta models are an abstract descripOon of models
• …
© 2008 Bernd Brügge 6So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 29: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/29.jpg)
Meta models
© 2008 Bernd Brügge 7So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 30: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/30.jpg)
Meta models
Why do we need them?
© 2008 Bernd Brügge 7So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 31: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/31.jpg)
Meta models
Why do we need them?• Meta models can be used for instance to formalize UML notaOons:
© 2008 Bernd Brügge 7So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 32: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/32.jpg)
Meta models
Why do we need them?• Meta models can be used for instance to formalize UML notaOons:• The UML is a Language, meta models are used to describe
the grammar
© 2008 Bernd Brügge 7So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 33: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/33.jpg)
Meta models
Why do we need them?• Meta models can be used for instance to formalize UML notaOons:• The UML is a Language, meta models are used to describe
the grammar
• The UML meta model describes all models one can create using UML
© 2008 Bernd Brügge 7So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 34: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/34.jpg)
Meta models
Why do we need them?• Meta models can be used for instance to formalize UML notaOons:• The UML is a Language, meta models are used to describe
the grammar
• The UML meta model describes all models one can create using UML
• The meta model allows to talk about semanOcs
© 2008 Bernd Brügge 7So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 35: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/35.jpg)
Meta models
© 2008 Bernd Brügge 8So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 36: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/36.jpg)
Meta models
OK, so meta models are cool, but how do I create a meta model?
© 2008 Bernd Brügge 8So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 37: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/37.jpg)
Meta models
OK, so meta models are cool, but how do I create a meta model?
To approach this problem, we will look at the history of UML’s meta model first.
© 2008 Bernd Brügge 8So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 38: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/38.jpg)
The history of UML’s meta model
© 2008 Bernd Brügge 9So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 39: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/39.jpg)
The history of UML’s meta model
• First there was UML which had semanOc problems
© 2008 Bernd Brügge 9So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 40: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/40.jpg)
The history of UML’s meta model
• First there was UML which had semanOc problems
• The OMG tried to formalize meta models
© 2008 Bernd Brügge 9So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 41: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/41.jpg)
The history of UML’s meta model
• First there was UML which had semanOc problems
• The OMG tried to formalize meta models
• They realized that all they needed to describe meta models was a subset of UML class diagram elements
© 2008 Bernd Brügge 9So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 42: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/42.jpg)
The history of UML’s meta model
• First there was UML which had semanOc problems
• The OMG tried to formalize meta models
• They realized that all they needed to describe meta models was a subset of UML class diagram elements
To describe any meta model, we can use the UML class diagram notaOon!
© 2008 Bernd Brügge 9So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 43: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/43.jpg)
Meta Object Facility (MOF)
© 2008 Bernd Brügge 10So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 44: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/44.jpg)
Meta Object Facility (MOF)
• The OMG introduced the MOF to create a common approach to meta modeling
© 2008 Bernd Brügge 10So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 45: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/45.jpg)
Meta Object Facility (MOF)
• The OMG introduced the MOF to create a common approach to meta modeling
• A meta model which is defined using MOF is called “MOF compliant”
© 2008 Bernd Brügge 10So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 46: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/46.jpg)
Advantages of MOF compliant meta models
• They can easily be compared
• Their instances (models) can be exchanged in a standardized way (XML Metadata Interchange)
• Their instances can live in the same metadata repository (data warehousing)
© 2008 Bernd BrüggeSo0ware Engineering I: So0ware
Technology WS 2008/0911
![Page 47: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/47.jpg)
Meta Object Facility (MOF) ‐ Facts
© 2008 Bernd Brügge 12So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 48: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/48.jpg)
Meta Object Facility (MOF) ‐ Facts
In general, the sequenceinstance model meta model meta‐meta model …
could be conOnued infinitely.
© 2008 Bernd Brügge 12So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 49: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/49.jpg)
Meta Object Facility (MOF) ‐ Facts
In general, the sequenceinstance model meta model meta‐meta model …
could be conOnued infinitely.
• MOF defines a four‐layer meta model hierarchy• four layers suffice for most pracOcal applicaOons
• MOF and UML are aligned• UML infrastructure contains concepts for UML and MOF
© 2008 Bernd Brügge 12So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 50: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/50.jpg)
Meta model hierarchy of the MOF (UML‐specific)
© 2008 Bernd Brügge 13So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 51: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/51.jpg)
Meta model hierarchy of the MOF (UML‐specific)
© 2008 Bernd Brügge 14So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 52: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/52.jpg)
Meta model hierarchy of the MOF (UML‐specific)
UML meta model (Layer M2)
• defines concepts like classes, a8ributes and associa;ons
© 2008 Bernd Brügge 14So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 53: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/53.jpg)
Meta model hierarchy of the MOF (UML‐specific)
UML meta model (Layer M2)
• defines concepts like classes, a8ributes and associa;ons
• model of the language UML
© 2008 Bernd Brügge 14So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 54: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/54.jpg)
Meta model hierarchy of the MOF (UML‐specific)
UML meta model (Layer M2)
• defines concepts like classes, a8ributes and associa;ons
• model of the language UML
Layer M2 contains descripOons of the elements that can be used to describe the models on the model layer
© 2008 Bernd Brügge 14So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 55: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/55.jpg)
Meta model hierarchy of the MOF (UML‐specific)
© 2008 Bernd Brügge 15So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 56: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/56.jpg)
Meta model hierarchy of the MOF (UML‐specific)
UML‐model (Layer M1)
By using any UML diagram, we instanOate the UML meta model and obtain a UML model
© 2008 Bernd Brügge 15So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 57: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/57.jpg)
Meta model hierarchy of the MOF (UML‐specific)
UML‐model (Layer M1)
By using any UML diagram, we instanOate the UML meta model and obtain a UML model
Layer M1 contains applica;on‐specific models© 2008 Bernd Brügge 15
So0ware Engineering I: So0ware Technology WS 2008/09
![Page 58: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/58.jpg)
Meta model hierarchy of the MOF (UML‐specific)
© 2008 Bernd Brügge 16So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 59: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/59.jpg)
Meta model hierarchy of the MOF (UML‐specific)
Instances (Layer M0)
• Real instances of the models
© 2008 Bernd Brügge 16So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 60: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/60.jpg)
Meta model hierarchy of the MOF (UML‐specific)
Instances (Layer M0)
• Real instances of the models
Layer M0 contains concrete run‐;me instances
© 2008 Bernd Brügge 16So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 61: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/61.jpg)
Meta model hierarchy of the MOF (UML‐specific)
Instances (Layer M0)
• Real instances of the models
Layer M0 contains concrete run‐;me instances
• Note the difference between instance specifica;ons and real instances!
© 2008 Bernd Brügge 16So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 62: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/62.jpg)
Meta model hierarchy of the MOF (UML‐specific)
© 2008 Bernd Brügge 17So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 63: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/63.jpg)
Meta model hierarchy of the MOF (UML‐specific)
MOF model (Layer M3)
• The UML meta model is an instance of a yet more abstract model, namely the MOF model
© 2008 Bernd Brügge 17So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 64: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/64.jpg)
Meta model hierarchy of the MOF (UML‐specific)
MOF model (Layer M3)
• The UML meta model is an instance of a yet more abstract model, namely the MOF model
• M3 : M2 ≈ M2 : M1
© 2008 Bernd Brügge 17So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 65: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/65.jpg)
Meta model hierarchy of the MOF (UML‐specific)
MOF model (Layer M3)
• The UML meta model is an instance of a yet more abstract model, namely the MOF model
• M3 : M2 ≈ M2 : M1
Layer M3 contains meta‐meta models
© 2008 Bernd Brügge 17So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 66: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/66.jpg)
Meta model hierarchy of the MOF (UML‐specific)
© 2008 Bernd Brügge 18So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 67: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/67.jpg)
Meta model hierarchy of the MOF (UML‐specific)
Remember that this is only an example!
• We looked at a UML‐specific hierarchy
© 2008 Bernd Brügge 18So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 68: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/68.jpg)
Meta model hierarchy of the MOF (UML‐specific)
Remember that this is only an example!
• We looked at a UML‐specific hierarchy• MOF describes meta models in general
© 2008 Bernd Brügge 18So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 69: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/69.jpg)
Where are we?
From model instances to meta models
MOF meta model hierarchy
How UML relates to MOF
– Example: Use case diagram meta model
– Example: Class diagram meta model
• Different notaOons for the UML meta model describe the same language
• UML Profiles: Adding new members to the family
© 2008 Bernd Brügge 19So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 70: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/70.jpg)
How UML relates to MOF
© 2008 Bernd Brügge 20So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 71: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/71.jpg)
How UML relates to MOF
• UML is MOF‐compliant:The UML meta model is an instance of the MOF model
© 2008 Bernd Brügge 20So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 72: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/72.jpg)
How UML relates to MOF
• UML is MOF‐compliant:The UML meta model is an instance of the MOF model
• Let’s see the UML meta model in acOon!
© 2008 Bernd Brügge 20So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 73: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/73.jpg)
Use Case Diagram Meta Model (simplified)
*
*
*
1
*
11 1
* *
1*
*
1..*
0..10..1
© 2008 Bernd Brügge 21So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 74: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/74.jpg)
Use Case Diagram Meta Model (simplified)
*
<<instanceOf>>
*
*
1
*
11 1
* *
1*
*
1..*
0..10..1
© 2008 Bernd Brügge 21So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 75: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/75.jpg)
Use Case Diagram Meta Model (simplified)
*<<instanceOf>>
*
*
1
*
11 1
* *
1*
*
1..*
0..10..1
© 2008 Bernd Brügge 21So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 76: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/76.jpg)
Use Case Diagram Meta Model (simplified)
*
<<instanceOf>>
*
*
1
*
11 1
* *
1*
*
1..*
0..10..1
© 2008 Bernd Brügge 21So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 77: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/77.jpg)
Use Case Diagram Meta Model (simplified)
*
<<Extend>>
<<instanceOf>>
*
*
1
*
11 1
* *
1*
*
1..*
0..10..1
© 2008 Bernd Brügge 21So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 78: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/78.jpg)
Use Case Diagram Meta Model (simplified)
*
<<Extend>>
<<Include>>
<<instanceOf>>
*
*
1
*
11 1
* *
1*
*
1..*
0..10..1
© 2008 Bernd Brügge 21So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 79: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/79.jpg)
Class Diagram Meta Model (simplified)
0..1
*
0..1 *
0..1
*
0..12..*
© 2008 Bernd Brügge 22So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 80: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/80.jpg)
Class Diagram Meta Model (simplified)
<<instanceOf>>
0..1
*
0..1 *
0..1
*
0..12..*
© 2008 Bernd Brügge 22So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 81: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/81.jpg)
Class Diagram Meta Model (simplified)
<<instanceOf>>
0..1
*
0..1 *
0..1
*
0..12..*
© 2008 Bernd Brügge 22So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 82: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/82.jpg)
Class Diagram Meta Model (simplified)
<<instanceOf>>
0..1
*
0..1 *
0..1
*
0..12..*
© 2008 Bernd Brügge 22So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 83: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/83.jpg)
Class Diagram Meta Model (simplified)
<<instanceOf>>
0..1
*
0..1 *
0..1
*
0..12..*
© 2008 Bernd Brügge 22So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 84: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/84.jpg)
Where are we?
From model instances to meta models
MOF meta model hierarchy
How UML relates to MOF
Example: Use case diagram meta model
Example: Class diagram meta model
Different notaOons for the UML meta model describe the same language
• UML Profiles: Adding new members to the family
© 2008 Bernd Brügge 23So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 85: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/85.jpg)
NotaOons for the UML meta model
• The UML meta model defines a language for specifying UML models
• The notaOon used to depict UML models provides graphical constructs represenOng instances of meta model elements(SOcky figure represents an Actor)
• The notaOon is a funcOon from meta model elements to model elements(“uml‐nota;on(Actor) = “)
© 2008 Bernd Brügge 24So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 86: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/86.jpg)
Where are we?
From model instances to meta models
MOF meta model hierarchy
How UML relates to MOF
Example: Use case diagram meta model
Example: Class diagram meta model
Different notaOons for the UML meta model describe the same language
UML Profiles: Adding new members to the family
© 2008 Bernd Brügge 25So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 87: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/87.jpg)
UML Profiles
• consist of stereotypes, tagged values and constraints
• customize UML models for parOcular domains or platorms
• are applied to elements of the UML meta model (M2)!
• are developed by manufacturers or standardizaOon organizaOons (CORBA, .NET)
© 2008 Bernd Brügge 26So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 88: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/88.jpg)
Applying UML Profiles
• By applying a UML profile,• you apply stereotypes to meta classes
• you provide a deeper meaning for the model
• the model gains integrity
• you narrow the amount of valid models, as you can see on the following slide…
© 2008 Bernd Brügge 27So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 89: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/89.jpg)
UML ProfilesAll models (MOF)
UML models
CORBA models(profile)
SysML models
.NET models(profile)
© 2008 Bernd Brügge 28So0ware Engineering I: So0ware
Technology WS 2008/09
![Page 90: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/90.jpg)
Further reading
• MOF specificaOon – URL to be delivered through the exercise portal
• Again, the UML 2 specificaOon– See UML 2 Slides
© 2008 Bernd BrüggeSo0ware Engineering I: So0ware
Technology WS 2008/0929
![Page 91: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/91.jpg)
OrganizaOonal Mauers 1
• Mid term exam– Thursday, December 18th 17:30
– Room to be announced
– RegistraOon procedure to be announced
© 2008 Bernd BrüggeSo0ware Engineering I: So0ware
Technology WS 2008/0930
![Page 92: The UML 2.0 meta model - Technische Universität München€¦ · The history of UML’s meta model • First there was UML which had semanc problems • The OMG tried to formalize](https://reader034.vdocuments.net/reader034/viewer/2022042118/5e9751d0b09f30688846fd54/html5/thumbnails/92.jpg)
OrganizaOonal Mauers 2"• For those of you interested in doing the homework, please read through the exercise sheet– QuesOons?– Please deliver the soluOon on Thursday, October 30th
• Paper based: before the exercise• E‐Mail based: send e‐mail to Florian Schneider, same deadline
© 2008 Bernd BrüggeSo0ware Engineering I: So0ware
Technology WS 2008/0931