一种用于安全内存管理的类型系统及其正确性证明

Manuel Montenegro, Ricardo Peña-Marí, Clara Segura
{"title":"一种用于安全内存管理的类型系统及其正确性证明","authors":"Manuel Montenegro, Ricardo Peña-Marí, Clara Segura","doi":"10.1145/1389449.1389468","DOIUrl":null,"url":null,"abstract":"We present a destruction-aware type system for the functional language Safe, which is a first-order eager language with facilities for programmer controlled destruction and copying of data structures. It provides also regions, i.e. disjoint parts of the heap, where the program allocates data structures. The runtime system does not need a garbage collector and all allocation/deallocation actions are done in constant time. The language is equipped with several analyses and inference algorithms so that regions, sharing information and types are automatically inferred by the compiler. Here, we concentrate on the correctness of the type system with respect to the operational semantics of the language. In particular, we prove that, in spite of sharing and of the use of implicit and explicit memory deallocation operations, all well-typed programs will be free of dangling pointers at runtime. The paper ends up with some examples of well-typed programs.","PeriodicalId":248980,"journal":{"name":"Proceedings of the 10th international ACM SIGPLAN conference on Principles and practice of declarative programming","volume":"38 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2008-07-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"23","resultStr":"{\"title\":\"A type system for safe memory management and its proof of correctness\",\"authors\":\"Manuel Montenegro, Ricardo Peña-Marí, Clara Segura\",\"doi\":\"10.1145/1389449.1389468\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We present a destruction-aware type system for the functional language Safe, which is a first-order eager language with facilities for programmer controlled destruction and copying of data structures. It provides also regions, i.e. disjoint parts of the heap, where the program allocates data structures. The runtime system does not need a garbage collector and all allocation/deallocation actions are done in constant time. The language is equipped with several analyses and inference algorithms so that regions, sharing information and types are automatically inferred by the compiler. Here, we concentrate on the correctness of the type system with respect to the operational semantics of the language. In particular, we prove that, in spite of sharing and of the use of implicit and explicit memory deallocation operations, all well-typed programs will be free of dangling pointers at runtime. The paper ends up with some examples of well-typed programs.\",\"PeriodicalId\":248980,\"journal\":{\"name\":\"Proceedings of the 10th international ACM SIGPLAN conference on Principles and practice of declarative programming\",\"volume\":\"38 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2008-07-15\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"23\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 10th international ACM SIGPLAN conference on Principles and practice of declarative programming\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/1389449.1389468\",\"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 10th international ACM SIGPLAN conference on Principles and practice of declarative programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1389449.1389468","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 23

摘要

我们为函数式语言Safe提出了一种破坏感知类型系统,它是一种一阶渴望语言,具有程序员控制的数据结构的破坏和复制功能。它还提供了区域,即堆的不相交部分,程序在其中分配数据结构。运行时系统不需要垃圾收集器,所有的分配/回收操作都在固定时间内完成。该语言配备了多种分析和推理算法,以便编译器自动推断区域,共享信息和类型。在这里,我们主要关注类型系统相对于语言的操作语义的正确性。特别地,我们证明了,尽管共享和使用隐式和显式内存释放操作,所有类型良好的程序在运行时都没有悬空指针。文章最后给出了一些类型良好的程序的例子。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
A type system for safe memory management and its proof of correctness
We present a destruction-aware type system for the functional language Safe, which is a first-order eager language with facilities for programmer controlled destruction and copying of data structures. It provides also regions, i.e. disjoint parts of the heap, where the program allocates data structures. The runtime system does not need a garbage collector and all allocation/deallocation actions are done in constant time. The language is equipped with several analyses and inference algorithms so that regions, sharing information and types are automatically inferred by the compiler. Here, we concentrate on the correctness of the type system with respect to the operational semantics of the language. In particular, we prove that, in spite of sharing and of the use of implicit and explicit memory deallocation operations, all well-typed programs will be free of dangling pointers at runtime. The paper ends up with some examples of well-typed programs.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信