Download presentation
Presentation is loading. Please wait.
1
Aspect Oriented Separation of Control Flow Concerns in Scientific Software
Chenchen Xi CNC Supervisor: Prof. John R. Gurd Advisor: Dr. Len Freeman Prof. Brian Warboys Our work focus on aspect oriented separation of control flow concerns in scientific software. Aspect oriented is a technique to better modularize object oriented programs by introducing crosscutting concerns in a safe way. It has been designed to provide a better separation of concerns at development level. Scientific software is widely used for both simulations and analysis of results of experiments. Such applications usually require a large number of numerical calculations to be performed, which is concerned with both the mathematical model and the control flow of the computation to achieve the performance goal. control flow (or alternatively, flow of control) refers to the order in which the individual statements, instructions or function calls of an imperative or functional program are executed or evaluated.
2
Aspect Oriented Separation of Control Flow Concerns in Scientific Software
Our work focus on aspect oriented separation of control flow concerns in scientific software. Aspect oriented is a technique to better modularize object oriented programs by introducing crosscutting concerns in a safe way. It has been designed to provide a better separation of concerns at development level. Scientific software is widely used for both simulations and analysis of results of experiments. Such applications usually require a large number of numerical calculations to be performed, which is concerned with both the mathematical model and the control flow of the computation to achieve the performance goal. control flow (or alternatively, flow of control) refers to the order in which the individual statements, instructions or function calls of an imperative or functional program are executed or evaluated.
3
Motivation Scientific software has become more complex.
Performance is critical for solving scientific problems. Modification and optimization of the control flow can enhance the performance of the computations. [Collins, 2004] Software engineering techniques are needed to manage this complexity. [McGregor, 2006] The goal of separation of concerns. define and maintain crosscutting concerns of a system’s behaviour as separately as possible. modularization of scientific software such as maintainability, reusability should be improved to better deal with computational changing or updating. [Miller, 2004] Due to the fact that the scientific software has become more complex, performance is always critical for solving scientific problems. The modification and optimization of the control flow are the traditional ways to enhance the performance of computations. However, as this software becomes increasingly complex, programmers have to cope more and more with software development issues. So that, it is point out that software engineering techniques are need to manage this complexity. From the software engineering point of view, it is important to define the crosscutting concerns of a system’s behaviour at development level which would otherwise be tangled and scattered across other concerns. The technique might have separated the crosscutting control flow concern in order to improve the modularization of scientific software for better maintainability and reusability against computational changing and updating. However, there is a lack of tool support to separate those concerns, aiming to make the control flow structure explicit to the programmer. Chenchen Xi / CNC
4
Crosscutting Concerns
In computer science, a concern is a general term that refers to any particular piece of interest or focus in a program. At every orange place in this graph cross-cutting concerns are aspects of a program which affect (crosscut) other concerns. These concerns often cannot be cleanly decomposed from the rest of the system in both the design and implementation, and result in either scattering or tangling of the program, or both. separation of concerns (SoC) is the process of breaking a program into distinct features that overlap in functionality as little as possible. <<Aspect>> at every orange place { do } Chenchen Xi / CNC
5
Hypotheses Scientific software complexity can be reduced by solving the problem of code tangling Control flow concerns are crosscutting concerns in scientific software that cause the problem of code tangling Separation of control flow concerns can reduce those complexity and thus improve modularization of scientific software such as maintainability, reusability Chenchen Xi / CNC
6
Separating control flow concerns
Separating control flow concerns from the base algorithm can gain performance benefit Treat loops as aspects [ Harbulot and Gurd, 2006] Treat synchronized block as aspects [ Xi, 2006] This approach allows a simpler development life cycle Develop a simplified version of the algorithm Develop a number of control flow strategies for different machines, architectures or platforms It is pointed out in \cite{AOP01, KG03} that there is a need to recognise complex behaviours for an effective separation of concerns. several attempts have been made to identify and separate the control flow in AOP. Most of these pick single elements in the control flow as join point, such as loops \cite{HG06}, synchronized blocks \cite{X06}. But none of these completely separate the control flow concerns from the base application. To sum up, separating the control flow from the application model is a flexible and powerful approach for achieving maintenance, reuseability and high performance in scientific software, but the design and implementation of a framework that allow this separation of concerns remains an open question. The key issue is development of a supporting mechanism for this problem. On the other hand, it is desirable to use a framework to capture the control flow semantics of a given scenario as accurately as possible. Thus, a novel separation of concerns using aspect oriented programming is proposed. Chenchen Xi / CNC
7
Objective and Aims Create control flow aware aspect oriented framework based on a high-level program representation Aims Formalise a control flow aspect machine Integrate control flow aspects into AspectJ Formalise high-level control flow concern description Evaluate the control flow aware aspect oriented framework with experiments The most mature aspect-oriented tool that has been available to date is AspectJ, which is an extension of Java. AspectJ can be used to separate unit concerns from the base application, but primarily at the object interface level, which is either executing a method or changing a field. The problem lies in the fact that the points where control flow should be recognised are not naturally supported in AspectJ's model for join points (i.e.points where AspectJ can intervene). Moreover, in most current AOP approaches, the join point definition language allows the programmer to select join points on the basis of program lexical structures, such as explicit program elements names. Unfortunately, the overly coupled naming convention of the join point model obstructs the separation of the control flow concerns. The dependency on program syntax renders the join point definition fragile \cite{KS04} and strictly couples an aspect to a specific program, thereby hindering its reusability and evolvability \cite{PA06, KGBM06}. Chenchen Xi / CNC
8
Methodology Investigate framework creation
four target control flow statements Identify problems from literature Identify control flow concerns Investigate solutions for the identified issues Investigate representation for control flow concerns Propose solution Implement the investigated framework Sequence statements Decision-making statements (if-then, if-then-else, switch) Looping statements (for, while, do-while) – inner or outer? Branching statements (break, continue, return) How the control flow concerns crosscuts the base program. Chenchen Xi / CNC
9
Achievements to date Previous research synchronized block join point
Background knowledge. Crosscutting concerns Aspect oriented programming Related work. Existing technique and approach The first attempt. Block join point Previous research. My Master's project describes a model for a synchronized block join point as well as for a synchronized block body join point on top of AspectJ. The research investigates the importance of separating behaviour based crosscutting concerns, discusses several use cases for the language mechanisms and provides a fully implemented version of the proposal in the form of an extension to the AspectJ compiler framework. Background knowledge. A good understanding of the problem of separation of crosscutting concerns and its relation with AO modelling has been acquired through a thorough literature review. This review included topics such as AOP, AO modelling separation of concerns and AO expression with respect to AspectJ. Related work. A good idea of existing techniques and approaches to AO modelling and AO join point selection has been obtained through an extensive literature review of prior research. The first attempt. A join point selection mechanism which targets basic sequence control flow has been designed and implemented. The base join point selection mechanism capture a join point by specifying the start and end locations.
10
Evaluation Characteristics of interest Understandability
Maintainability Reusability Testability Software Metrics Import C&K metrics from Object Oriented software development [Clarke et. al, 2004] Use Concern Fencing Index for Aspect Oriented area [Kaewkasi, 2006] Chenchen Xi / CNC
11
Future Plan Chenchen Xi / CNC
12
Thank You !
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.