workshop on integrated application of formal languages, geneva 2003 1 j.fischer mappings, use of mof...
TRANSCRIPT
Workshop on Integrated Application of Formal Languages, Geneva 2003
1J.Fischer
Mappings, Use of MOF for Language Families
Joachim Fischer
Workshop on Integrated Application of Formal Languages Geneva, 13 September 2003
J.Fischer
Workshop on Integrated Application of Formal Languages, Geneva 2003
2J.Fischer
The Problem
convenient methods to combine different specification languages
in a model-driven software development process
Clif: (1) Language integration is only be useful if there is also tool integration (2) Language integration is tool-dependent
SDLMSC
ASN.1TTCN
URNODLULF
Workshop on Integrated Application of Formal Languages, Geneva 2003
3J.Fischer
analysis models
design models
implementation models
deployment models
platform models
environment models
requirementmodels
diversity of modelling techniques: concept space with notation and semantics
Mod
el-b
ase
d S
oftw
are
Develo
pm
ent
requirements
Workshop on Integrated Application of Formal Languages, Geneva 2003
4J.Fischer
analysis models
design models
implementation models
deployment models
platform models
environment models
requirementmodels
requirementsM
od
el-b
ase
d S
oftw
are
Develo
pm
ent
Petri nets
process Bdcl i Natural, c Character;
B1
B2
B
dcl p Pid;
process B2
B2-1
B2-2
B2-3
B2
SDL...
Workshop on Integrated Application of Formal Languages, Geneva 2003
5J.Fischer
Kinds of Language Combinations
…in a software development process
1. switch from one development level to another UML UML SDL … requirement rough design detailed design analysis
2. decomposition of a complex system eODL SDL SDL + ASN.1 UML existing implementation
3. switch from one abstraction level to another SDL MSC
Workshop on Integrated Application of Formal Languages, Geneva 2003
6J.Fischer
Classic Methods of Language Combinations
1) Integration of languages to a new language
2) Translation between the languages
Problems• large effort (for each language pair a new mapping)• restrictions on expressive power by reducing the languages • right mix of concrete notations• restrictions on further modifications • large effort for adaptation of existing tools
Workshop on Integrated Application of Formal Languages, Geneva 2003
7J.Fischer
Models, Notations and Concept Space• Concepts
theoretical building stones for abstract models of specific problem domain – represented in special notations
• Concept space– concept collection for a complete model construction
with– relations between these concepts and – specific construction rules
• Abstraction Process– classification, exemplification– generalisation, specialisation– structuring, organisation– capsulation, information hiding– behaviour description
Workshop on Integrated Application of Formal Languages, Geneva 2003
8J.Fischer
Original
Concept
Notation
Concept
Notation
Original
Concept
Notation
Meta-Models
Original
Model(M1)
Original(M0)
Meta-Model(M2)
Meta-Meta-Model(M3)
~ abstract grammar
~ concrete grammar
~ ebnf
Workshop on Integrated Application of Formal Languages, Geneva 2003
9J.Fischer
Alternative Approach: Language Integration by Meta-modelling
• language definition in M2 layer (meta-model)– 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 meta-models (SDL UML), – construction of a merged meta-model (language) is possible
Workshop on Integrated Application of Formal Languages, Geneva 2003
10J.Fischer
Grammar versus Meta-Model
Grammar• strict and clear
association between semantics and syntactical structures
• compiler tool support for textual languages (yacc, lex)
Meta-Model• association diversity of
different notations (in particular graphical notations)
• simple and flexible possibilities for restriction and extension of the concept space
• creation support of model element repository
Combined use Structure of the concept space: abstract grammar or metamodelRelation between concept space and notation: transformation Semantics: defined for an special (example) notationNotation: concrete grammar
Workshop on Integrated Application of Formal Languages, Geneva 2003
11J.Fischer
SDL Language Definition
SDLAbstract machine
ASM
execution
AbstractGrammar
transf
orm
ati
on
dynamic semantics
static semantics
SDL/PR
SDL/GR
syntax
Well-formedness conditions
Workshop on Integrated Application of Formal Languages, Geneva 2003
12J.Fischer
SDL Language Definition (alternative)
SDLAbstract machine
ASM
execution
SDLMeta-model
transf
orm
ati
on
dynamic semantics
static semantics
SDL/PR
SDL/GR
syntax
UMLProfile
For SDL
Well-formedness conditions
Workshop on Integrated Application of Formal Languages, Geneva 2003
13J.Fischer
simplemeta-model
Meta-Model for SDL: The Method
syntax by bnf grammar
well- formedness byPC1
targetmeta-model
modelfragments
meta-datarepository
Constrains
Z100.F2
Open question- What is a good meta-model?
Workshop on Integrated Application of Formal Languages, Geneva 2003
14J.Fischer
Language Combination as combination of their concept spaces
concepts oflanguage A
concepts oflanguage B
combinedconcept space
• visually reflected by one or more existing notations (partially or complete) a combination of the concrete notations is not necessary but important: availability of methods for concept
spaces
Workshop on Integrated Application of Formal Languages, Geneva 2003
15J.Fischer
Language Combination as combination of their concept spaces
The way
• selection of the common concepts of the languages (common kernel, definition of reference points)
• estimation of the method to connect the
individual concept spaces with the kernel
• technical Realisation of the concept space (widely independent of available tools)
Workshop on Integrated Application of Formal Languages, Geneva 2003
16J.Fischer
Furtherconcepts
Furtherconcepts
Concept Space Kernel for SDL and MSC
Baseconcepts
ConceptsOf
Language A
ConceptsOf
Language B
Notation A Notation B
generalisation
Workshop on Integrated Application of Formal Languages, Geneva 2003
17J.Fischer
Furtherconcepts
Furtherconcepts
Concept Space Kernel for Data Types
Baseconcepts
ConceptsOf
Language A
ConceptsOf
Language B
Notation A Notation B
generalisation
Meta-model for data types
ASN.1 SDL Data types
Workshop on Integrated Application of Formal Languages, Geneva 2003
18J.Fischer
Basic Principles for a Concept Space API• necessary for the exchange and combination of models
• realised as (a set of)– interface definitions (CORBA or Java) – header files (C or C++)
• 1:1 relation: concepts of the language - interface
• generalisation/specialisations of concepts: by inheritance of the interfaces
• all other relations (associations, compositions, …) and attributes: by references over get and set methods
Workshop on Integrated Application of Formal Languages, Geneva 2003
19J.Fischer
Normative APIs for Concept Spaces
Existing APIs • for read, write and model modifications
• are unfortunately specific tothe tool and not to the language:Examples– RoseAPI (RationalRose for UML)– CMCS Client API (Cinderella API for MSC)
• Price: Tool adaptations for model / tool combination
• Solution: standardized and tool-independent approach for API Example: MOF (OMG)
Workshop on Integrated Application of Formal Languages, Geneva 2003
20J.Fischer
MOF - Meta Object Facility
storedmeta-model
MOF
modelling tool
MOFIDL
creation, modification…of meta-models
meta-modelas
XML document
MOFXMI
XMIfor
meta-model
IDLfor
meta-model
framework for specification, construction management, exchange integration
of meta-data
XMI defines rules to createDTDs for meta-models
Workshop on Integrated Application of Formal Languages, Geneva 2003
21J.Fischer
MOF – as Repository
storedmodels
Repository
storedmodels
API
Modelling tool B
read model
Modelling tool A
write model
XMIVersion
management
Repository - is the central information source for all tools- has programmatic and exchange interfaces- the access is standardised, but not implementation
Workshop on Integrated Application of Formal Languages, Geneva 2003
22J.Fischer
MOF – as Repository for Combined Languages
storedmodels
Repository A
Code Generator
storedA model
storedmodels
Repository B
storedB model executable
storedmodels
Repository C
storedC model
storedmodels
Repository T
storedTransformations
• more than one repository• connected by
- direct references (common kernel)- separate repository of transformation rules
Workshop on Integrated Application of Formal Languages, Geneva 2003
23J.Fischer
MOF Transformation Framework (MTF)
Restriction: structural transformation only
<<M (n+1)>> Source Meta-model
<<M n>>Source Model Transform
<<M 1>>Transformation Model
<<M 2>>Transfomation Meta-model
<<M (n+1)>>Target Meta-model
<<M n>>Target Model
Workshop on Integrated Application of Formal Languages, Geneva 2003
24J.Fischer
Conclusions
Problems with classic combination techniques • compilation and language integration (large effort,
restrictions on expressive power)
Advantage of the meta-model approach• two-dimensional description form with free correlation of
notations– suitable for languages with graphical notations
• faster technical realisation – separation from concrete syntax– creation support of model element repositories – support for meta-model transformations
Open Issues• criteria for good meta-models, efficient techniques for
transformations• research on pros and cons on meta-model approach• combination of different semantics
Workshop on Integrated Application of Formal Languages, Geneva 2003
25J.Fischer
Thank You !
Questions ?