8 research outputs found

    Multimethods and separate static typechecking in a language with C++-like object model

    Full text link
    The goal of this paper is the description and analysis of multimethod implementation in a new object-oriented, class-based programming language called OOLANG. The implementation of the multimethod typecheck and selection, deeply analyzed in the paper, is performed in two phases in order to allow static typechecking and separate compilation of modules. The first phase is performed at compile time, while the second is executed at link time and does not require the modules' source code. OOLANG has syntax similar to C++; the main differences are the absence of pointers and the realization of polymorphism through subsumption. It adopts the C++ object model and supports multiple inheritance as well as virtual base classes. For this reason, it has been necessary to define techniques for realigning argument and return value addresses when performing multimethod invocations.Comment: 15 pages, 18 figure

    Efficient compilation of .NET programs for embedded systems

    Full text link
    International audienceThe overhead associated with object-oriented languages has been the major drawback in their adoption by the embedded world. In this paper, we propose a compilation approach based on the closed-world assumption (CWA) that should enable OO technologies such as .NET on small embedded systems. Our implementation is based on a type analysis algorithm, which extends RTA so that it eliminates some subtype tests due to array covariance, and coloring, which maintain single subtyping invariants under the CWA. The impact of our global optimizations has been evaluated on embedded applications written in C#. Preliminary results show a noticeable reduction of the code size, class hierarchy and object mechanisms such as virtual calls and subtype tests

    Fast object operations in a persistent programming system

    Get PDF
    Thesis (M.S.)--Massachusetts Institute of Technology, Dept. of Electrical Engineering and Computer Science, 1994.Includes bibliographical references (p. 77-79).by Andrew C. Myers.M.S

    A fast method dispatcher for compiled languages with multiple inheritance

    No full text

    Implementing statically typed object-oriented programming languages

    Full text link
    A paraîtreInternational audienceObject-oriented programming languages represent an original implementation issue due to the mechanism known as late binding, aka message sending. The underlying principle is that the address of the actually called procedure is not statically determined, at compile-time, but depends on the dynamic type of a distinguished parameter known as the receiver. In statically typed languages, the point is that the receiver's dynamic type may be a subtype of its static type. A similar issue arises with attributes, because their position in the object layout may depends on the object's dynamic type. Furthermore, subtyping introduces another original feature, i.e. subtype checks. All three mechanisms need specific implementations, data structures and algorithms. In statically typed languages, late binding is generally implemented with tables, called virtual function tables in C++ jargon. These tables reduce method calls to pointers to functions, through a small fixed number of extra indirections. It follows that object-oriented programming yields some overhead, as compared to usual procedural languages. The different techniques and their resulting overhead depend on several parameters. Firstly, inheritance and subtyping may be single or multiple and a mixing is even possible, as in JAVA, which presents single inheritance for classes and multiple subtyping for interfaces. Multiple inheritance is a well known complication. Secondly, the production of executable programs may involve various schemes, from global compilation frameworks, where the whole program is known at compile time, to separate compilation and dynamic loading, where each program unit---usually a class in an object-oriented context---is compiled and loaded independently of any usage. Global compilation is well known to facilitate optimization. In this paper, we review the various implementation schemes available in the context of static typing and in the three cases of single inheritance, multiple inheritance, and single inheritance but with multiple subtyping, e.g. JAVA. The survey focuses on separate compilation and dynamic loading, as it is the most commonly used framework and the most demanding. However, many works have been recently undertaken in the global compilation framework, mostly for dynamically typed languages but also applied to the EIFFEL language in the SMARTEIFFEL compiler. Hence, we examine global techniques and how they can improve implementation efficiency. Finally, a mixed framework is considered, where separate compilation is followed by a global step, similar to linking, which uses global techniques, as well for implementation, with coloring, as for optimization, with type analysis. An application to dynamic loading is sketched

    Object-Centric Reflection: Unifying Reflection and Bringing It Back to Objects

    Get PDF
    Reflective applications are able to query and manipulate the structure and behavior of a running system. This is essential for highly dynamic software that needs to interact with objects whose structure and behavior are not known when the application is written. Software analysis tools, like debuggers, are a typical example. Oddly, although reflection essentially concerns run-time entities, reflective applications tend to focus on static abstractions, like classes and methods, rather than objects. This is phenomenon we call the object paradox, which makes developers less effective by drawing their attention away from run-time objects. To counteract this phenomenon, we propose a purely object-centric approach to reflection. Reflective mechanisms provide object-specific capabilities as another feature. Object-centric reflection proposes to turn this around and put object-specific capabilities as the central reflection mechanism. This change in the reflection architecture allows a unification of various reflection mechanisms and a solution to the object paradox. We introduce Bifr\"ost, an object-centric reflective system based on first-class meta-objects. Through a series of practical examples we demonstrate how object-centric reflection mitigates the object paradox by avoiding the need to reflect on static abstractions. We survey existing approaches to reflection to establish key requirements in the domain, and we show that an object-centric approach simplifies the meta-level and allows a unification of the reflection field. We demonstrate how development itself is enhanced with this new approach: talents are dynamically composable units of reuse, and object-centric debugging prevents the object paradox when debugging. We also demonstrate how software analysis is benefited by object-centric reflection with Chameleon, a framework for building object-centric analysis tools and MetaSpy, a domain-specific profile

    Run-time Variability with Roles

    Get PDF
    Adaptability is an intrinsic property of software systems that require adaptation to cope with dynamically changing environments. Achieving adaptability is challenging. Variability is a key solution as it enables a software system to change its behavior which corresponds to a specific need. The abstraction of variability is to manage variants, which are dynamic parts to be composed to the base system. Run-time variability realizes these variant compositions dynamically at run time to enable adaptation. Adaptation, relying on variants specified at build time, is called anticipated adaptation, which allows the system behavior to change with respect to a set of predefined execution environments. This implies the inability to solve practical problems in which the execution environment is not completely fixed and often unknown until run time. Enabling unanticipated adaptation, which allows variants to be dynamically added at run time, alleviates this inability, but it holds several implications yielding system instability such as inconsistency and run-time failures. Adaptation should be performed only when a system reaches a consistent state to avoid inconsistency. Inconsistency is an effect of adaptation happening when the system changes the state and behavior while a series of methods is still invoking. A software bug is another source of system instability. It often appears in a variant composition and is brought to the system during adaptation. The problem is even more critical for unanticipated adaptation as the system has no prior knowledge of the new variants. This dissertation aims to achieve anticipated and unanticipated adaptation. In achieving adaptation, the issues of inconsistency and software failures, which may happen as a consequence of run-time adaptation, are evidently addressed as well. Roles encapsulate dynamic behavior used to adapt players representing the base system, which is the rationale to select roles as the software system's variants. Based on the role concept, this dissertation presents three mechanisms to comprehensively address adaptation. First, a dynamic instance binding mechanism is proposed to loosely bind players and roles. Dynamic binding of roles enables anticipated and unanticipated adaptation. Second, an object-level tranquility mechanism is proposed to avoid inconsistency by allowing a player object to adapt only when its consistent state is reached. Last, a rollback recovery mechanism is proposed as a proactive mechanism to embrace and handle failures resulting from a defective composition of variants. A checkpoint of a system configuration is created before adaptation. If a specialized bug sensor detects a failure, the system rolls back to the most recent checkpoint. These mechanisms are integrated into a role-based runtime, called LyRT. LyRT was validated with three case studies to demonstrate the practical feasibility. This validation showed that LyRT is more advanced than the existing variability approaches with respect to adaptation due to its consistency control and failure handling. Besides, several benchmarks were set up to quantify the overhead of LyRT concerning the execution time of adaptation. The results revealed that the overhead introduced to achieve anticipated and unanticipated adaptation to be small enough for practical use in adaptive software systems. Thus, LyRT is suitable for adaptive software systems that frequently require the adaptation of large sets of objects
    corecore