首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
On the use of clone detection for identifying crosscutting concern code   总被引:2,自引:0,他引:2  
In systems developed without aspect-oriented programming, code implementing a crosscutting concern may be spread over many different parts of a system. Identifying such code automatically could be of great help during maintenance of the system. First of all, it allows a developer to more easily find the places in the code that must be changed when the concern changes and, thus, makes such changes less time consuming and less prone to errors. Second, it allows the code to be refactored to an aspect-oriented solution, thereby improving its modularity. In this paper, we evaluate the suitability of clone detection as a technique for the identification of crosscutting concerns. To that end, we manually identify five specific crosscutting concerns in an industrial C system and analyze to what extent clone detection is capable of finding them. We consider our results as a stepping stone toward an automated "aspect miner" based on clone detection.  相似文献   

2.
In systems developed without aspect-oriented programming, code implementing a crosscutting concern may be spread over many different parts of a system. Identifying such code automatically could be of great help during maintenance of the system. First of all, it allows a developer to more easily find the places in the code that must be changed when the concern changes and, thus, makes such changes less time consuming and less prone to errors. Second, it allows the code to be refactored to an aspect-oriented solution, thereby improving its modularity. In this paper, we evaluate the suitability of clone detection as a technique for the identification of crosscutting concerns. To that end, we manually identify five specific crosscutting concerns in an industrial C system and analyze to what extent clone detection is capable of finding them. We consider our results as a stepping stone toward an automated "aspect miner” based on clone detection.  相似文献   

3.
面向方面程序设计是近年来提出的一种程序设计技术,通过将横切关注点封装成Aspect,实现软件系统复杂性的降低,系统可维护性和可扩展性的提高。Aspect挖掘的目标是识别遗产系统中的横切关注点,为遗产系统的面向方面改造提供支持。文章提出了一种改进的基于活动轨迹的Aspect挖掘方法,基于横切关注点具有不同的调用上下文等约束寻找方法调用轨迹中相同的方法调用模式。通过实例说明该方法提高了候选Aspect的查全率。  相似文献   

4.
You can measure a software system's value by its modularity. The more modular the system, the easier it is to produce and extend. Aspect-oriented programming technologies aim to improve system modularity by modularizing crosscutting concerns. Global properties and programming and design issues can lead to crosscutting concerns--for example, error handling or transaction code, interacting features, and reliability and security. The guest editors introduce aspect-oriented programming and describe this special issue's articles, which explain the use of aspect-oriented programming to simplify enterprise and system software, the need to expand an interface's meaning in the presence of aspects, and the application of aspects to design and requirements activities.  相似文献   

5.
Aspect-oriented programming (AOP) provides mechanisms for the separation of crosscutting concerns - functionalities scattered through the system and tangled with the base code. Existing systems are a natural testbed for the AOP approach since they often contain several crosscutting concerns which could not be modularized using traditional programming constructs. This paper presents an automated approach to the problem of migrating systems developed according to the object-oriented programming (OOP) paradigm into aspect-oriented programming (AOP). A simple set of six refactorings has been defined to transform OOP to AOP and has been implemented in the AOP-migrator tool, an Eclipse plug-in. A set of enabling transformations from OOP to OOP complement the initial set of refactorings. The paper presents the results of four case studies, which use the approach to migrate selected crosscutting concerns from medium-sized Java programs (in the range of 10K to 40K lines of code) into equivalent programs in AspectJ. The case study results show the feasibility of the migration and indicate the importance of the enabling transformations as a preprocessing step  相似文献   

6.
面向方面软件开发研究   总被引:4,自引:0,他引:4  
系统的某些关注点横切整个系统,无法很好地封装在单个模块里,造成代码混乱和弥散,用面向方面编程AOP可以解决这些问题。首先介绍了现代软件开发方法及其产生的问题;其次,阐述了AOP的基本概念,并结合AspectC++演示了如何进行面向方面的编程;再次,描述了如何对UML扩展以支持对方面建模;然后介绍了面向方面软件开发在实时系统中的应用;最后给出了结论和未来的主要工作。  相似文献   

7.
基于UML面向方面需求建模   总被引:1,自引:0,他引:1  
面向方面编程(AOP)提供模块化横切关注点的机制,有效地解决横切属性引起的代码混乱和代码分散等问题.但是,AOP目前大都用在程序级和执行级,在软件开发的早期阶段中运用较少.在需求分析阶段分离功能关注点和非功能关注点,运用UML类图、状态图对方面进行建模,并实现非功能关注点的编织,完成系统建模的整个过程,并在此基础上给出了方面间的检测和解决方法.  相似文献   

8.
软件系统的运行环境日益复杂,这样的复杂性已经远远超过了人的控制能力。面向对象的程序设计方法会造成关注点不能分离,代码纠缠在一起,使得软件的模块性与复用性大大降低。面向方面的程序设计(Aspect-oftented programming,AOP)可以很好地分离关注点使软件更好地模块化。使用反射机制(Reflection),可以使程序在运行时通过自省(introspection)了解自己的状态,自己调节(intercession)自己(运行时自动修改程序),即动态地获得新的行为的能力。我们结合使用这两种方法的优点,使用AspectJ和Java的反射机制使得软件在运行时可以根据运行情况动态地改变行为。  相似文献   

9.
Aspect oriented programming aims at addressing the problem of the crosscutting concerns, i.e., those functionalities that are scattered among several modules in a given system. Aspects can be defined to modularize such concerns. In this work, we focus on a specific kind of crosscutting concerns, the scattered implementation of methods declared by interfaces that do not belong to the principal decomposition. We call such interfaces aspectizable. All the aspectizable interfaces identified within a large number of classes from the Java Standard Library and from three Java applications have been automatically migrated to aspects. To assess the effects of the migration on the internal and external quality attributes of these systems, we collected a set of metrics and we conducted an empirical study, in which some maintenance tasks were executed on the two alternative versions (with and without aspects) of the same system. In this paper, we report the results of such a comparison.  相似文献   

10.
11.
一种基于组件的aspect-oriented编程框架   总被引:2,自引:0,他引:2  
面向方面的编程(AOP:aspect-oriented programming)是一种新的编程技术.它引进了aspect,将影响多个模块的行为封装到一个可重用模块中,允许程序员对横切(crosscutting concerns)进行模块化,从而消除了面向对象编程(OOP:object-oriented programming)引起的代码混乱和分散问题.本文讨论了在服务体模型上实现的一种aspect-oriented编程框架.这个编程框架使用aspect组件,定义了对OOP语言的扩展,可方便将模块化的aspect代码扩展到源程序中,解决了OOP模型在这方面的不足.  相似文献   

12.
Aspect-Oriented Requirements Engineering focuses on the identification and modularisation of crosscutting concerns at early stages. There are different approaches in the requirements engineering community to deal with crosscutting concerns, introducing the benefits of the application of aspect-oriented approaches at these early stages of development. However, most of these approaches rely on the use of Natural Language Processing techniques for aspect identification in textual documents and thus, they lack a unified process that generalises its application to other requirements artefacts such as use case diagrams or viewpoints. In this paper, we propose a process for mining early aspects, i.e. identifying crosscutting concerns at the requirements level. This process is based on a crosscutting pattern where two different domains are related. These two different domains may represent different artefacts of the requirements analysis such as text and use cases or concerns and use cases. The process uses syntactical and dependency based analyses to automatically identify crosscutting concerns at the requirements level. Validation of the process is illustrated by applying it to several systems and showing a comparison with other early aspects tools. A set of aspect-oriented metrics is also used to show this validation.  相似文献   

13.
面向方面的程序设计:概念、实现与未来   总被引:11,自引:0,他引:11  
面向对象程序设计(OOP)的出现极大地提高了软件的可读性、可维护性和可复用性,但OOP并没有彻底解决软件的维护和复用问题,本质上是因为OOP难以模块化处理软件系统的横切关注点,以至于业务逻辑代码和其它代码(如日志记录、安全验证等)相互“纠缠”在一起,使得程序难以维护和复用。面向方面的程序设计(AOP)由此诞生,它最主要的设计原则是模块化系统的横切关注点,将业务代码与其它代码解耦,在更高的抽象和分解层次上,进一步提高了软件的可维护性、可复用性和可扩展性。首先深度探索了AOP的起源,然后阐述了AOP的本质,接着介绍了AOP的基本概念并以最为流行的实现语言AspectJ为例,剖析了AOP的实现机制,最后讨论了AOP在软件开发、测试、分析、度量和重构等领域的研究状况。  相似文献   

14.
To receive persistence capabilities, applications usually must explicitly access database management systems, such as object-oriented databases or object-relational mapping products. The usual way of building an application is tangling its functional code with explicit structured query language (SQL) or object query language (OQL) persistence statements. This tangling has several drawbacks: deficiencies in source code legibility, maintainability, and portability; lack of persistence functionality reuse; and low adaptability of persistence attributes. Separating crosscutting concerns such as persistence from the main application code can reduce software complexity and facilitate concerns reuse. A prototype persistence system shows how to use computational reflection to completely separate and adapt application persistence attribute at runtime.  相似文献   

15.
Aspect-oriented programming (AOP) seeks to improve software modularity via the separation of cross-cutting concerns. AOP proponents often advocate a development strategy where programmers write the main application (base code), ignoring cross-cutting concerns, and then aspect programmers, domain experts in their specific concerns, weave in the logic for these more specialized cross-cutting concerns. This purely oblivious strategy, however, has empirically been shown to tightly couple aspects to base code in many cases, hindering aspect modularity and reuse. In essence, the more intricate the weaving between the cross-cutting concern and the base code (lexically and/or semantically), the harder it becomes to: (a) robustly specify how to weave the aspects in at the required points, (b) capture interactions between aspects and base code, and (c) preserve the correct weaving as the base code evolves.We propose an alternate methodology, termed cooperative aspect-oriented programming (Co-AOP), where complete lexical separation of concerns is not taken as an absolute requirement. Instead, cross-cutting concerns are explicitly modeled as abstract interfaces through explicit join points (EJPs). Programmers specify where these interfaces interact with base code either through explicit lexical references or via traditional oblivious aspects. This explicit awareness allows base code and aspects to cooperate in ways that were previously not possible: arbitrary blocks of code can be advised, advice can be explicitly parameterized, base code can guide aspects in where to apply advice, and aspects can statically enforce new constraints upon the base code that they advise. These new techniques allow aspect modularity and program safety to increase, and bring us towards a cooperative AOP paradigm.We illustrate our methodology via an example on transactions, and also give an initial evaluation of cooperative AOP through an empirical study on program extensibility comparing both the traditional and cooperative AOP methodologies. Initial results show that cooperative AOP techniques result in code that is less complex with lower overall coupling, facilitating extensibility.  相似文献   

16.
Aspectual Feature Modules   总被引:1,自引:0,他引:1  
Two programming paradigms are gaining attention in the overlapping fields of software product lines (SPLs) and incremental software development (ISD). Feature-oriented programming (FOP) aims at large-scale compositional programming and feature modularity in SPLs using ISD. Aspect-oriented programming (AOP) focuses on the modularization of crosscutting concerns in complex software. Although feature modules, the main abstraction mechanisms of FOP, perform well in implementing large-scale software building blocks, they are incapable of modularizing certain kinds of crosscutting concerns. This weakness is exactly the strength of aspects, the main abstraction mechanisms of AOP. We contribute a systematic evaluation and comparison of FOP and AOP. It reveals that aspects and feature modules are complementary techniques. Consequently, we propose the symbiosis of FOP and AOP and aspectual feature modules (AFMs), a programming technique that integrates feature modules and aspects. We provide a set of tools that support implementing AFMs on top of Java and C++. We apply AFMs to a nontrivial case study demonstrating their practical applicability and to justify our design choices.  相似文献   

17.
面向方面编程(Aspect-Oriented Programming,AOP)是目前发展比较迅速的一种新的编程方法。它是面向过程、面向对象方法的进一步发展。AOP通过引入了方面概念,改进了关注点的分离(separation of concerns),减少代码缠结(code tangling),解决了横切关注点(crosscutting concerns)的问题,可以提高软件质量和效率。文章对AOP的基本概念、技术特点和AOP的技术框架现状进行了相关介绍。  相似文献   

18.
面向方面技术在仓储系统中的应用   总被引:1,自引:0,他引:1  
面向方面开发(AOP:Aspect—Oriented Programming)是一项允许设计人员模块化横切关注点的新的编程技术,它引入了“方面”这一概念,“方面”把影响多个模块的行为封装到一个单独的可重用模块中。本文介绍了AOP的基本概念并举例说明了AOP在仓储管理系统中的应用。  相似文献   

19.
Lesiecki  N. 《Software, IEEE》2006,23(1):24-32
(AOP) programming is a technique that allows programmers to modularize crosscutting concerns (behavior that cuts across the typical divisions of responsibility, such as concurrency or security). Aspect-oriented programming and the AspectJ language can reduce code size and defects while increasing understandability. Video Monitoring Services of America (VMS) began to investigate the adoption of AOP into the development of Adbase, the Java 2 Enterprise Edition-based application. Adbase supplies a Web-based search and e-commerce interface on VMS's library of advertising data. It uses a wide range of J2EE technologies, both commercial and open source. The Adbase team varied from four to seven full-time developers during the time frame covered by this article. We followed a modified version of extreme programming with a focus on emergent design and adherence to XP practices such as programmer testing-and pair programming.  相似文献   

20.
面向Aspect的程序设计——一种新的编程范型   总被引:34,自引:2,他引:34  
Currently the main stream programming paradigm is Object Oriented Programming: OOP, which has got-ten great success. The advantage of OOP is that it provides effective modularity support, and enables direct mappingfrom requirement space to design space, etc. However, there are still some specific requirement and design issues,e.g. , security and logging, which are hard to be implemented with clear modularity using either procedural or OOP techniques. In fact, the code of this kind of concerns are often scattered through out the whole system, resulting insome ugly scattering code and tangling code. Such kinds of programs are often difficult to develop and maintain. Re-cently a new programming paradigm Aspect Oriented Programming:AOP, which aims at solving the crosscutting concerns, has gained much popularity. This paper is an overview of AOP.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号