Backtracking in a Generalized Control Setting

Backtracking is a powerful conceptual and practical programming language control structure. However, its application in general has been limited to global control over recursive programs. In this paper we explore the coherence and utility of applying backtracking in a more general control setting, namely, block-structured coroutines. The following criteria are proposed for such a control combination to be judged successful: (i) retention of each control form's individual semantics; (ii) coherent semantics for each legal application of the combination; (iii) nonpreeminence of either control form, and (iv) facilitation of genuinely novel programming effects. The attainability of these criteria is assessed, with the aid of an informal language design and three illustrative applications: (i) a dual tree walk program using coroutine-managed backtracking subsystems; (ii) a context-free language intersection tester using bilevel hierarchical backtracking, and (iii) an optimizing computer job scheduler using backtracking in a simulation language context. Full programs are given for each example, phrased in a Pascal extension offering both coroutines and backtracking (expressed through nondeterministic control).

[1]  Charles J. Prenner,et al.  An implementation of backtracking for programming languages , 1972, SIGP.

[2]  Edward M. Reingold,et al.  Backtrack programming techniques , 1975, CACM.

[3]  Per Brinch Hansen,et al.  The programming language Concurrent Pascal , 1975, IEEE Transactions on Software Engineering.

[4]  Mary Lou Soffa,et al.  Referencing and Retention in Block-Structured Coroutines , 1981, TOPL.

[5]  Mary Lou Soffa,et al.  Control Separation in programming languages , 1977, ACM '77.

[6]  Daniel G. Bobrow,et al.  New Programming Languages for Artificial Intelligence Research , 1974, CSUR.

[7]  O. J. Dahl,et al.  Simula Begin , 1979 .

[8]  Gerald Jay Sussman,et al.  The Conniver Reference Manual , 1972 .

[9]  David R. Hanson,et al.  Language facilities for programmable backtracking , 1977, Artificial Intelligence and Programming Languages.

[10]  Jacques Cohen Interpretation of Non-Deterministic Algorithms in Higher-Level Languages , 1975, Inf. Process. Lett..

[11]  Robert W. Floyd,et al.  Nondeterministic Algorithms , 1967, JACM.

[12]  J. D Ichbiah,et al.  General Concepts of the Simula 67 Programming Language , 1972 .

[13]  Gary Lindstrom,et al.  Control structure aptness: A case study using top-down parsing , 1978, ICSE '78.

[14]  Solomon W. Golomb,et al.  Backtrack Programming , 1965, JACM.

[15]  Ole-Johan Dahl,et al.  Coroutine sequencing in a block structured environment , 1971 .

[16]  Drew McDermott,et al.  From PLANNER to CONNIVER: a genetic approach , 1972, AFIPS '72 (Fall, part II).

[17]  Richard D. Greenblatt,et al.  LISP Machine Progress Report. , 1977 .

[18]  Peter Johansen Non-deterministic programming , 1967 .

[19]  David R. Hanson,et al.  Language facilities for programmable backtracking , 1977 .

[20]  David R. Hanson,et al.  A procedure mechanism for backtrack programming , 1976, ACM '76.

[21]  Franco Turini,et al.  Two-level control structure for nondeterministic programming , 1977, CACM.