1 Towards an Automated Approach for Quality Improvement in OO Design Dr. Radu Marinescu Timişoara,...
-
Upload
christal-mccarthy -
Category
Documents
-
view
215 -
download
0
Transcript of 1 Towards an Automated Approach for Quality Improvement in OO Design Dr. Radu Marinescu Timişoara,...
Timişoara, 12.02.2003 1
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Towards an Automatic Approach for Quality
Improvement in Object-Oriented Design
Dr. Radu Marinescu
Timişoara, 12.02.2003 2
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Problem Statement
Numerous large-scale OO systems with signs of "rotting design" monolithic, inflexible, fragile, etc.
Discarding these systems is not an option ! high business value and large scale reuse and maintenance necessary
Design Flaws – an invariant issue in software time pressure during development permanent change of requirements
How to correlate external signs of poor quality andthe occurrence of concrete structural design flaws?
Timişoara, 12.02.2003 3
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Research Goal
Develop methods, techniques and tools that provide
a proper mapping between external quality attributes and the internal, structural characteristics of
object-oriented design.
Central focus is to support the process of quality assessment and improvement
for existing object-oriented systems
Timişoara, 12.02.2003 4
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Design Flaws ...
Exclusive Focus on Structural Flaws Design Fragments
i.e. methods, classes, modules (subsystems)
Need criteria for high-quality design design rules, principles and heuristics etc. also negative rules (e.g. "bad-smells")
… are structural characteristics of design
fragments
that express deviations from a given set
of criteria
typifying a high-quality design.
Timişoara, 12.02.2003 5
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Detection of Design Problems
Problem DetectionThe process of identifying the parts of a software system affected by a particular design flaw
It‘s not easy! manual and empirical
time-expensive and non-scalable
hard to quantify design rules and principles....
"Measuring" the Designmap source-code entities to numerical values
used as quality indicators
Idea: Use metrics to detect design problems!
Timişoara, 12.02.2003 6
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Problems with Software Measurement
Definitions of MetricsMapping attributes of a software product to numeric values [Fent97]
Imprecise, confusing, or conflicting definitions
Interpretation ModelsInterpretation level is too fine-grained to lead to design decisions
metrics values are like symptomsindicate an abnormality, but can’t indicate the causereduces the relevance of measurement results
There is a large gap between what we do measure and what we should measure!
Define mechanism for higher-level interpretation of metrics!
Timişoara, 12.02.2003 7
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
The measurable expression of a rule, by which
design fragments that are conformant to the rule
can be identified in the source-code
Detection Strategy
Generic mean for defining metrics-based design rules use metrics together! Based on mechanisms of filtering and composition
Timişoara, 12.02.2003 8
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Metricsmeasure internal characteristics
entity value pairs
Composition Operatorsarticulate the composition of a detection rule
i.e. compose metrics in a rule
Three operators used: and , or , butnotin
Filtering Mechanism
statistical functions that return a subset of a data-set
Semantical Filters (e.g. HigherThan or BottomValues)
Statistical Filters (e.g. BoxPlots)
Anatomy of a Detection Strategy
Timişoara, 12.02.2003 9
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Quantified Design Flaws
Around 20 design flaws quantified as DS
Different abstraction levels method to omission of
patterns
Different literature sources
Relevant design flaws
Timişoara, 12.02.2003 10
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Sources(Java, C++) Meta-Model
parsing
usingMetrics
Detection Strategy (*.sod)
Definitions ofStatistical
Outliers
1 .. n
1 .. m
executing with PRODEOOS
List of Candidates
manual inspection
Process of Design Inspection
Timişoara, 12.02.2003 11
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
The Unified Meta-Model
Design information needed in the DS i.e used by the metrics
Declarations classes, variables and methods
Inheritance relations Cross-referencing information
Variable accesses Method invocations
Contains information about packages for C++ the directory structure neccessary for the strategies at the
subsystem level
For Java and C++ TableGen and MeMoJ-Tables
Timişoara, 12.02.2003 12
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
What did we gain so far …
Detection Strategy proper mechanism for higher-level interpretation of measurements
Methodology for quantifying design-related rules
Quantified violations of design principles, rules and heuristics around 20 strategies for design flaws
from several literature sources
different abstraction levels from method to subsystem level
Build bridge between quality attributes and design problems Prove that the approach is scalable and accurate
… and what is left?
Timişoara, 12.02.2003 13
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Design principles and rules are implicit Hard to construct
A Classical Quality Model
Metrics are too fine-grained Hard to interpret
Timişoara, 12.02.2003 14
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Factor-Strategy Quality Model
Lack ofBridge
Data Classes
God Classes
Int.Seg Principle
WMC
TCC
CIW
NOAM
AUF
NOPA
COC
AOFD
NOD
LR
Principles, rules, heuristicsquantified in Detection Strategies
Qualitydecomposed in Factors
communicates with
Timişoara, 12.02.2003 15
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
The Case-Study
A Re-engineered Case-Study two versions of the an industrial business application second version re-engineered for maintainability purposes
Relevance of the Case-Study Size (~100KLOC) proper to evaluate scalability of approach Before-After reengineering scenario evaluate accuracy of DS Clear reengineering goal evaluate relevance of FS models
Size Characteristics
Timişoara, 12.02.2003 16
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Automatic Evaluation Method
Assumption 1 All major design problems in SV1 were eliminated during the
reengineering process not present in SV2
Assumption 2 Maintainability level in SV2 is higher (better) than in SV1
Timişoara, 12.02.2003 17
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Automatic Evaluation of Strategies — Results
Accuracy Rate: between 50% and 81% Average Accuracy Rate: 64.5 % Average Number of Suspects: ~ 15% of entities reported suspect
Timişoara, 12.02.2003 18
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Evaluation of FS Quality Model
Defined a Factor-Strategy quality model for maintainability
Evaluation mechanisms Score = nr. of suspects Qualifier = “grade”
1-10 scale based on Score
Compared results between the two versions based on Assumption 2
expected improvement in SV2
Timişoara, 12.02.2003 19
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Why is the FS Model Better ?
See the problems not the numbers! problems expressed in terms of design rules that are violated interpretation is much easier
Easier to improve the quality of the design understand the causes of problems easier to correlate with “correction strategies”
Timişoara, 12.02.2003 20
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Summary A mechanism for quantifying design-related rules
the “Detection Strategy” concept
Suite of detection strategies for finding design flaws quantification of well-known design flaws and…”smells”
Described a novel concept of quality model based on detection strategies the bridge between qualitative and quantitative statements
Strong tool support for the entire approach high degree of automatization and scalability
Concrete evaluation of the concepts, methods, techniques
Timişoara, 12.02.2003 21
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Refinement The issue of threshold values [Diploma Thesis in progress]
define a tuning-machine
Unify means of expression [Master Thesis in progress] SAIL language
Applicability Bridge the gap between automated problem detection and
problem correction [PhD in progress] Integrate techniques in the development process
Migration Adapt the approach to emerging technologies (e.g. EJB) …and programming paradigms (e.g. AOP)
Refinement
Applicability
Migration
Perspectives
Timişoara, 12.02.2003 22
Towards an Automated Approach for Quality Improvement in OO Design
Dr. Radu Marinescu
Thank you!