承诺之前的自由

Alexander J. Summers, Peter Müller
{"title":"承诺之前的自由","authors":"Alexander J. Summers, Peter Müller","doi":"10.3929/ETHZ-A-006904372","DOIUrl":null,"url":null,"abstract":"Null pointer dereferences are the most common runtime error in languages such as Java and C#. To alleviate this problem, Fahndrich and Leino proposed a non-null type system, in which reference types can be annotated with non-nullity expectations that are statically enforced. The main challenge for the static checking of non-nullity is object initialisation; since fields of new objects get first initialised with null, a non-null type system needs to determine when an object is fully initialised and, thus, its non-null fields actually contain non-null values. Several proposed solutions exist for tackling this problem, but each fail on one of the three criteria of soundness, flexibility and simplicity. In this paper we present a solution which satisfies all three criteria, making it suitable for mainstream use. We provide a formalisation of the core type system and prove soundness for a small language. We also show informally how the core type system can be extended to support a realistic language.","PeriodicalId":10841,"journal":{"name":"CTIT technical reports series","volume":"1 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2010-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":"{\"title\":\"Freedom before commitment\",\"authors\":\"Alexander J. Summers, Peter Müller\",\"doi\":\"10.3929/ETHZ-A-006904372\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Null pointer dereferences are the most common runtime error in languages such as Java and C#. To alleviate this problem, Fahndrich and Leino proposed a non-null type system, in which reference types can be annotated with non-nullity expectations that are statically enforced. The main challenge for the static checking of non-nullity is object initialisation; since fields of new objects get first initialised with null, a non-null type system needs to determine when an object is fully initialised and, thus, its non-null fields actually contain non-null values. Several proposed solutions exist for tackling this problem, but each fail on one of the three criteria of soundness, flexibility and simplicity. In this paper we present a solution which satisfies all three criteria, making it suitable for mainstream use. We provide a formalisation of the core type system and prove soundness for a small language. We also show informally how the core type system can be extended to support a realistic language.\",\"PeriodicalId\":10841,\"journal\":{\"name\":\"CTIT technical reports series\",\"volume\":\"1 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2010-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"5\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"CTIT technical reports series\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.3929/ETHZ-A-006904372\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"CTIT technical reports series","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.3929/ETHZ-A-006904372","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

摘要

空指针解引用是Java和c#等语言中最常见的运行时错误。为了缓解这个问题,Fahndrich和Leino提出了一个非空类型系统,在这个系统中,引用类型可以用静态强制的非空期望来注释。静态检查非空性的主要挑战是对象初始化;由于新对象的字段首先用null初始化,因此非空类型系统需要确定对象何时被完全初始化,因此,它的非空字段实际上包含非空值。为解决这一问题提出了几种解决办法,但每一种办法都没有达到健全、灵活和简单这三个标准中的一个。在本文中,我们提出了一个满足所有三个标准的解决方案,使其适合主流使用。我们提供了核心类型系统的形式化,并证明了小语言的可靠性。我们还非正式地展示了如何扩展核心类型系统以支持实际的语言。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Freedom before commitment
Null pointer dereferences are the most common runtime error in languages such as Java and C#. To alleviate this problem, Fahndrich and Leino proposed a non-null type system, in which reference types can be annotated with non-nullity expectations that are statically enforced. The main challenge for the static checking of non-nullity is object initialisation; since fields of new objects get first initialised with null, a non-null type system needs to determine when an object is fully initialised and, thus, its non-null fields actually contain non-null values. Several proposed solutions exist for tackling this problem, but each fail on one of the three criteria of soundness, flexibility and simplicity. In this paper we present a solution which satisfies all three criteria, making it suitable for mainstream use. We provide a formalisation of the core type system and prove soundness for a small language. We also show informally how the core type system can be extended to support a realistic language.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术文献互助群
群 号:481959085
Book学术官方微信