arrow
Return

A hybrid class- and prototype-based object model to support language-neutral structural intercession

delete2014-02-01
delete15
PRE
AI
F
Francisco Ortín *
M
Miguel A. Labrador
J
José Manuel Redondo
DOI:10.1016/j.infsof.2013.09.002delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Context: Dynamic languages have turned out to be suitable for developing specific applications where runtime adaptability is an important issue. Although NET and Java platforms have gradually incorporated features to improve their support of dynamic languages, they do not provide intercession for every object or class. This limitation is mainly caused by the rigid class-based object model these platforms implement, in contrast to the flexible prototype-based model used by most dynamic languages. Objective: Our approach is to provide intercession for any object or class by defining a hybrid class- and prototype-based object model that efficiently incorporates structural intercession into the object model implemented by the widespread.NET and Java platforms. Method: In a previous work, we developed and evaluated an extension of a shared-source implementation of the NET platform. In this work, we define the formal semantics of the proposed reflective model, and modify the existing implementation to include the hybrid model. Finally, we assess its runtime performance and memory consumption, comparing it to existing approaches. Results: Our platform shows a competitive runtime performance compared to 9 widespread systems. On average, it performs 73% and 61% better than the second fastest system for short- and long-running applications, respectively. Besides, it is the JIT-compiler approach that consumes less average memory. The proposed approach of including a hybrid object-model into the virtual machine involves a 444% performance improvement (and 65% less memory consumption) compared to the existing alternative of creating an extra software layer (the DLR). When none of the new features are used, our platform requires 12% more execution time and 13% more memory than the original NET implementation. Conclusion: Our proposed hybrid class- and prototype-based object model supports structural intercession for any object or class. It can be included in existing JIT-compiler class-based platforms to support common dynamic languages, providing competitive runtime performance and low memory consumption. (C) 2013 Elsevier B.V. All rights reserved.
Keywords:
Structural intercession
Duck typing
Prototype-based object model
Reflection
Virtual machine
Dynamic languages

Journal

Information and Software Technology cover
Information and Software Technology
IF:
4.3
Papers:
3.7K
Citations:
7.7K

Organization

State University System of Florida cover
State University System of Florida
Scholars:
12.7W
Papers: 10.9W
Citations: 130
U
University of Oviedo
Scholars:
1.1W
Papers: 1.0W
Citations: 15