Improving strategies for handling undefined variables

  • Authors:
  • Richard B. Borie;Allen S. Parrish

  • Affiliations:
  • The University of Alabama, Tuscaloosa, AL;The University of Alabama, Tuscaloosa, AL

  • Venue:
  • ACM-SE 30 Proceedings of the 30th annual Southeast regional conference
  • Year:
  • 1992

Quantified Score

Hi-index 0.00

Visualization

Abstract

Most programming languages ignore the problem of undefined variables and permit compilers to allow the leftover contents of the memory cells belonging to such variables to be referenced. Although efficient, this type of semantics does not support software engineering, in that defects may arise in subtle ways, and may be difficult to locate. Two other types of semantics that better support software engineering are to either initialize all variables to some default (e.g., zero), or to treat all references to undefined variables as illegal. Of these two types of semantics, the latter one has been argued by some to be superior in terms of software engineering, but conventional implementations of this semantics have been significantly less efficient. In this paper, we propose a new implementation of this semantics whose efficiency compares favorably, for certain realistic programs, with the semantics of initializing all variables to default values.