@PHDTHESIS{Collberg92, AUTHOR = "Christian S. Collberg", TITLE = "Flexible Encapsulation", SCHOOL = "Lund University", MONTH = dec, YEAR = 1992, 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. \par 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. \par 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 cantake part in later binds.", KEYWORDS = "COMPILER, SOFTENG, PROGLANG, DISTPROG, DISTCOMP, INCREMENTAL" }