Aspect Decomposition: Model-Driven Architecture (MDA) 30 Transformational Design with Essential. References. Ø Optional: Ø Obligatory:

Similar documents
30 Transformational Design with Essential Aspect Decomposition: Model-Driven Architecture (MDA)

30 Transformational Design with Essential Aspect Decomposition: Model-Driven Architecture (MDA)

31) Feature Models and MDA for Product Lines

Graph Structurings. 16. How to Structure Large Models - Obligatory Reading. Ø T. Fischer, Jörg Niere, L. Torunski, and Albert Zündorf, 'Story

16. How to Structure Large Models and Programs with Graph Structurings

Lecture 8: Verification and Validation

CSE 520S Real-Time Systems

Overview. Ø Neural Networks are considered black-box models Ø They are complex and do not provide much insight into variable relationships

Chapter 8: Recursion

Design and Analysis of College s CPC-Building. System Based on.net Platform

Functional Requirements for a Secure Electronic Voting System

CS 5523: Operating Systems

Economic and Social Council

Implementing Domain Specific Languages using Dependent Types and Partial Evaluation

47. Rich Components with A/P-Quality Contracts The Future Component Model for Embedded Systems

CS 5523 Operating Systems: Intro to Distributed Systems

Arguments and Artifacts for Dispute Resolution

Cluster Analysis. (see also: Segmentation)

Examination of CII and Business Methods Applications

Uses and Challenges. Care. Health C. ents in H. ive Age. Normati. Javier Vazquez-Salceda Utrecht University.

DevOps Course Content

51. Rich Components with A/P-Quality Contracts The Future Component Model for Embedded Systems

Institution Aware Conceptual Modelling

Plan For the Week. Solve problems by programming in Python. Compsci 101 Way-of-life. Vocabulary and Concepts

The European Patent Office

The International Migration of German Great War Veterans

Servilla: Service Provisioning in Wireless Sensor Networks. Chenyang Lu

JOB DESCRIPTION I. JOB IDENTIFICATION. Position Title: Jurilinguist Linguistic Profile: CCC Group and Level: ADG-C

AIOTI ALLIANCE FOR INTERNET OF THINGS INNOVATION

20 Design Methods - An Overview

Biometrics how to put to use and how not at all?

UN/CEFACT Centre for Trade Facilitation and Electronic Business

Software Agents Behaviour.

Agreement for iseries and AS/400 System Restore Test Service

Lecture 6 Cryptographic Hash Functions

EU Internal Market Law

Adaptive QoS Control for Real-Time Systems

70 th INTERNATIONAL ASTRONAUTICAL CONGRESS WASHINGTON D.C., UNITED STATES OCTOBER 2019 INSTRUCTIONS FOR AUTHORS

Economic and Social Council

USDL Variant Management. Dr. Daniel Oberle, Senior Researcher, SAP Research Karlsruhe Gunther Stuhec, Standards Architect, SAP AG Walldorf

Michael Laver and Ernest Sergenti: Party Competition. An Agent-Based Model

Hoboken Public Schools. PLTW Introduction to Computer Science Curriculum

Biometrics how to put to use and how not at all?

IBM Cognos Open Mic Cognos Analytics 11 Part nd June, IBM Corporation

Instruction Sheet for MCORE Software Agreement for Academic Centers (Non-profit)

File Systems: Fundamentals

Economic and Social Council

From Meander Designs to a Routing Application Using a Shape Grammar to Cellular Automata Methodology

Goal. Security Risk-Oriented BPMN

Palgrave Studies in Economic History. Series Editor Kent Deng London School of Economics London, United Kingdom

First International Workshop on UN/CEFACT Modeling Methodology. UML and other OMG technologies in a standardization environment

TERMS AND CONDITIONS OF USE

THE PRIMITIVES OF LEGAL PROTECTION AGAINST DATA TOTALITARIANISMS

Language, Hegemony and the European Union

Department of Industrial Engineering: Research Groups

Refinement in Requirements Specification and Analysis: a Case Study

Real-Time CORBA. Chenyang Lu CSE 520S

Benefits of a Modern Court Case Management System by Richard Slowes, Former Commissioner of Minnesota Supreme Court WHITE PAPER

OSS-Lizenzinformationen K6. Open Source Lizenzinformationen für Terminal 9620-K6 und 9720-K6

National Programme for Estonian Language Technology: a Pre-final Summary

Immigration Policy and the Labor Market

Comparison Sorts. EECS 2011 Prof. J. Elder - 1 -

Probabilistic Latent Semantic Analysis Hofmann (1999)

Genetic Algorithms with Elitism-Based Immigrants for Changing Optimization Problems

CSE 308, Section 2. Semester Project Discussion. Session Objectives

Managing for Results in a Multi-Country Facility

IOM International Organization for Migration OIM Organizaţia Internaţională pentru Migraţie

European Administrative Governance

UN/CEFACT Update Report

WORLD INTELLECTUAL PROPERTY ORGANIZATION GENEVA SPECIAL UNION FOR THE INTERNATIONAL PATENT CLASSIFICATION (IPC UNION) AD HOC IPC REFORM WORKING GROUP

OM Analysis for Nepal (MPP) Country Component Bal Krishna Bal, Madan Puraskar Pustakalaya

MYANMAR DEMOCRACY FELLOWSHIP

Global Partnership for Effective Development Co-operation Indicative Terms of Reference Focal point for trade unions at the country level

Urban and Regional Research International Volume 15

Research Article. ISSN (Print)

ENERCALC Software License Agreement

Clarifications to this call for applications are presented at the end of this document

Users reading habits in online news portals

Implementing Network Codes in the. Annex 32_14th MC. Energy Community Secretariat

February 11, Re: Unitary Patent Post Grant Fees. Dear Dr. Fröhlinger:

Cloud Tutorial: AWS IoT. TA for class CSE 521S, Fall, Jan/18/2018 Haoran Li

The International Classification of Crimes for Statistical Purposes (ICCS) Introduction

1. About Eastern Partnership Civil Society Facility project:

BA 20/20 Becoming a Benchmark Company for the Business Analyst Practice. BBC 2014 Building Business Capability

ForeScout Extended Module for McAfee epolicy Orchestrator

Ameri- can Thoracic Society, 1. Key definitions Authorized Users Outsource Provider Effective Date Fee Licensed Material Licensee

Paper 24 Tel: Date: June 23, 2017 UNITED STATES PATENT AND TRADEMARK OFFICE BEFORE THE PATENT TRIAL AND APPEAL BOARD

SUPPORT AND UPDATE AGREEMENT ( SUA ) Concerning support and maintenance for IAR Embedded Workbench and IAR visualstate from IAR Systems AB

eformz Mini-Manual ereader - How To

DEPUTY DISTRICT ATTORNEY I-IV (DEEP CLASS)

TERMS OF REFERENCE FOR SHORT-TERM CONSULTANCY CONTRACT

Marcia Macaulay Editor. Populist Discourse. International Perspectives

ADMISSIBILITY OF COMPUTER EVIDENCE IN TANZANIA

THE PATENTABILITY OF COMPUTER-IMPLEMENTED INVENTIONS. Consultation Paper by the Services of the Directorate General for the Internal Market

A Iterative Analysis to Improve Key Properties of Critical Human-Intensive Processes: An Election Security Example

Experimental Computational Philosophy: shedding new lights on (old) philosophical debates

World business and the multilateral trading system

American Government /Civics

CONCRETE: A benchmarking framework to CONtrol and Classify REpeatable Testbed Experiments

Norms, Institutional Power and Roles : towards a logical framework

Transcription:

Fakultät Informatik, Institut für Software- und Multimediatechnik, Lehrstuhl für Softwaretechnologie 30 Transformational Design with Essential Aspect Decomposition: Model-Driven Architecture () Prof. Dr. U. Aßmann Technische Universität Dresden Institut für Software- und Multimediatechnik Gruppe Softwaretechnologie http://st.inf.tu-dresden.de Version 11-0.2, 28.12.11 1. Model-Driven Architecture 2. Model Mappings 3. Model Merging and Weaving 4. MDSD with domain-specific tagging References Ø Obligatory: www.omg.org/mda Model driven architecture. Guide. OMG (ed.). Reference document for applications Ø tional: J. Frankel. Model-driven architecture. Wiley. Excellent book on the concepts of, including the MOF, model mappings. Manfred Nagl, editor. Building tightly integrated software development environments: the IPSEN approach, volume 1170 of Lecture Notes in Computer Science. Springer-Verlag Inc., New York, NY, USA, 1996. CIP Language Group. The Munich Project CIP, volume 1 of Lecture Notes in Computer Science. Springer-Verlag, 1984. Bauer et al. The Munich project CIP. Volume 1: The wide spectrum language CIP-L, volume 183 of Lecture Notes in Computer Science. Springer-Verlag, Berlin, Germany, 1985. F. L. Bauer, et al. The Munich Project CIP. Volume II: The Transformation System CIP-S. Springer-Verlag, LNCS 292, 1987. 2

Problem - Reuse Ø Many products must be produced in variants for different platforms Ø Machines ranging from PDA over PC to host Ø Component models from.net over CORBA to EJB Ø How to develop a product line? Ø How to produce common parts of models? 3 Problem: The Representation Schizophrenia Ø Problem: Design Aging Ø If an artifact has several representations, such as design, implementation, documentation Ø Always the code is modified, and the other become inconsistent Ø Usually, a design specification ages faster than implementation, because the programmers are tempted to change the implementation quickly, due to deadlines and customer requests Ø They forget to update the design Ø Solution: Ø XP: Single-source principle Ø don't represent in other ways that code Ø clean code that works Ø : do a round-trip to solve the problem Ø One of the biggest problems in software maintenance 4

30.1 MODEL-DRIVEN ARCHITECTURE 5 Remember: Refinement-based Modelling Ø (Old idea. Broadband languages, such as CIP or IPSEN did this in the 70s already) Ø Start with some simple model Ø Apply refinement steps: Ø Elaborate (more details change semantics) Ø Add platform-specific details Ø Semantics-preserving operations Ø Restructure (more structure, but keep requirements and delivery, i.e., semantics) Ø Split (decompose, introduce hierarchies, layers, reducibility) Ø Coalesce (rearrange) Ø TransformDomains (change representation, but keep semantics) 6

Model-Driven Architecture () Ø http://www.omg.org/mda is a refinement-based software development method for product families (product lines) Ø Split the models into Ø Platform-independent model: The PIM focuses on the logical architecture Ø Platform-specific model: The PSM adds platform specific details and timing constraints Ø Platform-specific implementation contains the code Ø Platform description model: describes the platform concepts Ø Advantages Ø Separation of concerns: Platformindependent vs platform-dependent issues Ø Portability Ø Automation: derive implementation models from design models (semi-) automatically Domain model for application domain Computationally Independent Model (CIM) Requirements specification Platform Independent Model (PIM) Platform Specific Model (PSM) Platform-Specific Implementation (PSI, Code) Platform Description Model (PDM) 7 Describes Product Lines Ø The platform stack is a translational framework Domain model for application domain Computationally Computationally Independent Independent Model Model (CIM) (CIM) Requirements Requirements specification specification Platform Platform Independent Independent Model Model (PIM) (PIM) Platform Independent Model (PIM) Platform Specific Model (PSM) Platform Platform Specific Specific Model Model (PSM) (PSM) Platform Specific Model (PSM) Code Code Code Code Platform-Specific Implementation (PSI, Code) The products of the product line 8

Model Mappings and Model Weavings Ø Model mappings connect models horizontally (on the same level) or vertically (crossing levels). From a model mapping, a simple transformation can be infered Ø Model weavings weave two input models to an output model Usually, some parts are still hand-written code Domain model for application domain Computationally Independent Model (CIM) Requirements specification Platform Independent Model (PIM) Horizontal model mappings + Platform Description Model (PDM) Vertical model mappings Platform Specific Model (PSM) + Handwritten code Platform-Specific Implementation (PSI, Code) 9 Example: Performed by Hand Requirments Specification (UML, formal methods,...) Realize active/ passive objects PIM (standard UML with parallelism) Adaptation to EJB platform PSM (parallelism resolved) Elimination of abstract relations PSM (EJB middleware) PSM (.NET middleware) Elimination of all non- Java constructs PSM (relations refined) PSM (relations refined) Java PSM (Java Code) PSM (C# Code) 10

Example: Compilers Are Simple Tools Ø Metamodels are language descriptions Ø Models are intermediate representations Ø Platform specific (abstract syntax tree) Ø Platform dependent (binary code) Programming Language in Concrete Syntax Abstract Syntax Tree (AST) Intermediate Language (IL) + Machine Language Description Model (PDM) Machine Language (ML) 11 What are Model Mappings? Ø Model Ø A model is a representation of a part of a function of a system, its structure, or behavior Ø Model mappings are transformations from an upper to a lower model Ø The mappings are automatic or semi-automatic: step-wise refinement of the model by transformation instanceof describes Model Metamodel Platform source target source target Mapping applicationof Mapping Technique 12

What Are Platforms? Ø Platforms are variability levels, variants that produce a variant of the specification Ø Platforms are environments on which a system runs: Ø Abstract machines Ø Libraries, such as JDK,.NET Ø Implementation languages Ø Java, Eiffel, C# Ø Component models Ø CORBA, Enterprise Java Beans (EJB),.NET-COM+, etc. Ø Ontology of a domain (e.g., medicine) Ø Constraints Ø Time Ø Memory Ø Energy 13 Benefit of Ø sees the system development process as a sequence of transformation steps from requirements to code Ø is an architectural style for transformational frameworks Ø Separation of Platform Information (separation of concerns) reduces dependencies on platform Ø Middleware (.NET, Corba, DCOM, Beans) Ø Platform specific details (resource constraints, memory handling) Ø Platforms in embedded and realtime systems Ø Domain Ø Reuse of PIM for many platforms Ø The PIM is a generic framework for a product family Ø A transformational framework, not an object-oriented framework Ø provides generic frameworks for designs and models Ø Parameterization with model mappings 14

30.2 MODEL MAPPINGS 15 Different Kinds of Mappings Ø The Guide suggests several patterns, i.e., mapping patterns between PIM and PSM: Ø Instantiation: binding the formal parameters of a template (instantiation of templates, framework instantiation) [see Design Patterns and Frameworks] Ø Isomorphic mapping: expand a tag in a PIM to n elements of a PSM (1:1 mapping) Ø Important to map a element of a PIM to several elements of a PSM Ø The extension information of a PSM can be expressed as one stereotype in a PIM (marked PIM) Ø Homomorphic mapping: expand a tag in a PIM to n elements of a PSM (1:n mapping) Ø Important to map a element of a PIM to several elements of a PSM Ø The extension information of a PSM can be expressed as one stereotype in a PIM (marked PIM) Ø Concept transformation mapping: Change a concept of a PIM into another concept in a PSM Ø For instance, a PIM method to a PSM Command object Ø Aspect mappings: aspects are woven into the core PIM Ø For instance, with a GRS 16

Morphic Mappings on Marked PIMs Ø 1:1 or 1:n mappings (isomorphic mappings, marked PIMs) are important Ø They introduce an exclusively-owns relationship from 1 element of the PIM to n elements in the PSM Ø Supported by many UML and tools Ø They partition the PIM and the PSM: The border of a partition is demarcated by the PIM tag Ø This serve for clear responsibilities, on which level a partition is edited 17 What Are UML Profiles? Ø A (UML) profile is a metamodel describing a platforms or a domain Ø Technically, a profile is a set of new stereotypes and tagged values Ø Stereotypes correspond to metaclasses Ø A profile has a metamodel that extends the UML metamodel Ø Stereotypes are metaclasses in this metamodel that are derived from standard UML metaclasses Ø Examples platform profiles: Ø EDOC Enterprise Distributed Objects Computing Ø Middleware: Corba,.NET, EJB Ø Embedded and realtime systems: time, performance, schedulability Ø A profile can describe a domain model Ø or ontology, if domain is large enough A profile can be the core of a domain specific language (DSL) Ø With own vocabulary, every entry in metamodel is a term Ø Examples: Banking, insurances, cars, airplanes, 18

Marking [ Guide, OMG] 19 Example of a Marked PIM Ø Different class implementations in a PSM, refining to different languages, using different patterns <<Java>> Loan -int sum +withdraw() public void withdraw( int amount) { sum -= amount; } <<C#>> Loan -int sum +withdraw() // Java implementation as a decorator class Loan extends Account { // decorator backlink Account upper; } private int sum; public void withdraw( int amount) { sum -= amount; // C# implementation: a partial class class Loan partial Account { private int sum; public void withdraw( int amount) { sum -= amount; } 20

Pattern Transformation [ Guide, OMG] 21 Model Transformation [ Guide, OMG] 22

Meta Model Transformation [ Guide, OMG] 23 30.3 Model Merging and Weaving [ Guide, OMG] 24

Additional Information [ Guide, OMG] 25 Adding Platform-Specific Extensions to Platform-Independent Models Essence Platform independent model (PIM) Platform-1 specific extension (PSE) Aspect 1 Model weaving Platform-1 specific model (PSM) Platform-2 specific extension (PSE) Aspect 2 Model weaving Platform-(1+2) specific model (PSM) 26

When Can We Semi-Automatically Enrich A PIM to a PSM? Ø Describe platform specific extension (PSE) as aspects or views Ø The PIM is the core, the PSM the weaved system Ø The model mapping becomes an aspect weaver PIM PSE for Aspect 1 PSE for Aspect 2 PSE for Aspect 3 PSM 27 With Several Layers for Resource-Constrained Systems Ø HIDOORS EU Projekt (High Integrity Distributed Object-Oriented Real-Time Systems), http://www.hidoors.org Ø for RT-UML Ø Realtime sequence diagrams (MSC) Ø UML realtime statecharts Ø Transformation into timed automata of Uppaal model checker PIM PSM-1 PSE for Aspect 1 (time) PSE for Aspect 2 (memory) PSM-2 28

RT Sequence Diagram (UML) RT Extension Aspect <<subject>> Heart Rate Server <<observer>> HR Trend Recoder Join Points <<observer>> HR Sensor A GetRate() C Subscribe() GetRate() Advice: {D-C<=1ms} {B-A <= 2ms} Subscribe() D B 29 RT-SD und RT-Statecharts are Platform Specific Aspects PIM: UML class diagram RT Sequence diagram PSM-1 RT-Statecharts PSM-2 30

Problem: Full Needs Roundtrip Ø Otherwise, the models age (design aging) Ø This is still an unsolved problem Requirements Specification Model Mappings Platform Independent Model (PIM) Platform Specific Model (PSM) Code 31 Problem 2: Needs More Levels (Multi-Stage ) Requirements Specification Platform Independent Model (PIM) platform stack... Platform Specific Model (PSM) Code 32

30.4 Model-Driven Software Development (MDSD) with Domain Specific Tagging Ø Model-based software development (MDSD, MDD) tags UML diagrams with domain profiles Ø From the profile stereotypes and tags, domain-specific code is generated Ø set/get, standard functions, standard attributes Ø compliance functions for component models Ø <!--In contrast, profile tags are platform-specific--> <<Account>> Loan withdraw() public void withdraw( int amount) { sum -= amount; } class Loan extends IAccount { private Person owner; void setowner(person p) {..} Person getowner() {..} private int sum; /*** end generated code **/ public void withdraw( int amount) { sum -= amount; } /*** begin generated code **/ } 33 The End Ø (R) is a trademark of OMG 34