Reachability Types: Tracking Aliasing and Separation in Higher-Order Functional Programs

被引:7
作者
Bao, Yuyan [1 ]
Wei, Guannan [2 ]
Bracevac, Oliver [2 ]
Jiang, Yuxuan [2 ]
He, Qiyang [2 ]
Rompf, Tiark [2 ]
机构
[1] Univ Waterloo, Waterloo, ON, Canada
[2] Purdue Univ, W Lafayette, IN 47907 USA
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2021年 / 5卷 / OOPSLA期
基金
加拿大自然科学与工程研究理事会; 美国国家科学基金会;
关键词
reachability types; ownership types; aliasing; type systems; effect systems; LANGUAGE;
D O I
10.1145/3485516
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Ownership type systems, based on the idea of enforcing unique access paths, have been primarily focused on objects and top-level classes. However, existing models do not as readily reflect the finer aspects of nested lexical scopes, capturing, or escaping closures in higher-order functional programming patterns, which are increasingly adopted even in mainstream object-oriented languages. We present a new type system, lambda*, which enables expressive ownership-style reasoning across higher-order functions. It tracks sharing and separation through reachability sets, and layers additional mechanisms for selectively enforcing uniqueness on top of it. Based on reachability sets, we extend the type system with an expressive flow-sensitive effect system, which enables flavors of move semantics and ownership transfer. In addition, we present several case studies and extensions, including applications to capabilities for algebraic effects, one-shot continuations, and safe parallelization.
引用
收藏
页数:32
相关论文
共 113 条
[1]   Semantics of Transactional Memory and Automatic Mutual Exclusion [J].
Abadi, Martin ;
Birrell, Andrew ;
Harris, Tim ;
Isard, Michael .
POPL'08: PROCEEDINGS OF THE 35TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2008, :63-74
[2]  
Ahmed A, 2007, FUND INFORM, V77, P397
[3]   Checking and inferring local non-aliasing [J].
Aiken, A ;
Foster, JS ;
Kodumal, J ;
Terauchi, T .
ACM SIGPLAN NOTICES, 2003, 38 (05) :129-140
[4]  
Aldrich J., 2009, P 24 ACM SIGPLAN C C, P1015, DOI 10.1145/1639950.1640073
[5]  
Amin Nada, 2016, A List of Successes that can Change the World. Essays Dedicated to Philip Wadler on the Occasion of his 60th Birthday. LNCS 9600, P249, DOI 10.1007/978-3-319-30936-1_14
[6]   Type Soundness Proofs with Definitional Interpreters [J].
Amin, Nada ;
Rompf, Tiark .
ACM SIGPLAN NOTICES, 2017, 52 (01) :666-679
[7]  
[Anonymous], 2002, Types and Programming Languages
[8]  
Barendregt H. P., 1985, ser. Studies in logic and the foundations of mathematics, V103
[9]  
Barendsen E., 1996, Mathematical Structures in Computer Science, V6, P579
[10]  
Bernardy JP, 2018, P ACM PROGRAM LANG, V2, DOI 10.1145/3158093