10 research outputs found

    Reflections on metaprogramming

    Get PDF
    Journal ArticleThe spread of object-oriented technology has led to object-oriented programming languages with object-oriented implementations. By encapsulating part of t h e semantics of a language within a set of default classes and empowering the programmer to derive new versions of these base classes, a designer can provide a language whose semantics can be tailored by individual programmers. The degree to which such languages are simultaneously flexible and efficient is an open question. We address this question by reporting our experience with using this technique to incorporate support for persistence into the Common Lisp Object System via its metaobject protocol. For many aspects of our implementation we found that the metaobject protocol was perfectly suitable. In other cases we had to variously extend the protocol, pay an unacceptable performance penalty, or modify the language implementation directly. Based on our experience we propose some improvements to the protocol. We also present some performance measurements that reveal the need for improved language implementation techniques

    Metamusing on object persistence

    Get PDF
    Journal ArticleThe need to "open up languages" has led to object-oriented programming languages with object-oriented implementations. By encapsulating the fundamental aspects of a language semantics within a set of default classes and giving t h e programmer t h e flexibility of deriving new versions of these base classes, a language whose semantics can be tailored to the needs of individual programmers can be provided. The degree of success in designing a language in this way to achieve flexibility and efficiency simultaneously is an open question. The Common Lisp Object System is designed with these techniques and we address this question by reporting our experience with the CLOS metaobject protocol in incorporating support for persistence into CLOS. For many aspects of our implementation we found that the metaobject protocol was perfectly suitable. In other cases we had to variously extend the protocol, pay an unacceptable performance penalty, or modify the language implementation directly. Based on our experience we propose some improvements to the protocol. We also present some performance measurements that reveal the need for improved language implementation techniques

    Using metaprogramming to add persistence to CLOS

    Get PDF
    Journal ArticleThe need to "open up" languages and the spread of object-oriented technology have led to object-oriented programming languages with object-oriented implementations. By encapsulating the fundamental aspects of language semantics within a set of default classes and giving the programmer the flexibility of deriving new versions of these base classes, a language whose semantics can be tailored to the needs of individual programmers can be provided. The degree to which such languages are simultaneously flexible and efficient is an open question. We address this question by reporting our experience with using this technique to incorporate support for persistence into the Common Lisp Object System via its metaobject protocol. For many aspects of our implementation we found that the metaobject protocol was perfectly suitable. In other cases we had to variously extend the protocol, pay an unacceptable performance penalty, or modify the language implementation directly. Based on our experience we propose some improvements to the protocol. We also present some performance measurements that reveal the need for improved language implementation techniques

    Fully Reflective Execution Environments: Virtual Machines for More Flexible Software

    Get PDF
    VMs are complex pieces of software that implement programming language semantics in an efficient, portable, and secure way. Unfortunately, mainstream VMs provide applications with few mechanisms to alter execution semantics or memory management at run time. We argue that this limits the evolvability and maintainability of running systems for both, the application domain, e.g., to support unforeseen requirements, and the VM domain, e.g., to modify the organization of objects in memory. This work explores the idea of incorporating reflective capabilities into the VM domain and analyzes its impact in the context of software adaptation tasks. We characterize the notion of a fully reflective VM, a kind of VM that provides means for its own observability and modifiability at run time. This enables programming languages to adapt the underlying VM to changing requirements. We propose a reference architecture for such VMs and present TruffleMATE as a prototype for this architecture. We evaluate the mechanisms TruffleMATE provides to deal with unanticipated dynamic adaptation scenarios for security, optimization, and profiling aspects. In contrast to existing alternatives, we observe that TruffleMATE is able to handle all scenarios, using less than 50 lines of code for each, and without interfering with the application's logic

    Making object-oriented databases more knowledgeable (From ADAM to ABEL)

    Get PDF
    Tesis leida en la Universidad de Aberdeen. 178 p.The salient points of this thesis are as follows: • Object-Oriented Databases can help in solving the impedance mismatch problem by introducing methods. However, methods have sometimes been overused in the sense th at the code encapsulated refers not only to how the operation is implemented but also to other kinds of knowledge that are implicit in the code. The disadvantages of this approach for modelling integrity constraints, user-defined relationships and active behaviour are pointed out. • The ADAM Object-Oriented Database has been extended to allow the designer to specify integrity constraints declaratively. A constraint equation approach is implemented th at supports the inheritance of constraints. • A need for semantic-rich user-defined relationships has been identified. In this thesis, relationships are represented as objects. An approach to enhance the semantics of relationships in both its structural and behavioural aspects is presented. The most novel idea of the approach presented is the support of the inferred properties and the operational semantics of relationships. • Active Databases have recently become an im portant area of research. This thesis shows how to extend an Object-Oriented Database with active capabilities. The principal contribution lies in representing as ‘first-class’ objects not only the active rules but also the rule manager itself. Hence, besides handling active rules as any other object in the system, future requirements can be supported just by specialising the current rule manager. • Active rules have been proposed for several purposes. Several examples, are given of the direct use of rules. However, higher level tools can be provided of which rule

    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

    Using a loadtime metaobject protocol to enforce access control policies upon user-level compiled code

    Get PDF
    This thesis evaluates the use of a loadtime metaobject protocol as a practical mechanism for enforcing access control policies upon applications distributed as user-level compiled code. Enforcing access control policies upon user-level compiled code is necessary because there are many situations where users are vulnerable to security breaches because they download and run potentially untrustworthy applications provided in the form of user-level compiled code. These applications might be distributed applications so access control for both local and distributed resources is required. Examples of potentially untrustworthy applications are Browser plug-ins, software patches, new applications, or Internet computing applications such as SETI@home. Even applications from trusted sources might be malicious or simply contain bugs that can be exploited by attackers so access control policies must be imposed to prevent the misuse of resources. Additionally, system administrators might wish to enforce access control policies upon these applications to ensure that users use them in accordance with local security requirements. Unfortunately, applications developed externally may not include the necessary enforcement code to allow the specification of organisation-specific access control policies. Operating system security mechanisms are too coarse-grained to enforce security policies on applications implemented as user-level code. Mechanisms that control access to both user-level and operating system-level resources are required for access control policies but operating system mechanisms only focus on controlling access to system-level objects. Conventional object-oriented software engineering can be used to use existing security architectures to enforce access control on user-level resources as well as system-resources. Common techniques are to insert enforcement within libraries or applications, use inheritance and proxies. However, these all provide a poor separation of concerns and cannot be used with compiled code. In-lined reference monitors provide a good separation of concerns and meet criteria for good security engineering. They use object code rewriting to control access to both userlevel and system-level objects by in-lining reference monitor code into user-level compiled code. However, their focus is upon replacing existing security architectures and current implementations do not address distributed access control policies. Another approach that does provide a good separation of concerns and allows reuse of existing security architectures are metaobject protocols. These allow constrained changes to be made to the semantics of code and therefore can be used to implement access control policies for both local and distributed resources. Loadtime metaobject protocols allow metaobject protocols to be used with compiled code because they rewrite base level classes and insert meta-level interceptions. However, these have not been demonstrated to meet requirements for good security engineering such as complete mediation. Also current implementations do not provide distributed access control. This thesis implements a loadtime metaobject protocol for the Java programming language. The design of the metaobject protocol specifically addresses separation of concerns, least privilege, complete mediation and economy of mechanism. The implementation of the metaobject protocol, called Kava, has been evaluated by implementing diverse security policies in two case studies involving third-party standalone and distributed applications. These case studies are used as the basis of inferences about general suitability of using loadtime reflection for enforcing access control policies upon user-level compiled code.EThOS - Electronic Theses Online ServiceGBUnited Kingdo
    corecore