Yann-Gaël Guéhéneuc
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 3.0 Unported License
Some Theory and Practice on Patterns – Introduction
NII, Tokyo, Japan 12/02/14
Some Theory and Practice on Patterns Introduction Yann-Gal Guhneuc - - PowerPoint PPT Presentation
Some Theory and Practice on Patterns Introduction Yann-Gal Guhneuc NII, Tokyo, Japan 12/02/14 This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 3.0 Unported License 2/155 Typical software
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 3.0 Unported License
NII, Tokyo, Japan 12/02/14
2/155
3/155
4/155
5/155
6/155
7/155
8/155
http://www.di.unito.it/~damiani/ariane5rep.html
9/155
10/155
11/155
http://calleam.com/WTPF/?p=4914
12/155
Quality Maintainability
Impact of Quality Models Challenges with Multi-language Systems
13/155
14/155
Division of software quality according to
http://www.sqa.net/iso9126.html
15/155
Division of software quality according to
16/155
Dimensions of product quality
17/155
Dimensions of product quality
18/155
Definitions of internal quality characteristics
19/155
Definitions of internal quality characteristics
20/155
21/155
Maintainability Quality Models Models Good Practices Definition Metrics Detection Occurrences Social Studies Characteristics Developers Studies Behaviour Factors Measures
22/155
Maintainability Quality Models Models Good Practices Definition Metrics Detection Occurrences Social Studies Characteristics Developers Studies Behaviour Factors Measures
23/155
(With minor adaptations)
Florian Deissenboeck, Elmar Juergens, Klaus Lochmann, and Stefan Wagner ; Software Quality Models: Purposes, Usage Scenarios and Requirements ; International Workshop on Software Quality, 24th International Symposium on Computer and Information Sciences, IEEE, 2009
24/155
Division of quality models according to
25/155
Division of quality models according to
26/155
Basis for quality models
27/155
Metrics have been well researched
28/155
Typical kinds of metrics
Lionel C. Briand, John W. Daly, and Jürgen Wüst ; A Unified Framework for Cohesion Measurement in Object-OrientedSystems ; Journal of Empirical Software Engineering, 3(1), Springer, 1998 Lionel C. Briand, John W. Daly, and Jürgen Wüst ; A Unified Framework for Coupling Measurement in Object-Oriented Systems ; Transactions on Software Engineering, 25(1), IEEE Press, 1999
29/155
Typical metrics
Typically computed automatically on source
30/155
Trend in computing metrics
Dozens of tools
31/155
32/155
33/155
34/155
35/155
36/155
37/155
http://hardsci.wordpress.com/2013/09/17/the-hotness-iq-tradeoff-in-academia/
38/155
Different input metrics, output characteristics
39/155
Different input metrics, output characteristics
40/155
Menzies et al.’s models
Tim Menzies, Member, IEEE, Jeremy Greenwald, and Art Frank ; Data Mining Static Code Attributes to Learn Defect Predictors ; Transactions on Software Engineering, 33(1), IEEE, 2007
41/155
Menzies et al.’s models
variations and combinations)
(No source code)
http://nasa-softwaredefectdatasets.wikispaces.com/
42/155
Menzies et al.’s models
43/155
Different input metrics, output characteristics
44/155
Different input metrics, output characteristics
45/155
Different input metrics, output characteristics
46/155
Bansiya and Davis’ QMOOD
reusability, and understandability
classes, objects, and their relationships
Jagdish Bansiya , Carl G. Davis ; A Hierarchical Model for Object-oriented Design Quality Assessment ; Transactions on Software Engineering, 28(1), IEEE, 2002
47/155
Bansiya and Davis’ QMOOD
(Source code)
48/155
Bansiya and Davis’ QMOOD
49/155
Conclusions
Limits
50/155
Limits
Overcome by using more, diverse,
51/155
Feedback
52/155
Maintainability Quality Models Models Good Practices Definition Metrics Detection Occurrences Social Studies Characteristics Developers Studies Behaviour Factors Measures
53/155
54/155
55/155
56/155
Maintainers can follow good practices
57/155
Maintainers can follow good practices
58/155
(With minor adaptations)
59/155
Design patterns
Design antipatterns
60/155
61/155
(With minor adaptations)
62/155
Pattern solution = Motif which
63/155
Pattern solution = Motif which
64/155
Pattern solution = Motif which
65/155
To compose objects in a tree-like structure to describe whole–part hierarchies
Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure Component66/155
To compose objects in a tree-like structure to describe whole–part hierarchies
Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure Component67/155
To compose objects in a tree-like structure to describe whole–part hierarchies
Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure Component68/155
To compose objects in a tree-like structure to describe whole–part hierarchies
Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure Component69/155
Conclusions
70/155
Important assumptions
71/155
Problem
Poor solution
Alternative solution
72/155
Negatively impact
73/155
Conclusions
74/155
Limits
How to use their occurrences in a model?
75/155
Maintainability Quality Models Models Good Practices Definition Metrics Detection Occurrences Social Studies Characteristics Developers Studies Behaviour Factors Measures
76/155
Developers’ characteristics
77/155
78/155
79/155
80/155
Need for social studies, typically in the form
81/155
For example, impact on identifiers on
82/155
For example, impact on identifiers on
Zohreh Sharafi, Zéphyrin Soh, Yann-Gaël Guéhéneuc, and Giuliano Antoniol ; Women & Men: Different but Equal – A Study on the Impact of Identifiers on Source Code Underestanding ; Proceeding of 20th International Conference on Program Comprehension, IEEE, 2012
83/155
Independent variables
Dependent variables
84/155
Subjects Conclusions
Subjects’ Demography (24 Subjects)
Academic background Gender
Ph.D. M.Sc. B.Sc. Male Female
11 10 3 15 9
Accuracy Time Effort
85/155
Importance Limits
86/155
Maintainability Quality Models Models Good Practices Definition Metrics Detection Occurrences Social Studies Characteristics Developers Studies Behaviour Factors Measures
87/155
Developers’ thought processes
88/155
Studying developers’
– Yarbus’ eye-movements and vision studies – Just and Carpenter’s eye–mind hypothesis – Palmer’s vision science – …
89/155
Picking into developers’ thought processes
90/155
Picking into developers’ thought processes
91/155
Picking into developers’ thought processes
92/155
Developers’ thought processes
93/155
Developers’ thought processes
Gerardo Cepeda Porras and Yann-Gaël Guéhéneuc ; An empirical study on the efficiency of different design pattern representations in UML class diagrams ; Journal of Empirical Software Engineering, 15(5), Springer, 2010
94/155
Developers’ use of design pattern notations
95/155
Independent variables
Dependent variables
96/155
Subjects
Conclusions
97/155
Importance
Limits
98/155
Usefulness of the feedback? Usefulness of the models?
99/155
Trend to use more, diverse, unrelated
100/155
Trend to use more, diverse, unrelated
101/155
102/155
103/155
Aristotle
384 BC–Mar 7, 322 BC
104/155
Aristotle
384 BC–Mar 7, 322 BC
Galileo Galilei
Feb 15, 1564–Jan 8, 1642
105/155
Aristotle
384 BC–Mar 7, 322 BC
Galileo Galilei
Feb 15, 1564–Jan 8, 1642
Isaac Newton
Dec 25, 1642–Mar 20, 1727
106/155
Aristotle
384 BC–Mar 7, 322 BC
Galileo Galilei
Feb 15, 1564–Jan 8, 1642
Isaac Newton
Dec 25, 1642–Mar 20, 1727
Max Tegmark
May 5, 1967–
107/155
Aristotle
384 BC–Mar 7, 322 BC
Galileo Galilei
Feb 15, 1564–Jan 8, 1642
Isaac Newton
Dec 25, 1642–Mar 20, 1727
Max Tegmark
May 5, 1967–
108/155
DSIV
Houari Sahraoui, Lionel C. Briand, Yann-Gaël Guéhéneuc , and Olivier Beaurepaire ; Investigating the impact of a measurement program on software quality ; Journal of Information and Software Technology, 52(9), Elsevier, 2010
109/155
MQL
110/155
MQL
111/155
Independent variables
Dependent variables
112/155
Subjects
113/155
114/155
115/155
116/155
117/155
Conclusions
Limits
118/155
119/155
120/155
121/155
122/155
123/155
124/155
125/155
126/155
127/155
128/155
129/155
130/155
Today’s systems are multi-languages
131/155
New problems
132/155
For example, control- and data-flows
native methods in Java are used by Java
Gang Tan and Jason Croft ; An empirical security study of the native code in the JDK ; Proceedings of the 17th Security Symposium, USENIX Association, 2008
133/155
Control-flow interactions
Data-flow interactions
134/155
Different computational models
135/155
Different computational models
static void *xmalloc(JNIEnv *env, size_t size) { void *p = malloc(size); if (p == NULL) JNU_ThrowOutOfMemoryError(env, NULL); return p; } #define NEW(type, n) ((type *) xmalloc(env, (n) * sizeof(type))) static const char *const *splitPath(JNIEnv *env, const char *path) { ... pathv = NEW(char *, count+1); pathv[count] = NULL; ... }
136/155
Different computational models
static void *xmalloc(JNIEnv *env, size_t size) { void *p = malloc(size); if (p == NULL) JNU_ThrowOutOfMemoryError(env, NULL); return p; } #define NEW(type, n) ((type *) xmalloc(env, (n) * sizeof(type))) static const char *const *splitPath(JNIEnv *env, const char *path) { ... pathv = NEW(char *, count+1); pathv[count] = NULL; ... }
137/155
138/155
139/155
140/155
Maintainability
141/155
Not only for quality assurance!
142/155
Not only for quality assurance!
Build systems descriptions
143/155
Not only for quality assurance!
Build systems descriptions Legal issues due to interrelations
144/155
Not only for quality assurance!
Clone definition and detection Build systems descriptions Legal issues due to interrelations
145/155
Not only for quality assurance!
Clone definition and detection Build systems descriptions Legal issues due to interrelations Impact on studies
146/155
147/155
148/155
149/155
150/155
151/155
152/155
153/155
154/155
155/155
Multi-language system quality characteristics