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 条
  • [41] Learning higher-order logic programs
    Andrew Cropper
    Rolf Morel
    Stephen Muggleton
    Machine Learning, 2020, 109 : 1289 - 1322
  • [42] MACHINE LEARNING OF HIGHER-ORDER PROGRAMS
    BALIGA, G
    CASE, J
    JAIN, S
    SURAJ, M
    LECTURE NOTES IN COMPUTER SCIENCE, 1992, 620 : 9 - 20
  • [43] Higher-order transformation of logic programs
    Seres, S
    Spivey, M
    LOGIC BASED PROGRAM SYNTHESIS AND TRANSFORMATION, 2001, 2042 : 57 - 68
  • [44] MACHINE LEARNING OF HIGHER-ORDER PROGRAMS
    BALIGA, G
    CASE, J
    JAIN, S
    SURAJ, M
    JOURNAL OF SYMBOLIC LOGIC, 1994, 59 (02) : 486 - 500
  • [45] Refinement of higher-order logic programs
    Colvin, R
    Hayes, I
    Hemer, D
    Strooper, P
    LOGIC BASED PROGRAM SYNTHESIS AND TRANSFORMATION, 2003, 2664 : 126 - 143
  • [46] Visualizing the performance of higher-order programs
    Waddell, O
    Ashley, JM
    ACM SIGPLAN NOTICES, 1998, 33 (07) : 75 - 82
  • [47] VERIFICATION OF PROGRAMS WITH HIGHER-ORDER ARRAYS
    KOWALCZYK, W
    URZYCZYN, P
    LECTURE NOTES IN COMPUTER SCIENCE, 1987, 278 : 251 - 258
  • [48] PREDICATE TRANSFORMERS AND HIGHER-ORDER PROGRAMS
    NAUMANN, DA
    THEORETICAL COMPUTER SCIENCE, 1995, 150 (01) : 111 - 159
  • [49] A relational logic for higher-Order programs
    Aguirre A.
    Barthe G.
    Gaboardi M.
    Garg D.
    Strub P.-Y.
    2017, Association for Computing Machinery (01)
  • [50] A relational logic for higher-order programs
    Aguirre, Alejandro
    Barthe, Gilles
    Gaboardi, Marco
    Garg, Deepak
    Strub, Pierre-Yves
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2019, 29