共查询到20条相似文献,搜索用时 31 毫秒
1.
Binkley D. Ceccato M. Harman M. Ricca F. Tonella P. 《IEEE transactions on pattern analysis and machine intelligence》2006,32(9):698-717
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 相似文献
2.
Points-to analysis is a static code analysis technique that establishes the relationships between variables of references and allocated objects. A number of points-to analysis algorithms have been proposed for procedural and object-oriented languages like C and Java, while few of them can be used for AspectJ as we know so far. One main reason is that AspectJ is an aspect-oriented language which implements the separation of crosscutting concerns by advices, pointcuts, and inter-type declarations, while a points-to analysis of AspectJ programs may be imprecise because any aspect woven into the base code may change the points-to relations in the program and thus a conservative analysis has to be taken in order to handle the aspects. In this paper, we propose a context-sensitive points-to analysis technique called AJPoints for AspectJ. Similar to the weaving mechanism for AspectJ, AJPoints obtains the constraints and templates on the points-to relations for the base code and the aspects, respectively, but weaves and solves them in an iterative manner in order to cross the boundary between the base code and the aspects. We have implemented AJPoints on abc AspectJ compiler and evaluated it by using twelve AspectJ benchmark programs. The experimental results show that our technique can achieve a high precision about points-to relations in AspectJ programs. 相似文献
3.
为了消除传统面向对象开发模式在处理公共系统功能所产生的代码混乱、一致性差和扩展困难问题,在.NET Framework环境下,采用面向方面(aspect-oriented programming,AOP)模式,创建了方面管理器完全分离软件中横切多模块的系统功能,并新增加了异常处理传递机制,加强了面向方面的容错性能;并结合面向方面编程(object-oriented programming,OOP),建立了易于设计、理解和维护的系统,提高了代码的质量、产量及其扩展性. 相似文献
4.
Bruntink M. van Deursen A. van Engelen R. Tourwe T. 《IEEE transactions on pattern analysis and machine intelligence》2005,31(10):804-818
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. 相似文献
5.
《IEEE transactions on pattern analysis and machine intelligence》2005,31(10):801-803
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. 相似文献
6.
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. 相似文献
7.
8.
9.
This paper considers a class of lattice-based algebraic structures describing the semantics of type hierarchies in an object-oriented program system. Several properties of such structures (namely, completeness, equivalent transformations, and logical reduction) are studied. The suggested methodology serves the purpose of verification and upgrading of type hierarchies; an important direction concerns automatic elimination of code redundancy. 相似文献
10.
As our society becomes more technologically complex, computer systems are finding an alarming number of uses in safety-critical applications. In many such systems, the software component's reliability is essential to the system's safe operation, so it becomes natural to ask, “How can software be made to behave correctly when executed?” Using program transformations to produce trusted software simplifies verification. Program transformations use proven laws to manipulate programs in a manner analogous to algebraic transformations. The authors sketch how a formal method based on program transformations can be used to construct a verified compiler. Such a compiler has been proved to correctly compile any correct program into assembly language. While the compiler itself may not execute efficiently-after all, you need only use the verified compiler the last time you compile a program-the transformational approach should enable the verified compiler to produce efficient assembly code 相似文献
11.
面向方面编程 ( AOP)把横切关注点从系统中分离 ,解决了面向对象编程 ( OOP)中代码纠缠、散射的问题。但在面向方面建模中 ,横切方面没有得到很好的支持。首先 ,在统一建模语言 ( UML)元模型的基础上利用类图建立了整体框架模型 ,设计了核心类、方面、横切元素及其之间的关系 ;其次 ,利用 UML扩展机制为切点、通知、方面等主要元素建立了新的模型 ,设计了它们与方面之间新的关联关系并为其定义了语义。通过 UML扩展,使得 UML能够直接表达面向方面概念 ,支持面向方面建模设计 ,实现了面向方面模型 相似文献
12.
Justin O. Graver 《Software》1992,22(7):519-535
Increasing code reuse in software systems is an important way to decrease development and maintenance costs, reduce the time required to respond to new requirements, and significantly advance the feasible complexity limits for new systems. Object-oriented programming languages and environments provide fundamental support for truly reusable code through abstraction, inheritance, and polymorphism. Reusable code is a prerequisite for a significantly more powerful concept: reusable design. Frameworks of resuable design abstractions are difficult to create and typically evolve over a long period of use and refinement. Thus, it is important to understand how systems evolve and how this evolution can be directed to achieve the best results. This article illustrates some of the standard transformations, called refactorings, that occur in object-oriented systems as they evolve by describing the creation and evolution of a framework for building general-purpose string-to-object translators. It reflects our experiences with object-oriented compilers over a five year period while working on the Typed Smalltalk compiler project. 相似文献
13.
面向方面编程(AOP)把横切关注点从系统中分离,解决了面向对象编程(OOP)中代码纠缠、散射的问题。但在面向方面建模中,横切方面没有得到很好的支持。首先,在统一建模语言(UML)元模型的基础上利用类图建立了整体框架模型,设计了核心类、方面、横切元素及其之间的关系;其次,利用UML扩展机制为切点、通知、方面等主要元素建立了新的模型,设计了它们与方面之间新的关联关系并为其定义了语义。通过UML扩展,使得UML能够直接表达面向方面概念,支持面向方面建模设计,实现了面向方面模型的可视化和可辨别性;整体框架模型使得面向方面整体结构清晰,各个核心元素之间关系明确,为面向方面建模提供了一个整体设计平台,提高了面向方面软件设计的模块化,增强了代码的重用性和系统的可维护性。 相似文献
14.
An integrated crosscutting concern migration strategy and its semi-automated application to JHotDraw
Marius Marin Arie van Deursen Leon Moonen Robin van der Rijst 《Automated Software Engineering》2009,16(2):323-356
In this paper we propose a systematic strategy for migrating crosscutting concerns in existing object-oriented systems to
aspect-oriented programming solutions. The proposed strategy consists of four steps: mining, exploration, documentation and
refactoring of crosscutting concerns. We discuss in detail a new approach to refactoring to aspect-oriented programming that
is fully integrated with our strategy, and apply the whole strategy to an object-oriented system, namely the JHotDraw framework.
Moreover, we present a method to semi-automatically perform the aspect-introducing refactorings based on identified crosscutting
concern sorts which is supported by a prototype tool called sair. We perform an exploratory case study in which we apply this tool on the same object-oriented system and compare its results
with the results of manual migration in order to assess the feasibility of automated aspect refactoring. Both the refactoring
tool sair and the results of the manual migration are made available as open-source, the latter providing the largest aspect-introducing
refactoring available to date.
We report on our experiences with conducting both case studies and reflect on the success and challenges of the migration
process.
M. Marin is a guest at Delft University of Technology. 相似文献
15.
Eduardo FigueiredoAuthor Vitae Claudio Sant’AnnaAuthor Vitae 《Journal of Systems and Software》2012,85(2):227-243
Manifestation of crosscutting concerns in software systems is often an indicative of design modularity flaws and further design instabilities as those systems evolve. Without proper design evaluation mechanisms, the identification of harmful crosscutting concerns can become counter-productive and impractical. Nowadays, metrics and heuristics are the basic mechanisms to support their identification and classification either in object-oriented or aspect-oriented programs. However, conventional mechanisms have a number of limitations to support an effective identification and classification of crosscutting concerns in a software system. In this paper, we claim that those limitations are mostly caused by the fact that existing metrics and heuristics are not sensitive to primitive concern properties, such as either their degree of tangling and scattering or their specific structural shapes. This means that modularity assessment is rooted only at conventional attributes of modules, such as module cohesion, coupling and size. This paper proposes a representative suite of concern-sensitive heuristic rules. The proposed heuristics are supported by a prototype tool. The paper also reports an exploratory study to evaluate the accuracy of the proposed heuristics by applying them to seven systems. The results of this exploratory analysis give evidences that the heuristics offer support for: (i) addressing the shortcomings of conventional metrics-based assessments, (ii) reducing the manifestation of false positives and false negatives in modularity assessment, (iii) detecting sources of design instability, and (iv) finding the presence of design modularity flaws in both object-oriented and aspect-oriented programs. Although our results are limited to a number of decisions we made in this study, they indicate a promising research direction. Further analyses are required to confirm or refute our preliminary findings and, so, this study should be seen as a stepping stone on understanding how concerns can be useful assessment abstractions. We conclude this paper by discussing the limitations of this exploratory study focusing on some situations which hinder the accuracy of concern-sensitive heuristics. 相似文献
16.
17.
Evolving Object-Oriented Designs with Refactorings 总被引:1,自引:0,他引:1
Refactorings are behavior-preserving program transformations that automate design evolution in object-oriented applications. Three kinds of design evolution are: schema transformations, design pattern microarchitectures, and the hot-spot-driven-approach. This research shows that all three are automatable with refactorings. A comprehensive list of refactorings for design evolution is provided and an analysis of supported schema transformations, design patterns, and hot-spot meta patterns is presented. Further, we evaluate whether refactoring technology can be transferred to the mainstream by restructuring non-trivial C++ applications. The applications that we examine were evolved manually by software engineers. We show that an equivalent evolution could be reproduced significantly faster and cheaper by applying a handful of general-purpose refactorings. In one application, over 14K lines of code were transformed automatically that otherwise would have been coded by hand. Our experiments identify benefits, limitations, and topics of further research related to the transfer of refactoring technology to a production environment. 相似文献
18.
《Journal of Microcomputer Applications》1995,18(3):279-285
This paper describes an implementation method for object-oriented applications. In the common practice the base address of the current object instance is passed on the stack as a pointer from one virtual method to another. The way suggested in this paper uses a global pointer pointing to the currently active object. This pointer is implemented by using some of the CPU registers exclusively for this purpose, thus saving the time of reloading it. Provided that some instructions manipulate on the same object instance before the program switches to another object a smaller and faster executing code can be achieved and at the same time some stack space can be saved. 相似文献
19.
David MacQueen 《Formal Aspects of Computing》2002,13(3-5):214-232
At a fundamental level, functional and object-oriented programming languages are all ‘higher-order’, in the sense that they
support computing with values that are themselves pieces of program code encapsulated with a local environment. In functional
languages these ‘active’ values are functions, while in object-oriented languages they are objects. Both styles of higher-order
language claim to provide good support for writing adaptable programs, but functional and object-oriented languages achieve
this adaptability in different ways: functional programs rely on parameterisation at the value, type and module level, while
object-oriented languages rely primarily on subtyping and implementation inheritance. Here we compare these two approaches,
mainly in terms of the features and properties of their type systems, and consider the benefits and disadvantages of unifying
(or merging) the two paradigms by adding object-oriented features to ML as a base language. We argue that while some of the
simpler aspects of object-oriented languages are compatible with ML, adding a full- edged class-based object system to ML
leads to an excessively complex type system and relatively little expressive gain, especially if we aim to preserve that mostly
functional style of programming that is a major advantage of ML.
Received March 2002 / Accepted in revised form April 2002 相似文献
20.
Ralf Lmmel 《Electronic Notes in Theoretical Computer Science》2005,127(3):49
We are interested in evolution scenarios for language-based functionality. We identify different dimensions along which such functionality can evolve, including the following: (i) coding style; (ii) coding details; (iii) data model; (iv) crosscutting concerns; and (v) patches. We focus at language interpreters as examples of language-based functionality, but similar scenarios exist for type checkers, static analyses, program transformations, and other sorts of language-based functionality. Our experiences are based on using rule-based programming (with Prolog) for the implementation of language-based functionality, while evolutionary transformations of the functionality are perceived as meta-programs. 相似文献