【24h】

Type-Directed Automatic Incrementalization

机译:类型定向自动增量化

获取原文

摘要

Application data often changes slowly or incrementally over time. Since incremental changes to input often result in only small changes in output, it is often feasible to respond to such changes asymptotically more efficiently than by re-running the whole computation. Traditionally, realizing such asymptotic efficiency improvements requires designing problem-specific algorithms known as dynamic or incremental algorithms, which are often significantly more complicated than conventional algorithms to design, analyze, implement, and use. A long-standing open problem is to develop techniques that automatically transform conventional programs so that they correctly and efficiently respond to incremental changes. In this paper, we describe a significant step towards solving the problem of automatic incrementalization: a programming language and a compiler that can, given a few type annotations describing what can change over time, compile a conventional program that assumes its data to be static (unchanging over time) to an incremental program. Based on recent advances in self-adjusting computation, including a theoretical proposal for translating purely functional programs to self-adjusting programs, we develop techniques for translating conventional Standard ML programs to self-adjusting programs. By extending the Standard ML language, we design a fully featured programming language with higher-order features, a module system, and a powerful type system, and implement a compiler for this language. The resulting programming language, LML, enables translating conventional programs decorated with simple type annotations into incremental programs that can respond to changes in their data correctly and efficiently. We evaluate the effectiveness of our approach by considering a range of benchmarks involving lists, vectors, and matrices, as well as a ray tracer. For these benchmarks, our compiler incrementalizes existing code with only trivial amounts of annotation. The resulting programs are often asymptotically more efficient, leading to orders of magnitude speedups in practice.
机译:应用程序数据通常随着时间的推移缓慢或逐渐变化。由于对输入的增量变化通常不会导致输出的小变化,因此响应渐近更有效地响应的变化通常比重新运行整个计算更有效。传统上,实现这种渐近效率改进需要设计特定的特定问题算法,称为动态或增量算法,这通常比传统算法更加复杂,以设计,分析,实施和使用。一个长期的开放问题是开发自动转换传统程序的技术,以便正确有效地响应增量变化。在本文中,我们描述了解决自动增量化问题的重要步骤:编程语言和一个编译器可以给出一些描述可以随时间变化的内容的少数型注释,编译一个假定其数据才能静态的传统程序(随着时间的推移不变)到一个增量计划。基于最近的自我调整计算的进步,包括用于将纯粹功能程序转换为自我调整程序的理论提议,我们开发用于将传统标准ML程序转换为自调整程序的技术。通过扩展标准ML语言,我们设计具有高阶功能,模块系统和强大类型系统的全功能编程语言,并为此语言实现编译器。由此产生的编程语言LML使得通过简单类型注释装饰的传统程序转换为能够正确有效地响应其数据的变化的增量程序。我们通过考虑涉及列表,向量和矩阵的一系列基准以及射线示踪剂来评估我们的方法的有效性。对于这些基准测试,我们的编译器只递增现有代码,只有琐碎的批注量。由此产生的计划往往更有效地效率,导致实践中的数量级加速。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号