495 research outputs found

    Remote method invocation as a first-class citizen

    No full text
    The classical remote method invocation (RMI) mechanism adopted by several object-based middleware is 'black-box' in nature, and the RMI functionality, i.e., the RMI interaction policy and its configuration, is hard-coded into the application. This RMI nature hinders software development and reuse, forcing the programmer to focus on communication details often marginal to the application being developed. Extending the RMI behavior with extra functionality is also a very difficult job, because added code must be scattered among the entities involved in communications. This situation could be improved by developing the system in several separate layers, confining communications and related matters to specific layers. As demonstrated by recent work on reflective middleware, reflection represents a powerful tool for realizing such a separation and therefore overcoming the problems referred to above. Such an approach improves the separation of concerns between the communication-related algorithms and the functional aspects of an application. However, communications and all related concerns are not managed as a single unit that is separate from the rest of the application, which makes their reuse, extension, and management difficult. As a consequence, communications concerns continue to be scattered across the meta-program, communication mechanisms continue to be black-box in nature, and there is only limited opportunity to adjust communication policies through configuration interfaces. In this paper we examine the issues raised above, and propose a reflective approach specially designed to open up the Java RMI mechanism. Our proposal consists of a new reflective model, called multi-channel reification, that reflects on and reifies communication channels, i.e., it renders communication channels first-class citizens. This model is designed both for developing new communication mechanisms and for extending the behavior of communication mechanisms provided by the underlying system. Our approach is embodied in a framework called mChoRM, which is described in detail in this paper

    SmartMethod: an Efficient Replacement for Method

    No full text
    In the last few years the interest in reflection has grown and many modem programming languages/architectures have provided the programmer with reflective mechanisms. As well as any other novelty also reflection has detractors. They rightly or wrongly accuse reflection to be too inefficient to be used with real profit. In this work, we have investigated about the performance of Java reflection library (especially of the class Method and of its method invoke) and realized a mechanism which improves its performances. Our mechanism consists of a class, named SmartMethod and of a parser contributing to transform reflective invocations into direct call carried out by the standard invocation mechanism of Java. The SmartMethod class is compliant - that is, it provides exactly the same services -, with the class Method of the standard Java core reflection library but it provides a more efficient reflective method invocation

    Smartreflection: Efficient introspection in java

    No full text
    In the last few years the interest in reflection has grown and many modern programming languages/environments (e.g., Java and.NET) have provided the programmer with reflective mechanisms, i.e., with the ability of dynamically looking into (introspect) the structure of the code from the code itself. In spite of its evident usefulness, reflection has many detractors, who claim that it is too inefficient to be used with real profit. In this work, we have investigated about the performance issue in the context of the Java reflection library and presented a different approach to the introspection in Java that improves its performances. The basic idea of the proposed approach consists of moving most of the overhead due to the dynamic introspection from run-time to compiletime. The efficiency improvement has been proved by providing a new reflection library compliant – that is, it provides exactly the same services –, with the standard Java reflection library based on the proposed approach. This paper is focused on speeding up the reification and the invocation of methods, i.e., on the class SmartMethod that replaces the class Method of the standard reflection library

    Language components for modular DSLs using traits

    No full text
    Recent advances in tooling and modern programming languages have progressively brought back the practice of developing domain-specific languages as a means to improve software development. Consequently, the problem of making composition between languages easier by emphasizing code reuse and componentized programming is a topic of increasing interest in research. In fact, it is not uncommon for different languages to share common features, and, because in the same project different DSLs may coexist to model concepts from different problem areas, it is interesting to study ways to develop modular, extensible languages. Earlier work has shown that traits can be used to modularize the semantics of a language implementation; a lot of attention is often spent on embedded DSLs; even when external DSLs are discussed, the main focus is on modularizing the semantics. In this paper we will show a complete trait-based approach to modularize not only the semantics but also the syntax of external DSLs, thereby simplifying extension and therefore evolution of a language implementation. We show the benefits of implementing these techniques using the Scala programming language

    @Java : bringing a richer annotation model to Java

    No full text
    The ability to annotate code and, in general, the capability to attach arbitrary meta-data to portions of a program are features that have become more and more common in programming languages. Annotations in Java make it possible to attach custom, structured meta-data to declarations of classes, fields and methods. However, the mechanism has some limits: annotations can only decorate declarations and their instantiation can only be resolved statically. With this work, we propose an extension to Java (named @Java) with a richer annotation model, supporting code block and expression annotations, as well as dynamically evaluated members. In other words, in our model, the granularity of annotations extends to the statement and expression level and annotations may hold the result of runtime-evaluated expressions. Our extension to the Java annotation model is twofold: (i) we introduced block and expression annotations and (ii) we allow every annotation to hold dynamically evaluated values. Our implementation also provides an extended reflection API to support inspection and retrieval of our enhanced annotations

    (Symbolic) state-space inspection of a class of dynamic Petri nets

    No full text
    The design of dynamic or adaptable discrete-event systems needs for adequate modeling techniques in order to manage possible structural changes occurring during system's lifecycle. An usual approach is that of polluting design with details not concerning the (current) system behavior, rather its evolution. That hampers analysis, reuse and maintenance in general. A Petri net-based reflective layout based on classical Petri nets was recently proposed to support dynamic discrete-event system's design, and was applied to dynamic workflows. The basic idea is that keeping functional aspects separated from evolutionary ones, deploying evolution on the (current) system configuration when necessary, results in a clean formal model for dynamic systems. This model preserves the ability of verifying properties typical of classical Petri nets. As a first step toward the implementation of a discrete-event simulator, Reflective Petri nets are provided with a (symbolic) reduced state-transition graph

    Formal Attributes Traceability in Modular Language Development Frameworks

    No full text
    AbstractModularization and component reuse are concepts that can speed up the design and implementation of domain specific languages. Several modular development frameworks have been developed that rely on attributes to share information among components. Unfortunately, modularization also fosters development in isolation and attributes could be undefined or used inconsistently due to a lack of coordination. This work presents 1) a type system that permits to trace attributes and statically validate the composition against attributes lack or misuse and 2) a correct and complete type inference algorithm for this type system. The type system and inference are based on the Neverlang development framework but it is also discussed how it can be used with different frameworks
    corecore