An implementation of backtracking for programming languages

  • Authors:
  • Charles J. Prenner;Jay M. Spitzen;Ben Wegbreit

  • Affiliations:
  • Center for Research in Computing Technology;Center for Research in Computing Technology;Center for Research in Computing Technology

  • Venue:
  • ACM SIGPLAN Notices - Special issue on control structures in programming languages
  • Year:
  • 1972

Quantified Score

Hi-index 0.00

Visualization

Abstract

Primitive operations for backtracking and a technique for their implementation are described. The technique is applicable to all programming languages whose control structure is strictly hierarchical. A general stack model for such languages is presented and a realization of the backtracking primitives is described in terms of this model. The primitives give the user control over which assignents to variables will be 'undone' when backtracking. Moreover, their realization, at each point of choice, does not save the entire current machine state but only a relatively small amount of information sufficient to later reconstruct that machine state. Consequently, the implementation makes efficient use of storage and makes backtracking a practical progamming device for dealing with complex problems.