A type theory for incremental computational complexity with control flow changes

Author:

Çiçek Ezgi1,Paraskevopoulou Zoe2,Garg Deepak1

Affiliation:

1. MPI-SWS, Germany

2. Princeton University, USA

Abstract

Incremental computation aims to speed up re-runs of a program after its inputs have been modified slightly. It works by recording a trace of the program's first run and propagating changes through the trace in incremental runs, trying to re-use as much of the original trace as possible. The recent work CostIt is a type and effect system to establish the time complexity of incremental runs of a program, as a function of input changes. However, CostIt is limited in two ways. First, it prohibits input changes that influence control flow. This makes it impossible to type programs that, for instance, branch on inputs that may change. Second, the soundness of CostIt is proved relative to an abstract cost semantics, but it is unclear how the semantics can be realized. In this paper, we address both these limitations. We present DuCostIt, a re-design of CostIt, that combines reasoning about costs of change propagation and costs of from-scratch evaluation. The latter lifts the restriction on control flow changes. To obtain the type system, we refine Flow Caml, a type system for information flow analysis, with cost effects. Additionally, we inherit from CostIt index refinements to track data structure sizes and a co-monadic type. Using a combination of binary and unary step-indexed logical relations, we prove DuCostIt's cost analysis sound relative to not only an abstract cost semantics, but also a concrete semantics, which is obtained by translation to an ML-like language.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference28 articles.

1. A type theory for incremental computational complexity with control flow changes (technical appendix). Online at http://www. mpi-sws.org/~ecicek/ducostit_appendix.pdf. A type theory for incremental computational complexity with control flow changes (technical appendix). Online at http://www. mpi-sws.org/~ecicek/ducostit_appendix.pdf.

2. U. A. Acar. Self-Adjusting Computation. PhD thesis Department of Computer Science Carnegie Mellon University 2005. U. A. Acar. Self-Adjusting Computation. PhD thesis Department of Computer Science Carnegie Mellon University 2005.

3. Adaptive functional programming

4. An experimental analysis of self-adjusting computation

5. Step-Indexed Syntactic Logical Relations for Recursive and Quantified Types

Cited by 8 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. ReLoC Reloaded: A Mechanized Relational Logic for Fine-Grained Concurrency and Logical Atomicity;Logical Methods in Computer Science;2021-07-27

2. Relational cost analysis in a functional-imperative setting;Journal of Functional Programming;2021

3. Relational cost analysis for functional-imperative programs;Proceedings of the ACM on Programming Languages;2019-07-26

4. Closure conversion is safe for space;Proceedings of the ACM on Programming Languages;2019-07-26

5. Bidirectional type checking for relational properties;Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation;2019-06-08

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3