【24h】

Copy-on-write in the PHP language

机译:用PHP语言写时复制

获取原文

摘要

PHP is a popular language for server-side applications. In PHP, assignment to variables copies the assigned values, according to its so-called copy-on-assignment semantics. In contrast, a typical PHP implementation uses a copy-on-write scheme to reduce the copy overhead by delaying copies as much as possible. This leads us to ask if the semantics and implementation of PHP coincide, and actually this is not the case in the presence of sharings within values. In this paper, we describe the copy-on-assignment semantics with three possible strategies to copy values containing sharings. The current PHP implementation has inconsistencies with these semantics, caused by its naive use of copy-on-write. We fix this problem by the novel mostly copy-on-write scheme, making the copy-on-write implementations faithful to the semantics. We prove that our copy-on-write implementations are correct, using bisimulation with the copy-on-assignment semantics.
机译:PHP是服务器端应用程序的流行语言。在PHP中,分配给变量会根据其所谓的“分配时复制”语义来复制分配的值。相反,典型的PHP实现使用写时复制方案来通过尽可能多地延迟复制来减少复制开销。这使我们想知道PHP的语义和实现是否一致,而实际上在值内存在共享却不是这种情况。在本文中,我们用三种可能的策略来复制分配时的复制语义,以复制包含共享的值。当前的PHP实现与这些语义不一致,这是由于其天真的使用“写时复制”功能引起的。我们通过新颖的写时复制方案解决了这个问题,使写时复制实现忠实于语义。我们使用赋值复制语义的双仿真证明了写时复制实现是正确的。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号