In embedded software development, reuse is recognized as the. Boosting Embedded Systems Development with Domain- Specific Modeling

Similar documents
Domain-Specific Modelling for Cross-Platform Product Families

Use software to define silicon p. 15

Utilizing Domain-Specific Modelling for Software Testing

Test Automation Framework

Design Patterns for Complex Event Processing

Embedded Software Development with MPS

CONDIS. IT Service Management and CMDB

Application Architectures

Ten steps to better requirements management.

Using the TASKING Software Platform for AURIX

Visionet IT Modernization Empowering Change

SavvyDox Publishing Augmenting SharePoint and Office 365 Document Content Management Systems

Implementação. Interfaces Pessoa Máquina 2010/ Salvador Abreu baseado em material Alan Dix. Thursday, June 2, 2011

System Software Product Line

Managing Variability in Software Architectures 1 Felix Bachmann*

Chapter 4 Software Lifecycle and Performance Analysis

CDC UNIFIED PROCESS PRACTICES GUIDE

Fourth generation techniques (4GT)

ITIL, the CMS, and You BEST PRACTICES WHITE PAPER

Quotes from Object-Oriented Software Construction

TTCN-3, Qtronic and SIP

Satisfying business needs while maintaining the

Johannes Sametinger. C. Doppler Laboratory for Software Engineering Johannes Kepler University of Linz A-4040 Linz, Austria

Licensing for BarTender s Automation Editions. Understanding Printer-Based Licensing WHITE PAPER

Software Design. Design (I) Software Design Data Design. Relationships between the Analysis Model and the Design Model

Introduction to Network Operating Systems

UML for C# Modeling Basics

Efficient Management of Tests and Defects in Variant-Rich Systems with pure::variants and IBM Rational ClearQuest

You can probably work with decimal. binary numbers needed by the. Working with binary numbers is time- consuming & error-prone.

Abstract

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program

Business Process Management (BPM) Software

1/20/2016 INTRODUCTION

Applying 4+1 View Architecture with UML 2. White Paper

IBM Rational Rhapsody

Tibetan For Windows - Software Development and Future Speculations. Marvin Moser, Tibetan for Windows & Lucent Technologies, USA

COCOVILA Compiler-Compiler for Visual Languages

Architecture Design & Sequence Diagram. Week 7

Object-Oriented Software Specification in Programming Language Design and Implementation

Lesson 1 Introduction to Rapid Application Development using Visual Basic

SQL Server 2005 Reporting Services (SSRS)

Modeling Turnpike: a Model-Driven Framework for Domain-Specific Software Development *

Executive summary. Table of Contents. Technical Paper Minimize program coding and reduce development time with Infor Mongoose

Address IT costs and streamline operations with IBM service desk and asset management.

Math Content by Strand 1

Basics of Dimensional Modeling

secure intelligence collection and assessment system Your business technologists. Powering progress

Chapter 1. Dr. Chris Irwin Davis Phone: (972) Office: ECSS CS-4337 Organization of Programming Languages

9 Research Questions Resolved

Application Centric Infrastructure Object-Oriented Data Model: Gain Advanced Network Control and Programmability

Manage Software Development in LabVIEW with Professional Tools

Queensland recordkeeping metadata standard and guideline

Implementing reusable software components for SNOMED CT diagram and expression concept representations

A White Paper By: Dr. Gaurav Banga SVP, Engineering & CTO, Phoenix Technologies. Bridging BIOS to UEFI

Generating Web Applications from Process Models

Java CPD (I) Frans Coenen Department of Computer Science

Introduction to Generative Software Development

TestManager Administration Guide

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

ENTERPRISE ARCHITECTUE OFFICE

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

Adapter, Bridge, and Façade

Questions? Assignment. Techniques for Gathering Requirements. Gathering and Analysing Requirements

Work Process Management

Tech-Clarity Insight: Better Service from Better Product Information. Evolving to Visual, Product-Centric Service Communication

Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS

Lecture 5: Gate Logic Logic Optimization

Designing a Semantic Repository

Business Process Management In An Application Development Environment

Realizing business flexibility through integrated SOA policy management.

Budapest University of Technology and Economics Department of Measurement and Information Systems. Business Process Modeling

Structuring Product-lines: A Layered Architectural Style

Visible Business Templates An Introduction

Access Tutorial 13: Event-Driven Programming Using Macros

Service Oriented Enterprise Architecture

Embedded/Real-Time Software Development with PathMATE and IBM Rational Systems Developer

IAI : Expert Systems

Generating Aspect Code from UML Models

Microsoft CRM Features. What s new in Dynamics CRM 2016

Source Code Translation

ROC+ as a consultancy service

Meta-Model specification V2 D

How to design and implement firmware for embedded systems

Select the right configuration management database to establish a platform for effective service management.

This Readme includes information pertaining to Novell Service Desk 7.0.

Visual Programming of Logic, Motion, and Robotics

Handling the Complexity of RDF Data: Combining List and Graph Visualization

Requirements Analysis Concepts & Principles. Instructor: Dr. Jerry Gao

Run-time Variability Issues in Software Product Lines

Reusable Knowledge-based Components for Building Software. Applications: A Knowledge Modelling Approach

Part I. Introduction

A Framework for Software Product Line Engineering

The Phases of an Object-Oriented Application

Technical document. Group 3 Mate Tomin Pieter van Ede Raymond Weijermars Daniel Faustino Stefan Hospes

Automation of Library (Codes) Development for Content Management System (CMS)

Rotorcraft Health Management System (RHMS)

2) Write in detail the issues in the design of code generator.

PCB Project (*.PrjPcb)

D6.1: Service management tools implementation and maturity baseline assessment framework

Transcription:

Software Modeling Boosting Embedded Systems Development with - Specific Modeling -specific modeling promises order of magnitude productivity and quality improvements for embedded software development by leveraging the knowledge of domain experts into the generation of final code. by Risto Pohjonen, MetaCase Consulting In embedded software development, reuse is recognized as the key factor for better productivity and lower costs. In the ideal case, the product family approach makes it possible to apply reuse on a whole range of related products. The family members are based on a common architecture and rely heavily on reusable components, thus freeing the developers to concentrate only on the required variation between the products. This approach also enables the developers to focus on design instead of implementation details. Traditionally, however, the product family approach has been hindered by the lack of adequate design tools. Most current design languages and tools provide little if any support for design level reuse and domain-specific design concepts, which are the key requirements for a successful product family solution. The Promise of DSM -specific modeling (DSM) is an emerging technology that addresses these issues. The basic idea of DSM is that the product family variants are described with a domain-specific modeling language that is based on the domain itself and the final products are automatically generated from these models. This is possible because the models capture all static and behavioral aspects of the product. Also, unlike the general-purpose code generators found in typical design tools, the DSM generators are specifically implemented to support the domain concepts found in the models. DSM is an important mechanism for guiding development in a product family. The domain-specific modeling language and generators, created by a few domain experts, shift the abstraction level of designs to the product concept level, make the product family explicit to developers and effectively set legal variation space. Basically, this means that the domain knowledge of an expert is leveraged to the whole development team. DSM is an important mechanism for guiding development in a product family. Experiences from real-life cases of DSM uses have also reported more concrete benefits. The single most important promise of DSM is order of magnitude productivity improvements. For example, Nokia states that with DSM, it develops mobile phones up to 10 times faster than before. Similarly, Lucent reports that domain-specific languages improve its productivity by 3-10 times depending on the product. As the DSM 57

Product Idea Meta Case Tool Specific Modeling Language DSM Case Tool Product Model?? : MI :?? clock time Show Mode EditHours HO Edit Minutes MI A Set HO clockoffset A MI clockoffset Figure 1 Code Generator Product Code + Framework Architecture for designing and using a DSM environment. Generated Code getclockoffset(). roll(metime.minute, true, displaytime());... + Framework primitive public void roll (int field, boolean up, METime displaytime) {... solution is based on the domain and the terminology known and used by those working within the field, it is also easier and faster to introduce it to new people. DSM also contributes to the improvement of the overall quality of the product. As the modeling language defines the variation space and the implementation is automatically generated, there are substantially fewer errors because the need for error-prone manual intervention is minimized. Architecture for a DSM Environment For a complete DSM environment with 100% code generation, three things are required: a modeling tool with support for the domain-specific language, a code generator and a domainspecific framework. This basic architecture is presented on the left-hand side of Figure 1, with an example of a DSM environment for developing software for digital wristwatches on the right. The role of the modeling language in a DSM environment is pivotal: as a representation of static and dynamic domain concepts and semantics, a modeling language defines maximum variation space for the product family. The language also ensures that developers follow the family approach and de facto standards. The task of the code generator is to translate the models into the required output format and to provide variation for output formats. The task of the domain-specific framework is then to provide the DSM environment with an interface for the target platform and programming language by providing the atomic implementations of commonalities and variabilities as framework-level primitive services and components. 58

// All this code is generated directly from the model. // Since no manual coding or editing is needed, it is // not intended to be particularly human-readable public class SimpleTime extends AbstractWatchApplication { // define unique numbers for each Action (a...) and DisplayFn (d...) static final int a22_1405 = +1; //+1+1 static final int a22_2926 = +1+1; //+1 static final int d22_977 = +1+1+1; // public SimpleTime(Master master) { super(master); // Transitions and their triggering buttons and actions // Arguments: From State, Button, Action, To State addtransition ("Start [Watch]", "", 0, "Show"); addtransition ("Show", "Mode", 0, "EditHours"); addtransition ("EditHours", "Set", a22_2926, "EditHours"); addtransition ("EditHours", "Mode", 0, "EditMinutes"); addtransition ("EditMinutes", "Set", a22_1405, "EditMinutes"); addtransition ("EditMinutes", "Mode", 0, "Show"); // What to display in each state // Arguments: State, blinking unit, central unit, DisplayFn addstatedisplay("show", -1, METime.MINUTE, d22_977); addstatedisplay("edithours", METime.HOUR_OF_DAY, METime.MINUTE, d22_977); addstatedisplay("editminutes", METime.MINUTE, METime.MINUTE, d22_977); ; // Actions (return null) and DisplayFns (return time) public Object perform(int methodid) { switch (methodid) { case a22_2926: getclockoffset().roll(metime.hour_of_day, true, displaytime()); case a22_1405: getclockoffset().roll(metime.minute, true, displaytime()); case d22_977: return getclocktime(); Figure 2 Code generated from the example model in Figure 1. Building a DSM Environment The starting point for building a DSM environment is to identify the commonalities and variabilities among possible family members and refine these variation points with static and dynamic variation attributes. These common elements and variation attributes are then allocated to the DSM environment architecture. In order to do this, two aspects need to be considered. First is the computational model that is suitable for specifying the required variation. The second aspect is the required code generator output and its target platform and implementation language. These two aspects affect each other: sometimes the computational model may require a certain kind of generator output (e.g. a state machine as a computational model requires a state machine implementation or vice versa). The computational model(s) of variation and underlying platform for generator output are then represented with the elements of DSM environment, modeling languages, generator and domain-specific framework. The first part of a DSM environment to be implemented is the modeling language. As the language is the only part that is visible to the user and thereby provides the user interface for the development, it has to maintain control over all possible variations within the product family. The modeling language is also the main factor for increasing productivity. Therefore it should operate on the highest achievable level of abstraction and should be kept as independent from actual code as possible. It may initially appear easier to build the language as an extension on top of the existing code base or platform but this usually leads to a rather limited level of abstraction and mapping to domain concepts. We have found that the best way to design a domain-specific modeling language is to base it on some well-known model of computation, like state machine, data model or flow model, and enrich this model with domainspecific concepts. For example, the modeling language for watch development (as illustrated in Figure 1), is based on the computational model of a state machine, which was complemented with the following domainspecific extensions: Transitions between states may be initiated by user actions only (hence the button symbol as a trigger). The actions during a state transition may operate on time units only, and there is only a limited set of legal operations. Each state is associated with a display function that defines how the time units are shown on display when the state is active. In most cases it is not possible to cover all variation within just one type of model and modeling language. This raises the important questions of model organization, layering, integration and reuse. Typically, efforts to develop a modeling language start with a flat model structure that has all concepts arranged on the same level without any serious attempts to reuse them. As the complexity of the model grows, the flat models are rarely suitable for presenting hierarchical and modularized software products. Therefore, we need to be able to present our models in a layered fashion. 59

An important criterion for layering is the nature of the variability. For example, a typical pattern we have found within the product families is to have a language based on a behavioral computational model (like the state machine) to handle the lowlevel functional aspects of the family members and to cover the high-level configuration issues with a language based on a static model (like data and component models). Another aspect affecting the layer structure is reuse. The idea of reuse-based layering is to treat each model as a reusable component for the models on the higher level. In this type of solution, the reusable element has a canonical definition that is stored somewhere and referenced where needed. To enable the code generator to produce completely functional and executable output code, the models should capture all static and behavioral variation of the target product while the domain framework should provide the required low-level interface with the target platform. As the translation process itself is complex enough, the generator should be kept as simple and straightforward as possible. It is also difficult to maintain variability factors within the generator especially when the family domain and architecture evolve continuously. Thus, before including any variability aspect into the code generator, evaluate the nature of the variation carefully: if something seems difficult to support with the generator, consider raising it up to the modeling language or pushing it down to the framework. Also bear in mind that the developer should do all basic decision-making at the model level. According to our experiences, the generator is a proper place for only two kinds of variation. As each target platform or programming language requires, at least partially, a unique generator implementation anyway, it is widely acceptable to handle the target variation within the generator. Another suitable way to use the generator for managing variability is to build higher-level primitives by combining low-level primitives during generation. The final part of the environment is the domain framework. In many cases the differentiation between the target platform and the domain framework remains unclear. We have learned to rely on the following definition: the target platform includes general hardware, operating system, programming languages and software tools, libraries and components that are found on the target system. The domain framework consists of any additional component or code that is required to support code generation on top of them. It must be noted that in some cases the additional framework is not needed because the code generator can interface directly with the target platform. We have found that, architecturally, frameworks consist of three layers. The components and services required to interface with the target platform are on the lowest level. The middle level is the core of the framework and it is responsible for implementing the counterparts for the logical structures presented by the models as templates and components for higher-level variability. The top-level of the framework provides an interface with models by defining the expected code generation output, which complies with the code and templates provided by the other framework layers. An example of generated code in Figure 2 illustrates how a domain framework can support the code generation. It is the 60

implementation of the state machine presented in Figure 1. As the watch domain framework provides primitives defining the state machine and operating on the time units, the required generator output remains reasonably simple and achievable. Another issue related to the development of DSM environments is the tool support. Traditionally there have not been any cost-effective ways to implement complete DSM environments with the required editors and generators. More recently, however, tools with customizable modeling languages and code generators have emerged. These tools provide built-in support for both defining the DSM environments and applying them in product development. As MetaCase tools like MetaEdit+ or Ptech, the effort of building complete DSM environments is reduced to a few man-weeks. DSM provides major benefits for product family development. These benefits are not easily, if at all, available for developers in other current product family approaches: reading textual manuals about the product family, mapping family aspects to code or code visualization notations, browsing components in a library, or trying to follow a (hopefully) shared understanding of a common architecture or framework. As an investment, the creation of a DSM environment of course requires experts time and resources, but we have found that the investment pays itself back by the time the third variant is created. This approach also scales from small teams to large globally distributed companies. Interestingly, the amount of expert resources needed to build and maintain a language and generators does not grow with the size of product family and/or number of developers. MetaCase Consulting Jyväskylä, Finland. +358 14 4451 400. [www.metacase.com.]. 61