27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Coordination Model to Support Visualization of Aspect-Oriented Programs<br />

Álvaro F. d’Arce, Rogério E. Garcia, Ronaldo C. M. Correia, Danilo M. Eler<br />

Departamento de Matemática, Estatística e Computação<br />

Faculdade de Ciências e Tecnologia – Universidade Estadual Paulista “Júlio de Mesquita Filho”<br />

Rua Roberto Simonsen, 305 – CEP 19060-900 – Presidente Prudente - SP, Brazil<br />

alvaro@darce.com, {rogerio,ronaldo,danilo}@fct.unesp.br<br />

Abstract<br />

Program Comprehension tasks represent a strategic role<br />

in Software Engineering activities, demanding time and<br />

effort, representing a considerable cost in maintenance.<br />

Aspect-Oriented Programming has specific elements to<br />

compose program behavior (e.g., aspects, pointcuts, join<br />

points and advices). The cognitive process can be improved<br />

by employing visual techniques to support source<br />

code analysis of its structure and behavior. A Software<br />

Visualization tool must be able to provide suitable visual<br />

representations for the program. Particularly, visual exploration<br />

of Aspect-Oriented programs requires some features<br />

to map how aspects crosscut some program structures. In<br />

this paper we propose a tool and an architecture to improve<br />

Aspect-Oriented program understanding supported by three<br />

coordinated visualization techniques.<br />

Keywords: Program Understanding, Aspect-Oriented<br />

Program, Software Visualization, Software Engineering.<br />

1 Introduction<br />

Program Comprehension involves individual programmers<br />

understanding about what a program does and how<br />

it does it, in order to make functional changes and extensions,<br />

for example, without introducing defects [6]. Karahasanovic<br />

and his partners argue that Program Comprehension<br />

remains incomplete, requiring a deeper understanding<br />

of employed strategies, and before any modification (e.g.,<br />

maintenance tasks), understanding the underlying mechanisms<br />

might improve the comprehension [13]. Acquiring<br />

knowledge about large programs may delay Program Comprehension<br />

tasks, which motivate the use of Software Visualization<br />

as an alternative approach to improve the cognitive<br />

process.<br />

However, Aspect-Oriented programs comprehension can<br />

become more complex to be done, because separated units<br />

of code interfere in the behavior of other units. Aspect-<br />

Oriented Programming (AOP) supports crosscut concerns<br />

modularization, by structures that add behavior to selected<br />

elements of the programming language semantics [14].<br />

Thus, AOP isolates implementation that otherwise would<br />

be spread and tangled throughout the base code. This new<br />

feature increases the program structural complexity, making<br />

harder to achieve the understanding of its architecture and<br />

structure, bringing up challenges to Aspect-Oriented Program<br />

Comprehension.<br />

Based on that, Software Visualization can be an alternative<br />

approach to help software engineers to cope with<br />

structural complexity – due to fragmentation and the need<br />

to compose fragments – since the visual representations are<br />

able to work with an Aspect-Oriented program effectively,<br />

having specific visual mappings for Aspect-Oriented programs<br />

and mechanisms to gather and to organize data representing<br />

AOP features.<br />

Visualization techniques, some extensions and tools<br />

have been proposed to support software visualization:<br />

TreeMaps [12, 2, 18], Polymetric Views [15, 3] to visualize<br />

hierarchical structures; Hyperbolic Trees [17] to visualize<br />

large hierarchical structures; Bars and Stripes for interrelational<br />

structures visualization [1]; UML 3D to visualize<br />

packages, classes and methods [10]; and Dependence<br />

Graphs for inter-dependency level visualization [19]. These<br />

visualization techniques can be used to build visual representations<br />

to support comprehension tasks, but when applied<br />

to an Aspect-Oriented program as artifact, they are<br />

able to represent only the aspects before the weaving process<br />

– its fragmented code – and not the resulting code after<br />

the weaver – its tangled and spread code.<br />

In this paper we propose a tool and an architecture<br />

supported by coordinated visual mappings which tackle<br />

Aspect-Oriented programs. The proposed approach is capable<br />

of analyzing a source code after the weaving process,<br />

enabling a visual exploration of the software structure (i.e.,<br />

methods, aspects, advices and pointcuts) and how it all is<br />

related. Furthermore, our tool is able to visually show all<br />

structures involved in structural tests’ results.<br />

168

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!