A Declarative Evolution Framework for Object-Oriented Design Patterns

Slides:



Advertisements
Similar presentations
1 A Graph Rewriting Formalism for Object-Oriented Software Evolution Tom Mens FWO Postdoctoral Fellow Programming Technology Lab Vrije.
Advertisements

A Declarative Meta-Programming Approach to Framework Documentation Tom Tourwé & Tom Mens Programming Technology Lab Vrije.
1 Reuse Contracts Patrick Steyaert Programming Technology Lab Vrije Universiteit Brussel WWW:
SERL - Software Engineering Research Labslide1 Frameworks and Hooks by Garry Froehlich Paul Sorenson SERL (Software Engineering Research Lab)
Basic Concepts in Component-Based Software Engineering
Architecture Eclipse Framework with Plugin Concept JTransformer Plugin Analysis + Transformation interface: logical Program.language keeps representation.
PROMPT: Algorithm and Tool for Automated Ontology Merging and Alignment Natalya Fridman Noy and Mark A. Musen.
Collaboration Diagrams. Example Building Collaboration Diagrams.
PROMPT: Algorithm and Tool for Automated Ontology Merging and Alignment Natalya F. Noy and Mark A. Musen.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Design Patterns.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
ECE 355 Design Patterns Tutorial Part 2 (based on slides by Ali Razavi) Presented by Igor Ivković
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
The chapter will address the following questions:
Deriving AO Software Architectures using the AO-ADL Tool Suite Luis Fernández, Lidia Fuentes, Mónica Pinto, Juan A. Valenzuela Universidad de Málaga
Enterprise Systems & Architectures. Enterprise systems are mainly composed of information systems. Business process management mainly deals with information.
A Survey of Software Refactoring Tom Mens, Tom Tourwé
Benefits of Using AllFusion ERwin and Advantage Gen in the Same Project Lifecycle Steve Smith Jumar Solutions 28 th March 2007.
Design Patterns.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
Faculty of Informatics and Information Technologies Slovak University of Technology Peter Kajsa and Ľubomír Majtás Design.
Object-oriented Software Engineering with Reuse Contracts Koen De Hondt, Carine Lucas, Kim Mens, Tom Mens, Patrick Steyaert, Roel Wuyts Programming Technology.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
An Introduction to Software Architecture
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
POSL (Principles of Software Languages) Gr. Kyushu Institute of Technology, Japan Pointcut-based Architectural Interface.
Lecture 7: Requirements Engineering
Automating the Development of Pattern-Oriented Designs Copyright, 1996 © Dale Carnegie & Associates, Inc. Sherif Yacoub, Hengyi Xue, and Hany Ammar {yacoub,
Capturing and Reusing Functional and Non-functional Requirements Knowledge: A Goal-Object Pattern Approach Lawrence Chung and Sam Supakkul The University.
An approach for Framework Construction and Instantiation Using Pattern Languages Rosana Teresinha Vaccare Braga Paulo Cesar Masiero ICMC-USP: Institute.
A Formal Model for Object-Oriented Software Reuse Kim Mens Programming Technology Lab Vrije Universiteit Brussel FNRS MeetingMay 6th, 1997.
Katholieke Universiteit Leuven112 April 2000 Research Topics in Software Evolution Dr. Tom Mens FWO Postdoctoral Fellow Programming Technology Lab Vrije.
Reuse Contracts A Historic Overview Dr. Tom Mens Programming Technology Lab Vrije Universiteit Brussel Course OOSE.RC EMOOSE
October 19, 1998Doctoral Symposium OOPSLA’98 Kim Mens Intentional annotations for evolving object-oriented software Kim Mens Programming Technology Lab.
2000 Research Overview Dr. Kim Mens Programming Technology Lab Vrije Universiteit Brussel.
Documenting Evolving Software Systems through Reuse Contracts Kim Mens Patrick SteyaertCarine Lucas Programming Technology Lab, Vrije Universiteit Brussel.
Design Pattern Support based on principles of model driven development Zihao Zhao.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
1 The XMSF Profile Overlay to the FEDEP Dr. Katherine L. Morse, SAIC Mr. Robert Lutz, JHU APL
Design Patterns: MORE Examples
Generic Feature-Based Composition
Business System Development
Chapter 2 Database System Concepts and Architecture
Information systems modeling tools
Introduction to Design Patterns
Observer Design Pattern
CMPE 135: Object-Oriented Analysis and Design October 24 Class Meeting
SysML 2.0 Model Lifecycle Management (MLM) Working Group
Design Patterns with C# (and Food!)
Transformational Software Evolution by Assertions
Presented by Igor Ivković
Web Programming Language
Introduction to Design Patterns Part 1
Patterns.
Evaluating Compuware OptimalJ as an MDA tool
Software Architecture
ece 627 intelligent web: ontology and beyond
Intentional source-code views
An Introduction to Software Architecture
CMPE 135 Object-Oriented Analysis and Design March 21 Class Meeting
Advanced ProgramMING Practices
Reuse Contracts: Managing the Evolution of Reusable Assets
Requirements Document
Advanced ProgramMING Practices
Dept. of Computation, UMIST
Presented by Igor Ivković
Information systems modeling tools
ONAP Architecture Principle Review
Software Architecture & Design
Presentation transcript:

A Declarative Evolution Framework for Object-Oriented Design Patterns Tom Mens Tom Tourwé {tom.mens | tom.tourwe}@vub.ac.be Programming Technology Lab Vrije Universiteit Brussel

Overview Introduction to design patterns Specification of design patterns and their instances Evolution of design pattern instances Evolution conflicts Tool support Conclusion Future work

Design patterns Offer successful and proven solutions for a design problem that occurs over and over again Improve understandability, maintainability, extensibility, reusability, etc. Are used in most object-oriented frameworks Gain increasing popularity Impose specific structure on implementation Define hot spots of an object-oriented framework Dictate relationships and collaborations between a set of classes/methods

Example: Observer instance in MVC update View PluggableListViewByItem PluggableListViewOfMany changed Model dependents

Pattern specification and constraint definition Use declarative meta programming patternInstance(MVC, ObserverDP). role(MVC, observer, [View]). role(MVC, concreteObserver, [PluggableListViewByItem]). role(MVC, concreteObserver, [PluggableListViewOfMany). role(MVC, subject, [Model]). role(MVC, updateMethod, [#update]). role(MVC, changeMethod, [#changed]) patternConstraint(?instance, ObserverDP) if role(?instance, subject, ?subject), role(?instance, changeMethod, ?changeselector), role(?instance, updateMethod,?updateselector), concreteMethod(?subject, ?changeselector), calls(?subject,?changeselector,?updateselector) declarative specification of the design pattern instance declarative constraint imposed by the design pattern on every instance

Automated transformations Refactorings High-level structural transformations that can be applied to a framework in a behavior-preserving way E.g., extractSuperclass, addParameter Design Pattern Refactorings Refactorings specific for a particular design pattern Are composed of a number of ordinary refactorings Applied to design pattern instances Make sure the constraints imposed by the pattern are adhered to E.g., addConcreteObserver, addUpdateMethod All refactorings are specified declaratively

Example evolutions role(MVC, changeMethod, [#changed:]). View Model update changed PluggableListViewByItem PluggableListViewOfMany update PluggableList extractSuperclass refactoring update: aSymbol addChangeMethod design pattern refactoring role(MVC, changeMethod, [#changed:]). role(MVC, updateMethod, [#update:]). changed: update PluggableListViewByItem PluggableListViewOfMany

Evolution conflicts Changes to the software Applied manually insufficient knowledge of design patterns (instances) can lead to violation of constraints Via automated (design pattern) refactorings problems when changes by different developers must be merged Structural merge conflicts Behavioural merge conflicts All conflicts can be detected using a declarative approach

Structural merge conflict View Model update changed changed: update and update: are implemented differently! update: aSymbol PluggableList update PluggableListViewOfMany PluggableListViewByItem update: aSymbol update: aSymbol

Constraint violations View Model update changed changed: update: aSymbol update QSOULPluggableListView Problems with QSOULPluggableListView (1) it does not implement update: (2) it is no subclass of PluggableList PluggableList update update: aSymbol PluggableListViewOfMany PluggableListViewByItem

Declarative conflict detection Explicitly log all refactorings applied and the software entities they work on Compare them one by one Different changes to one and the same software entity may lead to a conflict extractSuperclass View PluggableListView PLVByItem PLVOfMany update addChangeMethod View PLVByItem PLVOfMany update: changed: same hierarchy same role

Tool Support Specification facilities Browsing facilities User-friendly interface on top of declarative medium Browsing facilities All software entities (classes/methods/…) that participate in a given DP instance All DP instances in which a given software entity (class/method/…) participates Support for evolution and merging Offer list of refactorings that can be applied Provide warnings for possible conflicts Suggest solutions where possible

Tool Support

Conclusion Automated support for software evolution Through disciplined evolution of design pattern instances used in the framework Via explicit declarative specification and automated transformation of those instances Detection of evolution conflicts Structural & behavioural conflicts; constraint violation Using explicit high-level knowledge of the design and its evolution

Future Work Extensive validation on industrial cases Tool support & integration in existing IDEs Scalability of the approach Allow for different design pattern variants Many design patterns exist & new ones are constantly discovered Metapatterns as an abstraction of design patterns Formal basis for conflict detection Define conditions under which particular conflicts occur Requires formalisation of metapatterns