A multivalued language with a dependent type system

DTP '13 Pub Date : 2013-09-24 DOI:10.1145/2502409.2502412
Neal Glew, Tim Sweeney, Leaf Petersen
{"title":"A multivalued language with a dependent type system","authors":"Neal Glew, Tim Sweeney, Leaf Petersen","doi":"10.1145/2502409.2502412","DOIUrl":null,"url":null,"abstract":"Type systems are used to eliminate certain classes of errors at compile time. One of the goals of type system research is to allow more classes of errors (such as array subscript errors) to be eliminated. Dependent type systems have played a key role in this effort, and much research has been done on them. In this paper, we describe a new dependently-typed functional programming language based on two key ideas. First, it makes no distinction between expressions, types, kinds, and sorts-everything is a term. The same integer values are used to compute with and to index types, such as specifying the length of an array. Second, the term language has a multivalued semantics-a term can evaluate to zero, one, multiple, even an infinite number of values. Since types are characterised by their members, they are equivalent to terms whose possible values are the members of the type, and we exploit this to express type information in our language. In order to type check such terms, we give up on decidability. We consider this a good tradeoff to get an expressive language without the pain of some dependent type systems. This paper describes the core ideas of the language, gives an intuitive description of the semantics in terms of set-theory, explains how to implement the language by restricting what programs are considered valid, and sketches the core of the type system.","PeriodicalId":205623,"journal":{"name":"DTP '13","volume":"53 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2013-09-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"DTP '13","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2502409.2502412","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

Abstract

Type systems are used to eliminate certain classes of errors at compile time. One of the goals of type system research is to allow more classes of errors (such as array subscript errors) to be eliminated. Dependent type systems have played a key role in this effort, and much research has been done on them. In this paper, we describe a new dependently-typed functional programming language based on two key ideas. First, it makes no distinction between expressions, types, kinds, and sorts-everything is a term. The same integer values are used to compute with and to index types, such as specifying the length of an array. Second, the term language has a multivalued semantics-a term can evaluate to zero, one, multiple, even an infinite number of values. Since types are characterised by their members, they are equivalent to terms whose possible values are the members of the type, and we exploit this to express type information in our language. In order to type check such terms, we give up on decidability. We consider this a good tradeoff to get an expressive language without the pain of some dependent type systems. This paper describes the core ideas of the language, gives an intuitive description of the semantics in terms of set-theory, explains how to implement the language by restricting what programs are considered valid, and sketches the core of the type system.
具有依赖类型系统的多值语言
类型系统用于在编译时消除某些类型的错误。类型系统研究的目标之一是允许消除更多类型的错误(例如数组下标错误)。依赖类型系统在这项工作中发挥了关键作用,并且已经对它们进行了许多研究。在本文中,我们基于两个关键思想描述了一种新的依赖类型函数式编程语言。首先,它不区分表达式、类型、种类和排序——一切都是术语。相同的整数值用于计算和索引类型,例如指定数组的长度。其次,术语语言具有多值语义——一个术语可以求值为0、1、多个,甚至无限多个值。由于类型是由其成员来表征的,因此它们等价于其可能值是类型成员的项,我们利用这一点在语言中表达类型信息。为了对这些术语进行类型检查,我们放弃了可判定性。我们认为这是一种很好的权衡,可以获得一种表达性语言,而不必忍受依赖类型系统带来的痛苦。本文描述了该语言的核心思想,根据集合论给出了直观的语义描述,解释了如何通过限制哪些程序被认为是有效的来实现该语言,并概述了类型系统的核心。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信