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 条
  • [21] A Transformational Approach to Polyvariant BTA of Higher-Order Functional Programs
    Arroyo, Gustavo
    Guadalupe Ramos, J.
    Tamarit, Salvador
    Vidal, German
    LOGIC-BASED PROGRAM SYNTHESIS AND TRANSFORMATION, 2009, 5438 : 40 - +
  • [22] Automating Relatively Complete Verification of Higher-Order Functional Programs
    Unno, Hiroshi
    Terauchi, Tachio
    Kobayashi, Naoki
    ACM SIGPLAN NOTICES, 2013, 48 (01) : 75 - 86
  • [23] Generating Reversible Circuits from Higher-Order Functional Programs
    Valiron, Benoit
    REVERSIBLE COMPUTATION, RC 2016, 2016, 9720 : 289 - 306
  • [24] Using Circular Programs for Higher-Order Syntax Functional pearl
    Axelsson, Emil
    Claessen, Koen
    ACM SIGPLAN NOTICES, 2013, 48 (09) : 257 - 262
  • [25] A logical analysis of aliasing in imperative higher-order functions
    Berger, Martin
    Honda, Kohei
    Yoshida, Nobuko
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2007, 17 : 473 - 546
  • [26] A logical analysis of aliasing in imperative higher-order functions
    Berger, M
    Honda, K
    Yoshida, N
    ACM SIGPLAN NOTICES, 2005, 40 (09) : 280 - 293
  • [27] Analysing the Complexity of Functional Programs: Higher-Order Meets First-Order
    Avanzini, Martin
    Dal Lago, Ugo
    Moser, Georg
    PROCEEDINGS OF THE 20TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING (ICFP'15), 2015, : 152 - 164
  • [28] Analysing the Complexity of Functional Programs: Higher-Order Meets First-Order
    Avanzini, Martin
    Dal Lago, Ugo
    Moser, Georg
    ACM SIGPLAN NOTICES, 2015, 50 (09) : 152 - 164
  • [29] Exploiting reachability and cardinality in higher-order flow analysis
    Might, Matthew
    Shivers, Olin
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2008, 18 : 821 - 864
  • [30] A Higher-Order Abstract Syntax Approach to Verified Transformations on Functional Programs
    Wang, Yuting
    Nadathur, Gopalan
    PROGRAMMING LANGUAGES AND SYSTEMS (ESOP 2016), 2016, 9632 : 752 - 779