Roles and role models have received much attention as useful concepts for developing highly reusable and dynamically evolvable systems. Role models belong to the category of collaboration-based development techniques....
详细信息
Roles and role models have received much attention as useful concepts for developing highly reusable and dynamically evolvable systems. Role models belong to the category of collaboration-based development techniques. but most of the existing approaches to role models do not explicitly incorporate the core principle of collaboration-based developments as an essential property of their primary design goals. Consequently, the existing approaches still suffer from a problematic phenomenon that the structural and behavioral constraints defined in a role system can be violated during the role-binding stage. We call such a problematic phenomenon the role-binding anomaly. In order to alleviate the role-binding anomaly, we propose an enhanced role model, in which all role instances and core objects can exist by themselves, namely., they can be developed, executed, and tested independently. Roles and core classes can be bound to each other at the instance level. In addition, the role system describes and encapsulates the behavior for dynamic reconfigurations among role instances. The enhanced role model is designed so as to be meaningful with respect to software engineering principles, rather than dynamic evolution. It also facilitates role model implementation using general programming languages (i.e. not supporting dynamic specialization) such as Java. To illustrate how the proposed role model makes such benefits, we develop a set of Java classes necessary for implementing the enhanced role model in the form of a Java package role, and present a simplified automatic teller machine system as an example application. Copyright (C) 2002 John Wiley Sons, Ltd.
Alternative semantics for aspect-oriented abstractions can be defined by language designers using extensible aspect compiler frameworks. However, application developers are prevented from tailoring the language semant...
详细信息
ISBN:
(纸本)9781605584423
Alternative semantics for aspect-oriented abstractions can be defined by language designers using extensible aspect compiler frameworks. However, application developers are prevented from tailoring the language semantics in an application-specific manner. To address this problem, we propose art architecture for aspect-oriented languages with an explicit meta-interface to language semantics. We demonstrate the benefits of such an architecture by presenting several scenarios in which aspect-oriented programs use the meta-interface of the language to tailor its semantics to a particular application execution context.
metaprogramming is the process of writing computer programs that treat programs as data, enabling them to analyze or transform existing programs or generate new ones. While the concept of metaprogramming has existed f...
详细信息
metaprogramming is the process of writing computer programs that treat programs as data, enabling them to analyze or transform existing programs or generate new ones. While the concept of metaprogramming has existed for several decades, activities focusing on metaprogramming have been increasing rapidly over the past few years, with most languages offering some metaprogramming support and the amount of meta-code being developed growing exponentially. In this article, we introduce a taxonomy of metaprogramming languages and present a survey of metaprogramming languages and systems based on the taxonomy. Our classification is based on the metaprogramming model adopted by the language, the phase of the metaprogram evaluation, the metaprogram source location, and the relation between the metalanguage and the object language.
Reflective operations are powerful APIs (Application Programming Interface) that let developers build advanced tools and architectures. Reflective operations are used for implementing tools and development environment...
详细信息
Reflective operations are powerful APIs (Application Programming Interface) that let developers build advanced tools and architectures. Reflective operations are used for implementing tools and development environments (e.g., compilers, debuggers, inspectors) or language features (e.g., distributed systems, exceptions, proxies, aspect-oriented programming). In addition, languages are evolving, introducing better concepts, and revising practices and APIs. Since 2008 Pharo has evolved from Squeak and its reflective API has evolved accordingly, diverging consequently from the original Smalltalk reflective API. With more than 500 reflective methods identified, Pharo has one of the largest reflective feature sets ranging from structural reflection to on-demand stack reification. Those operations are often built on top of the other, creating different layers of reflective operations, from low-level to high-level ones. There is a need to understand the current reflective APIs to understand their underlying use, potential dependencies, and whether some reflective features can be scoped and optional. Such an analysis is challenged by new metaobjects organically introduced in the system, such as first-class instance variables, and their mixture with the base-level API of objects and classes. In this article, we analyze the reflective operations used in Pharo 12 and their interdependencies. We propose a classification based on their semantics and we identify a set of issues of the current implementation. Such an analysis of reflective operations in Pharo is important to support the revision of the reflective layer and its potential redesign.
暂无评论