Implementing statically typed object-oriented programming languages

Author:

Ducournau Roland1

Affiliation:

1. LIRMM -- CNRS and Université Montpellier II, Cedex, France

Abstract

Object-oriented programming represents an original implementation issue due to its philosophy of making the program behavior depend on the dynamic type of objects. This is expressed by the late binding mechanism, aka message sending . The underlying principle is that the address of the actually called procedure is not statically determined at compile-time, but depends on the dynamic type of a distinguished parameter known as the receiver . A similar issue arises with attributes, because their position in the object layout may also depend on the object's dynamic type. Furthermore, subtyping introduces another original feature (i.e., runtime subtype checks). All three mechanisms need specific implementations and data structures. In static typing, late binding is generally implemented with so-called virtual function tables . These tables reduce method calls to pointers to functions via a small fixed number of extra indirections. It follows that object-oriented programming yields some overhead, as compared to the usual procedural languages. The different techniques and their resulting overhead depend on several parameters. First, inheritance and subtyping may be single or multiple, and even a mixing is possible, as in Java and ˙NET which present single inheritance for classes and multiple subtyping for interfaces. Multiple inheritance is a well-known complication. Second, the production of executable programs may involve various schemes, from global compilation, which implies the closed-world assumption (CWA), as the whole program is known at compile time, to separate compilation and dynamic loading, where each program unit is compiled and loaded independently of any usage, hence under the open-world assumption (OWA). Global compilation is well-known to facilitate optimization. This article reviews the various implementation techniques available in static typing and in the three cases of single inheritance, multiple inheritance, and multiple subtyping. This language-independent survey focuses on separate compilation and dynamic loading, as they represent the most commonly used and the most demanding framework. However, many works have been undertaken in the global compilation framework, mostly for dynamically typed languages, but also applied to the EIFFEL language. Hence, we also examine global techniques and how they can improve implementation efficiency. Finally, mixed frameworks that combine open and closed world assumptions are considered. For instance, just-in-time (JIT) compilers work under provisional CWA, at the expense of possible recompilations. In contrast, we present an experimental compiler-linker, where separate compilation implies the OWA, whereas the whole program is finally linked under the CWA.

Funder

Conseil Régional Languedoc-Roussillon

Publisher

Association for Computing Machinery (ACM)

Subject

General Computer Science,Theoretical Computer Science

Reference114 articles.

1. Type feedback vs. concrete type inference

2. Implementing jalapeño in Java

3. Efficient implementation of Java interfaces

4. Alpern B. Cocchi A. and Grove D. 2001b. Dynamic type checking in Jalapeno In Proceedings of the 2001 Symposium of the Java#8482;Virtual Machine Research and Technology Symposium. Vol. 1 USENIX Association Berkeley CA. Alpern B. Cocchi A. and Grove D. 2001b. Dynamic type checking in Jalapeno In Proceedings of the 2001 Symposium of the Java#8482;Virtual Machine Research and Technology Symposium. Vol. 1 USENIX Association Berkeley CA.

5. Jam---designing a Java extension with mixins

Cited by 9 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Mutually Iso-Recursive Subtyping;Proceedings of the ACM on Programming Languages;2023-10-16

2. Secure Compilation to Protected Module Architectures;ACM Transactions on Programming Languages and Systems;2015-04-16

3. Secure Compilation of Object-Oriented Components to Protected Module Architectures;Programming Languages and Systems;2013

4. Towards a full multiple-inheritance virtual machine.;The Journal of Object Technology;2012

5. Efficient Compilation of .NET Programs for Embedded Systems.;The Journal of Object Technology;2012

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3