Safe Programming with Pointers Through Stateful Views
Safe Programming with Pointers Through Stateful Views
复制标题
通过状态视图使用指针进行安全编程
DOI:
--
复制
发表时间:
2005
期刊:
影响因子:
--
通讯作者:
H. Xi
中科院分区:
文献类型:
--
作者:
Dengping Zhu;H. Xi
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.