Integrating Independent Components with On-Demand Remodularization based on OOPSLA 2002 paper by Mira Mezini Klaus Ostermann Prepared by Karl Lieberherr.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

1 JAC : Aspect Oriented Programming in Java An article review by Yuval Nir and Limor Lahiani.
Presented by: Thabet Kacem Spring Outline Contributions Introduction Proposed Approach Related Work Reconception of ADLs XTEAM Tool Chain Discussion.
A metadata-driven approach to context-sensitive composition of collaborations Eddy Truyen, Wouter Joosen and Pierre Verbaeten Bo N. Jørgensen Maersk Institute.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
Introduction To System Analysis and Design
Architecture-driven Modeling and Analysis By David Garlan and Bradley Schmerl Presented by Charita Feldman.
Institute For Software Integrated Systems Vanderbilt University Applications of Model Integrated Computing to The Synchronous Language Signal Ethan Jackson.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
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
Introduction To System Analysis and design
Object Oriented Software Development
Chapter 10 Introduction to Components. Process Phases Discussed in This Chapter Requirements Analysis Design Implementation ArchitectureFramework Detailed.
Catalysis/Testing Catalysis Objects, components, and Frameworks with UML.
An Introduction to Software Architecture
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Introduction To System Analysis and Design
Expression evaluation E : S | C. S = int. C = Op E E. Op : A | M. A = “+”. M = “*”.
Model-Driven Analysis Frameworks for Embedded Systems George Edwards USC Center for Systems and Software Engineering
© DATAMAT S.p.A. – Giuseppe Avellino, Stefano Beco, Barbara Cantalupo, Andrea Cavallini A Semantic Workflow Authoring Tool for Programming Grids.
JCMP: Linking Architecture with Component Building Guoqing Xu, Zongyuan Yang and Haitao Huang Software Engineering Lab, East China Normal University SACT-01,
Slides for Gregor Kiczales Two versions –short version: Crosscutting capabilities for Java and AspectJ through DJ (4 viewgraphs only) –long version: Controlling.
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Design Rules for Increasing Modularity with CaesarJ Carlos Eduardo Pontual Advisor: Paulo Borba 17/06/2010.
Performance evaluation of component-based software systems Seminar of Component Engineering course Rofideh hadighi 7 Jan 2010.
SWE 316: Software Design and Architecture Objectives Lecture # 18 Introduction to Components SWE 316: Software Design and Architecture To learn:  benefits.
Catalysis/Testing Catalysis Objects, components, and Frameworks with UML.
2 2009/10 Object Oriented Technology 1 Topic 2: Introduction to Object-Oriented Approach Reference: u Ch.16 Current Trends in System Development (Satzinger:
AOP Foundations Doug Orleans Karl Lieberherr. What we did earlier AOP languages have the following main elements: –a join point model (JPM) wrt base PL.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
What is Object-Oriented?  Organization of software as a collection of discreet objects that incorporate both data structure and behavior.
Features of AOP languages AOP languages have the following main elements: –a join point model (JPM) wrt base PL –a specification language for expressing.
DEVS Based Modeling and Simulation of the CORBA POA F. Bernardi, E. de Gentili, Pr. J.F. Santucci {bernardi, gentili, University.
© Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 1 Model-Driven Development for Pluggable Collaborations Iris Groher, Stephan Bleicher, Christa.
Linzhang Wang Dept. of Computer Sci&Tech, Nanjing University The Strategy Pattern.
Demeter Aspects We study techniques for the emerging area of Aspect-Oriented Software Development and focus on the following areas:  Aspectual Collaborations.
Developing Adaptable Software Architectures for Real-Time Systems Using Design Patterns Lawrence Chung, Kendra Cooper, Anna Yi The University of Texas.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
DJ: traversal-visitor-style programming in Java Josh Marshall/ Doug Orleans Want to add more on traversal through collections and Aspectual Components.
1 2 Z C1 C2 C3 C4 C5 Collab-1 Collab-2Collab-3 Collab-4 OOAD Implementation C1 C2 C3 C4 C5 No language constructs that capture collaborations.
Lorenz: Visitor Beans: An Aspect-Oriented Pattern Aspect-oriented pattern: describes a solution to a tangling problem in a particular context.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
AOP/cross-cutting What is an aspect?. An aspect is a modular unit that cross-cuts other modular units. What means cross-cutting? Apply AOP to AOP. Tease.
R-customizers Goal: define relation between graph and its customizers, study domains of adaptive programs, merging of interface class graphs.
UBC software modularity group 1/14/02 UCSD1 Discussion with Kiczales at UBC Ontology of AOP Ontology is the study of what there is, an inventory of what.
AO Mechanisms in Demeter1 Discussion with Gregor Kiczales at UBC Ontology of AOP Ontology is the study of what there is, an inventory of what exists. An.
Talk only to your friends that share the same concerns (Law of Demeter for Concerns) Midterm Review February 2004.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Jesse proposal1 Jesse’s proposal Karl Lieberherr.
Features of AOP languages AOP languages have the following main elements: –a join point model (JPM) wrt base PL –a specification language for expressing.
Software Design Refinement Using Design Patterns
Crosscutting Capabilities for Java and AspectJ through DJ
Good for DJ over Java Extending traversals for collections (b..*)
Systems Analysis and Design With UML 2
Discussion with Gregor Kiczales at UBC
Demeter Aspects Who We Are Aspectual Collaborations
Designing Software for Ease of Extension and Contraction
UML dynamic Modeling (Behavior Diagram)
Model-Driven Analysis Frameworks for Embedded Systems
ADAPTIVE PROGRAMMING Sezen ERDEM December 2005.
Chapter 5 Designing the Architecture Shari L. Pfleeger Joanne M. Atlee
JAsCo an Aspect-Oriented approach tailored for
An Introduction to Software Architecture
Strategy Design Pattern
APPCs revisited 2/25/2019 APPCs revisited.
Adaptive Programming in JAsCo
Presentation transcript:

Integrating Independent Components with On-Demand Remodularization based on OOPSLA 2002 paper by Mira Mezini Klaus Ostermann Prepared by Karl Lieberherr

Important Characteristic of DRE Applications DRE applications need to consider composing aspects at several time epochs. The environments in which many DRE applications are fielded are dynamic and unpredictable. This makes it difficult to a priori (i.e., at design time) determine exactly the nature of the interaction between composed aspects.

Implication 1:dynamic activation Need to do things like: if (wantOnlineScheduling) { SchedulingGraph sg = wantScheduling1 ? new Scheduling1(courses): new Scheduling2(courses); … } class Scheduling1 = SuccessiveAugmentationColoring + SchedulingGraph; class Scheduling2 = SimulatedAnnealingColoring + SchedulingGraph;

Implication 2: on-demand remodularization A-posteriory integration of aspects into existing applications, without physically changing them. Need to apply aspect to a specific group of objects that is computed at run-time. Apply aspect at object level. Remodularization only used when functionality of aspect is used.

What is new? Program generic behavior in a hierarchy of participant graphs: nested collaboration interfaces making up a family of vitual types. –client-from-server (implement), server-from-client (bind) When binding is chosen, select one leaf of generic behavior (+ operator). Dynamic remodularization for binding: mapping roles to classes is not good enough. –Binding at object level –On-demand remodularization using wrapper recycling.

Example Graph algorithms for a generic graph structure –Graph coloring –Graph matching Reuse those algorithms in many different structures

University Example TeacherCourse Room StudentYearStudent teaches * requiredCourses * * * * Use two different names for the two directions: teaches/taught_by requiredCourses/required_by

Mappings to Graph Graph: Course Collision Vertex: Course Edge(v1,v2) : Teacher teaches both v1 and v2 or both v1 nad v2 required by same student year

Possible Mappings to Graphs GraphVertexEdge(v1,v2) Student ContactsStudentsv1 and v2 visit a common course Student knows TeacherStudents, TeachersStudent v1 visits a course by teacher v2 Teacher uses RoomTeachers, RoomsCourse with teacher v1 assigned to room v2

Side note: express re- modularizations adaptively Use a version of traversal strategies suitable for UML class diagrams with bidirectional associations. cg refers to class graph in the following. Use DJ programming style.

Student Contacts Students v1 and v2 visit a common course iff cg.collect(v1, t1) intersect cg.collect(v2, t1) is non-empty, where t1 = “only forward: from Student to Course”. All edges are only used in the forward direction.

Student knows Teacher Student v1 visits a course by teacher v2 iff cg.collect(v1,”only forward: from Student to Teacher”) contains v2.

Teacher uses Room Course with teacher v1 assigned to room v2 iff cg.collect(v1, “only forward: from Teacher to Room”) contains v2.

Course collision Courses conflicting with a course v1: union –cg.collect(v1,”from Course via Teacher to Course”) –cg.collect(v1,”from Course via StudentYear to Course”)

Graph Collaboration Interfaces interface Graph { expected Vertex[] vertices; interface Vertex { expected Edge[] edges(); } interface Edge { expected Vertex getV1(); expected Vertex getV2(); } This looks strange: it should say that a graph consists of an array of vertices.

Graph Collaboration Interfaces interface ColoredGraph extends Graph { provided compMinimumColoring(Vertex v[]); refine Vertex { expected void setColor(int c); expected int getColor(); } refine Edge { provided float getBadness(); } Should be Graph

Connector for scheduling graph class SchedulingGraph binds ColoredGraph { class CourseVertex binds Vertex { Course c; Edge[] cachedEdges; CourseVertex(Course c) {this.c = c;} Edge[] edges() { if (cachedEdges == null) { cachedEdges = // from Course via Teacher to x:Course // from Course via StudentYear to x:Course // add CourseCollision(c,x); return cachedEdges; } …

Connector for scheduling graph continued class SchedulingGraph binds ColoredGraph { // continued class CourseCollision binds Edge { Course c1, c2; CourseCollision(Course c1, Course c2){ this.c1 = c1; this.c2 = c2; } // wrapper recycling Vertex getV1() {return CourseVertex(c1);} Vertex getV2() {return CourseVertex(c2);} }

Demo Code class Scheduling1 = SuccessiveAugmentationColoring + SchedulingGraph; class Scheduling2 = SimulatedAnnealingColoring + SchedulingGraph; ColoredGraph colorg = wantScheduling1 ? new Scheduling1(): new Scheduling2(); computeScheduling(colorg, someCourses);

Looks familiar Similar kind of genericity achievable with DJ. In DJ can influence generic behavior through visitor selection and binding through dynamic class graph and traversal strategy selection. But not compile-time type safe: compatability of generic behavior with binding checked only at run-time.

Similar code in DJ (not as compile-time type-safe) ClassGraph cg = wantCg1 ? new ClassGraph(…):new ClassGraph(…); String st = wantSt1 ? new String(…):new String(…); Visitor vis = wantVis1 ? new Visitor(…):new Visitor(…); compute(cg,st,vis,someInput); // cg.traverse(someInput,st,vis); // vary generic algorithm through vis // vary binding through cg and st

What is gained? Traditional: To reuse a generic algorithm, translate from a low-level data structure to the higher-level data structure of the generic algorithm and run the algorithm there and map the result back to the low-level data structure. Translation is done by binding. Proposed solution: why is it better?

What is gained? Can organize generic computations hierarchically and combine with different bindings. Translation is done on-demand.

Connector for contact graph class StudentContactGraph binds Graph { class StudentVertex binds Vertex { Student s; StudentVertex(Student s) {this.s = s;} Edge[] edges() { // from Student to Course (forward) // from Course to Student (forward) } class StudentContact binds Edge { }

Binding a collaboration interface to a concrete application Requires on-demand remodularization of the application. Remodularization: specify how the model structure of the base application should be transformed to match the model structure expected of the collaboration interface.

Remodularization Virtual: base model structure is never changed. Defines a virtual view on top of the physical structure. The remodularization for binding a collaboration interface C is effective only on the demand of executing functionality in C.

Architecture for collaboration interfaces Collaboration Interface Collaboration1Collaboration2 Remodularization1 Remodularization2 Base Application binds

Free combination of collaborations and connectors Class A = Coloring1 + StudentContactsColoring; Class B = Coloring2 + StudentContactsColoring; Class C = Matching1 + StudentContactsMatching; Class D = Matching2 + StudentContactsMatching;

Fluid Aspect-Oriented Programming Gregor: Fluid AOP involves the ability to temporarily shift a program (or other software model) to a different structure to do some piece of work with it, and then shift it back. Mira: on-demand remodularization a good starting point for fluid AOP. Karl: Adaptive Programming is an instance of fluid AOP: different structure = minimum structure needed for algorithm.

Fluid Aspect-Oriented Programming Karl: An adaptive program written in DJ is by definition fluid. By providing class graphs and strategies we transform that program into a different context where it will execute. Then we can change the context at run-time and run the program again.

Fluid AOP Callback methods describe events (joinpoints) that should lead to the execution of the method. Similar to Doug Orleans’ branches. There is an additional apply clause expressible by a cflow.

Conclusions We should investigate the dynamic properties of Mira’s approach to dynamic deployment and combinations of aspects in DRE systems. Need to generalize from ACs without aspectual methods to ACs with aspectual methods.

Conclusions How can we simulate those components with units? In this paper interfaces are hierarchical. In units they are flat.