Skip to main content

Design and partial evaluation of meta-objects for a concurrent reflective language

  • Conference paper
  • First Online:
ECOOP’98 — Object-Oriented Programming (ECOOP 1998)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1445))

Included in the following conference series:

Abstract

Customizable meta-objects are a powerful abstraction for extending language features and implementation mechanisms, but interpretive execution suffers from severe performance penalty. Some of this penalty can be reduced by applying partial evaluation to meta-interpreters, but partial evaluation of meta-objects in existing concurrent object-oriented languages is ineffective. This paper proposes a new meta-object design for our reflective language ABCL/R3. It yields meta-objects that can be optimized effectively using partial evaluation. The crux of the design is the separation of state-related operations from other operations, and this separation is accomplished by using reader/writer methods in our concurrent object-oriented language called Schematic. Our benchmark trials show that non-trivial programs with partially evaluated meta-objects run more than six times faster than ones that are interpreted by meta-objects. In addition, a partially evaluated program that uses a customized meta-object runs as efficiently as a program that is manually rewritten so as to have the same functionality without using meta-objects.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Andersen, L. O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen (1994). (DIKU Report 94/19)

    Google Scholar 

  2. Asai, K., Masuhara, H., Matsuoka, S., Yonezawa, A.: Partial Evaluation as a Compiler for Reflective Languages. Technical Report 95-10, Department of Information Science, University of Tokyo (1995)

    Google Scholar 

  3. Asai, K., Masuhara, H., Yonezawa, A.: Partial Evaluation of Call-by-value lambdacalculus with Side-effects. In Partial Evaluation and Semantics-Based Program Manipulation (PEPM'97), SIGPLAN Notices, Vol. 32, No. 12. ACM (1997) 12–21

    Google Scholar 

  4. Chambers, C, Ungar, D., Lee, E.: An Efficient Implementation of Self, a Dynamically-Type Object-Oriented Language Based on Prototypes. In Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'89), SIGPLAN Notices, Vol. 24, No. 10. ACM (1989) 49–70

    Google Scholar 

  5. Chiba, S.: A Metaobject Protocol for C++. In Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'95), SIGPLAN Notices, Vol. 30, No. 10. ACM (1995) 285–299

    Google Scholar 

  6. Chiba, S. Masuda, T.: Designing an Extensible Distributed Language with a Meta-Level Architecture. In European Conference on Object-Oriented Programming (ECOOP'93), Lecture Notes in Computer Science, Vol. 707. Springer-Verlag (1993) 482–501.

    Google Scholar 

  7. Futamura, Y.: Partial Evaluation of Computation Process—an Approach to a Compiler-compiler. Systems, Computers, Controls, Vol. 2, No. 5 (1971) 45–50

    Google Scholar 

  8. Gengler, M. Martel, M.: Self-applicable partial evaluation for the pi-calculus. In Partial Evaluation and Semantics-Based Program Manipulation (PEPM'97), SIGPLAN Notices, Vol. 32, No. 12. ACM (1997)

    Google Scholar 

  9. Hosoya, H., Kobayashi, N., Yonezawa, A.: Partial Evaluation Scheme for Concurrent Languages and Its Correctness. Euro-Par'96 Parallel Processing, Lecture Notes in Computer Science, Vol. 1123. Springer-Verlag (1996) 625–632

    Google Scholar 

  10. Igarashi, A. Kobayashi, N.: Type-Based Analysis of Usage of Communication Channels for Concurrent Programming Languages. In International Static Analysis Symposium (SAS'97), Lecture Notes in Computer Science, Vol. 1302. Springer-Verlag, (1997) 187–201

    Google Scholar 

  11. Ishikawa, Y., Hori, A., Sato, M., Matsuda, M., Nolte, J., Tezuka, H., Konaka, H., Maeda, M., Kubota, K.: Design and Implementation of Metalevel Architecture in C++: MPC++ Approach. In Reflection Symposium'96 (1996) 153–166

    Google Scholar 

  12. Jones, N. D., Gomard, C. K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice Hall (1993)

    Google Scholar 

  13. Kiczales, G., Rivières, J. des, Bobrow, D. G.: The Art of the Metaobject Protocol. MIT Press, Cambridge, MA (1991)

    Google Scholar 

  14. Kiczales, G. Rodriguez, L.: Efficient Method Dispatch in PCL. In LISP and Functional Programming (LFP'90), ACM (1990) 99–105

    Google Scholar 

  15. Kobayashi, N., Nakade, M., Yonezawa, A.: Static Analysis of Communication for Asynchronous Concurrent Programming Languages. In International Static Analysis Symposium (SAS'95), Lecture Notes in Computer Science, Vol. 983. Springer-Verlag (1995) 225–242

    Google Scholar 

  16. Kobayashi, N., Pierce, B. C., Turner, D. N.: Linearity and the Pi-Calculus. In Principles of Programming Languages (POPL'96) (1996) 358–371

    Google Scholar 

  17. Maes, P.: Concepts and Experiments in Computational Reflection. In Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'87), SIGPLAN Notices Vol. 22, No. 12. ACM (1987) 147–155

    Google Scholar 

  18. Marinescu, M. Goldberg, B.: Partial Evaluation Techniques for Concurrent Programs. In Partial Evaluation and Semantics-Based Program Manipulation (PEPM'97), SIGPLAN Notices, Vol. 32, No. 12. ACM (1997) 47–62

    Google Scholar 

  19. Masuhara, H., Matsuoka, S., Asai, K., Yonezawa, A.: Compiling Away the Meta-Level in Object-Oriented Concurrent Reflective Languages Using Partial Evaluation. In Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'95), SIGPLAN Notices, Vol. 30, No. 10. ACM (1995) 300–315

    Google Scholar 

  20. Masuhara, H., Matsuoka, S., Watanabe, T., Yonezawa, A.: Object-Oriented Concurrent Reflective Languages can be Implemented Efficiently. In Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'92), SIGPLAN Notices, Vol. 27, No. 10. ACM (1992) 127–145

    Google Scholar 

  21. Masuhara, H., Matsuoka, S., Yonezawa, A.: Implementing Parallel Language Constructs Using a Reflective Object-Oriented Language. In Reflection Symposium'96, San Francisco, CA. (1996) 79–91

    Google Scholar 

  22. Nakaya, A., Yamamoto, K., Yonezawa, A.: RNA Secondary Structure Prediction Using Highly Parallel Computers. Compt. Appl. Biosci. 11 (1995) 685–692

    Google Scholar 

  23. Oyama, Y., Taura, K., Yonezawa, A.: An Efficient Compilation Framework for Languages Based on a Concurrent Process Calculus. In Euro-Par '97 Object-Oriented Programming, Lecture Notes in Computer Science, Vol. 1300. Springer-Verlag, (1997)

    Google Scholar 

  24. Smith, B. C: Reflection and Semantics in Lisp. In Principles of Programming Languages (POPL'84), ACM (1984) 23–35

    Google Scholar 

  25. Sun Microsystems: Java(TM) Core Reflection: API and Specification, (1997)

    Google Scholar 

  26. Taura, K.: Efficient and Reusable Implementation of Fine-Grain Multithreading and Garbage Collection on Distributed-Memory Parallel Computers. PhD thesis, Department of Information Science, University of Tokyo (1997).

    Google Scholar 

  27. Taura, K. Yonezawa, A.: Schematic: A Concurrent Object-Oriented Extension to Scheme. In Object-Based Parallel and Distributed Computation, Lecture Notes in Computer Science, Vol. 1107. Springer-Verlag, (1996) 59–82

    Google Scholar 

  28. Watanabe, T. Yonezawa, A.: Reflection in an Object-Oriented Concurrent Language. In Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'88), SIGPLAN Notices, Vol. 23, No. 11. ACM (1988) 306–315.

    Google Scholar 

  29. Yonezawa, A. (ed.): ABCL: An Object-Oriented Concurrent System. MIT Press, Cambridge, MA (1990)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Eric Jul

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Masuhara, H., Yonezawa, A. (1998). Design and partial evaluation of meta-objects for a concurrent reflective language. In: Jul, E. (eds) ECOOP’98 — Object-Oriented Programming. ECOOP 1998. Lecture Notes in Computer Science, vol 1445. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0054102

Download citation

  • DOI: https://doi.org/10.1007/BFb0054102

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-64737-9

  • Online ISBN: 978-3-540-69064-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics