首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 22 毫秒
1.
面向方面编程技术研究   总被引:6,自引:3,他引:3  
面向方面编程是一项允许编程人员模块化横切关注点的新的编程技术,它引入了“方面”这一概念,“方面”把影响多个模块的行为封装到一个单独的可重用模块中,利用Xerox PARC发行的AspeetJ,Java开发者可以很方便地进行面向方面编程。本文介绍了AOP、AspeetJ的基本概念并举例说明了AOP在仓储管理系统中的应用。  相似文献   

2.
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  相似文献   

3.
Design patterns often need to be blended (or composed) when they are instantiated in a software system. The composition of design patterns consists of assigning multiple pattern elements into overlapping sets of classes in a software system. Whenever the modularity of each design pattern is not preserved in the source code, their implementation becomes tangled with each other and with the classes’ core responsibilities. As a consequence, the change or removal of each design pattern will be costly or prohibitive as the software system evolves. In fact, composing design patterns is much harder than instantiating them in an isolated manner. Previous studies have found design pattern implementations are naturally crosscutting in object-oriented systems, thereby making it difficult to modularly compose them. Therefore, aspect-oriented programming (AOP) has been pointed out as a natural alternative for modularizing and blending design patterns. However, there is little empirical knowledge on how AOP models influence the composability of widely used design patterns. This paper investigates the influence of using AOP models for composing the Gang-of-Four design patterns. Our study categorizes different forms of pattern composition and studies the benefits and drawbacks of AOP in these contexts. We performed assessments of several pair-wise compositions taken from 3 medium-sized systems implemented in Java and two AOP models, namely, AspectJ and Compose*. We also considered complex situations where more than two patterns involved in each composition, and the patterns were interacting with other aspects implementing other crosscutting concerns of the system. In general, we observed two dominant factors impacting the pattern composability with AOP: (i) the category of the pattern composition, and (ii) the AspectJ idioms used to implement the design patterns taking part in the composition.  相似文献   

4.
Parameterized programming is a powerful technique for the reliable reuse of software. In this technique, modules are parameterized over very general interfaces that describe what properties of an environment are required for the module to work correctly. Reusability is enhanced by the flexibility of the parameterization mechanism proposed here. Reliability is further enhanced by permitting interface requirements to include more than purely syntactic information. This paper introduces three new ideas that seem especially useful in supporting parameterized programming: 1) theories, which declare global properties of program modules and interfaces; 2) views, which connect theories with program modules in an elegant way; and 3) module expressions, a kind of general structured program transformation which produces new modules by modifying and combining existing modules. Although these ideas are illustrated with some simple examples in the OBJ programming language, they should also be taken as proposals for an Ada1 library system, for adding modules to Prolog, and as considerations for future language design efforts. OBJ is an ultra-high level programming language, based upon rewrite rules, that incorporates these ideas, and many others from modern programming methodology.  相似文献   

5.
 This paper deals with the integration of different types of standardised and available fieldbus and sensor/actuator bus systems into control systems and applications. The concept for integration and the first steps of realisation considering the bus systems PROFIBUS, CAN and INTERBUS are presented here. This includes a simple but unified application programming interface (API) on all underlying interfaces including standardised fieldbus systems and other improvements for the adaptation to different fieldbus systems. A main feature of these improvements is that there is no recompilation necessary in case of exchanging field bus systems, making the integration of different fieldbus systems much easier. The remaining work for the system integrator is to modify a few configuration tables which are written in ASCII text and easy to handle. The presented concept is realised using VME bus systems with Motorola CPU board, real time operating system OS-9 and hard- and software modules for the interfaces to PROFIBUS, CAN and INTERBUS. Received: 12 March 1997/ Accepted: 22 May 1997  相似文献   

6.
7.
This paper considers the prospects of transferring software-engineering methods and tools from the field of information systems (IS) to the field of production systems (PS). In particular, object-oriented programming is transferable to control programming by providing: (1) a standard, high-level, general purpose, real-time modules for controlling motion, logic and sequences; (2) detailed task specification; and (3) CAD/CAM database management and interaction with control. Additional transferable tools are man–machine interfaces for programmable logic controllers (PLC), robots, and numerically controlled (NC) machines. Current development of industrial standards should help provide full multi-platform support and connectivity and increase transfer of software development methods and tools from IS to PS.  相似文献   

8.
介绍语音IC的控制方法和接口,PLC编程的实现方法通过设计的第三方模块直接插在PLC框架上实现对内部变量、信息的语音播报.  相似文献   

9.
面向方面编程AOP(Aspect Oriented Programming)为开发者提供了一种机制来描述横切关注点.它能够自动地将横切关注点织入到面向对象的软件系统中,从而实现了横切关注点的模块化.然而AOP这种对横切关注点封装、织入的独特性为分析程序结构带来了困难,对传统的程序分析技术提出了新课题.通过分析AOP程序的特殊性,提出了基于AspectJ构造AOP程序控制流图的方法.该方案可以为AOP程序的理解、验证、测试以及重构提供控制流分析平台.  相似文献   

10.
This paper investigates some key algebraic properties of the categories of spans and cospans (up to isomorphic supports) over the category Set of (small) sets and functions, analyzing the monoidal structures induced over both spans and cospans by cartesian product and disjoint union of sets. Our results find analogous counterparts in (and are partly inspired by) the theory of relational algebras, thus our paper also sheds some light on the relationship between (co)spans and the categories of (multi)relations and of equivalence relations. And, since (co)spans yield an intuitive presentation of dynamical systems with input and output interfaces, our results introduce an expressive, two-fold algebra that can serve as a specification formalism for rewriting systems and for composing software modules.  相似文献   

11.
The Geometry Modelling System (GEMO), developed at Dresden University of Technology, covers the area of definition and manipulation of geometrical objects with regard to a further processing in a CAD/CAM system. The programming system GEMO has been designed modularly. The implemented algorithms are based on analytic and constructive geometrical methods. All modules have clearly defined interfaces, permitting a direct integration in CAD/CAM systems. Implementations for PCs and 32-bit computers are now available.  相似文献   

12.
This paper investigates whether AspectJ can be used for efficient profiling of Java programs. Profiling differs from other applications of AOP (e.g. tracing), since it necessitates efficient and often complex interactions with the target program. As such, it was uncertain whether AspectJ could achieve this goal. Therefore, we investigate four common profiling problems (heap usage, object lifetime, wasted time and time‐spent) and report on how well AspectJ handles them. For each, we provide an efficient implementation, discuss any trade‐offs or limitations and present the results of an experimental evaluation into the costs of using it. Our conclusions are mixed. On the one hand, we find that AspectJ is sufficiently expressive to describe the four profiling problems and reasonably efficient in most cases. On the other hand, we find several limitations with the current AspectJ implementation that severely hamper its suitability for profiling. Copyright © 2006 John Wiley & Sons, Ltd.  相似文献   

13.
AspectC#——在C#中应用AOP   总被引:2,自引:0,他引:2  
当前,AspectJ是用得最普遍的AOP工具,它是基于Java平台的。着重讨论了一种基于.NET平台的AOP技术,AspectC#。用户可以通过AspectC#在C#中应用AOP。目前,AspectC#只支持C#语言,但是.NET平台的多语言性使得跨语言的AOP应用成为可能。  相似文献   

14.
面向方面编程方法是一种新的程序开发方法,主要是为了弥补面向对象方法的一些不足。该文介绍了面向方面编程的基本概念、语法规范,并且以面向方面语言Aspectj为例说明面向方面编程的特点。  相似文献   

15.
Peirce algebras     
We present a two-sorted algebra, called aPeirce algebra, of relations and sets interacting with each other. In a Peirce algebra, sets can combine with each other as in a Boolean algebra, relations can combine with each other as in a relation algebra, and in addition we have both a set-forming operator on relations (the Peirce product of Boolean modules) and a relation-forming operator on sets (a cylindrification operation). Two applications of Peirce algebras are given. The first points out that Peirce algebras provide a natural algebraic framework for modelling certain programming constructs. The second shows that the so-calledterminological logics arising in knowledge representation have evolved a semantics best described as a calculus of relations interacting with sets.  相似文献   

16.
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.  相似文献   

17.
面向方面的程序设计综述   总被引:1,自引:0,他引:1  
现在大多数的软件项目都选择OOP,但OOP技术也有其局限性,它对某些需求并不能很好地进行描述。本文介绍了一种全新的程序设计方法一面向方面的程序设计方法,这种程序设计方法可以有效地描述OOP方法不能描述的横切关注点;介绍了面向方面程序设计的基本思想以及面向方面程序设计语言AspectJ的基本概念及面向方面软件开发方法。  相似文献   

18.
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.  相似文献   

19.
Implementation of a design pattern can take many forms according to the programming language being used. Most of the literature presents design patterns in their conventional object-oriented implementations. Several other studies show the implementation in aspect-oriented languages such as AspectJ, EOS, and Caesar. In this work, we compare the implementation of three design patterns: singleton, observer, and decorator design patterns in these languages and also discuss the possibility of implementing them in ParaAJ: an extension to the AspectJ language that implements the idea of parametric aspects. We found that ParaAJ helps in making the implementation of the singleton and observer patterns reusable but it fails to help in the decorator case. The problem with the decorator pattern exists because of the current translation mechanism of ParaAJ׳s aspects to normal AspectJ׳s aspects. This opens the door for further work in ParaAJ to better support the idea of parametric aspects.  相似文献   

20.
Viega  J. Vuas  J. 《Software, IEEE》2000,17(6):19-21
Aspect-oriented programming (AOP) is a novel topic in the software engineering and languages communities. AOP appears to have the potential to significantly improve the reliability of programs, particularly by modularizing error-handling policies and allowing for easier maintenance and better reuse. In this article, we introduce AspectJ, the first AOP language, and demonstrate how you can use it to construct more reliable software  相似文献   

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

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