...
首页> 外文期刊>ACM SIGPLAN Notices: A Monthly Publication of the Special Interest Group on Programming Languages >Denotational Cost Semantics for Functional Languages with Inductive Types
【24h】

Denotational Cost Semantics for Functional Languages with Inductive Types

机译:归纳类型功能语言的指称成本语义

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

摘要

A central method for analyzing the asymptotic complexity of a functional program is to extract and then solve a recurrence that expresses evaluation cost in terms of input size. The relevant notion of input size is often specific to a datatype, with measures including the length of a list, the maximum element in a list, and the height of a tree. In this work, we give a formal account of the extraction of cost and size recurrences from higher-order functional programs over inductive datatypes. Our approach allows a wide range of programmer-specified notions of size, and ensures that the extracted recurrences correctly predict evaluation cost. To extract a recurrence from a program, we first make costs explicit by applying a monadic translation from the source language to a complexity language, and then abstract datatype values as sizes. Size abstraction can be done semantically, working in models of the complexity language, or syntactically, by adding rules to a preorder judgement. We give several different models of the complexity language, which support different notions of size. Additionally, we prove by a logical relations argument that recurrences extracted by this process are upper bounds for evaluation cost; the proof is entirely syntactic and therefore applies to all of the models we consider.
机译:分析功能程序渐近复杂度的一种主要方法是提取然后求解一个递归,该递归表示基于输入大小的评估成本。输入大小的相关概念通常特定于数据类型,其度量标准包括列表的长度,列表中的最大元素以及树的高度。在这项工作中,我们对归纳数据类型从高阶功能程序中提取成本和大小重复进行了正式说明。我们的方法允许使用各种程序员指定的大小概念,并确保提取的重复正确地预测评估成本。为了从程序中提取重复发生的代码,我们首先通过将源语言转换为复杂性语言进行单字转换来明确成本,然后将数据类型值抽象为大小。大小抽象可以在语义上,在复杂性语言的模型中进行工作,或者在语法上通过将规则添加到预判断中来完成。我们给出了复杂性语言的几种不同模型,它们支持不同的大小概念。此外,我们通过逻辑关系论证证明,此过程提取的重复性是评估成本的上限;该证明完全是句法上的,因此适用于我们考虑的所有模型。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号