A type theory for incremental computational complexity with control flow changes

Ezgi Çiçek, Zoe Paraskevopoulou, D. Garg
{"title":"A type theory for incremental computational complexity with control flow changes","authors":"Ezgi Çiçek, Zoe Paraskevopoulou, D. Garg","doi":"10.1145/2951913.2951950","DOIUrl":null,"url":null,"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.","PeriodicalId":336660,"journal":{"name":"Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming","volume":"154 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-09-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"16","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2951913.2951950","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 16

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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
控制流变化时增量计算复杂度的类型理论
增量计算的目的是在程序的输入被稍微修改后加速程序的重新运行。它的工作原理是记录程序第一次运行的跟踪,并在增量运行中通过跟踪传播更改,尝试尽可能多地重用原始跟踪。最近的工作成本是一个类型和效果系统,以建立一个程序的增量运行的时间复杂度,作为输入变化的函数。然而,CostIt在两个方面受到限制。首先,它禁止影响控制流的输入更改。这使得输入程序不可能,例如,在可能改变的输入上进行分支。其次,相对于一个抽象的成本语义,cost的合理性得到了证明,但该语义如何实现尚不清楚。在本文中,我们解决了这两个限制。我们提出了DuCostIt,这是对CostIt的重新设计,它结合了对变更传播成本和从头开始评估成本的推理。后者解除了对控制流更改的限制。为了获得类型系统,我们改进了Flow Caml,这是一个信息流分析的类型系统,具有成本效应。此外,我们从CostIt继承了索引改进,以跟踪数据结构大小和共一元类型。使用二元和一元阶梯索引逻辑关系的组合,我们证明了DuCostIt的成本分析不仅相对于抽象的成本语义,而且相对于具体的语义,这些语义是通过翻译成类似ml的语言得到的。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Think like a vertex, behave like a function! a functional DSL for vertex-centric big graph processing Deriving a probability density calculator (functional pearl) Fully abstract compilation via universal embedding Automatically disproving fair termination of higher-order functional programs Allocation characterizes polyvariance: a unified methodology for polyvariant control-flow analysis
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1