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

被引:6
|
作者
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
来源
基金
美国国家科学基金会; 加拿大自然科学与工程研究理事会;
关键词
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
相关论文
共 50 条
  • [1] Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic Programs
    Wei, Guannan
    Bracevac, Oliver
    Jia, Songlin
    Bao, Yuyan
    Rompf, Tiark
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2024, 8 (POPL):
  • [2] Types and Higher-Order Recursion Schemes for Verification of Higher-Order Programs
    Kobayashi, Naoki
    ACM SIGPLAN NOTICES, 2009, 44 (01) : 416 - 428
  • [3] Binary Reachability Analysis of Higher Order Functional Programs
    Ledesma-Garza, Ruslan
    Rybalchenko, Andrey
    STATIC ANALYSIS, SAS 2012, 2012, 7460 : 388 - 404
  • [4] Modular Verification of Higher-Order Functional Programs
    Sato, Ryosuke
    Kobayashi, Naoki
    PROGRAMMING LANGUAGES AND SYSTEMS (ESOP 2017): 26TH EUROPEAN SYMPOSIUM ON PROGRAMMING, 2017, 10201 : 831 - 854
  • [5] Termination analysis of higher-order functional programs
    Sereni, D
    Jones, ND
    PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2005, 3780 : 281 - 297
  • [6] A Temporal Logic for Higher-Order Functional Programs
    Okuyama, Yuya
    Tsukada, Takeshi
    Kobayashi, Naoki
    STATIC ANALYSIS (SAS 2019), 2019, 11822 : 437 - 458
  • [7] Temporal Verification of Higher-Order Functional Programs
    Murase, Akihiro
    Terauchi, Tachio
    Kobayashi, Naoki
    Sato, Ryosuke
    Unno, Hiroshi
    ACM SIGPLAN NOTICES, 2016, 51 (01) : 57 - 68
  • [8] Automated Verification of Higher-Order Functional Programs
    Terauchi, Tachio
    FUNCTIONAL AND LOGIC PROGRAMMING (FLOPS 2012), 2012, 7294 : 2 - 2
  • [9] Types for Deadlock-Free Higher-Order Programs
    Padovani, Luca
    Novara, Luca
    FORMAL TECHNIQUES FOR DISTRIBUTED OBJECTS, COMPONENTS, AND SYSTEMS, FORTE 2015, 2015, 9039 : 3 - 18
  • [10] Verifying Higher-Order Functional Programs with Pattern-Matching Algebraic Data Types
    Ong, C. -H. Luke
    Ramsay, Steven J.
    ACM SIGPLAN NOTICES, 2011, 46 (01) : 587 - 598