Fractional Ownerships for Safe Memory Deallocation

Free registration required

Executive Summary

The authors propose a type system for a programming language with memory allocation/de-allocation primitives, which prevents memory-related errors such as double-frees and memory leaks. The main idea is to augment pointer types with fractional ownerships, which express both capabilities and obligations to access or de-allocate memory cells. By assigning an ownership to each pointer type constructor (rather than to a variable), their type system can properly reason about list/tree-manipulating programs. Furthermore, thanks to the use of fractions as ownerships, the type system admits a polynomial-time type inference algorithm, which serves as an algorithm for automatic verification of lack of memory-related errors. A prototype verifier has been implemented and tested for C programs.

  • Format: PDF
  • Size: 227.55 KB