An Exhaustive-Search Method Using Layered Streams Obtained Through a Meta-Interpreter for Chain Programs
Okumura and Matsumoto have published  examples of logic programs using a data structure they call “layered stream,” especially suited for completely traversing a search space in a deterministic manner [2,4]. A layered stream is a representation of a list of lists, in which common heads of adjacent sublists have been factored. This factorization allows the pruning of several branches of the search space in constant time and is also a source of parallelism [3, p. 147]. The published examples include the N-queen problem and “instant insanity” (a precursor of Rubik’s cube). Each such deterministic, layered-stream program supposedly performs exhaustive search over the space generated by some nondeterministic, naive program. However, a method converting a non-deterministic program into a corresponding exhaustive-search, layered-stream version has not yet been proposed, as far as we know. Layered streams have thus remained difficult to use [3, p. 408], since the programmer must be concerned both about factorization of heads and exhaustive search. We build upon the work of Okumura and Matsumoto by showing how to translate nondeterministic programs into exhaustive-search, layered-stream form. Our method is restricted to generate-and-test programs fitting a certain schema.
KeywordsSearch Space Logic Program Exhaustive Search Empty List Parallel Logic
Unable to display preview. Download preview PDF.
- 1.Akira Okumura and Yuji Matsumoto. Parallel programming with layered streams. In Proceedings of the 1987 Symposium on Logic Programming, pages 224–231, San Francisco, California, U.S.A., 1987. Lecture Notes in Computer Science 348.Google Scholar
- 2.H. Tamaki. Stream-based compilation of ground I/O Prolog into committed-choice languages. In Proceedings of the Fourth International Conference on Logic Programming, pages 376–393, Melbourne, Australia, 1987.Google Scholar
- 3.Evan Tick. Parallel Logic Programming. MIT Press, 1991.Google Scholar