A modality for safe resource sharing and code reentrancy

  • Authors:
  • Rui Shi;Dengping Zhu;Hongwei Xi

  • Affiliations:
  • Yahoo! Inc.;Bloomberg Inc.;Boston University

  • Venue:
  • ICTAC'10 Proceedings of the 7th International colloquium conference on Theoretical aspects of computing
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

The potential of linear logic in facilitating reasoning on resource usage has long been recognized. However, convincing uses of linear types in practical programming are still rather rare. In this paper, we present a general design to effectively support practical programming with linear types. In particular, we introduce and then formalize a modality, which we refer to as the sharing modality, in support of sharing of linear resources (with no use of locks). We develop the underlying type theory for the sharing modality and establish its soundness based on a notion of types with effects. We also point out an intimate relation between this modality and the issue of code reentrancy. In addition, we present realistic examples to illustrate the use of sharing modality, which are verified in the programming language ATS and thus provide a solid proof of concept.