Franz KurfeB Parallelism in Logic
Artificial Intelligence Kiinstliche Intelligenz edited by Wolfgang Bibel and Walther von Hahn Artificial Intelligence aims for an understanding and the technical realization of intelligent behaviour. The books of this series are meant to cover topics from the areas of knowledge processing, knowledge representation, expert systems, communication of knowledge (language, images, speach, etc.), AI machinery as well as languages, models of biological systems, and cognitive modelling. In English: Automated Theorem Proving by Wolfgang Bibel Parallelism in Logic by Franz Kurfel3 Relative Complexities of First Order Calculi by Elmar Eder In German: Die Wissensreprasentationssprache OPS 5 by Reinhard Krickhahn and Bernd Radig Prolog by Ralf Cordes, Rudolf Kurse, Horst Langend6rfer and Heinrich Rust LISP by Rudiger Esser and Elisabeth Feldmar Logische Grundlagen der KiinstIichen Intelligenz by Michael R. Genesereth and Nils 1. Nilsson Wissenbasierte Echtzeitplanung by Jtirgen Dorn Modulare Regelprogrammierung by Siegfried Bocionek Automatisierung von Terminierungsbeweisen by Christoph Walther Logische und Funktionale Programmierung by Ulrich Furbach
Franz KurfeB Parallelism in Logic Its Potential for Performance and Program Development II Vleweg
Die Deutsche Bibliothek - CIP-Einheitsaufnahme Kurfess, Franz: Parallelism in logic: its potential for performance and program development / Franz Kurfess. - Braunschweig: Vieweg, 1991 (Artificial intelligence) AMS Subject Classification: 03 B 70,68 N 05, 68 M 20,68 Q 10,68 T 25 Verlag Vieweg P. O. Box 5829 0-6200 Wiesbaden. FR Germany Vieweg is a subsidiary company of the Bertelsmann Publishing International. All rights reserved Friedr. Vieweg & Sohn Verlagsgesellschaft mbh, Braunschweig 1991 No part of this publication may be reproduced, stored in a retrieval system or transmitted, mechanical, photocopying or otherwise, without prior permission of the copyright holder. Cover design: L. Markgraf, Wiesbaden ISBN-13: 978-3-528-05163-1 e-isbn-13: 978-3-322-84922-9 DOl: 10.1007/ 978-3-322-84922-9
Preface The work described in this book is the outcome of the author's contributions to the design of a parallel inference machine in the Artificial Intelligence / Intellektik Group at the Computer Science Department of the Technical University in Munich. It is the revised version of a doctoral dissertation, submitted to the Technical University under the same title in 1990. The research was carried out in the framework of the European ESPRIT programme, project 415: "Parallel Architectures and Languages for Advanced Information Processing - A VLSI-directed Approach", with Philips Research Laboratories, Eindhoven, The Netherlands, as main contractor, and Nixdorf Computer AG, Paderborn, Germany, as subcontractor for subproject F. Out of the many people who helped me to accomplish this work, I owe the most to Prof. Dr. W. Bibel, who founded the Intellektik Group in Munich, initiated its participation in ESPRIT 415, and hired me for this project although my exposure to logic was rather limited at that time. My thesis advisor, Prof. E. Jessen, deserves a lot of gratitude for his superb supervision and constant encouragement, especially after Prof. Bibelleft Munich; without his help, it would have taken me even longer to complete this work. Many more people contributed to the research described here; an overview can be found in the back of the book (p. 269). My final thanks go to Catharine 0 'Shaughnessy for her patience and support, especially during the final stage. Berkeley, March 1991 Franz K urfeb
Abstract This book discusses the potential of parallelism in logic programming and its exploitation on parallel architectures. Whereas the state of the art is almost exclusively restricted to an exploitation of ANDor OR-parallelism, a variety of categories of parallelism is discussed with respect to different levels of a logical formula (formula, clause, literal, term) and different ways to evaluate it. This discussion is based on formal specifications of the categories using the language UNITY (Chandy and Misra, 1988). As an outcome of these investigations, a proposal is made to capture both the specification of parallel problems with logic, as well as the exploitation of parallelism in the evaluation of a logic formula or program: Modularity allows structuring of logic programs in an appropriate way, and meta-evaluation can be used to control the evaluation process on a parallel system. This combination yields a consistent programming framework with a wide scope ranging from program specification and verification to implementation and execution on parallel archi tectures. Finally, the suitability of a specific evaluation mechanism for parallel architectures is investigated. The spanning setter concept is derived from the connection method (Bibel, 1987) and relies on a statical analysis of the formula to achieve largely independent computation units suited for execution on parallel computer systems. The potential of parallelism in logic reaches far beyond the exploitation of AND- and OR-parallelism usually found in attempts to parallelize PROLOG. Moderate language enhancements and an appropriate evaluation mechanism offer a programming framework with strong expressiveness and efficient execution, without sacrificing the cleanliness of the underlying theoretical foundations.
Contents 1 Introduction 1 1.1 Logic...... 2 1.2 Parallelism....... 4 1.3 Parallelism and Logic. 7 1.4 Relevance of the Work 11 1.5 Organization of the Book. 14 2 Foundations 17 2.1 Logic: The Connection Method 18 2.2 Parallelism: UNITY and Processes. 33 2.3 Model Elimination 44 2.4 A Language: Lop. 58 2.5 Conclusions 64 3 State of the Art 65 3.1 Parallel Logic Systems 66 3.2 Conclusions... 94 4 Parallelism in Logic 95 4.1 Chapter Organization. 96 4.2 Variations on Parallelism. 97 4.3 Overview... 101 4.4 Multitasking. 108 4.5 Modularity 112 4.6 Precision.. 120
4.7 Competition. 125 4.8 Spanning Sets 141 4.9 Reductions.. 150 4.10 o R-Parallelism 163 4.11 Routes... 170 4.12 AND-Parallelism 175 4.13 Term Parallelism 181 4.14 Distributed Representation. 194 4.15 Conclusions: Parallelism in Logic 206 5 A Parallel Logic Language: MMLOP 207 5.1 Overview. 208 5.2 Syntax.. 216 5.3 Semantics 217 5.4 Examples 218 6 Computational Model 223 6.1 A Computational Model for MMLop.... 226 7 Architecture 231 7.1 7.2 7.3 Overview Architecture.... Spanning Setters.... Mappings to Parallel Architectures 233 233 239 7.4 Unification... 250 7.5 Conclusions: Spanning Setters and Parallel Architectures255 8 Conclusions 257 8.1 Foundations... 260 8.2 State of the Art... 261 8.3 Parallelism in Logic. 263 8.4 MMLOP: A Parallel Logic Programming Language 264 8.5 Computational Model 266 8.6 Architecture... 267 V1l1
List of Figures 2.1 A predicate logic formula and its matrix notation 25 2.2 The matrix with connections...... 31 2.3 The matrix with copies......... 32 2.4 Program COMPLEMENTARY PATHS 1 37 2.5 Program COMPLEMENTARY PATHS 2 41 2.6 A model elimination tableau. 45 2.7 Program PROVER... 47 2.8 Program EXTENSION 49 2.9 Program EXTREE... 50 2.10 Program REDUCTION 51 2.11 Program EXTENSION-2 52 2.12 Program PROVER-2a.. 55 2.13 Program PROVER-2b.. 57 2.14 PROLOG and Lop notation 59 2.15 The Syntax of Lop.... 60 2.16 An interpretation for Lop 61 2.17 Fanning of a Lop formula 62 4.1 The Space of Parallelism in Logic 104 4.2 Program TASK-EXEC... 109 4.3 Program TASK-LOGIC.. 110 4.4 Program MODULE-EXECl 114 4.5 Program MODULE-EXEC2 117 4.6 Program PRECISION 121 4.7 Program CALCULI... 127
4.8 Program STRATEG. 133 4.9 Program STRATRBF 136 4.10 Program STRATBDF 137 4.11 Program SPASE... 143 4.12 Program TAUTOLOGY 151 4.13 Program SUBSUMPTION. 153 4.14 Program RESTRICTED UNIT RESOLUTION 155 4.15 Program PURITY REDUCTION... 157 4.16 Program ISOLATED CONNECTION REDUCTION 158 4.17 Program OR.... 164 4.18 Program ROUTES. 171 4.19 Program AND/OR 176 4.20 Program TERM.. 182 4.21 Program FORWARD 185 6.1 A computational model for MMLop 227 7.1 Anatomy of a spanning setter.... 234 7.2 A team of spanning setters...... 235 7.3 Functional structure of spanning setters. 237 7.4 Bus-connected spanning setters 241 7.5 Transputer-based node 244 7.6 Transputer system... 244 7.7 Transputer tree...... 245 7.8 Massively parallel system. 248 7.9 Dag representation of terms 250 7.10 Root connection. 251 7.11 First forward. 251 7.12 Second forward. 252 7.13 Melted dag... 252 7.14 Program SYNC-UNIF 254 x
List of Tables 3.1 Extended Warren Abstract Machine 3.2 ANDORRA... 3.3 AQUARIUS / PPP... 3.4 AURORA.... 3.5 CONCURRENT PROLOG 3.6 DELTA PROLOG... 3.7 GUARDED HORN CLAUSES 3.8 PARLOG. 3.9 PARTHEO 3.10 PEPSys 3.11 PIM 3.12 POPE 4.1 Multitasking 4.2 Modularity 4.3 Precision 4.4 Calculi 4.5 Strategies 4.6 Find Connections 4.7 Construction of Spanning Sets 4.8 Unification.... 4.9 Spanning Sets 4.10 Tautology Reduction 4.11 Subsumption 4.12 Factorization... 70 73 75 77 79 81 83 85 87 89 91 93 111 118 123 129 139 144 145 146 148 152 153 154
4.13 Restricted Unit Resolution 156 4.14 Purity... 157 4.15 Isolated Connection Reduction 159 4.16 Reductions 161 4.17 OR-Parallelism 167 4.18 Routes... 173 4.19 AND-Parallelism 178 4.20 Forwarding 186 4.21 Chaining 187 4.22 Occur Check 188 4.23 Bottom-up 189 4.24 Separability 190 4.25 Function Call 191 4.26 Distributed Representation 203 5.1 Parallel phenomena and their description: Coarse grain 212 5.2 Parallel phenomena and their description: Medium grain214 5.3 Parallel phenomena and their description: Fine grain 216 7.1 Features of parallel architectures. 240 7.2 Bus-based system... 242 7.3 Transputer-based system. 246 7.4 Massively parallel system. 249 Xll