arrow
Return

Implementing Statically Typed Object-Oriented Programming Languages

delete2011-04-29
delete13
delete
OA
AI
D
Ducournau, Roland *
DOI:10.1145/1922649.1922655delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
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.
Keywords:
Languages
Measurement
Performance
Binary tree dispatch
casting
coloring
downcast
dynamic loading
genericity
late binding
linking
message sending
method dispatch
multiple inheritance
pointer adjustment
single inheritance
static typing
type analysis
separate compilation
virtual function tables
C plus
C#
Eiffel
Java
PRM
Theta
IRIDIUM: A Framework for Statically Optimizing JavaScript Programs
err2026-04-01
err0
PREAI
errMehta, Meetesh kalpesh; Garg, Anirudh; Yadav, Aneeket; Thakur, Manas
errShare
errSave
errShare
errSave
Optimizing runtime performance of hybrid dynamically and statically typed languages for the .NET platform
err2016-03-01
err4
PREAI
errQuiroga, Jose; Ortin, Francisco; Llewellyn-Jones, David; Garcia, Miguel
errShare
errSave
Techniques for obtaining high performance in Java programs
err2000-09-01
err57
errOAAI
errKazi, IH; Chen, HH; Stanley, B; Lilja, DJ
errShare
errSave

Journal

ACM Computing Surveys cover
ACM Computing Surveys
IF:
28
Papers:
2.7K
Citations:
4.6W

Organization

C
centre national de la recherche scientifique (cnrs)
Scholars:
24.5W
Papers: 18.2W
Citations: 21.3W
Cited Papers

Cited Papers

An Isochore Framework Underlies Chromatin Architecture
err2017-01-06
err0
errOAAI
errKamel Jabbari; Giorgio Bernardi
errShare
errSave
Exploring Interactions between the Gut Microbiota and Social Behavior through Nutrition
err2018-11-06
err0
errOAAI
errCristian Pasquaretta; Tamara Gómez-Moracho; Philipp Heeb; Mathieu Lihoreau
errShare
errSave
A review of brain circuitries involved in stuttering
err2014-11-17
err0
errOAAI
errAnna Craig-McQuaide; Harith Akram; Ludvic Zrinzo; Elina Tripoliti
errShare
errSave
Reversed Surface-Mass-Balance Gradients on Himalayan Debris-Covered Glaciers Inferred from Remote Sensing
err2020-05-14
err0
errOAAI
errRosie R. Bisset; Amaury Dehecq; Daniel N. Goldberg; Matthias Huss; Robert G. Bingham; Noel Gourmelen
errShare
errSave
IFN‐γ and TNF‐α secretion by CD4+ and CD8+ TCRαβ+ T‐cell clones derived early after allogeneic bone marrow transplantation
err2009-04-24
err0
PREAI
errØystein Bruserud; Wilfried Hamann; Sarita Patel; Gerhard Ehninger; Helmut Schmidt; Graham Pawelec
errShare
errSave
Glacier mass-balance determination by remote sensing and high-resolution modelling
err2017-09-08
err0
errOAAI
errAlun Hubbard; Ian Willis; Martin Sharp; Douglas Mair; Peter Nienow; Bryn Hubbard; Heinz Blatter
errShare
errSave
errShare
errSave
researcher View more