SlideShare a Scribd company logo
DOMAIN MODELLING
LINGI2252 – PROF. KIM MENS
* These slides are part of the course LINGI2252 “Software Maintenance and Evolution”,
given by Prof. Kim Mens at UCL, Belgium
*
DOMAIN MODELLING
MAIN CAUSES OF MAINTENANCE PROBLEMS
Poor quality of the software documentation
Poor software quality (e.g., unstructured code, too large
components, inadequate design)
Insufficient knowledge about the system and its domain
(maybe unavailable due to personnel turnover)
Ineffectiveness of maintenance team
low productivity, low motivation, low skill levels, competing
demands for programmer time
2
REMEMBER?
DOMAIN
ANALYSIS TO
THE RESCUE
A. DOMAIN ANALYSIS
LINGI2252 – PROF. KIM MENS
* Material mostly based on Kang & al., Feature-Oriented Domain Analysis
(FODA): Feasibility Study, Technical Report CMU/SEI-90-TR-21, 1990
*
DOMAIN MODELLING – DOMAIN ANALYSIS
ASSEMBLY LINES
Factory assembly lines
are able to build a series

of similar products in

large quantities
Economies of scale: savings from using technology to
produce a greater volume of a single output with the same
or less inputs
4
* Slide based on slides by A. van Deursen, Domain Engineering, 2001
*
DOMAIN MODELLING – DOMAIN ANALYSIS
SOFTWARE PRODUCT LINES
Inspired by factory assembly lines
Software product lines (SPL)
are about building a family of software systems
sharing a common set of features
that satisfy the needs of a particular domain
Economies of scope: savings from using technology to build
a greater diversity of outputs with the same or less inputs
5
* Slide based on slides by A. van Deursen, Domain Engineering, 2001
*
DOMAIN MODELLING – DOMAIN ANALYSIS
EXAMPLES OF DOMAINS
Window management systems (MSWindows, X windows, …)
Text or graphical editors
Television broadcast planning systems
Air traffic control systems
Telephone switches
Insurance portals
On-line banking applications
* Example used in [Kang & al. 1990]
*
6
DOMAIN MODELLING – DOMAIN ANALYSIS
OBJECT-ORIENTED APPLICATION FRAMEWORKS
Particular implementation technique for building software families
Object-oriented application frameworks
Support reuse beyond the class level
by defining a set of cooperating classes embodying an abstract design
that can be used to solve a family of related problems
Building a custom application from a framework is typically done through
class specialisation
Principle of inversion of control: framework calls the application code
MORE ON THIS LATER…
* Slide based on slides by A. van Deursen, Domain Engineering, 2001
*
7
SNEAK PREVIEW
DOMAIN MODELLING – DOMAIN ANALYSIS
DOMAIN ANALYSIS
Captures domain knowledge of experts for related class of systems
Supports software reuse by capturing domain expertise and
understanding
Method for discovering and representing commonalities among
related software systems
e.g., common capabilities and data
Feature-Oriented Domain Analysis as particular domain analysis
technique
* [Prieto-Diaz1990] Ruben Prieto-Diaz, Domain Analysis: An Introduction.
ACM SIGSOFT Software Engineering Notes 15(2):47-54, April, 1990.
*
8
DOMAIN MODELLING – DOMAIN ANALYSIS
FEATURE-ORIENTED DOMAIN ANALYSIS (FODA)
Primary focus is the identification of prominent or distinctive
features of software systems in a domain
Commonalities = what features all systems in the domain
have in common
Variabilities = distinguishing features between different
systems in the domain
Leads to the creation of a set of products that define the domain
Analysis of a product family, as opposed to a single product
* [Kang & al. 1990] Kang & al., Feature-Oriented Domain Analysis (FODA):
Feasibility Study, Technical Report CMU/SEI-90-TR-21, 1990
*
9
DOMAIN MODELLING – DOMAIN ANALYSIS
FEATURES
Features are "user-visible aspects or characteristics" of the
domain
Define both common aspects of (the systems in) a domain
As well as differences between related systems in the domain
Describe mandatory, optional, or alternative characteristics of
these related systems
10
DOMAIN MODELLING – DOMAIN ANALYSIS
LINK WITH SOFTWARE REUSE
Domain analysis provides a generic and reusable description
of the requirements of a class of systems.
Defines what is common across all systems in that domain.
These common features may be implemented as reusable
components that may be reused across different systems.
11
DOMAIN MODELLING – DOMAIN ANALYSIS
SOME TERMINOLOGY
Application : a system which provides a set of general services for solving
some type of user problem.
Context : the circumstances, situation, or environment in which a particular
system exists.
(Application) domain : a set of current and future applications which share a
set of common capabilities and data.
Domain analysis : The process of identifying, collecting, organizing, and
representing the relevant information in a domain based on the study of
existing systems and their development histories, knowledge captured from
domain experts, underlying theory, and emerging technology within the
domain.
* From [Kang & al. 1990]
*
12
DOMAIN MODELLING – DOMAIN ANALYSIS
SOME TERMINOLOGY
Domain engineering: An encompassing process which includes domain analysis and the
subsequent construction of components, methods, and tools that address the problems
of system development through the application of the domain analysis products.
Domain model: A definition of the functions, objects, data, and relationships in a
domain.
Feature: A prominent or distinctive user-visible aspect, quality, or characteristic of a
software system or systems.
User: Either a person or an application that operates a system in order to perform a task.
Reusable component: A software component (including requirements, designs, code,
test data, etc.) designed and implemented for the specific purpose of being reused.
* From [Kang & al. 1990]
*
13
DOMAIN MODELLING – DOMAIN ANALYSIS
DOMAIN ANALYSIS PROCESS
Three basic phases :
1. Context analysis defines the extent (or bounds) of the
domain under analysis
2. Domain modelling describes the problems to be
addressed by the software in the domain
3. Architecture modelling creates the overall software
architecture to implement a solution to the problems
in that domain
14
DOMAIN MODELLING – DOMAIN ANALYSIS
1. CONTEXT ANALYSIS
A domain analyst interacts with users and domain experts to
establish the bounds of the domain
The analyst gathers sources of information for performing
the analysis
The results of this phase define the scope of the analysis.
This requires identifying the primary inputs and outputs of
software in the domain as well as software interfaces
15
DOMAIN MODELLING – DOMAIN ANALYSIS
2. DOMAIN MODELING
A domain analyst uses information sources and other products of the context analysis to
support the creation of a domain model
Acquiring domain information: experts, legacy systems, literature, prototyping, …
Domain model is reviewed by the user, domain expert, and requirements analyst
Domain model can consist of several artefacts:
A feature model to describe the software features (commonality & variability)
A dictionary to define a standard lexicon of domain terminology
An entity-relationship diagram do document main software entities and their
relationships
Other diagrams to specify generic software requirements, like control flow or data flow
diagrams
16
DOMAIN MODELLING – DOMAIN ANALYSIS
3. ARCHITECTURE MODELLING
Using the domain model, the domain analyst then produces an
architecture model.
This model should be reviewed by the domain expert, the
requirements analyst, and the software engineer.
The user does not need to participate in this review.
Architecture model captures the overall structure of the
implementation of different software systems in the domain
different technologies possible: reusable components, domain-
specific languages, generators, application frameworks, …
17
DOMAIN MODELLING – DOMAIN ANALYSIS
SUMMARY
Context analysis (scope of domain)
Domain Model
Architectures
Implement
applications
in domain
Create reusable resources (designs,
components, etc.)
Domain
(representation
of problems in
domain)
(representation
of solutions in
domain)
New application New application
Domain
analysis
Tools and training
support
*
* Source: Figure 1-4, page 8 of Kang & al., Feature-
Oriented Domain Analysis (FODA): Feasibility
Study, Technical Report CMU/SEI-90-TR-21, 1990
18
B. FEATURE MODELLING
LINGI2252 – PROF. KIM MENS
DOMAIN MODELLING – FEATURE MODELLING
FEATURE MODELLING
Used in domain analysis and software product lines (SPL)
to express the commonalities and variabilities of a family of
systems
in terms of the features they may offer
20
DOMAIN MODELLING – FEATURE MODELLING
FEATURE MODEL
Consists of a hierarchy of features
Example:
21
Car
Transmission
Manual

transmission
Automatic

transmission
Engine Pulls trailerCar body
Electric Gasoline
Car
Transmission
Manual

transmission
Automatic

transmission
Engine Pulls trailerCar body
Electric Gasoline
DOMAIN MODELLING – FEATURE MODELLING
FEATURE MODEL
Consists of a hierarchy of features
Plus variability (mandatory, optional, alternatives) :
Car
Manual

transmission
Automatic

transmission
Engine Pulls trailerCar body
Electric Gasoline
22
mandatory optional
alternative or
Transmission
DOMAIN MODELLING – FEATURE MODELLING
FEATURE TYPES
Mandatory features = features that each system in
the domain must have
e.g., all cars must have a body, a transmission
and an engine
Optional features = features that a system may or
may not have
e.g., some cars have a hook to pull a trailer
23
Concept
or feature
Subfeature
Concept
or feature
Subfeature
DOMAIN MODELLING – FEATURE MODELLING
FEATURE TYPES
Alternative features = features of which the
system can only have one at a time,
represents an XOR between features
e.g., every car must have either a manual or an
automatic transition, but cannot have both at
the same time
OR features = features of which the system can
have one or more
at least one, but several are possible too
e.g., a car can have an electric engine or run on
gasoline; it can even have both if it’s a hybrid
24
Concept
opt.

feature
opt.

feature
alternative
Concept
opt.

feature
opt.

feature
or
DOMAIN MODELLING – FEATURE MODELLING
TOOL SUPPORT
Tool support : FeatureIDE
an Eclipse plug-in for FOSD
25
DOMAIN MODELLING – FEATURE MODELLING
FEATURE DEPENDENCIES
“requires” or “implies”
when the inclusion of one feature depends on the inclusion of another
(a mandatory feature is a special case of this, but implication relations
could also exist between more distant features in the feature hierarchy)
“mutual exclusion”
when two features cannot co-exist
(an XOR is a special case of this, but mutual exclusions could also exist
between more distant features in the feature hierarchy)
or more generic constraints defined in terms of Boolean operators
26
DOMAIN MODELLING – FEATURE MODELLING
TOOL SUPPORT FOR DEPENDENCIES
FeatureIDE supports constraints: not, and, or, implies, iff, ()
FeatureIDE tool (supposedly) even checks for redundant constraints
27
DOMAIN MODELLING – FEATURE MODELLING
FEATURE MODEL : ANOTHER SIMPLE EXAMPLE
Feature model of an e-shop software product line
28
For some reason FeatureIDE seems to
flag the addition constraints as a
“redundant” constraint.
DOMAIN MODELLING – FEATURE MODELLING
FEATURE MODEL
parent feature, with an arc drawn through all of the options, as is the case in
windowLayout. The arc signifies that one and only one of those features must be chosen.
The remaining features with no special notation are all mandatory.
The line drawn between a child feature and a parent feature indicates that a child feature
requires its parent feature to be present; if the parent is not marked as valid, then the child
feature for that system is in essence "unreachable." For example, if the windowLayout
were selected to be overlappedLayout, then the feature tiledColumns would be
"unreachable" for that specific system, since its parent tiledLayout would not be valid.
interiortiled
tiled
Layout
MoveOp
abort
Input
move
border
Icon
move
Feedback
interactive
Feedback
ghost
Feedback
opaque
moveResizeFeedback
erase
AfterBefore
erase
Erasure
move
Move
After
exposepartially
OffScreen
Move
Configuration
windowzapEffect
constrained
Move
windowLayout
overlapped
Layout
tiled
Columns Arbitrary
Figure 7-6: Features for the Window Manager Move Operation
To illustrate the use of the feature diagram Figure 7-7 shows a comparison of the move
*
* Source: Fig. 7-6, page 64 of Kang & al., Feature-
Oriented Domain Analysis (FODA): Feasibility
Study, Technical Report CMU/SEI-90-TR-21, 1990
29
A slightly more

elaborate example
systems straightforward. Certain types of information are more difficult to obtain from such a
display, such as knowledge of invalid feature combinations or underlying issues and
rationales. These types of information are discussed in the next two sections.
windowLayout
windowLayout
interior
interior
ArbitraryColumns
tiled
Layout
overlapped
Move
constrained
zapEffect window
Configuration
OffScreen
partially expose
After
Move
move
Erasure
erase
Before After
erase
moveResizeFeedback
opaque
Feedback
ghost
Feedback
interactive
Feedback
move
Icon
border
move
Input
abort
MoveOp
Layout
tiled
tiled
Move
X10/uwm
tiled
tiled
Layout
MoveOp
abort
Input
move
border
Icon
move
Feedback
interactive
Feedback
ghost
Feedback
opaque
moveResizeFeedback
erase
AfterBefore
erase
Erasure
move
Move
After
exposepartially
OffScreen
Configuration
windowzapEffect
constrained
Move
overlapped
Layout
tiled
Columns Arbitrary
SunView
Move
Figure 7-7: Comparison of Move Operation Features in X10/uwm and SunView
DOMAIN MODELLING – FEATURE MODELLING
FEATURE MODEL
*
* Source: Fig. 7-7, page 65 of Kang & al., Feature-
Oriented Domain Analysis (FODA): Feasibility
Study, Technical Report CMU/SEI-90-TR-21, 1990
30
DOMAIN MODELLING – FEATURE MODELLING
FEATURE MODEL SEMANTICS
The semantics of a feature model is its set of valid
configurations
A configuration is an instance of the feature model with a set
of features selected
A configuration is valid if it respects the semantics imposed
by the dependencies and constraints, e.g.
mandatory features must be selected; optional features
may be selected; exactly one must be selected for x-or; etc.
31
Car
Transmission
Manual

transmission
Automatic

transmission
Engine Pulls trailerCar body
Electric Gasoline
DOMAIN MODELLING – FEATURE MODELLING
FEATURE MODEL CONFIGURATION
In our car feature model, a configuration represents a
particular car
Here’s a valid configuration:
Car
Manual

transmission
Automatic

transmission
Engine Pulls trailerCar body
Electric Gasoline
32
Transmission
Car
Transmission
Manual

transmission
Automatic

transmission
Engine Pulls trailerCar body
Electric Gasoline
DOMAIN MODELLING – FEATURE MODELLING
FEATURE MODEL CONFIGURATION
Here’s an invalid configuration
Why?
Car
Manual

transmission
Automatic

transmission
Engine Pulls trailerCar body
Electric Gasoline
33
Transmission
DOMAIN MODELLING – FEATURE MODELLING
FEATURE MODEL SEMANTICS
A feature model is inconsistent if it has no valid configurations
Two feature models are equivalent if they have the same set of
valid configurations
A commonality is a feature that appears in all of the model’s
valid configurations
A variability is a feature that appears only in some of the
configurations
i.e., optional, alternatives or or-features
34
Domain Modelling
DOMAIN MODELLING
LEARNING OBJECTIVES
▸ software product line
▸ economy of scope
▸ domain analysis
▸ feature-oriented domain analysis
▸ link with software reuse
▸ feature
▸ commonality
▸ variability
▸ domain analysis process
▸ feature model
▸ feature types (mandatory,
obligatory, ...)
▸ feature dependencies
▸ FeatureIDE tool
▸ feature model semantics
DOMAIN MODELLING
FURTHER READING
Ruben Prieto-Diaz, Domain Analysis: An Introduction. ACM
SIGSOFT Software Engineering Notes 15(2):47-54, April, 1990.
Kang & al., Feature-Oriented Domain Analysis (FODA):
Feasibility Study, Technical Report CMU/SEI-90-TR-21, 1990
Czarnecki & Eisenecker, Generative programming: Methods,
Tools and Applications, Addison Wesley, 2000
Chapter 2: Domain Engineering; Chapter 4: Feature
Modeling; and examples in Chapters 12, 13 & 14.
37
DOMAIN MODELLING
POSSIBLE QUESTIONS
▸ Define, in your own words, what a software product line is.
▸ Explain, in your own words, the difference between economies of scale and economies of scope, in the
context of software product lines.
▸ Explain the main purpose of domain analysis.
▸ What is the goal of feature-oriented domain analysis? What is a feature? How does this relate to software
product lines?
▸ Wat is the link between feature-oriented domain analysis and software reuse?
▸ Explain and discuss the different phases of the domain analysis process.
▸ Explain and illustrate the feature modelling notation (and different kinds of feature types and feature
dependencies).
▸ What is a configuration of a feature model? When is a configuration said to be valid? Explain and illustrate
on an example. When is a feature model said to be inconsistent?
▸ Explain, in your own words, the notions of commonality and variability in the context of feature modelling.

More Related Content

PDF
Software Maintenance and Evolution
PPTX
Software Maintenance
PPTX
Software Evolution and Maintenance Models
PPTX
Software evolution and maintenance basic concepts and preliminaries
PPT
Software maintenance
ODP
Software evolution -- Good practices
PDF
Software evolution and maintenance
Software Maintenance and Evolution
Software Maintenance
Software Evolution and Maintenance Models
Software evolution and maintenance basic concepts and preliminaries
Software maintenance
Software evolution -- Good practices
Software evolution and maintenance

What's hot (20)

PPTX
Software Evolution
PPT
Object Oriented Software Engineering (OOSE) presentation on SOFTWARE MAINTENANCE
PPTX
Software maintenance ppt
PPTX
Software Evolution
PPTX
Software maintenance
PDF
Intro softwareeng
PPTX
Software maintenance
PPTX
5 chap - MAINTENANCE
PDF
Introduction to Software Evolution: The Software Volcano
PPT
Review se
PPT
Ian Sommerville, Software Engineering, 9th Edition Ch2
PPTX
Maintenance & Re-Engineering of Software
PPTX
Ch2 sw processes
PPTX
Ian Sommerville, Software Engineering, 9th Edition Ch 4
PPT
Software Change in Software Engineering SE27
PPT
Dependable Software Development in Software Engineering SE18
PPT
Software maintenance and configuration management, software engineering
PDF
Se solns 9th edition
PDF
7. The Software Development Process - Maintenance
DOCX
Software maintenance
Software Evolution
Object Oriented Software Engineering (OOSE) presentation on SOFTWARE MAINTENANCE
Software maintenance ppt
Software Evolution
Software maintenance
Intro softwareeng
Software maintenance
5 chap - MAINTENANCE
Introduction to Software Evolution: The Software Volcano
Review se
Ian Sommerville, Software Engineering, 9th Edition Ch2
Maintenance & Re-Engineering of Software
Ch2 sw processes
Ian Sommerville, Software Engineering, 9th Edition Ch 4
Software Change in Software Engineering SE27
Dependable Software Development in Software Engineering SE18
Software maintenance and configuration management, software engineering
Se solns 9th edition
7. The Software Development Process - Maintenance
Software maintenance
Ad

Similar to Domain Modelling (20)

PPT
System Modelling.ppt
PPT
software_engg-chap-03.ppt
PPTX
05 fse requirementsengineering
PPT
Lecture 12 requirements modeling - (system analysis)
PPT
vu-re-lecturedfgdfgdfgdfgdfgdfgfgafga a29.ppt
PPT
Chapter_06_RequirementRequirements Modeling.ppt
PPTX
Analysis
PDF
[2015/2016] RESEARCH in software engineering
PPT
Design engineering
PPT
Design engineering
PPTX
OOSAD-Object Oriented Systems Analysis and Design - Chapter06-Part I.pptx
PPTX
clean architecture uncle bob AnalysisAndDesign.el.en.pptx
PPT
2. Life Cycle Models for Software Engineeting
PPTX
Software Requirement Engineering.pptx
PPTX
The Role of the Software Architect (short version)
PPTX
SE-Lecture-4.pptx
PDF
Domain Driven Design
PDF
Requeriment Analysis and modelling presentation
PPT
Analysis modeling
System Modelling.ppt
software_engg-chap-03.ppt
05 fse requirementsengineering
Lecture 12 requirements modeling - (system analysis)
vu-re-lecturedfgdfgdfgdfgdfgdfgfgafga a29.ppt
Chapter_06_RequirementRequirements Modeling.ppt
Analysis
[2015/2016] RESEARCH in software engineering
Design engineering
Design engineering
OOSAD-Object Oriented Systems Analysis and Design - Chapter06-Part I.pptx
clean architecture uncle bob AnalysisAndDesign.el.en.pptx
2. Life Cycle Models for Software Engineeting
Software Requirement Engineering.pptx
The Role of the Software Architect (short version)
SE-Lecture-4.pptx
Domain Driven Design
Requeriment Analysis and modelling presentation
Analysis modeling
Ad

More from kim.mens (20)

PDF
Context-Oriented Programming
PDF
Software Reuse and Object-Oriented Programming
PDF
Bad Code Smells
PDF
Object-Oriented Design Heuristics
PDF
Software Patterns
PDF
Code Refactoring
PDF
Object-Oriented Application Frameworks
PDF
Towards a Context-Oriented Software Implementation Framework
PDF
Towards a Taxonomy of Context-Aware Software Variabilty Approaches
PDF
Breaking the Walls: A Unified Vision on Context-Oriented Software Engineering
PDF
Context-oriented programming
PDF
Basics of reflection
PDF
Advanced Reflection in Java
PDF
Basics of reflection in java
PDF
Reflection in Ruby
PDF
Introduction to Ruby
PDF
Introduction to Smalltalk
PDF
A gentle introduction to reflection
PDF
Managing the Evolution of Information Systems with Intensional Views and Rela...
PDF
Usage contracts (presented at SATToSE 2014 in L'Aquila, Italy)
Context-Oriented Programming
Software Reuse and Object-Oriented Programming
Bad Code Smells
Object-Oriented Design Heuristics
Software Patterns
Code Refactoring
Object-Oriented Application Frameworks
Towards a Context-Oriented Software Implementation Framework
Towards a Taxonomy of Context-Aware Software Variabilty Approaches
Breaking the Walls: A Unified Vision on Context-Oriented Software Engineering
Context-oriented programming
Basics of reflection
Advanced Reflection in Java
Basics of reflection in java
Reflection in Ruby
Introduction to Ruby
Introduction to Smalltalk
A gentle introduction to reflection
Managing the Evolution of Information Systems with Intensional Views and Rela...
Usage contracts (presented at SATToSE 2014 in L'Aquila, Italy)

Recently uploaded (20)

PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
Empowerment Technology for Senior High School Guide
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
1_English_Language_Set_2.pdf probationary
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Cell Types and Its function , kingdom of life
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
Paper A Mock Exam 9_ Attempt review.pdf.
Practical Manual AGRO-233 Principles and Practices of Natural Farming
LDMMIA Reiki Yoga Finals Review Spring Summer
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Final Presentation General Medicine 03-08-2024.pptx
What if we spent less time fighting change, and more time building what’s rig...
Empowerment Technology for Senior High School Guide
202450812 BayCHI UCSC-SV 20250812 v17.pptx
1_English_Language_Set_2.pdf probationary
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Supply Chain Operations Speaking Notes -ICLT Program
Cell Types and Its function , kingdom of life
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Final Presentation General Medicine 03-08-2024.pptx
Weekly quiz Compilation Jan -July 25.pdf
Complications of Minimal Access Surgery at WLH
Chinmaya Tiranga quiz Grand Finale.pdf

Domain Modelling

  • 1. DOMAIN MODELLING LINGI2252 – PROF. KIM MENS * These slides are part of the course LINGI2252 “Software Maintenance and Evolution”, given by Prof. Kim Mens at UCL, Belgium *
  • 2. DOMAIN MODELLING MAIN CAUSES OF MAINTENANCE PROBLEMS Poor quality of the software documentation Poor software quality (e.g., unstructured code, too large components, inadequate design) Insufficient knowledge about the system and its domain (maybe unavailable due to personnel turnover) Ineffectiveness of maintenance team low productivity, low motivation, low skill levels, competing demands for programmer time 2 REMEMBER? DOMAIN ANALYSIS TO THE RESCUE
  • 3. A. DOMAIN ANALYSIS LINGI2252 – PROF. KIM MENS * Material mostly based on Kang & al., Feature-Oriented Domain Analysis (FODA): Feasibility Study, Technical Report CMU/SEI-90-TR-21, 1990 *
  • 4. DOMAIN MODELLING – DOMAIN ANALYSIS ASSEMBLY LINES Factory assembly lines are able to build a series
 of similar products in
 large quantities Economies of scale: savings from using technology to produce a greater volume of a single output with the same or less inputs 4 * Slide based on slides by A. van Deursen, Domain Engineering, 2001 *
  • 5. DOMAIN MODELLING – DOMAIN ANALYSIS SOFTWARE PRODUCT LINES Inspired by factory assembly lines Software product lines (SPL) are about building a family of software systems sharing a common set of features that satisfy the needs of a particular domain Economies of scope: savings from using technology to build a greater diversity of outputs with the same or less inputs 5 * Slide based on slides by A. van Deursen, Domain Engineering, 2001 *
  • 6. DOMAIN MODELLING – DOMAIN ANALYSIS EXAMPLES OF DOMAINS Window management systems (MSWindows, X windows, …) Text or graphical editors Television broadcast planning systems Air traffic control systems Telephone switches Insurance portals On-line banking applications * Example used in [Kang & al. 1990] * 6
  • 7. DOMAIN MODELLING – DOMAIN ANALYSIS OBJECT-ORIENTED APPLICATION FRAMEWORKS Particular implementation technique for building software families Object-oriented application frameworks Support reuse beyond the class level by defining a set of cooperating classes embodying an abstract design that can be used to solve a family of related problems Building a custom application from a framework is typically done through class specialisation Principle of inversion of control: framework calls the application code MORE ON THIS LATER… * Slide based on slides by A. van Deursen, Domain Engineering, 2001 * 7 SNEAK PREVIEW
  • 8. DOMAIN MODELLING – DOMAIN ANALYSIS DOMAIN ANALYSIS Captures domain knowledge of experts for related class of systems Supports software reuse by capturing domain expertise and understanding Method for discovering and representing commonalities among related software systems e.g., common capabilities and data Feature-Oriented Domain Analysis as particular domain analysis technique * [Prieto-Diaz1990] Ruben Prieto-Diaz, Domain Analysis: An Introduction. ACM SIGSOFT Software Engineering Notes 15(2):47-54, April, 1990. * 8
  • 9. DOMAIN MODELLING – DOMAIN ANALYSIS FEATURE-ORIENTED DOMAIN ANALYSIS (FODA) Primary focus is the identification of prominent or distinctive features of software systems in a domain Commonalities = what features all systems in the domain have in common Variabilities = distinguishing features between different systems in the domain Leads to the creation of a set of products that define the domain Analysis of a product family, as opposed to a single product * [Kang & al. 1990] Kang & al., Feature-Oriented Domain Analysis (FODA): Feasibility Study, Technical Report CMU/SEI-90-TR-21, 1990 * 9
  • 10. DOMAIN MODELLING – DOMAIN ANALYSIS FEATURES Features are "user-visible aspects or characteristics" of the domain Define both common aspects of (the systems in) a domain As well as differences between related systems in the domain Describe mandatory, optional, or alternative characteristics of these related systems 10
  • 11. DOMAIN MODELLING – DOMAIN ANALYSIS LINK WITH SOFTWARE REUSE Domain analysis provides a generic and reusable description of the requirements of a class of systems. Defines what is common across all systems in that domain. These common features may be implemented as reusable components that may be reused across different systems. 11
  • 12. DOMAIN MODELLING – DOMAIN ANALYSIS SOME TERMINOLOGY Application : a system which provides a set of general services for solving some type of user problem. Context : the circumstances, situation, or environment in which a particular system exists. (Application) domain : a set of current and future applications which share a set of common capabilities and data. Domain analysis : The process of identifying, collecting, organizing, and representing the relevant information in a domain based on the study of existing systems and their development histories, knowledge captured from domain experts, underlying theory, and emerging technology within the domain. * From [Kang & al. 1990] * 12
  • 13. DOMAIN MODELLING – DOMAIN ANALYSIS SOME TERMINOLOGY Domain engineering: An encompassing process which includes domain analysis and the subsequent construction of components, methods, and tools that address the problems of system development through the application of the domain analysis products. Domain model: A definition of the functions, objects, data, and relationships in a domain. Feature: A prominent or distinctive user-visible aspect, quality, or characteristic of a software system or systems. User: Either a person or an application that operates a system in order to perform a task. Reusable component: A software component (including requirements, designs, code, test data, etc.) designed and implemented for the specific purpose of being reused. * From [Kang & al. 1990] * 13
  • 14. DOMAIN MODELLING – DOMAIN ANALYSIS DOMAIN ANALYSIS PROCESS Three basic phases : 1. Context analysis defines the extent (or bounds) of the domain under analysis 2. Domain modelling describes the problems to be addressed by the software in the domain 3. Architecture modelling creates the overall software architecture to implement a solution to the problems in that domain 14
  • 15. DOMAIN MODELLING – DOMAIN ANALYSIS 1. CONTEXT ANALYSIS A domain analyst interacts with users and domain experts to establish the bounds of the domain The analyst gathers sources of information for performing the analysis The results of this phase define the scope of the analysis. This requires identifying the primary inputs and outputs of software in the domain as well as software interfaces 15
  • 16. DOMAIN MODELLING – DOMAIN ANALYSIS 2. DOMAIN MODELING A domain analyst uses information sources and other products of the context analysis to support the creation of a domain model Acquiring domain information: experts, legacy systems, literature, prototyping, … Domain model is reviewed by the user, domain expert, and requirements analyst Domain model can consist of several artefacts: A feature model to describe the software features (commonality & variability) A dictionary to define a standard lexicon of domain terminology An entity-relationship diagram do document main software entities and their relationships Other diagrams to specify generic software requirements, like control flow or data flow diagrams 16
  • 17. DOMAIN MODELLING – DOMAIN ANALYSIS 3. ARCHITECTURE MODELLING Using the domain model, the domain analyst then produces an architecture model. This model should be reviewed by the domain expert, the requirements analyst, and the software engineer. The user does not need to participate in this review. Architecture model captures the overall structure of the implementation of different software systems in the domain different technologies possible: reusable components, domain- specific languages, generators, application frameworks, … 17
  • 18. DOMAIN MODELLING – DOMAIN ANALYSIS SUMMARY Context analysis (scope of domain) Domain Model Architectures Implement applications in domain Create reusable resources (designs, components, etc.) Domain (representation of problems in domain) (representation of solutions in domain) New application New application Domain analysis Tools and training support * * Source: Figure 1-4, page 8 of Kang & al., Feature- Oriented Domain Analysis (FODA): Feasibility Study, Technical Report CMU/SEI-90-TR-21, 1990 18
  • 19. B. FEATURE MODELLING LINGI2252 – PROF. KIM MENS
  • 20. DOMAIN MODELLING – FEATURE MODELLING FEATURE MODELLING Used in domain analysis and software product lines (SPL) to express the commonalities and variabilities of a family of systems in terms of the features they may offer 20
  • 21. DOMAIN MODELLING – FEATURE MODELLING FEATURE MODEL Consists of a hierarchy of features Example: 21 Car Transmission Manual
 transmission Automatic
 transmission Engine Pulls trailerCar body Electric Gasoline
  • 22. Car Transmission Manual
 transmission Automatic
 transmission Engine Pulls trailerCar body Electric Gasoline DOMAIN MODELLING – FEATURE MODELLING FEATURE MODEL Consists of a hierarchy of features Plus variability (mandatory, optional, alternatives) : Car Manual
 transmission Automatic
 transmission Engine Pulls trailerCar body Electric Gasoline 22 mandatory optional alternative or Transmission
  • 23. DOMAIN MODELLING – FEATURE MODELLING FEATURE TYPES Mandatory features = features that each system in the domain must have e.g., all cars must have a body, a transmission and an engine Optional features = features that a system may or may not have e.g., some cars have a hook to pull a trailer 23 Concept or feature Subfeature Concept or feature Subfeature
  • 24. DOMAIN MODELLING – FEATURE MODELLING FEATURE TYPES Alternative features = features of which the system can only have one at a time, represents an XOR between features e.g., every car must have either a manual or an automatic transition, but cannot have both at the same time OR features = features of which the system can have one or more at least one, but several are possible too e.g., a car can have an electric engine or run on gasoline; it can even have both if it’s a hybrid 24 Concept opt.
 feature opt.
 feature alternative Concept opt.
 feature opt.
 feature or
  • 25. DOMAIN MODELLING – FEATURE MODELLING TOOL SUPPORT Tool support : FeatureIDE an Eclipse plug-in for FOSD 25
  • 26. DOMAIN MODELLING – FEATURE MODELLING FEATURE DEPENDENCIES “requires” or “implies” when the inclusion of one feature depends on the inclusion of another (a mandatory feature is a special case of this, but implication relations could also exist between more distant features in the feature hierarchy) “mutual exclusion” when two features cannot co-exist (an XOR is a special case of this, but mutual exclusions could also exist between more distant features in the feature hierarchy) or more generic constraints defined in terms of Boolean operators 26
  • 27. DOMAIN MODELLING – FEATURE MODELLING TOOL SUPPORT FOR DEPENDENCIES FeatureIDE supports constraints: not, and, or, implies, iff, () FeatureIDE tool (supposedly) even checks for redundant constraints 27
  • 28. DOMAIN MODELLING – FEATURE MODELLING FEATURE MODEL : ANOTHER SIMPLE EXAMPLE Feature model of an e-shop software product line 28 For some reason FeatureIDE seems to flag the addition constraints as a “redundant” constraint.
  • 29. DOMAIN MODELLING – FEATURE MODELLING FEATURE MODEL parent feature, with an arc drawn through all of the options, as is the case in windowLayout. The arc signifies that one and only one of those features must be chosen. The remaining features with no special notation are all mandatory. The line drawn between a child feature and a parent feature indicates that a child feature requires its parent feature to be present; if the parent is not marked as valid, then the child feature for that system is in essence "unreachable." For example, if the windowLayout were selected to be overlappedLayout, then the feature tiledColumns would be "unreachable" for that specific system, since its parent tiledLayout would not be valid. interiortiled tiled Layout MoveOp abort Input move border Icon move Feedback interactive Feedback ghost Feedback opaque moveResizeFeedback erase AfterBefore erase Erasure move Move After exposepartially OffScreen Move Configuration windowzapEffect constrained Move windowLayout overlapped Layout tiled Columns Arbitrary Figure 7-6: Features for the Window Manager Move Operation To illustrate the use of the feature diagram Figure 7-7 shows a comparison of the move * * Source: Fig. 7-6, page 64 of Kang & al., Feature- Oriented Domain Analysis (FODA): Feasibility Study, Technical Report CMU/SEI-90-TR-21, 1990 29 A slightly more
 elaborate example
  • 30. systems straightforward. Certain types of information are more difficult to obtain from such a display, such as knowledge of invalid feature combinations or underlying issues and rationales. These types of information are discussed in the next two sections. windowLayout windowLayout interior interior ArbitraryColumns tiled Layout overlapped Move constrained zapEffect window Configuration OffScreen partially expose After Move move Erasure erase Before After erase moveResizeFeedback opaque Feedback ghost Feedback interactive Feedback move Icon border move Input abort MoveOp Layout tiled tiled Move X10/uwm tiled tiled Layout MoveOp abort Input move border Icon move Feedback interactive Feedback ghost Feedback opaque moveResizeFeedback erase AfterBefore erase Erasure move Move After exposepartially OffScreen Configuration windowzapEffect constrained Move overlapped Layout tiled Columns Arbitrary SunView Move Figure 7-7: Comparison of Move Operation Features in X10/uwm and SunView DOMAIN MODELLING – FEATURE MODELLING FEATURE MODEL * * Source: Fig. 7-7, page 65 of Kang & al., Feature- Oriented Domain Analysis (FODA): Feasibility Study, Technical Report CMU/SEI-90-TR-21, 1990 30
  • 31. DOMAIN MODELLING – FEATURE MODELLING FEATURE MODEL SEMANTICS The semantics of a feature model is its set of valid configurations A configuration is an instance of the feature model with a set of features selected A configuration is valid if it respects the semantics imposed by the dependencies and constraints, e.g. mandatory features must be selected; optional features may be selected; exactly one must be selected for x-or; etc. 31
  • 32. Car Transmission Manual
 transmission Automatic
 transmission Engine Pulls trailerCar body Electric Gasoline DOMAIN MODELLING – FEATURE MODELLING FEATURE MODEL CONFIGURATION In our car feature model, a configuration represents a particular car Here’s a valid configuration: Car Manual
 transmission Automatic
 transmission Engine Pulls trailerCar body Electric Gasoline 32 Transmission
  • 33. Car Transmission Manual
 transmission Automatic
 transmission Engine Pulls trailerCar body Electric Gasoline DOMAIN MODELLING – FEATURE MODELLING FEATURE MODEL CONFIGURATION Here’s an invalid configuration Why? Car Manual
 transmission Automatic
 transmission Engine Pulls trailerCar body Electric Gasoline 33 Transmission
  • 34. DOMAIN MODELLING – FEATURE MODELLING FEATURE MODEL SEMANTICS A feature model is inconsistent if it has no valid configurations Two feature models are equivalent if they have the same set of valid configurations A commonality is a feature that appears in all of the model’s valid configurations A variability is a feature that appears only in some of the configurations i.e., optional, alternatives or or-features 34
  • 36. DOMAIN MODELLING LEARNING OBJECTIVES ▸ software product line ▸ economy of scope ▸ domain analysis ▸ feature-oriented domain analysis ▸ link with software reuse ▸ feature ▸ commonality ▸ variability ▸ domain analysis process ▸ feature model ▸ feature types (mandatory, obligatory, ...) ▸ feature dependencies ▸ FeatureIDE tool ▸ feature model semantics
  • 37. DOMAIN MODELLING FURTHER READING Ruben Prieto-Diaz, Domain Analysis: An Introduction. ACM SIGSOFT Software Engineering Notes 15(2):47-54, April, 1990. Kang & al., Feature-Oriented Domain Analysis (FODA): Feasibility Study, Technical Report CMU/SEI-90-TR-21, 1990 Czarnecki & Eisenecker, Generative programming: Methods, Tools and Applications, Addison Wesley, 2000 Chapter 2: Domain Engineering; Chapter 4: Feature Modeling; and examples in Chapters 12, 13 & 14. 37
  • 38. DOMAIN MODELLING POSSIBLE QUESTIONS ▸ Define, in your own words, what a software product line is. ▸ Explain, in your own words, the difference between economies of scale and economies of scope, in the context of software product lines. ▸ Explain the main purpose of domain analysis. ▸ What is the goal of feature-oriented domain analysis? What is a feature? How does this relate to software product lines? ▸ Wat is the link between feature-oriented domain analysis and software reuse? ▸ Explain and discuss the different phases of the domain analysis process. ▸ Explain and illustrate the feature modelling notation (and different kinds of feature types and feature dependencies). ▸ What is a configuration of a feature model? When is a configuration said to be valid? Explain and illustrate on an example. When is a feature model said to be inconsistent? ▸ Explain, in your own words, the notions of commonality and variability in the context of feature modelling.