Safe programming with pointers through stateful views

  • Authors:
  • Dengping Zhu;Hongwei Xi

  • Affiliations:
  • Computer Science Department, Boston University;Computer Science Department, Boston University

  • Venue:
  • PADL'05 Proceedings of the 7th international conference on Practical Aspects of Declarative Languages
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.