首页> 外文会议>Proceedings of the 2011 ACM SIGPLAN international conference on functional programming >Implicit Self-Adjusting Computation for Purely Functional Programs
【24h】

Implicit Self-Adjusting Computation for Purely Functional Programs

机译:纯函数程序的隐式自调整计算

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

摘要

Computational problems that involve dynamic data, such as physics simulations and program development environments, have been an important subject of study in programming languages. Building on this work, recent advances in self-adjusting computation have developed techniques that enable programs to respond automatically and efficiently to dynamic changes in their inputs. Self-adjusting programs have been shown to be efficient for a reasonably broad range of problems but the approach still requires an explicit programming style, where the programmer must use specific monadic types and primitives to identify, create and operate on data that can change over time. We describe techniques for automatically translating purely functional programs into self-adjusting programs. In this implicit approach, the programmer need only annotate the (top-level) input types of the programs to be translated. Type inference finds all other types, and a type-directed translation rewrites the source program into an explicitly self-adjusting target program. The type system is related to information-flow type systems and enjoys decidable type inference via constraint solving. We prove that the translation outputs well-typed self-adjusting programs and preserves the source program's input-output behavior, guaranteeing that translated programs respond correctly to all changes to their data. Using a cost semantics, we also prove that the translation preserves the asymptotic complexity of the source program.
机译:涉及动态数据的计算问题,例如物理模拟和程序开发环境,已成为编程语言研究的重要课题。在这项工作的基础上,自调节计算的最新进展已开发出使程序能够自动有效地响应其输入中的动态变化的技术。事实表明,自调整程序对于解决相当广泛的问题是有效的,但是该方法仍然需要一种明确的编程风格,程序员必须使用特定的单子类型和原语来识别,创建和操作随时间变化的数据。 。我们描述了将纯功能程序自动转换为自调整程序的技术。在这种隐式方法中,程序员仅需要注释要翻译的程序的(顶级)输入类型。类型推论会找到所有其他类型,类型定向翻译会将源程序重写为一个明确的自我调整目标程序。类型系统与信息流类型系统相关,并且通过约束求解享有可确定的类型推断。我们证明了翻译输出了类型正确的自调整程序,并保留了源程序的输入输出行为,从而确保了翻译后的程序能够正确响应其数据的所有更改。使用成本语义,我们还证明了翻译保留了源程序的渐近复杂性。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号