Planner-BESM-6 Systems Implementation Methods

V. PilshikovIJCAI 1975

Abstract

In the mid-1970s, the PLANNER programming language was a cornerstone of Artificial Intelligence research, offering powerful features like goal-directed invocation and backtracking. However, its high computational and memory costs often limited its practical application. This paper describes the implementation of the PLANNER-BESM-6 system, which introduced several architectural optimizations to improve efficiency. Key innovations include a single-stack backtracking mechanism using an "archive" list, an array-based list representation, and a three-stage garbage collection process. These methods allowed for a high-performance implementation on the BESM-6 mainframe, making the language a viable tool for complex AI systems.

Introduction

The core challenge in early AI language design was the "efficiency gap." While languages like PLANNER allowed researchers to build sophisticated systems with ease, the underlying mechanisms for managing non-determinism—specifically backtracking—were notoriously slow. Standard implementations often relied on multiple stacks or frequent copying of activation frames, leading to excessive memory consumption and slow data transfers.

The PLANNER-BESM-6 system was designed to bridge this gap. Developed for the BESM-6, a flagship Soviet computer, the system aimed to provide a practical implementation that minimized overhead without sacrificing the core expressive power of the language.

Implementation Methods

Archive-Based Backtracking

To avoid the overhead of copying stack frames during backtracking, PLANNER-BESM-6 utilizes a single-stack approach supplemented by a specialized list called the "archive." When the program state changes—such as during variable binding—the archive records the previous state and its memory location.

Stack frame transitions during backtracking operations, illustrating the single-stack management and pointer updates.

If a failure occurs and the system must backtrack, it does not need to restore a full copy of a previous stack. Instead, it "replays" the archive backward, undoing changes to restore the environment to its prior state. This significantly reduces the memory footprint of non-deterministic programs.

Array-Based List Representation

Unlike traditional LISP implementations that use linked lists (cons cells), PLANNER-BESM-6 represents lists as arrays of pointers. Each list pointer contains the starting address, the length, and a type indicator.

Internal representation of complex list structures using arrays of pointers and semi-defined values.

This representation offers several advantages:

  • Constant-time access: List lengths are available in $O(1)$ time.
  • Bidirectional scanning: Lists can be scanned efficiently from both ends, which is particularly beneficial for pattern-matching operations.
  • Memory Locality: Array-based storage helps localize data in memory, optimizing performance for virtual memory paging systems.

Three-Stage Garbage Collection

The use of array-based lists necessitates a compact memory layout. The system employs a custom three-stage garbage collector designed to pack memory tightly:

  1. Marking: Identifies all used cells.
  2. Downward Scan: Scans memory to update references pointing to lower memory addresses.
  3. Compaction and Upward Scan: Moves marked cells to their new locations and updates references pointing to higher memory addresses. This process requires no additional workspace, making it highly efficient for the BESM-6's memory constraints.

Semi-Defined (SD) Structures

To handle variables that are constrained but not yet assigned a concrete value, the system introduces "semi-defined structures." These act as internal placeholders that enforce consistency during pattern matching. For example, if two variables are constrained to be equal before their values are known, the SD-structure maintains this dependency automatically, delaying memory allocation until a value is finally determined.

Discussion and Results

The architectural shifts in PLANNER-BESM-6 yielded significant qualitative improvements. By using the "archive" as a targeted undo mechanism, the system avoided the massive memory overhead of systems like POPLER 1.5, which relied on multiple stack copies. Furthermore, the array-based list representation provided a structural advantage for pattern matching, the primary operation in PLANNER programs.

While the implementation required some trade-offs—such as prohibiting "actors" during pattern matching and limiting the system to recursive and backtrack regimes—these constraints enabled a more streamlined and faster interpreter. The resulting system proved to be a "practical tool" capable of supporting sophisticated AI research on contemporary hardware.

Conclusion

The PLANNER-BESM-6 implementation demonstrates that the inherent inefficiencies of high-level AI languages can be mitigated through clever systems-level optimizations. By rethinking backtracking and data representation, the authors created a system that balanced the theoretical power of PLANNER with the practical constraints of the BESM-6 mainframe. This work laid the groundwork for more efficient AI development environments in the Soviet research community.

Summary updated

BibTeX
@inproceedings{pilshikov1975planner,
  author = {V. Pilshikov},
  title = {{Planner-BESM-6 Systems Implementation Methods}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1975},
}
Figure