Refinement Types for Call-by-name Programs

Q4 Computer Science Journal of Information Processing Pub Date : 2023-01-01 DOI:10.2197/ipsjjip.31.708
Ryosuke Sato
{"title":"Refinement Types for Call-by-name Programs","authors":"Ryosuke Sato","doi":"10.2197/ipsjjip.31.708","DOIUrl":null,"url":null,"abstract":"A refinement type system can be used as a basis of a fully automated verification tool of higher-order functional programs. Most of existing refinement type systems are, however, designed for call-by-value programs, which are unsound for call-by-name programs. In this paper, we introduce a refinement type system for a call-by-name functional language. The most important difference between call-by-value and call-by-name for constructing a refinement type system is whether a variable can be treated as a value or not. The soundness of a typical refinement type systems depends on this fact. On the other hand, in a call-by-name program, since a variable is bound to a term, we cannot treat a variable as a value. To overcome this problem, we track when the term bound to a variable will be evaluated. If we found that a variable is already evaluated in some context, we can treat the variable as a value at the context. We also introduce a type inference algorithm and report on a prototype implementation and preliminary experiments.","PeriodicalId":16243,"journal":{"name":"Journal of Information Processing","volume":"6 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Information Processing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.2197/ipsjjip.31.708","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"Computer Science","Score":null,"Total":0}
引用次数: 0

Abstract

A refinement type system can be used as a basis of a fully automated verification tool of higher-order functional programs. Most of existing refinement type systems are, however, designed for call-by-value programs, which are unsound for call-by-name programs. In this paper, we introduce a refinement type system for a call-by-name functional language. The most important difference between call-by-value and call-by-name for constructing a refinement type system is whether a variable can be treated as a value or not. The soundness of a typical refinement type systems depends on this fact. On the other hand, in a call-by-name program, since a variable is bound to a term, we cannot treat a variable as a value. To overcome this problem, we track when the term bound to a variable will be evaluated. If we found that a variable is already evaluated in some context, we can treat the variable as a value at the context. We also introduce a type inference algorithm and report on a prototype implementation and preliminary experiments.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
按名称调用程序的细化类型
精化类型系统可以作为高阶功能程序的全自动验证工具的基础。然而,大多数现有的细化类型系统都是为按值调用程序设计的,这对于按名称调用程序来说是不健全的。本文介绍了一种基于名称调用的函数式语言的细化类型系统。在构造细化类型系统时,按值调用和按名称调用之间最重要的区别在于变量是否可以被视为值。一个典型的细化类型系统的可靠性依赖于这个事实。另一方面,在按名称调用程序中,由于变量绑定到一个项,因此不能将变量视为值。为了克服这个问题,我们跟踪绑定到变量的项何时被求值。如果我们发现一个变量已经在某个上下文中求值了,我们可以将该变量作为上下文中的值来处理。我们还介绍了一种类型推断算法,并报告了原型实现和初步实验。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Journal of Information Processing
Journal of Information Processing Computer Science-Computer Science (all)
CiteScore
1.20
自引率
0.00%
发文量
0
期刊最新文献
Container-native Managed Data Sharing Editor's Message to Special Issue of Computer Security Technologies for Secure Cyberspace Understanding the Inconsistencies in the Permissions Mechanism of Web Browsers An Analysis of Susceptibility to Phishing via Business Chat through Online Survey Analysis and Consideration of Detection Methods to Prevent Fraudulent Access by Utilizing Attribute Information and the Access Log History
×
引用
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