...
首页> 外文期刊>Theoretical computer science >Towards imperative modules: Reasoning about invariants and sharing of mutable state
【24h】

Towards imperative modules: Reasoning about invariants and sharing of mutable state

机译:迈向命令式模块:关于不变性和可变状态共享的推理

获取原文
获取原文并翻译 | 示例
           

摘要

Imperative and object-oriented programs make ubiquitous use of shared mutable objects. Updating a shared object can and often does transgress a boundary that was supposed to be established using static constructs such as a class with private fields. This paper shows how auxiliary fields can be used to express two state-dependent encapsulation disciplines: ownership, a kind of separation, and friendship, a kind of sharing. A methodology is given for specification and modular verification of encapsulated object invariants and shown sound for a class-based language. As an example the methodology is used to specify iterators, which are problematic for previous ownership systems.
机译:命令式和面向对象的程序无处不在地使用共享的可变对象。更新共享库可以并且经常确实会越过应该使用静态构造(例如具有私有字段的类)建立的边界。本文展示了如何使用辅助字段来表达两个与状态相关的封装学科:所有权(一种分离)和友谊(一种共享)。给出了一种方法,用于对封装的对象不变式进行规范和模块化验证,并显示了基于类的语言的声音。作为示例,该方法用于指定迭代器,这对于以前的所有权系统是有问题的。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号