Confined types in Java

Jan Vítek, Boris Bokowski · Software Practice and Experience · 2001

Abstract The sharing and transfer of references in object‐oriented languages is difficult to control. Without any constraint, practical experience has shown that even carefully engineered object‐oriented code can be brittle, and subtle security deficiencies can go unnoticed. In this paper, we present inexpensive syntactic constraints that strengthen encapsulation by imposing static restrictions on the spread of references. In particular, we introduceconfined typesto impose a static scoping discipline on dynamic references andanonymous methodsto loosen confinement somewhat to allow code reuse. We have implemented a verifier which performs a modular analysis of Java programs and provides a static guarantee that confinement is respected. Copyright © 2001 John Wiley & Sons, Ltd.

Read the paper · More papers on PaperTik