多态效果的限定范围功能
Scoped Capabilities for Polymorphic Effects
摘要:
类型系统通常表征值的形状,但不表征它们的自由变量。然而,如果知道值捕获的自由变量,就可以保证许多理想的安全属性。我们描述了CCsubBox,这种捕获的变量简洁地表示在类型的演算,并显示它可以用来安全地实现效果和效果多态性通过作用域的能力。我们讨论了如何跟踪捕获的变量的决定指导的演算的关键方面,并表明CCsubBox承认简单和直观的类型为常见的数据结构和它们的典型使用模式。我们演示了如何使用这些想法来指导实现捕获检查在一个实用的程序设计语言。
英文摘要:
Type systems usually characterize the shape of values but not their free variables. However, many desirable safety properties could be guaranteed if one knew the free variables captured by values. We describe CCsubBox, a calculus where such captured variables are succinctly represented in types, and show it can be used to safely implement effects and effect polymorphism via scoped capabilities. We discuss how the decision to track captured variables guides key aspects of the calculus, and show that CCsubBox admits simple and intuitive types for common data structures and their typical usage patterns. We demonstrate how these ideas can be used to guide the implementation of capture checking in a practical programming language.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。