共查询到20条相似文献,搜索用时 31 毫秒
1.
2.
Execution levels for aspect-oriented programming: Design,semantics, implementations and applications
In aspect-oriented programming (AOP) languages, advice evaluation is usually considered as part of the base program evaluation. This is also the case for certain pointcuts, such as if pointcuts in AspectJ, or simply all pointcuts in higher-order aspect languages like AspectScheme. While viewing aspects as part of base level computation clearly distinguishes AOP from reflection, it also comes at a price: because aspects observe base level computation, evaluating pointcuts and advice at the base level can trigger infinite regression. To avoid these pitfalls, aspect languages propose ad-hoc mechanisms, which increase the complexity for programmers while being insufficient in many cases. After shedding light on the many facets of the issue, this paper proposes to clarify the situation by introducing levels of execution in the programming language, thereby allowing aspects to observe and run at specific, possibly different, levels. We adopt a defensive default that avoids infinite regression, and gives advanced programmers the means to override this default using level-shifting operators. We then study execution levels both in practice and in theory. First, we study the relevance of the issues addressed by execution levels in existing aspect-oriented programs. We then formalize the semantics of execution levels and prove that the default semantics is indeed free of a certain form of infinite regression, which we call aspect loops. Finally, we report on existing implementations of execution levels for aspect-oriented extensions of Scheme, JavaScript and Java, discussing their implementation techniques and current applications. 相似文献
3.
《Science of Computer Programming》2007,64(3):321-374
This paper describes MiniMAO1, a core aspect-oriented language. Unlike previous aspect-oriented calculi and core languages, MiniMAO1allows around advice to change the target object of an advised operation before proceeding. MiniMAO1accurately models the ways AspectJ allows changing the target object, e.g., at call join points. Practical uses for changing the target object using advice include proxies and other wrapper objects.MiniMAO1was designed to serve as a core language for studying modular specification and verification in the aspect-oriented paradigm. To this end MiniMAO1
- •has an imperative, reference-based semantics,
- •models the control-flow effects of changing target object bindings with advice, and
- •has a safe static type system.
4.
5.
方面编织是系统关注点编织的实现部分,其优劣关系着面向方面软件系统的执行效率、编织粒度、模块化程度。依据方面化构件组装以及按需计算中间件平台需求,提出一种动态方面编织模型——DAWeaver,该模型利用BCEL修改类文件,通过方面容器反射调用方面组件,支持了编织的动态性。最后,给出该模型的原型系统,并对已编织系统作了性能分析。 相似文献
6.
李伟 《数字社区&智能家居》2007,1(6):1599
基于UML的ATM系统面向方面模型,能够把关注从系统中分离出来,形成一个独立于系统的方面模块。面向方面编程(AOP)技术允许把设计好的方面模块根据特定需要重新织入系统,组合为完整系统。模型扩展了UML来表达方面元素概念,并从系统的静态结构模型和方面织入建模ATM系统。 相似文献
7.
面向方面编程 ( AOP)把横切关注点从系统中分离 ,解决了面向对象编程 ( OOP)中代码纠缠、散射的问题。但在面向方面建模中 ,横切方面没有得到很好的支持。首先 ,在统一建模语言 ( UML)元模型的基础上利用类图建立了整体框架模型 ,设计了核心类、方面、横切元素及其之间的关系 ;其次 ,利用 UML扩展机制为切点、通知、方面等主要元素建立了新的模型 ,设计了它们与方面之间新的关联关系并为其定义了语义。通过 UML扩展,使得 UML能够直接表达面向方面概念 ,支持面向方面建模设计 ,实现了面向方面模型 相似文献
8.
面向方面编程(AOP)把横切关注点从系统中分离,解决了面向对象编程(OOP)中代码纠缠、散射的问题。但在面向方面建模中,横切方面没有得到很好的支持。首先,在统一建模语言(UML)元模型的基础上利用类图建立了整体框架模型,设计了核心类、方面、横切元素及其之间的关系;其次,利用UML扩展机制为切点、通知、方面等主要元素建立了新的模型,设计了它们与方面之间新的关联关系并为其定义了语义。通过UML扩展,使得UML能够直接表达面向方面概念,支持面向方面建模设计,实现了面向方面模型的可视化和可辨别性;整体框架模型使得面向方面整体结构清晰,各个核心元素之间关系明确,为面向方面建模提供了一个整体设计平台,提高了面向方面软件设计的模块化,增强了代码的重用性和系统的可维护性。 相似文献
9.
Kung Chen Shu-Chun Weng Jia-Yin Lin Meng Wang Siau-Cheng Khoo 《Higher-Order and Symbolic Computation》2011,24(1-2):151-189
Many side-effecting programming activities, such as profiling and tracing, can be formulated as crosscutting concerns and be framed as side-effecting aspects in the aspect-oriented programming paradigm. The benefit gained from this separation of concerns is particularly evident in purely functional programming, as adding such aspects using techniques such as monadification will generally lead to crosscutting changes. This paper presents an approach to provide side-effecting aspects for lazy purely functional languages in a user transparent fashion. We propose a simple yet direct state manipulation construct for developing side-effecting aspects and devise a systematic monadification scheme to translate the woven code to monadic style purely functional code. Furthermore, we present a static and dynamic semantics of the aspect programs and reason about the correctness of our monadification scheme with respect to them. 相似文献
10.
11.
在研究AOP原理的基础上,提出一种面向aspect的编程框架AODF,采用基于日志技术的增量式编织机制,不仅提高了编织效率,而且基于Bigraph理论的AODF支持方面的动态演化,实现了行为的一致性与相容性。另外,AODF从语言层提供对方面的支持,无需改动语言本身任何结构及特性,而且可以把自行编制的aspect配置为标准组件入库,实现方面的重用。从而使得遗留系统无需变更就可以获得面向方面的扩展。 相似文献
12.
The type and effect discipline is a new framework for reconstructing the principal type and the minimal effect of expressions in implicitly typed polymorphic functional languages that support imperative constructs. The type and effect discipline outperforms other polymorphic type systems. Just as types abstract collections of concrete values, effects denote imperative operations on regions. Regions abstract sets of possibly aliased memory locations. Effects are used to control type generalization in the presence of imperative constructs while regions delimit observable side-effects. The observable effects of an expression range over the regions that are free in its type environment and its type; effects related to local data structures can be discarded during type reconstruction. The type of an expression can be generalized with respect to the type variables that are not free in the type environment or in the observable effect. Introducing the type and effect discipline, we define both a dynamic and a static semantics for an ML-like language and prove that they are consistently related. We present a reconstruction algorithm that computes the principal type and the minimal observable effect of expressions. We prove its correctness with respect to the static semantics. 相似文献
13.
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. 相似文献
14.
Dian-Xiang Xu 《计算机科学技术学报》2009,24(5):949-961
Aspect-oriented programming modularizes crosscutting concerns into aspects with the advice invoked at the specified points
of program execution. Aspects can be used in a harmful way that invalidates desired properties and even destroys the conceptual
integrity of programs. To assure the quality of an aspect-oriented system, rigorous analysis and design of aspects are highly
desirable. In this paper, we present an approach to aspect-oriented modeling and verification with finite state machines.
Our approach provides explicit notations (e.g., pointcut, advice and aspect) for capturing crosscutting concerns and incremental
modification requirements with respect to class state models. For verification purposes, we compose the aspect models and
class models in an aspect-oriented model through a weaving mechanism. Then we transform the woven models and the class models
not affected by the aspects into FSP (Finite State Processes), which are to be checked by the LTSA (Labeled Transition System
Analyzer) model checker against the desired system properties. We have applied our approach to the modeling and verification
of three aspect-oriented systems. To further evaluate the effectiveness of verification, we created a large number of flawed
aspect models and verified them against the system requirements. The results show that the verification has revealed all flawed
models. This indicates that our approach is effective in quality assurance of aspect-oriented state models. As such, our approach
can be used for model-checking state-based specification of aspect-oriented design and can uncover some system design problems
before the system is implemented. 相似文献
15.
Dima Alhadidi Azzam Mourad Hakim Idrissi Kaitouni Mourad Debbabi 《Journal of Systems and Software》2013
In this paper, we propose a novel aspect-oriented approach based on GIMPLE, a language-independent and a tree-based representation generated by the GNU Compiler Collection (GCC), for the systemization of application security hardening. The security solutions are woven into GIMPLE representations in a systematic way, eliminating the need for manual hardening that might generate a considerable number of errors. To achieve this goal, we present a formal specification for GIMPLE weaving and the implementation strategies of the proposed weaving semantics. Syntax for a common aspect-oriented language that is abstract and multi-language support together with syntax for a core set for GIMPLE constructs are presented to express the weaving semantics. GIMPLE weaving accompanied by a common aspect-oriented language (1) allows security experts providing security solutions using this common language, (2) lets developers focus on the main functionality of programs by relieving them from the burden of security issues, (3) unifies the matching and the weaving processes for mainstream languages, and (4) facilitates introducing new security features in AOP languages. We handle the correctness and the completeness of GIMPLE weaving in two different ways. In the first approach, we prove them according to the rules and algorithms provided in this paper. In the second approach, we accommodate Kniesel's discipline that ensures that security solutions specified by our approach are applied at all and only the required points in source code, taking into consideration weaving interactions and interferences. Finally, we explore the viability and the relevance of our propositions by applying the defined approach for systematic security hardening to develop case studies. 相似文献
16.
Aspect Oriented Programming can arbitrarily distort the semantics of programs. In particular, weaving can invalidate crucial safety and liveness properties of the base program. In this article, we identify categories of aspects that preserve some classes of properties. Specialized aspect languages are then designed to ensure that aspects belong to a specific category and, therefore, that woven programs will preserve the corresponding properties.Our categories of aspects, inspired by Katz’s, comprise observers, aborters, confiners and weak intruders. Observers introduce new instructions and a new local state but they do not modify the base program’s state and control-flow. Aborters are observers which may also abort executions. Confiners only ensure that executions remain in the reachable states of the base program. Weak intruders are confiners between two advice executions. These categories (along with two others) are defined formally based on a language independent abstract semantics framework. The classes of preserved properties are defined as subsets of LTL for deterministic programs and CTL* for non-deterministic ones. We can formally prove that, for any program, the weaving of any aspect in a category preserves any property in the related class.We present, for most aspect categories, a specialized aspect language which ensures that any aspect written in that language belongs to the corresponding category. It can be proved that these languages preserve the corresponding classes of properties by construction. The aspect languages share the same expressive pointcut language and are designed w.r.t. a common imperative base language.Each category and language is illustrated by simple examples. The appendix provides semantics and two instances of proofs: the proof of preservation of properties by a category and the proof that all aspects written in a language belong to the corresponding category. 相似文献
17.
一种基于组件的aspect-oriented编程框架 总被引:2,自引:0,他引:2
面向方面的编程(AOP:aspect-oriented programming)是一种新的编程技术.它引进了aspect,将影响多个模块的行为封装到一个可重用模块中,允许程序员对横切(crosscutting concerns)进行模块化,从而消除了面向对象编程(OOP:object-oriented programming)引起的代码混乱和分散问题.本文讨论了在服务体模型上实现的一种aspect-oriented编程框架.这个编程框架使用aspect组件,定义了对OOP语言的扩展,可方便将模块化的aspect代码扩展到源程序中,解决了OOP模型在这方面的不足. 相似文献
18.
Although static typing provides undeniable benefits for the development of applications, dynamically typed languages have become increasingly popular for specific scenarios. Since each approach offers different benefits, the StaDyn programming language has been designed to support both dynamic and static typing. This paper describes the minimal core of the StaDyn programming language. Its type system performs type reconstruction over both dynamic and static implicitly typed references. A new interpretation of union and intersection types allows statically gathering the type information of dynamic references, which improves runtime performance and robustness. The evaluation of the generated code has shown how our approach offers an important runtime performance benefit. 相似文献
19.
Mannino M.V. Choi J.J. Batory D.S. 《IEEE transactions on pattern analysis and machine intelligence》1990,16(11):1258-1272
The object-oriented functional data language (O2FDL) is an interactive strongly typed database programming language that integrates the object-oriented and functional programming paradigms. It was designed for advanced applications that require a powerful and uniform database programming language supporting the software engineering principles of these tow paradigms. To this end, the O2 FDL supports inheritance and encapsulation of object-oriented languages, and an equational notation and strong typing of functional programming. Strong typing is extended with type restrictions to constrain the instantiations of type variables in function interfaces, while inheritance is augmented with a monotonic subtype rule for function redefinition. The O2FDL also supports novel features. For the core of the O2FDL, a denotational semantics based on an extended λ-calculus is provided. For selected system-defined functions, operational semantics are provided and it is demonstrated that a subset of the O2FDL is at least as expressive as the relational algebra 相似文献
20.
A typed program logic LMF for recursive specification and verification is presented. It comprises a strict functional programming language with polymorphic and recursively defined partial functions and polymorphic data types. The logic is two-valued with the equality symbol as only predicate. Quantifiers range over the values, which permits inductive proofs of properties. The semantics is based on a contextual (observational) semantics, which gives a consistent presentation of higher-order functions. Our analysis also sheds new light on the the role of partial functions and loose specifications. It is also an analysis of influence of extensions of programs on the tautologies. The main result is that universally quantified equations are conservative, which is also the base for several other conservative classes of formulas. 相似文献