Checking and inferring local non-aliasing

被引:15
作者
Aiken, A [2 ]
Foster, JS
Kodumal, J
Terauchi, T
机构
[1] Univ Maryland, College Pk, MD 20742 USA
[2] Univ Calif Berkeley, Berkeley, CA 94720 USA
关键词
restrict; confine; types; type qualifiers; alias analysis; effect inference; flow-sensitivity; constraints; locking; Linux kernel;
D O I
10.1145/780822.781146
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In prior work [15] we studied a language construct restrict that allows programmers to specify that certain pointers are not aliased to other pointers used within a lexical scope. Among other applications, programming with these constructs helps program analysis tools locally recover strong updates, which can improve the tracking of state in flow-sensitive analyses. In this paper we continue the study of restrict and introduce the construct confine. We present a type and effect system for checking the correctness of these annotations, and we develop efficient constraint-based algorithms implementing these type checking systems. To make it easier to use restrict and confine in practice, we show how to automatically infer such annotations without programmer assistance. In experiments on locking in 589 Linux device drivers, confine inference can automatically recover strong updates to eliminate 95% of the type errors resulting from weak updates.
引用
收藏
页码:129 / 140
页数:12
相关论文
共 30 条
[1]  
ANDERSEN LO, 1994, THESIS DIKU U COPENH
[2]  
[Anonymous], P 21 ACM SIGPLAN SIG
[3]  
[Anonymous], POPL 88
[4]  
[Anonymous], 2001, P 18 ACM S OP SYST P
[5]  
*ANSI, 1999, 9899 ISOIEC
[6]   Alias burying: Unique variables without destructive reads [J].
Boyland, J .
SOFTWARE-PRACTICE & EXPERIENCE, 2001, 31 (06) :533-553
[7]  
CALCAGNO C, 2001, P 28 ACM SIGPLAN SIG, P155
[8]  
CHASE DR, 1990, P SIGPLAN 90 C PROGR, P296
[9]  
CLARKE D, 2003, P 10 INT WORKSH FDN
[10]  
Das M., 2002, PLDI, P57, DOI DOI 10.1145/512529.512538