Collberg's Thesis: Flexible Encapsulation


Cover art by Bud Grace. Used by permission.
© 1992 King Features Syndicate/distr. Bulls.


Abstract

Most modular programming languages provide an encapsulation concept. Such concepts are used to protect the representational details of the implementation of an abstraction from abuse by its clients. Unfortunately, strict encapsulation is hindered by the separate compilation facilities provided by modern languages. The goal of the work presented here is to introduce techniques which allow modular languages to support both separate compilation and strict encapsulation without undue translation-time or execution-time cost.

The thesis is divided into four parts. The first part surveys existing modular languages and modular language translation techniques. The second part presents the experimental modular imperative and object-oriented language Zuse, which supports strict and flexible encapsulation facilities. The third part describes four translation system designs for Zuse based on high-level module binding. The fourth part evaluates these systems.

The Zuse design applies the principle of orthogonality to encapsulation: every aspect of every exported item may be either hidden or revealed. Specifically, Zuse supports three types of exported items: abstract, semi-abstract, and concrete. These differ in the amount of implementation information revealed to client modules: concrete items reveal all representational details, semi-abstract items some, and abstract items none. Exported items can also be paired with a protection clause that restricts the ways in which they may be manipulated by particular clients.

The four translation system designs presented in the third part of the thesis assure -- through the use of intermediate code module binding -- that the cost (in terms of execution-time and storage) of using an abstract or semi-abstract item will be no greater than if the same item had been concrete. In addition to performing the tasks of traditional system link editors the sequential binder checks deferred context conditions, performs inter-modular optimizations, and generates code for deferred procedures. A deferred procedure is one for which the compiler is unable to generate code because of references to imported abstract items. Similarly, a deferred context condition is a static semantic check which could not be performed at compile-time. The other translation systems discussed in the thesis perform the same actions as the sequential binder, but apply different techniques to improve performance: the distributed binder distributes its actions over the sites of a distributed system such as a network of workstations, the incremental binder inserts the code of modified modules in-place in the executable program, and the hierarchical binder binds collections of modules into libraries which themselves can take part in later binds.

The sequential and distributed binders have been implemented, and their performance is evaluated in the last part of the thesis. To examine the behavior of the binders, a model of modular programs has been developed which allows programs with widely differing qualities to be generated. Results indicate that the distributed binder runs between 2 and 3.5 times as fast as the sequential binder; for some programs it is even faster than traditional link editors.



NOTES:




Gzipped Postscript
Coverpage (greyscale) A4 LETTER (22k)
Titlepage A4 LETTER (14k)
Abstract A4 LETTER (14k)
Contents A4 LETTER (18k)
Chapter 1 Introduction A4 LETTER (42k)
Chapter 2 Modular Languages and Their Processors A4 LETTER (145k)
Chapter 3 A Language with Flexible Encapsulation A4 LETTER (115k)
Chapter 4 The Semantics of Zuse A4 LETTER (128k)
Chapter 5 Sequential High-Level Module Binding A4 LETTER (172k)
Chapter 6 Distributed High-Level Module Binding A4 LETTER (205k)
Chapter 7 Incremental High-Level Module Binding A4 LETTER (72k)
Chapter 8 Evaluation A4 LETTER (168k)
Chapter 9 Conclusions and Future Research A4 LETTER (46k)
Bibliography A4 LETTER (59k)
Index A4 LETTER (25k)

Tar'd & Gzipped Postscript
The whole thing... A4 LETTER (1244k)

ASCII Text
The BibTeX entry BibTeX.bib (2k)



Referenced by in where
Amer Diwan Understanding and Improving the Performance of Modern Programming Languages PhD Thesis, Department of Computer Science, University of Massachusets.
Amer Diwan Goals and Design of the Whole Program Optimizer, MASPLAS'96.
Mary Fernandez A Retargetable, Optimizing Linker PhD Thesis, Department of Computer Science, Princeton University.
Mary Fernandez Simple and Effective Link-Time Optimization of Modula-3 Programs PLDI'95
Bill Kalsow CONST Comments in Variable Declarations


Back to Collberg's Research Page
Back to Collberg's Home Page http://www.vlsi.polymtl.ca/m3/faq/questions/varconst.html