Freedom before commitment

Alexander J. Summers, Peter Müller
{"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}
引用次数: 5

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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
承诺之前的自由
空指针解引用是Java和c#等语言中最常见的运行时错误。为了缓解这个问题,Fahndrich和Leino提出了一个非空类型系统,在这个系统中,引用类型可以用静态强制的非空期望来注释。静态检查非空性的主要挑战是对象初始化;由于新对象的字段首先用null初始化,因此非空类型系统需要确定对象何时被完全初始化,因此,它的非空字段实际上包含非空值。为解决这一问题提出了几种解决办法,但每一种办法都没有达到健全、灵活和简单这三个标准中的一个。在本文中,我们提出了一个满足所有三个标准的解决方案,使其适合主流使用。我们提供了核心类型系统的形式化,并证明了小语言的可靠性。我们还非正式地展示了如何扩展核心类型系统以支持实际的语言。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Costs and Benefits of Electric Vehicles and District Cooling Systems: A case study in Singapore Towards a Digital Urban Climate Twin: Simulation-as-a-Service (SaaS) for Model Integration Microscale Assessment of the Anthropogenic Heat Mitigation Strategies Decision Support System: User research, usability analysis and computational build Analysis of climatic variables in different urban sites of Singapore and evaluation of strategies to improve the outdoor thermal environment
×
引用
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