Treffer: Efficient runtime metaprogramming services for Java.
Weitere Informationen
Highlights • JMPLib supports runtime structural intercession and code generation for Java. • With our system, Java programs can be adapted and modified at runtime. • Neither the Java language nor the platform are modified. • JMPLib provides the best runtime performance of the systems evaluated. • JMPLib consumes fewer memory resources than the rest of implementations for the JVM. Abstract The Java programming language and platform provide many optimizations to execute statically typed code efficiently. Although Java has gradually incorporated more dynamic features across its versions, it does not provide several metaprogramming features supported by most dynamic languages, such as structural intercession (the ability to dynamically modify the structure of classes) and dynamic code generation. Therefore, we propose a method to add those metaprogramming features to Java in order to increase its runtime adaptiveness, while taking advantage of the robustness of its static type system and the performance of its virtual machine. We support the dynamic addition, deletion and replacement of class methods and fields, and dynamic code generation. The metaprogramming services are provided as a library, so neither the Java language nor its virtual machine are modified. We evaluate our system, called JMPLib, and compare it with the existing metaprogramming systems for the Java platform and other highly optimized dynamic languages. JMPLib obtains similar runtime performance to the existing fastest system that modifies the implementation of the Java virtual machine. Moreover, our system introduces no performance penalty when metaprogramming is not used, and consumes fewer memory resources than the rest of implementations for the Java platform. [ABSTRACT FROM AUTHOR]
Copyright of Journal of Systems & Software is the property of Elsevier B.V. and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)