Language Specification using Metamodelling Joachim Fischer

advertisement
Language Specification
using
Metamodelling
Joachim Fischer
Humboldt University Berlin
LAB Workshop
Geneva 24.11.02
Languages ...
- cover domains, not the universe
 complex systems need more than one language (SDL, ASN.1, ...) for
their description, implementation, deployment, ...
- are driven by user needs (concepts, notations)
 evolution
- need notations
 graphical notation in favour:



state of the art (SDL, TTCN, MSC, URN, ...)
best suited to cope with complexity (2 dimensional drawing + text)
clear representation (better than text)
- often share similar concepts (OO concepts, ODP concepts...)
- need tools to be used !
- need a community to live and to evolve !
J. Fischer
LAB Workshop, Geneva 24.11.02
2
Language Definitions ...
- differ in the level of formality
- "traditionally": use grammars



concrete grammar for definition of notations
abstract grammar for definition of concepts
do not share the grammar with other languages
- "new" Metamodelling approach: use graphs (labelled nodes and arcs)




graphs for definition of concepts
assignment of notation elements (informal, formal)
differentiation of abstraction levels: model and Metamodel
concept of Metamodelling in general is not new
but for the definition of languages!
Similarities between both?
J. Fischer
LAB Workshop, Geneva 24.11.02
3
"New" versus "Traditional"
"new" Layer
MetaMetamodel
Description
infrastructure for
- language definitions
- Metamodelling architecture
"traditional" Layer
concept
grammar
- instance of M3
- language for specification of /
programs / models
- semantic definition
concrete
grammar
of a language
Model
- instance of M2
- language for description of an
information domain
parameterised
program
Application
- instance of M1
- real subject of existence
Metamodel
J. Fischer
LAB Workshop, Geneva 24.11.02
executable
4
Semantic Concerns
"traditional"
"new"
Metamodel
-
M3 implications
wellformedness
rules (text,OCL,
…)
mapping to
languages
ASM, …
J. Fischer
- instance of M3
- language for specification of /
programs / models
- semantic definition
concrete
grammar of a
language
-
grammar
wellformedness
rules (text,ASM
OCL – Object Constraint Language …)
a mix of
Predicate Logic and
- set theory
in an intuitive syntax
-
LAB Workshop, Geneva 24.11.02
-
ASM, …
5
InterfaceDef
InterfaceDef
model
isAbstract : Boolean
isAbstract : Boolean
... as metamodel instance
a Class
a7 : Class
name = InterfaceDef
...
name = InterfaceDef
feature
feature
an Attribute
name = isAbstract
multiplicity = 1, 1
a PrimitiveType
isAbstract : Attribute
name = isAbstract
multiplicity = ( {1, 1} )
...
Boolean : PrimitiveType
name = Boolean
name = Boolean
type ...
type
J. Fischer
LAB Workshop, Geneva 24.11.02
6
Characteristics of Metamodelling
- language definition in M2 layer (Metamodel)


defines concepts
may be manipulated (Extension, Specialization, Structural
adaptation)
- definition of semantic separated from language notation



no coupling to „grammar technologies“
suitable (graphical) notation can be selected!
integration of languages with different notations is possible
- common Meta-metamodel is a suitable way for a language
integration


relations between metamodels (SDL  UML),
construction of a merged Metamodel (language) is possible
J. Fischer
LAB Workshop, Geneva 24.11.02
7
MOF - Meta Object Facility
- OMG standard
- base of OMG Model Driven Architecture (MDA)
- What is it ? model driven distributed object
framework
specification
 construction
 management
 exchange
 integration
 integrating

of Metadata in software systems
J. Fischer
LAB Workshop, Geneva 24.11.02
8
MOF - Meta Object Facility
- OMG standard
- base of OMG Model Driven Architecture (MDA)
- What is it ? model driven distributed object
framework
Metameta model
specification
 construction
 management
 exchange
 integration
 integrating

Concept Space
fundamental object oriented
terminology
 classes, associations, inheritance,
packages
 common modelling concepts similar
to UML-Core (more restricted)

of Metadata in software systems
J. Fischer
LAB Workshop, Geneva 24.11.02
9
MOF - Meta Object Facility
- OMG standard
- base of OMG Model Driven Architecture (MDA)
- What is it ? model driven distributed object
framework
Metameta model
Cl1
Cl2
CORBA
MOF
MOF Repository as a Tool
specification offers I/f for storing and
processing of
 construction
 Metamodels
 management
(based on MOF concepts)
 exchange
 models (based on those
Metamodels)
 integration
 integrating

of Metadata in software systems
J. Fischer
LAB Workshop, Geneva 24.11.02
10
MOF - Meta Object Facility
- OMG standard
- base of OMG Model Driven Architecture (MDA)
- What is it ? model driven distributed object
framework
Metameta model
Cl1
Cl2
CORBA
MOF
XML
representation
of models
J. Fischer
specification
 construction
 management
 exchange
 integration
 integrating
XML representation ensures


exchange of Metamodels
and models,
independend from:
- syntactical representation
- MOF-tool-vendor
- ORB vendor
of Metadata in software systems
LAB Workshop, Geneva 24.11.02
11
MOF - Meta Object Facility
- OMG standard
- base of OMG Model Driven Architecture (MDA)
- What is it ? model driven distributed object
framework
Metameta model
Cl1
Cl2
CORBA
MOF
XML
representation
of models
usage of the same
Metameta-model
specification
 as a base for
 construction
relating
 management
Metamodels
 exchange
 representing concepts of
 integration
different languages
 integrating
comes with the result of

 an integrated language
of Metadata in software
systems
on conceptual level
nothing is said about a
but: MOF does not define the style ofcommon
notationsnotation
!
!!!
MOF 1.x comes only with textual description of MOF
J. Fischer
LAB Workshop, Geneva 24.11.02
12
representation of MOF models
(Metamodels)
• choice of notation/
representation of the
definition
M2 metamodel
MODL
XML
UMLProfile
API (MOF-IDL)
• UML and MOF have the same foundation
• UML is usable as a language for description
of Metamodels, i.e. for definition of other(!)
modelling languages
MOF
• if UML is used for concrete MOF syntax,
UML tools can used for that new language too XML
UML, IDL,
EDOC, ...
eODL,
TTCN-3, URN,
SDL ???
J. Fischer
representation
of models
file/stream
LAB Workshop, Geneva 24.11.02
IDL for
model repository
API for tools
13
Benefits of MOF (1)
- MOF repository stores metamodels

access via IDL interfaces





generic interfaces for inspection
and traversal
model specific interfaces according to
MOF concepts
tools can obtain information
about the language
tools can add information
(implemented language subset)
same interfaces for all
metamodels (languages)!
Language concepts
MODL
XML
API (MOF-IDL)
MOF
XML
representation
of models
file/stream
J. Fischer
UML
LAB Workshop, Geneva 24.11.02
IDL for
model repository
API for tools
14
Benefits of MOF (2)
- MOF-to-IDL mapping generates repositories


IDL for Metamodel specific
repository
serve to:





MODL
XML
API (MOF-IDL)
Similar to MOF-IDL
same technology for all
metamodels (languages)!
XML
representation
of models
file/stream
J. Fischer
UML
MOF
standard API for modelling tools


store,
manipulate,
retrieve and
exchange models
Language concepts
LAB Workshop, Geneva 24.11.02
IDL for
model repository
API for tools
15
Benefits of MOF (3)
- MOF-XMI provides file/streaming format


XML Metadata lnterchange
XMI defines a DTD for MOF

Language concepts
Metamodels can be exchanged
as XML file/stream
MODL

XMI defines rules to create
DTDs for Metamodels


XML
API (MOF-IDL)
MOF
Model can be exchanged as
XML file/stream (e.g. UML XMI)
common interchange format
for all Metamodels!
XML
representation
of models
file/stream
J. Fischer
UML
LAB Workshop, Geneva 24.11.02
IDL for
model repository
API for tools
16
Vision of an MOF-based Integration of
ITU languages
MOF based Metamodels for all languages
 standardized methodology and tool interfaces for
language development
 Creation, Extension, ...
 merge of Metamodels possible
 Language integration (as UML is an integration of ...)
 definition of arbitrary notations ruled by the zeitgeist
J. Fischer
LAB Workshop, Geneva 24.11.02
17
Can standards allow common tools for UML, SDL,
ASN.1, MSC, … with backward compatibility ?
UML 2.x, 3.x
UML 2.0
UML 2.0 restricted
MOF 2.0
common
kernal
SDL 2000
our visionary
technology approach
J. Fischer
real-time
engine
SDL restricted
SDL 2000
kernel
LAB Workshop, Geneva 24.11.02
SDL 20xx
18
Questions, Statements ???…
J. Fischer
LAB Workshop, Geneva 24.11.02
19
Download