skip to main content
10.1145/1595768.1595776acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article

Safe reflection through polymorphism

Published:24 August 2009Publication History

ABSTRACT

Code executed in a fully reflective system switches back and forth between application and interpreter code. These two states can be seen as contexts in which an expression is evaluated. Current language implementations obtain reflective capabilities by exposing objects to the interpreter. However, in doing so these systems break the encapsulation of the application objects. In this paper we propose safe reflection through polymorphism, i.e. by unifying the interface and ensuring the encapsulation of objects from both the interpreter and application context. We demonstrate a homogeneous system that defines the execution semantics in terms of itself, thus enforcing that encapsulation is not broken.

References

  1. N. Adams and J. Rees. Object-oriented programming in scheme. In Conference Record of the 1988 ACM Conference on Lisp and Functional Programming, pages 277--288, Aug. 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. K. Auer. Reusability through self-encapsulation. In Pattern languages of program design, pages 505--516. ACM Press/Addison-Wesley Publishing Co., 1995. Google ScholarGoogle Scholar
  3. G. Bracha and D. Ungar. Mirrors: design principles for meta-level facilities of object-oriented programming languages. In Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'04), ACM SIGPLAN Notices, pages 331--344, New York, NY, USA, 2004. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. K. Gybels, R. Wuyts, S. Ducasse, and M. D'Hondt. Inter-language reection - a conceptual model and its implementation. Journal of Computer Languages, Systems and Structures, 32(2-3):109--124, July 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. Ingalls, T. Kaehler, J. Maloney, S. Wallace, and A. Kay. Back to the future: The story of Squeak, a practical Smalltalk written in itself. In Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA'97), pages 318--326. ACM Press, Nov. 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. H. Lorenz and J. Vlissides. Pluggable reection: decoupling meta-interface and implementation. In ICSE '03: Proceedings of the 25th International Conference on Software Engineering, pages 3--13, Washington, DC, USA, 2003. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Maes. Concepts and experiments in computational reection. In Proceedings OOPSLA '87, ACM SIGPLAN Notices, volume 22, pages 147--155, Dec. 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. I. Piumarta and A. Warth. Open reusable object models. Technical report, Viewpoints Research Institute, 2006. VPRI Research Note RN-2006-003-a.Google ScholarGoogle Scholar
  9. A. Rigo and S. Pedroni. PyPy's approach to virtual machine construction. In Proceedings of the 2006 conference on Dynamic languages symposium, OOPSLA '06: Companion to the 21st ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, pages 944--953, New York, NY, USA, 2006. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. N. Schärli, A. P. Black, and S. Ducasse. Object-oriented encapsulation for dynamically typed languages. In Proceedings of 18th International Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA'04), pages 130--149, Oct. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Safe reflection through polymorphism

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        CASTA '09: Proceedings of the first international workshop on Context-aware software technology and applications
        August 2009
        20 pages
        ISBN:9781605587073
        DOI:10.1145/1595768

        Copyright © 2009 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 24 August 2009

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Upcoming Conference

        FSE '24

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader