Alias burying: Unique variables without destructive reads
- 16 March 2001
- journal article
- research article
- Published by Wiley in Software: Practice and Experience
- Vol. 31 (6), 533-553
- https://doi.org/10.1002/spe.370
Abstract
An unshared object can be accessed without regard to possible conflicts with other parts of a system, whether concurrent or single‐threaded. A unique variable (sometimes known as a ‘free’ or ‘linear’ variable) is one that either is null or else refers to an unshared object. Being able to declare and check which variables are unique improves a programmer's ability to avoid program faults.In previously described uniqueness extensions to imperative languages, a unique variable can be accessed only with a destructive read, which nullifies it after the value is obtained. This approach suffers from several disadvantages: the use of destructive reads increases the complexity of the program which must continually restore nullified values; adding destructive reads changes the semantics of the programming language; and many of the nullifications are actually unnecessary.We demonstrate instead that uniqueness can be preserved through the use of existing language features. We give a modular static analysis that checks (nonexecutable) uniqueness annotations superimposed on an imperative programming language without destructive reads. The ‘alias‐burying’ intuition is that aliases that are ‘dead’ (will never be used again) can be safely ‘buried’ (made undefined). Copyright © 2001 John Wiley & Sons, Ltd.This publication has 22 references indexed in Scilit:
- Removing unnecessary synchronization in JavaACM SIGPLAN Notices, 1999
- Escape analysis for object-oriented languagesACM SIGPLAN Notices, 1999
- Escape analysis for JavaACM SIGPLAN Notices, 1999
- Virginity: A contribution to the specification of object-oriented softwareInformation Processing Letters, 1999
- Data groupsACM SIGPLAN Notices, 1998
- Ownership types for flexible alias protectionACM SIGPLAN Notices, 1998
- State in HaskellHigher-Order and Symbolic Computation, 1995
- IslandsACM SIGPLAN Notices, 1991
- Reference escape analysisACM SIGPLAN Notices, 1991
- Detecting global variables in denotational specificationsACM Transactions on Programming Languages and Systems, 1985