Safe Programming with Pointers Through Stateful Views

Safe Programming with Pointers Through Stateful Views
复制标题

通过状态视图使用指针进行安全编程

DOI:
--
复制
发表时间:
2005
期刊:
International Symposium on Practical Aspects of Declarative Languages
影响因子:
--
通讯作者:
H. Xi
H. Xi
中科院分区:
--
文献类型:
--
作者:
Dengping Zhu;H. Xi

文献摘要

被引文献

相似文献

在许多应用中,必须通过指针进行直接记忆操作是必不可少的。但是,通常也可以理解,指针的使用(或可能滥用)通常是程序错误的丰富来源。因此,高度追捧可以有效地强制执行在编程中安全使用指针的方法。 ATS是一种编程语言,其类型系统植根于最近开发的框架应用类型系统,并且ATS中的新颖而理想的功能在于它通过新颖的状态观点来支持与指针一起安全编程的支持。特别是,即使是在ATS中也允许使用指针算术,并且可以通过ATS的类型系统确保安全。在本文中,我们在ATS中概述了此功能,并根据ATS的原型实现提供了一些有趣的示例,以通过状态观点通过指针来证明安全编程的实用性。
The need for direct memory manipulation through pointers is essential in many applications. However, it is also commonly understood that the use (or probably misuse) of pointers is often a rich source of program errors. Therefore, approaches that can effectively enforce safe use of pointers in programming are highly sought after. ATS is a programming language with a type system rooted in a recently developed framework Applied Type System, and a novel and desirable feature in ATS lies in its support for safe programming with pointers through a novel notion of stateful views. In particular, even pointer arithmetic is allowed in ATS and guaranteed to be safe by the type system of ATS. In this paper, we give an overview of this feature in ATS, presenting some interesting examples based on a prototype implementation of ATS to demonstrate the practicality of safe programming with pointer through stateful views.