Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida [email protected]...

23
Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida [email protected] [email protected]

Transcript of Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida [email protected]...

Page 1: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Domain Engineering

Silvio Romero de Lemos Meira

Eduardo Santana de [email protected]

[email protected]

Page 2: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Based onGenerative Programming: Methods, Tools, and Applications

by Krzysztof Czarnecki, Ulrich Eisenecker

Page 3: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Agenda

• Domain Engineering– Concept– Components– Steps

• Key Concepts• Features and Feature Models

– The Importance– Example

• Commonality and Variability

Page 4: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

What is Domain Engineering?

• Domain Engineering (DE) is the activity of collecting, organizing, and storing past experience in building systems or parts of systems in a particular domain in the form of reusable assets, as well as providing an adequate means for reusing these assets when building (i.e., retrieval, qualification, dissemination, adaptation, assembly, and so on) new

systems.

• Steps:– Domain Analysis– Domain Design– Domain Implementation

Page 5: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Software Development based on DE

Domain Engineering

Application Engineering

Domain Analysis

Domain Design

Domain Implem.

RequirementsAnalysis

ProductConfiguration

Integration and Test

Domain

knowledge

Domain

Model

System Family Architecture

Customer

Needs

Features Product

Configuration

Product

Domain-specific languages

Components

Generators

New Requirements

New RequirementsCustomDesign

CustomDevelopment

Page 6: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Domain Engineering’s Components

Domain Engineering Process Component

Main Purpose

Domain Analysis Domain scooping and defining a set of reusable, configurable requirements for the systems in the domain

Domain Design Developing a common architecture for the system in the domain and devising a production plan

Domain Implementation Implementing the reusable assets, for example, reusable components, domain-specific languages, generators, a reuse infrastructure, and a production plan

Page 7: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Domain Analysis

• Purpose:– Select and define the domain of focus– Collect the relevant domain information

and integrate it into a coherent domain model

• Sources of domain information:– Existing systems, domain experts,

textbooks, experiments.....

Page 8: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Domain Model

• A domain model is an explicit representation of the common and the variable properties of the system in a domain, the semantics of the properties and domain concepts, and the dependencies between the variable properties

• Domain model’s components:– Domain Definition

• Defines:– the scope of a domain;– existing systems;– rationale for including or excluding a given system.

– Domain Lexicon• Domain vocabulary

– Concept models• Concept’s descriptions (object diagrams, interaction, state….)

– Feature models

Page 9: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Domain Design and Domain Implementation

• Purpose:– To develop an architecture for the family

of systems in the domain and to devise a production plan

• Input – Application Engineering

Page 10: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Concepts

• Domain– Infinite– Domain as the “real world”

• An area of knowledge or activity characterized by a set of concepts and terminology understood by practitioners in that area

– Domain as a set of systems• knowledge “real world” + How to build software systems

– Domain: An area of knowledge • Scoped to maximize the satisfaction of the requirements of its

stakeholders• Includes a set of concepts and terminology understood by

practitioners in that area• Includes the knowledge of how to build software systems in that area

Page 11: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Domain Scope and Scoping

• Horizontal scope– How many different systems are in the

domain?

• Vertical scope– Which parts of these systems are in the

domain?

• Encapsulated x Diffused domains

Page 12: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Relationships between domains

• A is contained in B

• A uses B

• A is analogous to B

Page 13: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Features and Feature Model

• Feature:– An end-user-visible characteristic of a system– A distinguishable characteristic of a concept that is relevant

to some stakeholder of the concept

• Elements:– Feature diagram– Feature definitions– Composition rules– Rationale for features

Page 14: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Example

Car

Mandatory Features

Optional Feature

Transmission Horsepower Air ConditioningComposition rule:“Air Conditioning” requires “horsepower” >100

Automatic Manual

Alternative Features

Rationale“Manual” moreFuel efficient

Page 15: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Feature Modeling: The importance

• Reusable software– Variability

• Key technique – To Identity and capture variability

• To avoid– Relevant features and variations points are not

included in the reusable software– Many features and variations points are included

but never used {complexity, costs}

Page 16: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Feature Models

• Represents the common and the variable features of concept instances and the

• Dependencies between the variable features• Elements

– Feature Diagram– Semantic descriptions of each features– Client programs– Exemplar systems– Constraints– Priorities

Page 17: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Feature Diagrams

• Mandatory Features

• Optional Features

• Alternative Features

Page 18: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Mandatory Features

C

f4f3

f2f1

Feature set {C, f1, f2, f3, f4}

Page 19: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Optional Features

C

f3

f2f1

Feature set {C} , {C, f1}, {C, f1, f3}, {C, f2}, {C, f1, f2}, {C, f1, f3, f2}

Page 20: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Alternative Features

C

f1

Feature set {C, f1, f3} , {C, f1, f4}, {C, f1, f5}, {C, f2, f3}, {C, f2, f4}, {C, f2, f5}

f2 f3 f4 f5

Page 21: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Expressing Commonality and Variability

• Commonality– What features are common to all instances

of the concept? {focus on concept}– What features are common to all instances

of the concept that have that particular feature? {focus on feature}

• Variability– Use of optional or alternative features– Variation points (nodes)

Page 22: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Questions ?

Page 23: Domain Engineering Silvio Romero de Lemos Meira Eduardo Santana de Almeida silvio@cesar.org.br esa2@cin.ufpe.br.

Next class: Cap 02.