【24h】

Adoption and focus

机译:采纳与关注

获取原文

摘要

A type system with linearity is useful for checking software protocols andresource management at compile time. Linearity provides powerful reasoning about state changes, but at the price of restrictions on aliasing. The hard division between linear and nonlinear types forces the programmer to make a trade-off between checking a protocol on an object and aliasing the object. Most onerous is the restriction that any type with a linear component must itself be linear. Because of this, checking a protocol on an object imposes aliasing restrictions on any data structure that directly or indirectly points to the object. We propose a new type system that reduces these restrictions with the adoption and focus constructs. Adoption safely allows a programmer to alias objects on which she is checking protocols, and focus allows the reverse. A programmer can alias data structures that point to linear objects and use focus for safe access to those objects. We discuss how we implemented these ideas in the Vaultprogramming language.
机译:具有线性的类型系统对于在编译时检查软件协议和资源管理很有用。线性为状态变化提供了有力的推论,但以限制别名为代价。线性和非线性类型之间的硬性划分迫使程序员在检查对象上的协议和别名对象之间进行权衡。最麻烦的是任何具有线性成分的类型本身必须是线性的限制。因此,检查对象上的协议会对直接或间接指向该对象的任何数据结构施加别名限制。我们提出了一种新型的系统,可以通过采用和关注结构来减少这些限制。通过采用,安全地允许程序员为正在检查协议的对象加上别名,而专注则允许相反的操作。程序员可以为指向线性对象的数据结构添加别名,并使用焦点来安全访问那些对象。我们讨论了如何以Vaultprogramming语言实现这些想法。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号