INF5120 Modellbasert Systemutvikling Modelbased System development

Similar documents
INF5120 Modelbased System development

INF5120 Model-Based System Development

INF5120 Modellbasert Systemutvikling Modelbased System development

INF5120 Modellbasert Systemutvikling Modelbased System development

INF Lecture plan

INF5120 and INF9120 Modelbased System development

INF5120 and INF9120 Modelbased System development

INF5120 Modellbasert Systemutvikling Modelbased System development

INF5120 Modelbased System development

Computation Independent Model (CIM): Platform Independent Model (PIM): Platform Specific Model (PSM): Implementation Specific Model (ISM):

The Eclipse Modeling Framework and MDA Status and Opportunities

An Introduction to MDE

OMG Specifications for Enterprise Interoperability

Introduction to MDE and Model Transformation

Model driven Engineering & Model driven Architecture

Sequence Diagram Generation with Model Transformation Technology

Developing Web-Based Applications Using Model Driven Architecture and Domain Specific Languages

Modelling in Enterprise Architecture. MSc Business Information Systems

Model Driven Engineering (MDE)

BLU AGE 2009 Edition Agile Model Transformation

Overview of lectures today and Wednesday

The Unified Modelling Language. Example Diagrams. Notation vs. Methodology. UML and Meta Modelling

Modellierung operationaler Aspekte von Systemarchitekturen. Master Thesis presentation. October 2005 March Mirko Bleyh - Medieninformatik

Spemmet - A Tool for Modeling Software Processes with SPEM

Metamodeling with Metamodels. Using. UML/MOF including OCL

QoS-aware model-driven SOA using SoaML

A Comparison of Ecore and GOPPRR through an Information System Meta Modeling Approach

Plan. Language engineering and Domain Specific Languages. Language designer defines syntax. How to define language

Introduction to Dependable Systems: Meta-modeling and modeldriven

Object Management Group Model Driven Architecture (MDA) MDA Guide rev. 2.0 OMG Document ormsc/

Language engineering and Domain Specific Languages

Model-Driven Language Engineering

METADATA INTERCHANGE IN SERVICE BASED ARCHITECTURE

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

ECLIPSE MODELING PROJECT

innoq Deutschland GmbH innoq Schweiz GmbH D Ratingen CH-6330 Cham Tel Tel

Small is Beautiful Building a flexible software factory using small DSLs and Small Models

Future Directions for SysML v2 INCOSE IW MBSE Workshop January 28, 2017

UNIVERSITY OF OSLO Department of Informatics. Metamodel-based Editor for Service Oriented Architecture (MED4SOA) Master thesis.

CISC836: Models in Software Development: Methods, Techniques and Tools

A universal PNML Tool. Lukasz Zoglowek

Model handling with EMF

Outline. A little history. Outline. The Unified Modeling Language Opportunities and Challenges for Formal Methods

A Formal Approach to Modeling and Model Transformations in Software Engineering

Christian Doppler Laboratory

3rd Lecture Languages for information modeling

A Metamodel independent approach for Conflict Detection to support distributed development in MDE. Mostafa Pordel A THESIS

Practical Model-Driven Development with the IBM Software Development Platform

Experimental transformations between Business Process and SOA models

ATHABASCA UNIVERSITY RULE ENHANCED BUSINESS PROCESS MODELING OF SERVICE ORIENTED ARCHITECTURES LUIS ROCHA. A project submitted in partial fulfillment

AADL Graphical Editor Design

Transformation of the system sequence diagram to an interface navigation diagram

Semantic Information Modeling for Federation (SIMF)

UML 2.0 State Machines

Comparative analysis of MDA tools

FREQUENTLY ASKED QUESTIONS

Meta Object Facility (MOF) Specification

with openarchitectureware

Model Driven Engineering

An Open Modeling Infrastructure. Olaf Kath Marc Born

ADT: Eclipse development tools for ATL

The Specifications Exchange Service of an RM-ODP Framework

Model Driven Architecture

Introduction to OpenArchitectureWare

The PISA Project A Model Driven Development case study

SCENARIO-BASED REQUIREMENTS MODELLING

This paper is more intended to set up a basis for a constructive discussion than to offer definitive answers and closed solutions.

Comparing graphical DSL editors

MOMOCS D2.1 XIRUP S UPPORTING T OOLS R EQUIREMENTS. Model driven Modernisation of Complex Systems. Dissemination Level: Work package:

From Object Composition to Model Transformation with the MDA

Software Language Engineering of Architectural Viewpoints

An introduction to MOF MetaObject Facility.

MDD with OMG Standards MOF, OCL, QVT & Graph Transformations

MDSE PRINCIPLES. Chapter #2

11 Model-Driven Architecture

1 Executive Overview The Benefits and Objectives of BPDM

Knowledge Discovery: How to Reverse-Engineer Legacy Systems

Deliverable D4.2. SHAPE MDE Toolset User s Guide

The Model-Driven Semantic Web Emerging Standards & Technologies

Proceedings of the 6th Educators Symposium: Software Modeling in Education at MODELS 2010 (EduSymp 2010)

INF5120. INF5120 Modellbasert Systemutvikling Modelbased System development. Lecture 4: CIM and PIM (SoaML and SOA) Arne-Jørgen Berre

INF Lecture plan

Composite Domain-Specific Language Design and Development using Aspect-Oriented Weaving. Master thesis 60 credits

Model Abstraction versus Model to Text Transformation

INF5120 Modelbased System development

Papyrus: Advent of an Open Source IME at Eclipse (Redux)

The Model Driven Architecture. Dennis Wagelaar Viviane Jonckers Software Languages Lab

Metamodeling. 16. April 2012 Real-Time Systems Lab Prof. Dr. Andy Schürr Dr. Gergely Varró 1

Model Driven Engineering (MDE) and Diagrammatic Predicate Logic (DPL)

Automation of Semantic Web based Digital Library using Unified Modeling Language Minal Bhise 1 1

Open Source egovernment Reference Architecture. Cory Casanave, President. Data Access Technologies, Inc.

WHY WE NEED AN XML STANDARD FOR REPRESENTING BUSINESS RULES. Introduction. Production rules. Christian de Sainte Marie ILOG

Raising the Level of Development: Models, Architectures, Programs

Model-Driven QoS Provisioning Techniques for CCM DRE Systems

MDA Journal. BPMI and OMG: The BPM Merger A BPT COLUMN. David S. Frankel Lead Standards Architect - Model Driven Systems SAP Labs.

An Introduction to Model Driven Engineering (MDE) Bahman Zamani, Ph.D. bahmanzamani.com

Transforming models with ATL

UML big picture. Perdita Stevens. School of Informatics University of Edinburgh

A tutorial report for SENG Agent Based Software Engineering. Course Instructor: Dr. Behrouz H. Far. XML Tutorial.

All you need are models Anneke Kleppe, Klasse Objecten

Transcription:

INF5120 Modellbasert Systemutvikling Modelbased System development Lecture 12: 03.04.2017 Arne-Jørgen Berre arneb@ifi.uio.no or Arne.J.Berre@sintef.no Telecom and Informatics 1

Content Introduction to Metamodels and UML Profiles Introduction to Eclipse, EMF and Sirius Introduction to Oblig 3 for May 4th Telecom and Informatics 2

3 Course parts (16 lectures) - 2017 January (1-3) (Introduction to Modeling, Business Architecture and the Smart Building project): 1-16/1: Introduction to INF5120 2-23/1: Modeling structure and behaviour (UML and UML 2.0 and metamodeling) - (establish Oblig groups) 3-30/1: WebRatio for Web Apps/Portals and Mobile Apps and Entity/Class modeling (Getting started with WebRatio) February (4-7) (Modeling of User Interfaces, Flows and Data model diagrams, Apps/Web Portals - IFML/Client-Side): 4-6/2: Business Model Canvas, Value Proposition, Lean Canvas and Essence 5-13/2: IFML Interaction Flow Modeling Language, WebRatio advanced for Web and Apps 6-20/2: BPMN process, UML Activ.Diagrams, Workflow and Orchestration modelling value networks 7-27/2: Modeling principles Quality in Models 27/2: Oblig 1: Smart Building Business Architecture and App/Portal with IFML WebRatio UI for Smart Building March (8-11) (Modeling of IoT/CPS/Cloud, Services and Big Data UML SM/SD/Collab, ThingML Server-Side): 8-6/3: Basis for DSL and ThingML -> UML State Machines and Sequence Diagrams 9-13/3: ThingML DSL - UML Composite structures, State Machines and Sequence Diagrams II 10-20/3: Guest lecture, "Experience with Modelling", Anton Landmark, SINTEF 11-27/3: ThingML part 2 and UML Service Modeling, Architectural models, SoaML. Role modeling and UML Collaboration diagrams April/May (12-14) (MDE Creating Your own Domain Specific Language): 12-3/4: Model driven engineering Metamodels, DSL, UML Profiles, EMF, Sirius Editors intro to Oblig 3 EASTER 10/4 og 17/4 20/4: Oblig 2: Smart Building Individual and group delivery - Internet of Things control with ThingML Raspberry Pi, Wireless sensors (temperature, humidity), actuators (power control) 13-24/4: MDE transformations, Non Functional requirements Discussion of Oblig2 and 3 1. Mai Official holiday 4/5: Oblig 3 - Your own Domain Specific Language (ArchiMate) (Delivery Thursday May 4 th ) 14-8/5: SmartBuilding Integrating App with Server side and Architmate editor (Discussion of Oblig 3) May (15-17): (Bringing it together) 15-15/5: Summary of the course Final demonstrations 16-22/5: Previous exams group collaborations (No lecture) 17-29/5: Conclusions, Preparations for the Exam by old exams June (Exam) 13/6: Exam (4 hours), June 13 th, 0900-1300

OMG Model-Driven Architecture (MDA) www.omg.org/mda Telecom and Informatics 4

Model-driven a definition A system development process is model-driven if the development is mainly carried out using conceptual models at different levels of abstraction and using various viewpoints it distinguishes clearly between platform independent and platform specific models models play a fundamental role, not only in the initial development phase, but also in maintenance, reuse and further development models document the relations between various models, thereby providing a precise foundation for refinement as well as transformation Telecom and Informatics 5

MDA From 30.000 Feet J2EE.Net A PIM can be retargeted to different platforms Not the only reason why MDA might be of interest to you Telecom and Informatics 6

Automation in Software Development Requirement s Manually implement Requirement s Manually implement Requirement s Manually implement Source in domain-specific language (DSL) High-level spec (functional and nonfunctional) Source in domain-specific language (DSL) Implement with Interactive, automated support Compile Compile Source in a general-purpose language, e.g., Java or C++ (may generate code in Java or C++) (may generate code in Java or C++) Compile Compile Compile Implementation Implementation Implementation Telecom and Informatics 7

Basic MDA Pattern PIM Transformation PSM Additional information Model markup Generic transformation Generic transformations Implement best practices, architectural and design patterns, technology patterns (e.g., J3EE patterns), optimizations, etc. Additional information Adjust the transformation globally Similar to compiler options Model markup Direct the transformation of particular model elements Not part of the PIM Different platform mappings may require different markup Similar to compiler pragmas Telecom and Informatics 8

Goals The three primary goals of MDA are portability, interoperability and reusability. The MDA starts with the well-known and long established idea of separating the specification of the operation of the system from the details of the way the system uses the capabilities of its software execution platform (e.g. JEE, CORBA, Microsoft.NET and Web services). MDA provides an approach for: specifying a system independently of the software execution platform that supports it; specifying software execution platforms; choosing a particular software execution platform for the system; transforming the system specification into one for a particular software execution platform; Telecom and Informatics 9

Basic concepts System Existing or planned system. System may include anything: a program, a single computer system, some combination of parts of different systems Model A model of a system is a description or specification of that system and its environment for some certain purpose. A model is often presented as a combination of drawings and text. Architecture The architecture of a system is a specification of the parts and connectors of the system and the rules for the interactions of the parts using the connectors. MDA prescribes certain kinds of models to be used, how those models may be prepared and the relationships of the different kinds of models. Viewpoint A viewpoint on a system is a technique for abstraction using a selected set of architectural concepts and structuring rules, in order to focus on particular concerns within that system. View A viewpoint model or view of a system is a representation of that system from the perspective of a chosen viewpoint. Platform A platform is a set of subsystems and technologies that provide a coherent set of functionality through interfaces and specified usage patterns, which any application supported by that platform can use without concern for the details of how the functionality provided by the platform is implemented. Telecom and Informatics 10

MDA Three main abstraction levels Computation independent model (CIM) The computational independent viewpoint is focused on the environment of the system and on the specific requirements of the system. A CIM represents the computational independent viewpoint. The CIM hides the structural details and, of course, the details related to the targeted platform. Platform independent model (PIM) A platform independent model is a view of the system from a platform independent viewpoint. The platform independent viewpoint is focused on the operation of the system, hiding the platform specific details. A PIM exhibits platform independence and is suitable for use with a number of different platforms of similar types. The PIM gathers all the information needed to describe the behaviour of the system in a platform independent way. Platform specific model (PSM) A platform specific model is a view of the system from the platform specific viewpoint. A PSM combines the specifications in the PIM with the details that specify how the system uses a particular type of platform. The PSM represents the PIM taking into account the specific platform characteristics. Telecom and Informatics 11

Model-driven development (MDD) Model transformation Model transformation CIM PIM Business Context Models Software Specification Models PSM Software Realisation Models Model-driven approach to system engineering where models are used in understanding design construction deployment operation maintenance modification Model transformation tools and services are used to align the different models. Business-driven approach to system engineering where models are refined from business needs to software solutions Computation independent model (CIM) capturing business context and business requirements Platform independent model (PIM) focusing on software services independent of IT technology Platform specific model (PSM) focusing on the IT technology realisation of the software services Telecom and Informatics 12

Basic MDA Pattern The basic pattern can be applied multiple times PIMs and PSMs are relative notions Someone s PIM can be someone else s PSM Platform independence is relative, too It s a scoping issue It s a strategic decision Telecom and Informatics 13

Role of Models Capture design information that is usually absent from code and lost during development Basis for System generation Analysis Simulation Test generation Documentation generation Domain-specificity of a modeling language strengthens its capabilities for generation, optimization, early error detection, etc. Telecom and Informatics 14

Viewpoints and Views System models are organized into multiple views Different abstraction levels Different aspects (e.g., workflow, domain concepts, deployment) Each view conforms to some viewpoint that prescribes some appropriate modeling notation Each viewpoint is relevant to some stakeholder Telecom and Informatics 15

Many different views Telecom and Informatics 16

MDA-Related Standards OMG Standards Modeling UML Metamodeling MOF Action semantics Model interchange XMI Diagram interchange Human-readable textual notation HUTN Model-based testing and debugging (CWM) Java Community Process (JCP) Standard Java Metadata Interface JMI Telecom and Informatics 17

Benefits of MDA Preserving the investment in knowledge Independent of implementation platform Tacit knowledge made explicit Speed of development Most of the implementation is generated Quality of implementation Experts provide transformation templates Maintenance and documentation Design and analysis models are not abandoned after writing 100% traceability from specification to implementation Telecom and Informatics 18

Domain specific modelling languages Specific to a domain More focussed purpose Usable by the domain experts More productive than general purpose If properly designed and tooled! UML profiles vs. DSL Telecom and Informatics 19

Assigning Meaning to Models If a model is no longer just fancy pictures to decorate your room a graphical syntax for C++/Java/C#/Eiffel... Then tools must be able to manipulate models Let s make a model of what a model is! => meta-modeling & meta-meta-modeling.. Use Meta-Object Facility (MOF) to avoid infinite Meta-recursion {ordered} +subtype Generalizes 0..* +supertype 0..1 {ordered} 0..* +container +containedelement Contains Namespace GeneralizableElement 0..* ModelElement Feature BehavioralFeature +constrainedelement 1..* Constraint StructuralFeature Constrains 0..* Package Classifier Operation Reference MofAttribute 0..* +referent RefersTo DataType Class Association 1 +referencedend AssociationEnd Telecom and Informatics

UML2 meta-model (part., OMG) Telecom and Informatics

Generalizations NB: Tell you nothing about: generalization being acyclic, or semantics of dynamic binding * Telecom and Informatics OMG

The 4 layers in practice Telecom and Informatics OMG

Comparing Abstract Syntax Systems M 3 Technology #1 Technology #2 (formal grammars (MOF + OCL) attribute grammars, etc.) EBNF MOF Technology #3 (XML Meta-Language) A XML DTD Or Schema Technology #4 (Ontology engineering) Upper Level Ontologies M 2 Pascal Language Grammar The UML meta-model A XML document A XML DTD or Schema KIF Theories M 1 A specific Pascal Program A specific execution of a Pascal program A Specific UML Model A Specific phenomenon corresponding to a UML Model A XML document + Xlink, Xpath, XSLT + RDF, OIL, DAML + etc. [XMI=MOF+XML+OCL] +Description Logics +Conceptual Graphs +etc. Telecom and Informatics

Model-Driven Architecture conformsto meta Metametamodel Metametamodel element MOF M3 meta conformsto M2 Metamodel element Metamodel Relational metamodel UML metamodel meta conformsto System repof M1 Model element Model Telecom and Informatics 25

Model-Driven Architecture: Example MOF Metametamodel Association source destination Class conformsto conformsto Relational Metamodel Table Column + col name: String+ owner name: String * {ordered} + keyof 1..* + key * * Type + type name: String conformsto System repof BookId Relational Model Title PagesNb AuthorId Book Telecom and Informatics 26

MDA technology standards Unified Modeling Language (UML) UML is the de-facto standard industry language for specifying and designing software systems. UML addresses the modelling of architecture and design aspects of software systems by providing language constructs for describing, software components, objects, data, interfaces, interactions, activities etc. Meta Object Facility (MOF) MOF provides the standard modelling and interchange constructs that are used in MDA. These constructs are a subset of the UML modelling constructs. This common foundation provides the basis for model/metadata interchange and interoperability. XML Metadata Interchange (XMI) XMI is a format to represent models in a structured text form. In this way UML models and MOF metamodels may be interchanged between different modelling tools. Common Warehouse Metamodel (CWM) CWM is the OMG data warehouse standard. It covers the full life cycle of designing, building and managing data warehouse applications and supports management of the life cycle. MOF Queries/View/Transformations (QVT) The goals of the QVT are to provide a standard specification of a language suitable for querying and transforming models which are represented according to a MOF metamodel. Telecom and Informatics 27

optional, can be repeated How does MDD work? Developer develops model(s) based on certain metamodel(s). Model Model Model Metamodel Using code generation templates, the model is transformed to executable code. Transformer Tranformation Rules Optionally, the generated code is merged with manually written code. Model Metamodel One or more model-to-model transformation steps may precede code generation. Transformer Code Generation Templates Generated Code Manually Written Code optional Telecom and Informatics 28

OMG MOF and metamodelling Telecom and Informatics 29

Fragments of a UML metamodel UML Telecom and Informatics 30

Three stages in the evolution of modelling techniques at the OMG. (a) (b) (c) UML MOF MOF amodel UML UML SPEM Workflow etc. amodel UML_for_CORBA Common Warehouse Metadata amodel Action language Telecom and Informatics 31

Egyptian architecture M 3 meta-meta model The MOF M 1 M 2 metamodel model The UML meta-model and other MM s Some UML models and other M s Various usages of these models M 0 the real world" Telecom and Informatics 32

Illustration Java MM Package MOF Class Association UML MM M3 Interface Package Class extends Class Association M2 Presentation Participant Java program Participant listens Presentation UML model M1 Telecom and Informatics 33

The three modelling levels M 3 level the MOF MMM M 2 level the UPM MM (SPEM) the UML MM the CWM MM CCM EDOC etc. M 1 level a UML model m another UML model m M 0 level a particular use of m another use of m Telecom and Informatics 34

Model -> Metamodel entity meta-entity UML MM relationship Class 1 * Attribute model meta-model relationship UML model Client Name: String Telecom and Informatics 35

Metamodel -> Meta-metamodel MOF entity meta-entity relationship model meta-model Class source destination Association relationship UML MM Class 1 * Attribute Telecom and Informatics 36

0..* Contains ModelElement /Depends On 1..* Constrains 1..* AttachesTo MOF Model (M3) 0..* 0..* Import Namespace Tag{ordered} 0..* Constraint TypedElement 0..* Aliases 0..* IsOfType 0..* +typedelement GeneralizableElement Generalizes Feature Constant StructureField Parameter Package +type1 Classifier BehaviouralFeature StructuralFeatureAssociationEnd /Exposes 1 1 ReferesTo Association Class DataType 0..* Operation Exception Attribute Reference 0..* CanRaise 0..* {ordered} PrimitiveType StructureType EnumerationType CollectionType AliasType Telecom and Informatics 37

Goals & Challenges Goals: We need an end-to-end tool chain that allows us to build models, verify them and generate various artefacts from them. All of this should happen in a homogeneous environment, namely Eclipse. Challenges: Good Editors for your models Verifying the models as you build them Transforming/Modifying models Generating Code Integrating generated and non-generated code Telecom and Informatics 38

Applied metamodelling Telecom and Informatics 39

Metamodels A metamodel is just another model (e.g. written in UML) Model of a set of models Metamodels are specifications Models are valid if no false statements according to metamodel (e.g. well-formed) Metamodels typically represents domain-specific models (real-time systems, safety critical systems, e-business) The domain of metamodelling is language definition A metamodel is a model of some part of a language Which part depends on how the metamodel is to be used Parts: syntax, semantics, views/diagrams,... Meta-metamodel Model of metamodels Reflexive metamodel, i.e., expressed using itself Minimal reflexive metamodel Telecom and Informatics 40

What is a metamodel? In its broadest sense, a metamodel is a model of a modelling language. The term meta means transcending or above, emphasising the fact that a metamodel describes a modelling language at a higher level of abstraction than the modelling language itself. In order to understand what a metamodel is, it is useful to understand the difference between a metamodel and a model. Whilst a metamodel is also a model, a metamodel has two main distinguishing characteristics. Firstly, it must capture the essential features and properties of the language that is being modelled. Thus, a metamodel should be capable of describing a language s concrete syntax, abstract syntax and semantics. Secondly, a metamodel must be part of a metamodel architecture. Just as we can use metamodels to describe the valid models or programs permitted by a language, a metamodel architecture enables a metamodel to be viewed as a model, which itself is described by another metamodel. This allows all metamodels to be described by a single metamodel. This single metamodel, sometimes known as a meta-metamodel, is the key to metamodelling as it enables all modelling languages to be described in a unified way. Telecom and Informatics 41

Why metamodel? System development is fundamentally based on the use of languages to capture and relate different aspects of the problem domain. The benefit of metamodelling is its ability to describe these languages in a unified way. This means that the languages can be uniformly managed and manipulated thus tackling the problem of language diversity. For instance, mappings can be constructed between any number of languages provided that they are described in the same metamodelling language. Another benefit is the ability to define semantically rich languages that abstract from implementation specific technologies and focus on the problem domain at hand. Using metamodels, many different abstractions can be defined and combined to create new languages that are specifically tailored for a particular application domain. Productivity is greatly improved as a result. Telecom and Informatics 42

Uses for a metamodel Define the syntax and semantics of a language. Explain the language. Compare languages rigorously. Specify requirements for a tool for the language. Specify a language to be used in a meta-tool. Enable interchange between tools. Enable mapping between models. Telecom and Informatics 43

The metamodelling process There is a clearly defined process to constructing metamodels, which does at least make the task a well-defined, if iterative, process. The process has the following basic steps: defining abstract syntax defining well-formedness rules and meta-operations defining concrete syntax defining semantics constructing mappings to other languages Telecom and Informatics 44

Abstract syntax The metamodel describes the abstract syntax of a language. The abstract syntax of a language describes the vocabulary of concepts provided by the language and how they may be combined to create models. It consists of a definition of the concepts, the relationships that exist between concepts and well-formedness rules that state how the concepts may be legally combined. Telecom and Informatics 45

Concrete syntax visual A visual syntax presents a model or program in a diagrammatical form. A visual syntax consists of a number of graphical icons that represent views on an underlying model. A good example of a visual syntax is a class diagram, which provides graphical icons for class models. The visual syntax shown in the figure (left) is particularly good at presenting an overview of the relationships and concepts in a model. Telecom and Informatics 46

Concrete syntax textual A textual syntax enables models or programs to be described in a structured textual form. A textual syntax can take many forms, but typically consists of a mixture of declarations, which declare specific objects and variables to be available, and expressions, which state properties relating to the declared objects and variables. The following Java code illustrates a textual syntax that includes a class with a local attribute declaration and a method with a return expression: Telecom and Informatics 47

Challenges facing developers Complexity Diversity Change Telecom and Informatics 48

Language-driven development Providing the solution Execution allows the model or program to be tested, run and deployed Analysis provides information of the properties of models and programs Testing support for both generating test cases and validating them must be provided Visualisation many languages have a graphical syntax, and support must be provided for this via the user interface to the language Parsing if a language has a textual syntax, a means must be provided for reading in expressions written in the language Translation languages don t exist in isolation. They are typically connected together whether it is done informally or automatically through code generation or compilation Integration it is often useful to be able to integrate features from one model or program into another, e.g. through the use of configuration management. Telecom and Informatics 49

Language engineering and metamodelling In order to be able to engineer languages, we need a language for capturing, describing and manipulating all aspects of languages in a unified and semantically rich way. This language is called a metamodelling language. Metamodels (models of languages) are the primary means by which language engineering artefacts are expressed, and are therefore the foundation for language-driven development. Telecom and Informatics 50

Semantics An abstract syntax conveys little information about what the concepts in a language actually mean. Therefore, additional information is needed in order to capture the semantics of a language. Defining a semantics for a language is important in order to be clear about what the language represents and means. Otherwise, assumptions may be made about the language that lead to its incorrect use. For instance, although we may have an intuitive understanding of what is meant by a state machine, it is likely that the detailed semantics of the language will be open to misinterpretation if they are not defined precisely. What exactly is a state? What does it mean for transition to occur? What happens if two transitions leave the same state. Which will be chosen? All these questions should be captured by the semantics of the language. Telecom and Informatics 51

Language Engineering with Eclipse Modeling Framework (EMF) Telecom and Informatics 52

The Language Engineer responsibilities uc LanguageEngineer MODUS Lanugage Engineering Workbench Clarify purpose of language and Identify domain concepts and concept relationships ("Rich Picture") Language Engineering «include» «include» Specify conceptual model (Scoping) DomainExpert LanguageEngineer «include» Specify abstract syntax DSL Integration «include» «include» «include» Specify Semantics Specify concrete syntax Transformation Engineer Check Language Quality ModelQualityChecker Deriv e DSL editor Telecom and Informatics 53

Metamodel development Understanding of concepts and requirements Initial requirements Concepts Partitioning of the metamodel into structures Architectural style Document the metamodel and develop it in EMF (.ecore) 1. Metamodel Scope, concepts, style 4. Feedback Add, remove, and modify concepts 2. DSL and/or UML profile Create concrete syntax (graphics) 3. Test Evaluate in user scenarios Telecom and Informatics 54

Characteristics for metamodel Suited for target roles Support domain concepts and scenarios of target roles Ease-of-use and understandable for business modeller (use terms) Support precise details and correctness for solution architect Avoid unnecessary complexity Keep it simple stupid (KISS) Number of elements and associations Type and navigation of associations Make it modular Provide core with extensions Define and illustrate possible subsets ( dialects ) that support scenarios Consider integration and extension points Suited for implementation EMF representation Transformation from/to UML profile Transformation to PSM Telecom and Informatics 55

Technology overview OMG MDA specification Eclipse technology Comments MOF UML EMF UML UML profile/dsl QVT MOF2TExt SPEM XMI GEF GMF ATL, MOFScript MOFScript EPF EMF Telecom and Informatics 56

MDA-compliant Eclipse technologies Sirius https://eclipse.org/sirius Eclipse Modeling Tools: http://www.eclipse.org/downloads/ Eclipse Modeling Framework (EMF) http://www.eclipse.org/emf/ EMF is a modeling framework and code generation facility for building tools and other applications based on a structured data model. Eclipse Graphical Editing Framework (GEF) http://www.eclipse.org/gef/ The Graphical Editing Framework (GEF) allows developers to take an existing application model and quickly create a rich graphical editor. Eclipse Graphical Modeling Framework (GMF) http://www.eclipse.org/gmf/ The Eclipse Graphical Modeling Framework (GMF) provides a generative component and runtime infrastructure for developing graphical editors based on EMF and GEF. Xtext https://eclipse.org/xtext/ Preferred tool for textual domain specific languages (used for ThingML for example) Atlas Transformation Language http://www.eclipse.org/gmt/atl/ The ATL project aims at providing a set of transformation tools for GMT. These include some sample ATL transformations, an ATL transformation engine, and an IDE for ATL (ADT: ATL Development Tools). Eclipse Process Framework (EPF) http://www.eclipse.org/epf/ To provide an extensible framework and exemplary tools for software process engineering - method and process authoring, library management, configuring and publishing a process. Telecom and Informatics 57

EMF Eclipse Modeling Framework Unifying Java, XML and (almost) UML EMF models are essentially simplified UML Class Diagrams EMF generates Java code based on these models Standard serialization is in the form of XMI EMF is MDA on training wheels Telecom and Informatics 58

EMF Models and Ecore Ecore is the model used to represent EMF models Ecore is also an EMF model and therefore its own metamodel And its own meta-meta-.-model, but never mind Available elements are: EClass EAttributes EReference EDataType EEnum, EEnum Literal EPackage EOperation, EParameter Conceptually equal to OMGs Essential MOF (EMOF) Telecom and Informatics 59

Creating your model Can be defined in three ways Java XML Schema Directly manipulate the model (the almost UML way) Both Java and XML Schema approach builds an EMF model Editing the model can be done with the EMF tree editor or the GMF graphical editor It is also possible to import Rational Rose (.mdl) files Telecom and Informatics 60

3 shades of EMF Ecore model Generated Java files Creation of an instance Book book = LibraryFactory.eINSTANCE.createBook(); book.settitle( How to be a meta role model ); Telecom and Informatics 61

GMF The Eclipse Graphical Modeling Framework (GMF) project is an open source project under the Eclipse Technology Project Infrastructure and components for developing visual design and modeling surfaces in Eclipse UML editors Business process editors Etc.. GMF forms a generative bridge between EMF and GEF A diagram definition (GEF) will be linked to a domain model (EMF) as input to the generation of a visual editor Telecom and Informatics 62

GMF Graphical Modeling Framework Utilizes EMF and GEF to support generation of graphical editors GEF Graphical Editing Framework Basic idea: Bring your own model Define diagram notation Define your tools Map model elements to diagram elements Generate editor Metamodel = Abstract Syntax Diagram notation = Concrete Syntax Telecom and Informatics 63

Simplified workflow Telecom and Informatics 64

UML profiles Telecom and Informatics 65

UML profiles They allow us to adapt the UML language to the needs of the analysts or the application domain Allows designers to model using application domain concepts. There are three extension mechanisms: Stereotypes Restrictions Tagged values Telecom and Informatics 66

Stereotype Extends the vocabulary of UML with new construction elements derived from existing UML but specific to a problem domain Can have associated restrictions and tagged values Possibility of assigning an icon for a better graphical representation DB Partners Telecom and Informatics 67

Restriction Is a semantical condition represented by a textual expression Imposes some kind of condition or requisite on the element to which it is applied OCL Object Constraint Language {An interface does not have attributes, only operations} Telecom and Informatics 68

Tagged value Is a property associated to a model element Used to store information about the element Management information, documentation, coding parameters,... Generally, the tools store this information but it is not shown in the diagrams Telecom and Informatics 69

Metamodels and profiles model <-> meta-model relationship extension relationship MOF M3 UML process generic Meta-model M2 UML Real-time UML For J2EE Migration oriented process Meta-model Workflow Meta-model real-time model migration model Workflow model M1 Telecom and Informatics 70

Domain-specific languages (DSLs) Telecom and Informatics 71

UML one size fits all? While the OMG MDA promotes UML as the visual universal glue suitable for modelling everything, we are also seeing a trend towards development and co-existence of several domain-specific modelling languages, e.g. supported by the Microsoft Domain-Specific Language (DSL) tools (http://lab.msdn.microsoft.com/teamsystem/workshop/dsltools/default.aspx). Such approaches are now also being discussed in various OMG forums. UML is seen as a general-purpose language while DSLs may be more expressive for most purposes. A model-driven framework needs to acknowledge the existence of different models and views expressed in different modelling languages. The MDA technologies can help us to align these models through a common metamodelling language on which model transformations and model mappings can be defined. Telecom and Informatics 72

Software factory The Software Factories Web site (http://www.softwarefactories.com/) defines the term Software Factory in the following way: A Software Factory is a software product line that configures extensible development tools like Visual Studio Team System with packaged content like DSLs, patterns, frameworks and guidance, based on recipes for building specific kinds of applications. For example, we might set up a Software Factory for thin client Customer Relationship Management (CRM) applications using the.net framework, C#, the Microsoft Business Framework, Microsoft SQL Server, and the Microsoft Host Integration Server. Equipped with this factory, we could rapidly punch out an endless variety of CRM applications, each containing unique features based on the unique requirements of specific customers. Better yet, we could use this factory to create an ecosystem, by making it available to third parties, who could extend it to rapidly build CRM applications incorporating their value added extensions. Telecom and Informatics 73

UML and DSLs The issue of the role of UML is often stated in overly simplistic terms: MDD advocates the use of UML for all domain modelling while the Software Factories approach advocates that UML never used. This is an incorrect statement of the positions of both camps. While the MDD approach treats UML, with customization, as the modelling language of choice for most application modelling, it also acknowledges the value of custom languages in certain specialized circumstances. This is the purpose of the OMG Meta-Object Facility (MOF) standard that plays an important role in MDD. UML itself is defined using MOF and there are MOF definitions of many other languages. The MDD approach acknowledges the value of non-uml DSLs as a technique to be applied judiciously. Further, the Software Factories approach does not reject UML entirely. It suggests that you use UML for developing sketches and documentation, where DSLs should be used for developing models from which code is generated. Telecom and Informatics 74

Advantages of using UML profiles UML is an open standard modelling language for which there are many available books and training courses. UML profiles provide a lightweight approach that is easily implemented using readily available UML tooling. Models with UML profiles applied can be read by all UML tools even if they do not have any knowledge of the profile. Basing all DSLs on UML creates a set of related languages that share common concepts. UML can be used for high-level architectural models as well as detailed models from which code can be generated. Telecom and Informatics 75

Disadvantages of using UML profiles UML profiles only permit a limited amount of customization. It is not possible to introduce new modelling concepts that cannot be expressed by extending existing UML elements. The use of UML does require familiarity with modelling concepts. Telecom and Informatics 76

Example Metamodels UML Use case Metamodel BPMN Metamodel IFML Metamodel Oblig 3 Visual Service Journey language Telecom and Informatics 77

UML Use Case Metamodel Telecom and Informatics 78

BPMN Metamodel Telecom and Informatics 79

BPMN Definitions Telecom and Informatics 80

IFML Metamodel Telecom and Informatics 81

Oblig 3 Use of Eclipse EMF and SIRIUS for the creation of an Archimate graphical editor https://eclipse.org/sirius/ Telecom and Informatics 82

Scope Manager metamodel Telecom and Informatics 83

Dictionary metamodel Telecom and Informatics 84

Some historic references [Atkinson and Kühne 2003] C. Atkinson and T. Kühne, "Model-Driven Development: A Metamodeling Foundation", IEEE Software, vol. 20, no. 5, pp. 36-41, 2003. http://www.mm.informatik.tudarmstadt.de/staff/kuehne/publications/papers/mda-foundation.pdf [Clark, et al. 2004] T. Clark, A. Evans, P. Sammut, and J. Willans, "Applied Metamodelling - A Foundation for Language Driven Development, Version 0.1", 2004. http://albini.xactium.com/web/index.php?option=com_remository&itemid=54&func=select&id=1 [Seidewitz 2003] E. Seidewitz, "What Models Mean", IEEE Software, vol. 20, no. 5, pp. 26-32, 2003. [Swithinbank, et al. 2005] P. Swithinbank, M. Chessell, T. Gardner, C. Griffin, J. Man, H. Wylie, and L. Yusuf, "Patterns: Model-Driven Development Using IBM Rational Software Architect", IBM, Redbooks, December 2005. http://www.redbooks.ibm.com/redbooks/pdfs/sg247105.pdf Telecom and Informatics 85

Next lecture - Monday April 24th, 2017 Concluding on Model Driven Engineering Presentation of Oblig 2 Further discussions for Oblig 3 with Eclipse, EMF and Sirius for May 4th Telecom and Informatics 86