Using Design Patterns and Constraints toAutomate the Detection and Correction of Inter-class Design Defects Yann-Gaël Guéhéneuc (email@example.com) Hervé Albin-Amiot (firstname.lastname@example.org) École des Mines de Nantes, France Object Technology Soft-Maint S.A., France International Inc., Canada
Design patterns Constraints Inter-class design defects The Ptidej tool To assess / to increase software2/25 flexibility and understandability
Summary n An overview of software quality n A classification of design defects n On inter-class design defects n Design pattern modeling n Design defects detection n Design defects correction n Case studies n Conclusion and future work3/25
An overview of software quality n Viewpoints – ISO/IEC 9126 • Functionality, reliability, usability, efficiency, maintainability, portability – ISO/IEC 14598 – Coupling, cohesion, method replacement… n Maintenance = 75% n Design defects4/25
A classification of design defects n Intra-class / Inter-class / Behavioral Number: 39/61 (64%) Detection–correction: 25% Number: 13/61 (21%)5/25 Detection–correction: 8%
On inter-class design defects 1/2 n Design patterns – [Gamma et al. 1994] • Quality architectural solutions • Language independent – General Smalltalk- or C++-level • Domain independent • Flexibility, understandability – Other authors6/25
On inter-class design defects 2/2 n Wanted software quality characteristics – Flexibility – Understandability n Hypotheses – Groups of entities similar to a design pattern = Inter-class design defects – Making these groups of entities closer to a design pattern = Improving architectural7/25 quality (flexibility and understandability)
Design pattern modeling 1/3 n Meta-model – Describe the entities and elements in design pattern abstract models n Abstract model – Describe a design pattern in term of roles n Concrete model – Link an abstract model to real code8/25
ic A Bas xample : Composite 3/3 E Informal descriptions from [Gamma et al.] Instance of class Pattern Translates into Instance of class PInterface Instance of class PClass Instance of class PAssoc Instance of class PDelegation name() Instance of class PMethod Pattern, PInterface, PClass, PAssoc,10/25 PDelegation, and PMethod are classes defined in our meta-model
Design pattern detection 1/4 n Design pattern abstract model – Detection rules, i.e., constraints • Roles as variables • Relationships as constraints among variables n CSP – Source code for domain – Abstract model for variables, constraints11/25
ic A Bas xample : Composite 2/4 E Source code 1 Composite pattern abstract model Source code n CSP CSP Distorted concrete models12/25 Composite pattern concrete model 1 Composite pattern concrete model n
Design pattern detection 3/4 n Distorted concrete models – The design pattern – Not quite • Some constraints are not verified n Back to our hypotheses – Groups of entities similar to a design pattern13/25
Design pattern detection 4/4 n Explanation-based Constraint Programming [Jussien] – Set of constraints justifying an action performed by the PaLM solver • Value removal • Contradiction – Strong interactivity with the user through dynamic removal / addition of constraints14/25
Conclusion and future work n Design patterns + Constraints + Inter-class design defects – To assess / to increase software flexibility and understandability n Semantics, scalability, software quality characteristics, automation, interaction, weights, noise, hybrid24/25
Thank you for your attention Questions? Comments? École des Mines de Nantes Yann-Gaël Guéhéneuc (email@example.com) Object Technology International Inc.25/25 Hervé Albin-Amiot (firstname.lastname@example.org) Soft-Maint S.A.
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.