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.
A considerable amount of programming language research has been directed towards the development of extensible languages. Typically, these languages allow data type extensions, in which new data types are constructed in terms of builtin or previously defined ones, and syntax extensions, which allow the programmer to express himself in a more convenient notation than that of the base language. For the past few years the author has been experimenting with a third axis of extensibility, namely, control extensionsthe introduction of non-standard control structures into programming languages.By non-standard control structures we refer to any one of a set of facilities which have appeared as specialized extensions to existing languages. These include non-deterministic algorithms, backtracking, parallel processing, coroutines, simulation primitives, synchronization operations, and the ~ike. Numerous papers describe how one or more of the above can he added to some language (usually AL?~L-60). }Iowever, there have been relatively few studies of either the effects of the extensions on the language as a whole or the possibility of obtaining all of these extensions in a unified way from a common base.
ECL is a programming language system currently under development at Harvard University. A general description of the system is given in a companion paper [1]. This paper will describe some of the control structure facilities available in ECL - a complete description will appear as part of the author's Ph.D. thesis. Most existing programming languages allow for only one path of control. The programmer is presented with an environment in which he may use conditional statements, iteration statements and nested function calls (perhaps called recursively) to modify the flow of control through his program but it is not usually possible to either suspend execution of the current program (control path) and start up another or to set up another control path to execute in parallel with the current one. EL1, as originally proposed in [2], allows for only one path of control. ECL, however, allows for the creation and manipulation of multiple paths of control. These paths may execute in parallel, or act as coroutines or in any other relation desirable. Since the number of paths which can be created to execute in parallel may be greater than the number of processors available on a given machine, some sort of path scheduling must be done. The path scheduler is written in EL1 and is available for redefinition by the programmer.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.