Coloring, a Versatile Technique for Implementing Object-Oriented Languages - LIRMM - Laboratoire d’Informatique, de Robotique et de Microélectronique de Montpellier Access content directly
Journal Articles Software: Practice and Experience Year : 2011

Coloring, a Versatile Technique for Implementing Object-Oriented Languages

Roland Ducournau

Abstract

Late binding and subtyping create run-time overhead for object-oriented languages. Dynamic typing and multiple inheritance create even more overhead. Static typing and single inheritance lead to two major invariants, of reference and position, that make the implementation as efficient as possible. Coloring is a technique that preserves these invariants for dynamic typing or multiple inheritance at minimal spatial cost. Coloring has been independently proposed for method invocation under the name of /selector coloring/, for subtype tests under the name of /pack encoding/, and for attribute access and object layout. This paper reviews a number of uses of coloring for optimizing object-oriented programming, generalizes them, and specifies several variations, such as bidirectional and /n/-directional coloring. Coloring is NP-hard, hence compilers that use it depend on heuristics. The paper describes two families of heuristics and presents some experimental results which indicate that coloring is both efficient and tractable and that bidirectional coloring gives the best results.

Dates and versions

lirmm-00596802 , version 1 (30-05-2011)

Identifiers

Cite

Roland Ducournau. Coloring, a Versatile Technique for Implementing Object-Oriented Languages. Software: Practice and Experience, 2011, 41 (6), pp.627-659. ⟨10.1002/spe.1022⟩. ⟨lirmm-00596802⟩
45 View
0 Download

Altmetric

Share

Gmail Facebook X LinkedIn More