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.
Preview
Unable to display preview. Download preview PDF.
References
Andersen, L. O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen (1994). (DIKU Report 94/19)
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)
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
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
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
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.
Futamura, Y.: Partial Evaluation of Computation Process—an Approach to a Compiler-compiler. Systems, Computers, Controls, Vol. 2, No. 5 (1971) 45–50
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)
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
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
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
Jones, N. D., Gomard, C. K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice Hall (1993)
Kiczales, G., Rivières, J. des, Bobrow, D. G.: The Art of the Metaobject Protocol. MIT Press, Cambridge, MA (1991)
Kiczales, G. Rodriguez, L.: Efficient Method Dispatch in PCL. In LISP and Functional Programming (LFP'90), ACM (1990) 99–105
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
Kobayashi, N., Pierce, B. C., Turner, D. N.: Linearity and the Pi-Calculus. In Principles of Programming Languages (POPL'96) (1996) 358–371
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
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
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
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
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
Nakaya, A., Yamamoto, K., Yonezawa, A.: RNA Secondary Structure Prediction Using Highly Parallel Computers. Compt. Appl. Biosci. 11 (1995) 685–692
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)
Smith, B. C: Reflection and Semantics in Lisp. In Principles of Programming Languages (POPL'84), ACM (1984) 23–35
Sun Microsystems: Java(TM) Core Reflection: API and Specification, (1997)
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).
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
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.
Yonezawa, A. (ed.): ABCL: An Object-Oriented Concurrent System. MIT Press, Cambridge, MA (1990)
Author information
Authors and Affiliations
Editor information
Rights 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