Alias burying: Unique variables without destructive reads

被引:68
作者
Boyland, J [1 ]
机构
[1] Univ Wisconsin, Dept Elect Engn & Comp Sci, Milwaukee, WI 53201 USA
关键词
unshared; borrowed; compromise;
D O I
10.1002/spe.370
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 (C) 2001 John Wiley & Sons, Ltd.
引用
收藏
页码:533 / 553
页数:21
相关论文
共 31 条
[1]  
ACHTEN P, 1993, WORKSH FUNCT PROGR G, P1
[2]  
Almeida PS, 1997, LECT NOTES COMPUT SC, V1241, P32, DOI 10.1007/BFb0053373
[3]  
[Anonymous], 1990, PROGRAMMING CONCEPTS
[4]  
BAKER HG, 1995, SIGPLAN NOTICES, V30, P45, DOI 10.1145/199818.199860
[5]   Escape analysis for object oriented languages.: Application to Java']Java™ [J].
Blanchet, B .
ACM SIGPLAN NOTICES, 1999, 34 (10) :20-34
[6]   Removing unnecessary synchronization in Java']Java [J].
Bogda, J ;
Hölzle, U .
ACM SIGPLAN NOTICES, 1999, 34 (10) :35-46
[7]   Promises: Limited specifications for analysis and manipulation [J].
Chan, EC ;
Boyland, JT ;
Scherlis, WL .
PROCEEDINGS OF THE 1998 INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, 1998, :167-176
[8]  
CHEN CP, 1997, 24 S PRINC PROGR LAN, P54
[9]   Escape analysis for Java']Java [J].
Choi, JD ;
Gupta, M ;
Serrano, M ;
Sreedhar, VC ;
Midkiff, S .
ACM SIGPLAN NOTICES, 1999, 34 (10) :1-19
[10]   Ownership types for flexible alias protection [J].
Clarke, DG ;
Potter, JM ;
Noble, J .
ACM SIGPLAN NOTICES, 1998, 33 (10) :48-64