Parallel backtracking with answer memoing for independent and-parallelism

Goal-level Independent and-parallelism (IAP) is exploited by scheduling for simultaneous execution two or more goals which will not interfere with each other at run time. This can be done safely even if such goals can produce multiple answers. The most successful IAP implementations to date have used recomputation of answers and sequentially ordered backtracking. While in principle simplifying the implementation, recomputation can be very inefficient if the granularity of the parallel goals is large enough and they produce several answers, while sequentially ordered backtracking limits parallelism. And, despite the expected simplification, the implementation of the classic schemes has proved to involve complex engineering, with the consequent difficulty for system maintenance and extension, while still frequently running into the well-known trapped goal and garbage slot problems. This work presents an alternative parallel backtracking model for IAP and its implementation. The model features parallel out-of-order (i.e., non-chronological) backtracking and relies on answer memoization to reuse and combine answers. We show that this approach can bring significant performance advantages. Also, it can bring some simplification to the important engineering task involved in implementing the backtracking mechanism of previous approaches.

[1]  K. A. Ross,et al.  Tabled Evaluation with Delaying for General Logic Programs , 1996 .

[2]  D. Cabezas,et al.  Un sistema de programación lógica extensible y con soporte para análisis global (an extensible, global analysis friendly logic programming system) , 2004 .

[3]  Mats Carlsson,et al.  Parallel execution of prolog programs: a survey , 2001, TOPL.

[4]  Seif Haridi,et al.  The Aurora or-parallel Prolog system , 1990, New Generation Computing.

[5]  Manuel V. Hermenegildo,et al.  Automatic Compile-Time Parallelization of Logic Programs for Restricted, Goal Level, Independent and Parallelism , 1999, J. Log. Program..

[6]  Seif Haridi,et al.  An Introduction to AKL A Multi-Paradigm Programming Language , 1993, NATO ASI CP.

[7]  Gopal Gupta,et al.  Parallel Execution of Logic Programs , 1991, Lecture Notes in Computer Science.

[8]  Hisao Tamaki,et al.  OLD Resolution with Tabulation , 1986, ICLP.

[9]  Rong Yang,et al.  The Andorra-I Engine: A Parallel Implementation of the Basic Andorra Model , 1991, ICLP.

[10]  Manuel V. Hermenegildo,et al.  The &-Prolog system: Exploiting independent and-parallelism , 1991, New Generation Computing.

[11]  Enrico Pontelli,et al.  &ACE: a high-performance parallel Prolog system , 1995, IPPS.

[12]  Manuel V. Hermenegildo,et al.  A High-Level Implementation of Non-deterministic, Unrestricted, Independent And-Parallelism , 2008, ICLP.

[13]  Manuel V. Hermenegildo,et al.  Annotation Algorithms for Unrestricted Independent And-Parallelism in Logic Programs , 2008, LOPSTR.

[14]  Saumya K. Debray,et al.  A Methodology for Granularity-Based Control of Parallelism in Logic Programs , 1996, J. Symb. Comput..

[15]  Manuel V. Hermenegildo,et al.  Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor) , 2005, Sci. Comput. Program..

[16]  David Scott Warren,et al.  Memoing for logic programs , 1992, CACM.

[17]  Manuel V. Hermenegildo,et al.  Determinacy Analysis for Logic Programs Using Mode and Type Information , 2004, LOPSTR.

[18]  V. S. Costa,et al.  The YAP Prolog system , 2011, Theory and Practice of Logic Programming.

[19]  Francesca Rossi,et al.  Strict and Nonstrict Independent And-Parallelism in Logic Programs: Correctness, Efficiency, and Compile-Time Conditions , 1995, J. Log. Program..

[20]  Paulo Nunes,et al.  High-Level Multi-threading Programming in Logtalk , 2008, PADL.

[21]  Vítor Manuel de Morais Santos Costa Compile-time analysis for the parallel execution of logic programs in Andorra-1 , 1993 .

[22]  Manuel V. Hermenegildo,et al.  Flexible Scheduling for Non-Deterministic, And-parallel Execution of Logic Programs , 1996, Euro-Par, Vol. II.

[23]  Manuel V. Hermenegildo,et al.  An overview of Ciao and its design philosophy , 2011, Theory and Practice of Logic Programming.

[24]  R. Costa,et al.  YAP user''s manual , 1989 .

[25]  Hassan Aït-Kaci,et al.  Warren's Abstract Machine: A Tutorial Reconstruction , 1991 .

[26]  Kish Shen,et al.  Overview of Daswam: Exploitation of Dependent and-Parallelism , 1996, J. Log. Program..

[27]  V. S. Costa,et al.  Theory and Practice of Logic Programming , 2010 .

[28]  John S. Conery Parallel Execution of Logic Programs , 1987 .

[29]  I. V. Ramakrishnan,et al.  Efficient Tabling Mechanisms for Logic Programs , 1995, ICLP.

[30]  Khayri A. M. Ali,et al.  The Muse Or-Parallel Prolog Model and its Performance , 1990, NACLP.

[31]  Sverker Janson,et al.  AKL - A Multiparadigm Programming Language , 1994 .

[32]  Manuel V. Hermenegildo,et al.  An abstract machine based execution model for computer architecture design and efficient implementation of logic programs in parallel , 1986 .

[33]  Alan H. Karp,et al.  A comparison of 12 parallel FORTRAN dialects , 1988, IEEE Software.

[34]  Manuel V. Hermenegildo,et al.  A simulation study on parallel backtracking with solution memoing for independent and-parallelism , 2011 .

[35]  Dae-Young Kim,et al.  A Design and Implementation of ATCA based , 2006 .

[36]  David Scott Warren,et al.  Tabled evaluation with delaying for general logic programs , 1996, JACM.

[37]  Ricardo Lopes,et al.  A design and implementation of the Extended Andorra Model1 , 2011, Theory and Practice of Logic Programming.