Workshop on Integrated Application of Formal Languages, Geneva J.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 J.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 SDL MSC ASN.1 TTCN URN ODL ULF
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer analysis models design models implementation models deployment models platform models environment models requirement models diversity of modelling techniques: concept space with notation and semantics Model-based Software Development requirements
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer analysis models design models implementation models deployment models platform models environment models requirement models requirements Model-based Software Development Petri nets process B dcl 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 J.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 J.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 J.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 J.Fischer Original Concept Notation Concept Notation OriginalConcept 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 J.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 J.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 metamodel Relation between concept space and notation: transformation Semantics: defined for an special (example) notation Notation: concrete grammar
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer SDL Language Definition SDL Abstract machine ASM execution Abstract Grammar transformation dynamic semantics static semantics SDL/PR SDL/GR syntax Well-formedness conditions
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer SDL Language Definition (alternative) SDL Abstract machine ASM execution SDL Meta-model transformation dynamic semantics static semantics SDL/PR SDL/GR syntax UML Profile For SDL Well-formedness conditions
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer simple meta-model Meta-Model for SDL: The Method syntax by bnf grammar well- formedness by PC1 target meta-model model fragments meta-data repository Constrains Z100.F2 Open question - What is a good meta-model?
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Language Combination as combination of their concept spaces concepts of language A concepts of language B combined concept 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 J.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 J.Fischer Further concepts Further concepts Concept Space Kernel for SDL and MSC Base concepts Concepts Of Language A Concepts Of Language B Notation A Notation B generalisation
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Further concepts Further concepts Concept Space Kernel for Data Types Base concepts Concepts Of Language A Concepts Of 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 J.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 J.Fischer Normative APIs for Concept Spaces Existing APIs for read, write and model modifications are unfortunately specific to the 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 J.Fischer MOF - Meta Object Facility stored meta-model MOF modelling tool MOF IDL creation, modification … of meta-models meta-model as XML document MOF XMI for meta-model IDL for meta-model framework for specification, construction management, exchange integration of meta-data XMI defines rules to create DTDs for meta-models
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer MOF – as Repository stored models Repository stored models API Modelling tool B read model Modelling tool A write model XMI Version 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 J.Fischer MOF – as Repository for Combined Languages stored models Repository A Code Generator stored A model stored models Repository B stored B model executable stored models Repository C stored C model stored models Repository T stored Transformations more than one repository connected by - direct references (common kernel) - separate repository of transformation rules
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer MOF Transformation Framework (MTF) Restriction: structural transformation only > Source Meta-model > Source Model Transform > Transformation Model > Transfomation Meta-model > Target Meta-model > Target Model
Workshop on Integrated Application of Formal Languages, Geneva J.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 J.Fischer Thank You ! Questions ?