Contemporary Modularisation Mechanisms: A Multi-Dimensional Quality Analysis

20
OPUS Group LES | DI |PUC-Rio - Brazil http://www.les.inf.puc-rio.br/opus Francisco Dantas | [email protected] Alessandro Gurgel | [email protected] Alessandro Garcia | [email protected] Contemporary Modularisation Mechanisms: A Multi- Dimensional Quality Analysis

description

Contemporary Modularisation Mechanisms: A Multi-Dimensional Quality Analysis. Francisco Dantas | [email protected] Alessandro Gurgel | [email protected] Alessandro Garcia | [email protected]. The Original Project Proposal - 2008. - PowerPoint PPT Presentation

Transcript of Contemporary Modularisation Mechanisms: A Multi-Dimensional Quality Analysis

Page 1: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

OPUS Group

LES | DI |PUC-Rio - Brazil

http://www.les.inf.puc-rio.br/opus

Francisco Dantas | [email protected] Gurgel | [email protected] Garcia | [email protected]

Contemporary Modularisation Mechanisms: A Multi-Dimensional Quality Analysis

Page 2: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

The Original Project Proposal - 2008

Assessment of individual “advanced” (post-OO) modularity mechanisms

Pointcut-advice (e.g., pointcut designators and types of advice) Intertypes, mixin composition, etc…

Assessment focus: stability vs. error-proneness Progress – 2008 – 2009: without explicit funding

Partially done for AspectJ mechanisms only Findings, examples:

Programmers do not introduce more bugs when using pointcut-advice [ICSE 2010] Programmers introduce more bugs in code when using after advice [ICSE 2010] AspectJ-based code face ripple effects when the number of interacting aspects

increase [ICSE 2008] (more than a Java+CC implementation)Apr 22, 2023 2

Page 3: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

The Original Project Proposal - 2008

Assessment of individual “advanced” (post-OO) modularity mechanisms

Pointcut-advice (e.g., pointcut designators and types of advice) Intertypes, mixin composition, etc…

Tradeoff: stability vs. error-proneness Progress – 2008 – 2009: without explicit funding

Partially done for AspectJ mechanisms only Findings, examples:

Programmers introduce more bugs in code when using after advice [ICSE 2010] Programmers do not introduce more bugs when using pointcut-advice [ICSE 2010] AspectJ-based code face severe ripple effects when the number of interacting

aspects increase [ICSE 2008]Apr 22, 2023 3

Page 4: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Need for Changing some Project Directions

No longer work on assessment of error-proneness due to the following problems

achieving high test coverage (>80%) in medium-sized systems is very time-consuming

faced problems in using testing tools with AspectJ e.g. these tools need to inject instrumentation code in the

application being tested expectation for statistically-relevant results is higher

Replaced error-proneness with reuse easier to measure than error-proneness the reasons are…

Apr 22, 2023 4

Page 5: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Why stability vs. reuse?

Sources of inspiration for this “tradeoff” analysis most AOP studies focus on one quality attribute ideally, software maintainability should satisfy both

reuse and stability [1] our experience has shown that reusing (AspectJ) aspects is

very hard: e.g. many modifications in abstract aspects implementing design patterns

stability and reuse are key requirements for systems that are strategic to organizations

Libraries, product lines, etc…

Apr 22, 2023 Francisco Dantas et. al @ OPUS Group 5

[1] Mohagheghi, Conradi, Killi, Schwarz: An Empirical Study of Software Reuse vs. Defect-Density and Stability. ICSE 2004: 282-292

Page 6: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Why stability vs. reuse?

ICSE paper [1] : analysis of OO systems – abstract (reusable) classes were more stable

Is this always true with advanced modularization languages? They are complementary and their simultaneous

achievement should be maximized: stability measures can help us to compute the effort to

realize the reuse of a module E.g. a severe instability (e.g. interface modification) is an indicator

that reusing the module was hard are always abstract modules (using a programming

technique) more stable (than using others)? E.g. abstract aspects vs. abstract composition filters

Apr 22, 2023 6

Page 7: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Goals: assessing stability and reuse

General Provide the means to empirically understand the

impact of contemporary modularisation mechanisms on program stability and reuse

Specifics Execution of empirical studies to perform a multi-

criteria assessment of contemporary modularity mechanisms

Acquired knowledge will be documented in the form of best design/programming practices

Apr 22, 2023 7

Page 8: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Specific Directions for our Study?

Some alternatives1. What is the impact of different module decompositions on

stability and reuse of pointcuts (or module interfaces)? different decompositions = those yielded by specific programming

techniques (CaesarJ, Compose*, EJPs, etc…) does “CaesarJ-based design” improve stability and reuse of

pointcuts (and/or module interfaces)?

2. Take some of your claims about CaesarJ mechanisms – that somehow are related to stability and reuse – and test them by comparing with other techniques, such as: Compose*

Apr 22, 2023 8

Page 9: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Specific Directions for our Study?

3. Take some of our previous findings about AspectJ stability problems and replicate the empirical tests with CaesarJ

now also considering reuse… compare with AspectJ and/or other techniques, such as: Compose* e.g. are CaesarJ implementations more stable and reusable in the

presence of aspect interactions

4. Take some of Apel’s findings about the advantages of AspectualMixinLayers and test it in CaesarJ

problems: we need to grasp AspectualMixinLayers not sure if we will be able to use his technique, compiler, etc… his claims were not exactly related to reuse and/or stability

What do you think? Which suits best? Other suggestions?

Apr 22, 2023 9

Page 10: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Vaidas (and Mira)’s interests

assessing virtual classes, family polymorphism, pointcuts, interfaces between families in realistic case studies

how often particular features are exploited how much benefit they bring when used

find limitations of the existing features and… identify directions for further improvement of the language,

or even need for new language features

we think these goals can fit well in all the objectives of the previous slides

Apr 22, 2023 Francisco Dantas et. al @ OPUS Group 10

Page 11: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Vaidas (and Mira)’s interests

Also consider other languages ECaesarJ EScala

How stable their compilers are?

Apr 22, 2023 Francisco Dantas et. al @ OPUS Group 11

Page 12: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Once we set the goal of the study…

… there are some specific issues to think about: Does the comparison of CaesarJ against X make sense?

X = Compose*, EJP, etc… Which applications to use?

Ideally, select applications that we have implementations available already (see next slides for initial candidates)

Which specific metrics/indicators of stability and reuse to use? (see next slides for initial candidates)

Format of the study? Exploratory study – implementations made by us? Controlled experiment = involving subjects Both

Apr 22, 2023 12

Page 13: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Initial Applications Do you have candidates of applications (partially) implemented

already with CaesarJ? Existing implementations in Java, AspectJ, XPIs, EJPs and Compose*

Apr 22, 2023 13

Application Approaches

MobileMedia Java, AspectJ, CaesarJ, Compose*, XPI and EJP

iBatis Java, AspectJ, Compose*, CaesarJ (*)

OpenOrb Java, AspectJ, Compose* (**)

Health Watcher Java, AspectJ, CaesarJ

(*) Initial versions in CaesarJ(**) Just some compositions in Compose*

Page 14: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Initial Applications – Why CaesarJ?

Apr 22, 2023 14

Application Main characteristic Why CaesarJ?

MobileMediaIt is an SPL that supports different features combinations for different devices, depending on its capabilities

• Provides better support to abstractions capability which plays an important role for ensuring validity of individual family classes and their composition• it also provides support to some technologies like JME in a more stable way

iBatis

It is an SPL composed of more than 60 releases developed incrementally and its development is characterized as a reactive approach

Open Orb

It is a reflective middleware in which a number of GoF patterns are used and combined to achieve the middleware requirements of high customizability and adaptability

There are some AspectJ implementations that in our previous studies they did not obtain good results.

Other suggestions?

Page 15: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Candidate Metrics

Apr 22, 2023 15

Group Metric Target

Language-dependent

Separation of Concerns Stability

Coupling and Cohesion Stability and Reuse

Reuse Frequency Reuse

Language-independent

Size Stability and Reuse

Number of Changes Stability and Reuse

Reuse Level (measuring in function of LoC) Reuse

Reuse Density (measuring in function of LoC) Reuse

Page 16: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Candidate Metrics

Language-dependent Separation of Concerns Coupling, Cohesion and Size

Language-independent Number of changes Specific Reuse Metrics

Reuse Level (measuring in function of lines of code) Reuse Density (measuring in function of reused parts to

the total number of lines of code)

Apr 22, 2023 16

Page 17: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Another Current Study : Design Pattern Composition

Quantitative study that compares aspect-based solutions for the compositions of GoF patterns in AspectJ, Compose* and CaesarJ approaches

Focusing on Stability and Reuse Developed on the top of OpenOrb Application Use of the well known AspectJ Idioms in order to

implement the patterns: abstract pointcut, template advice and so forth

Are there proposed implementations of design patterns with CaesarJ?

Apr 22, 2023 17

Page 18: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Another Current Study : Design Pattern Composition

CaesarJ bindings can be useful to improve the SoC instead of intertype declarations in design patterns context?

Which are the best candidates of design patterns to be implement in CaesarJ?

Apr 22, 2023 18

Page 19: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

Study Restrictions and Open Issues

Lack of support of CaesarJ to Java generics types This support is available from Java 1.5

Apr 22, 2023 19

Page 20: Contemporary Modularisation Mechanisms:  A Multi-Dimensional Quality Analysis

OPUS Group

LES | DI |PUC-Rio - Brazil

http://www.les.inf.puc-rio.br/opus

Francisco Dantas | [email protected] Gurgel | [email protected] Garcia | [email protected]

Assessing Contemporary Modularisation Mechanisms: A Multi-Dimensional Quality Analysis