通过还原到终止验证来验证功能程序的生产率

Ren Fukaishi, Naoki Kobayashi, Ryosuke Sato
{"title":"通过还原到终止验证来验证功能程序的生产率","authors":"Ren Fukaishi, Naoki Kobayashi, Ryosuke Sato","doi":"10.1145/3635800.3636963","DOIUrl":null,"url":null,"abstract":"A program generating a co-inductive data structure is called productive if the program eventually generates all the elements of the data structure. We propose a new method for verifying the productivity, which transforms a co-inductive data structure into a function that takes a path as an argument and returns the corresponding element. For example, an infinite binary tree is converted to a function that takes a sequence consisting of 0 (left) and 1 (right), and returns the element in the specified position, and a stream is converted into a function that takes a sequence of the form 0^n (or, simply a natural number n) and returns the n-th element of the stream. A stream-generating program is then productive just if the function terminates for every n. The transformation allows us to reduce the productivity verification problem to the termination problem for call-by-name higher-order functional programs without co-inductive data structures. We formalize the transformation and prove its correctness. We have implemented an automated productivity checker based on the proposed method, by extending an automated HFL(Z) validity checker, which can be used as a termination checker.","PeriodicalId":516782,"journal":{"name":"Proceedings of the 2024 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation","volume":"53 2","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-01-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Productivity Verification for Functional Programs by Reduction to Termination Verification\",\"authors\":\"Ren Fukaishi, Naoki Kobayashi, Ryosuke Sato\",\"doi\":\"10.1145/3635800.3636963\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"A program generating a co-inductive data structure is called productive if the program eventually generates all the elements of the data structure. We propose a new method for verifying the productivity, which transforms a co-inductive data structure into a function that takes a path as an argument and returns the corresponding element. For example, an infinite binary tree is converted to a function that takes a sequence consisting of 0 (left) and 1 (right), and returns the element in the specified position, and a stream is converted into a function that takes a sequence of the form 0^n (or, simply a natural number n) and returns the n-th element of the stream. A stream-generating program is then productive just if the function terminates for every n. The transformation allows us to reduce the productivity verification problem to the termination problem for call-by-name higher-order functional programs without co-inductive data structures. We formalize the transformation and prove its correctness. We have implemented an automated productivity checker based on the proposed method, by extending an automated HFL(Z) validity checker, which can be used as a termination checker.\",\"PeriodicalId\":516782,\"journal\":{\"name\":\"Proceedings of the 2024 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation\",\"volume\":\"53 2\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-01-11\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 2024 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3635800.3636963\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 2024 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3635800.3636963","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

如果生成共线性数据结构的程序最终生成了该数据结构的所有元素,那么该程序就被称为有生产力的程序。我们提出了一种验证生产率的新方法,它将共归纳数据结构转换为一个函数,该函数以路径为参数,并返回相应的元素。例如,将一棵无限二叉树转换为一个函数,该函数接收一个由 0(左)和 1(右)组成的序列,并返回指定位置上的元素;将一个流转换为一个函数,该函数接收一个形式为 0^n 的序列(或简单地接收一个自然数 n),并返回流中的第 n 个元素。通过这种转换,我们可以将生产率验证问题简化为没有共归纳数据结构的逐名调用高阶函数式程序的终止问题。我们形式化了这种转换,并证明了它的正确性。我们基于所提出的方法,通过扩展自动 HFL(Z) 有效性检查器,实现了一个自动生产率检查器,它可以用作终止检查器。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Productivity Verification for Functional Programs by Reduction to Termination Verification
A program generating a co-inductive data structure is called productive if the program eventually generates all the elements of the data structure. We propose a new method for verifying the productivity, which transforms a co-inductive data structure into a function that takes a path as an argument and returns the corresponding element. For example, an infinite binary tree is converted to a function that takes a sequence consisting of 0 (left) and 1 (right), and returns the element in the specified position, and a stream is converted into a function that takes a sequence of the form 0^n (or, simply a natural number n) and returns the n-th element of the stream. A stream-generating program is then productive just if the function terminates for every n. The transformation allows us to reduce the productivity verification problem to the termination problem for call-by-name higher-order functional programs without co-inductive data structures. We formalize the transformation and prove its correctness. We have implemented an automated productivity checker based on the proposed method, by extending an automated HFL(Z) validity checker, which can be used as a termination checker.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Complete Stream Fusion for Software-Defined Radio The 0'th PEPM Event: October 1987—and Andrei Petrovich Ershov: 1977–1988 (Invited Contribution) In memoriam Neil Deaton Jones A Historical Perspective on Program Transformation and Recent Developments (Invited Contribution) The Genesis of Mix: Early Days of Self-Applicable Partial Evaluation (Invited Contribution)
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1