Fifth_Generation_Computer_Systems_1992_Volume_1 Fifth Generation Computer Systems 1992 Volume 1
Fifth_Generation_Computer_Systems_1992_Volume_1 Fifth_Generation_Computer_Systems_1992_Volume_1
User Manual: Fifth_Generation_Computer_Systems_1992_Volume_1
Open the PDF directly: View PDF .
Page Count: 495
Download | ![]() |
Open PDF In Browser | View PDF |
~ FIFTH GENERATION COMPUTER SYSTEMS 1992 Edited by Institute for New Generation Computer Technology (ICOT) _ Volume 1 Ohmsha, Ltd. lOS Press FIFTH GENERATION COMPUTER SYSTEMS 1992 Copyright © 1992 by Institute for New Generation Computer Technology All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form or by any means, electronic, mechanical, recording or otherwise, without the prior permission of the copyright owner. ISBN 4-274-07724-1 (Ohmsha) ISBN 90-5199-099-5 (lOS Press) Library of Congress Catalog Card Number: 92-073166 Published and distributed in Japan by Ohmsha, Ltd. 3-1 Kanda Nishiki-cho, Chiyoda-ku, Tokyo 101, Japan Distributed in North America by lOS Press, Inc. Postal Drawer 10558, Burke, VA 22009-0558, U. S. A. United Kingdom by lOS Press 73 Lime Walk, Headington, Oxford OX3 7AD, England Europe and the rest of the world by lOS Press Van Diemenstraat 94, 1013 CN Amsterdam, Netherlands Far East jointly by Ohmsha, Ltd., lOS Press Printed in Japan iii FOREWORD On behalf of the Organizing Committee, it is my great pleasure to welcome you to the International Conference on Fifth Generation Computer Systems 1992. The Fifth Generation Computer Systems (FGCS) project was started in 1982 by the initiative of the late Professor Tohru MotoOka with the purpose of making a revolutionary new type of computers oriented to knowledge processing in the 1990s. After completing the initial and intermediate stages of research and development, we are now at the final point of our ten-year project and are rapidly approaching the completion of prototype Fifth Generation Computer Systems. The research goals of the FGCS project were challenging, but we expect to meet most of them. We have developed a new paradigm of knowledge processing including the parallel logic language, KLl, and the parallel inference machine, PIM. When we look back upon these ten years, we can find many research areas in knowledge processing related to this project, such as logic programming, parallel processing, natural language processing, and machine learning. Furthermore, there emerged many new applications of knowledge processing, such as legal reasoning and genetic information processing. I believe that this new world of information processing will grow more and more in the future. When very large knowledge bases including common sense knowledge come out in full scale and are widely used, the knowledge processing paradigm will show its real power and will give us great rewards. From now on, we can enjoy fifth generation computer technology in many fields. Following the same objective of creating such a new paradigm, there has been intense international collaboration, such as joint workshops with France, Italy, Sweden, the U.K., and the U.S.A., and joint research with U.S.A. and Swedish institutes on parallel processing applications. Against this background,ICOT hosts the International Conference on Fifth Generation Computer Systems 1992 (FGCS'92). This is the last in a series of FGCS conferences; previous conferences were held in 1981, 1984 and 1988. The purpose of the conference is to present the final results of the FGCS project, as well as to promote the exchange of new ideas in the fields of knowledge processing, logic programming, and parallel processing. FGCS'92 will take place over five days. The first two days will be devoted to the presentation of the latest results of the FGCS project, and will include invited lectures by leading researchers. The IV remaining three days will be devoted to technical sessions for invited and submitted papers, the presentation of the results of detailed research done at ICOT, and panel discussions. Professor D. Bj¢rner from the United Nations University, Professor l.A. Robinson from Syracuse University, and Professor C.A.R. Hoare from Oxford University kindly accepted our offer to· give invited lectures. Professor R. Kowalski from Imperial College is the chairperson of the plenary panel session on "A springboard for information processing in the 21st century." Professor Hajime Karatsu from Tokai University accepted our invitation to give a banquet speech. During the conference, there will be demonstrations of the research results from the ten-year FGCS project. The Parallel Inference Machines and many kinds of parallel application programs will be highlighted to show the feasibility of the machines. I hope that this conference will be a nice place to present all of the research results in this field up to this time, confirm the milestones, and propose a future direction for the research, development and applications of the fifth generation computers through vigorous discussions among attendees from all over the world. I hope all of the attendees will return to their own countries with great expectations in minds and feel that a new era of computer science has opened in terms of fifth generation computer systems. Moreover, I wish that the friendship and frank cooperation among researchers from around the world, brewed in the process of fifth generation computer systems research, will grow and widen so that this small but strong relationship can help promote international collaboration for the brilliant future of mankind. Hidehiko Tanaka Conference Chairperson v FOREWORD Esteemed guests, let me begin by welcoming you to the International Conference on Fifth Generation Computer Systems, 1992. I am Hideaki Kumano. I am the Director General of the Machinery and Information Industries Bureau of MIT!. We have been promoting the Fifth Generation Computer Systems Project, with the mission of international contributions to technological development by promoting the research and development of information technology in the basic research phase and distributing the achievements of that research worldwide. This international conference is thus of great importance in making our achievements available to all. It is, therefore, a great honor for me to be given the opportunity to make the keynote speech today. 1 Achievements of the Project Since I took up my current post, I have had several opportunities to visit the project site. This made a great impression on me since it proved to me that Japanese technology can produce spectacular results in an area of highly advanced technology, covering the fields of parallel inference machine hardware and its basic software such as operating systems and programming languages; fields in which no one had any previous experience. Furthermore, I caught a glimpse of the future use of fifth generation computer technology when I saw the results of its application to genetics and law. I was especially interested in the demonstration of the parallel legal inference system, since I have been engaged in the enactment and operation of laws at MIT!. I now believe that the machines using the concepts of fifth generation computers will find practical applications in the enactment and operation of laws in the near future. The research and development phase of our project will be completed by the end of this fiscal year. We will evaluate all the results. The committee for development of basic computer technology, comprised of distinguished members selected from a broad spectrum of fields, will make a formal evaluation of the project. This evaluation will take into account the opinions of those attending the conference, as well as the results of a questionnaire completed by overseas experts in each field. Even before this evaluation, however, I am convinced that the project has produced results that will have a great impact on future computer technology. 2 Features of the Fifth Generation Computer Systems Project I will explain how we set our goals and developed a scheme that would achieve these high-level technological advances. The commencement of the project coincided with the time when Japan was coming to be recognized as a major economic and technological power in the world community. Given these circumstances, the objectives of the project included not only the developInent of original and creative technology, but also the making of valuable international VI contributions. In this regard, we selected a theme of "knowledge information processing", which would have a major impact on a wide area from technology through to the economy. The project took as its research goal the development of a parallel inference system, representing the paradigm of computer technology as applied to the theme. The goal was particularly challenging at that time. I recalled the words of a participant at the first conference held in 1981. He commented that it was doubtful whether Japanese researchers could succeed in such a project since we, at that time, had very little experience in these fields. However, despite the difficulties of the task ahead of us, we promoted the project from the viewpoint of contributing to the international community through research. In this regard, our endeavors in this area were targeted as pre-competitive technologies, namely basic research. This meant that we would have to start from scratch, assembling and training a group of researchers. To achieve our goal of creating a paradigm of new computer technology, taking an integrated approach starting from basic research, we settled on a research scheme after exhaustive preliminary deliberations. As part of its efforts to promote the dissemination of basic research results as international public assets, the government of Japan, reflecting its firm commitment to this area, decided to finance all research costs. The Institute for New Generation Computer Technology (ICaT), the sponsor of this conference, was established to act as a central research laboratory where brainpower could be concentrated. Such an organization was considered essential to the development of an integrated technology that could be applied to both hardware and software. The Institute"s research laboratory, that actually conducted the project's research and development, was founded precisely ten years ago, today, on June 1 of 1982. A number of highly qualified personnel, all of whom were excited by the ideal that the project pursued, were recruited from the government and industry. Furthermore, various ad hoc groups were formed to promote discussions among researchers in various fields, making Ie aT the key center for research communication in this field. The duration of the project was divided into three phases. Reviews were conducted at the end of each phase, from the viewpoint of human resources and technological advances, which made it possible to entrust various areas of the research. I believe that this approach increased efficiency, and also allowed flexibility by eliminating redundant areas of research. We have also been heavily involved in international exchanges, with the aim of promoting international contributions. Currently, we are involved in five different international research collaboration projects. These include work in the theorem proving field with the Australian National University (ANU), and research into constraint logic programming with the Swedish Institute of Computer Science (SICS). The results of these two collaborations, on display in the demonstration hall, are excellent examples of what research collaboration can achieve. We have also promoted international exchange by holding international conferences and by hosting researchers from abroad at ICaT. And, we have gone to great lengths to make public our project's achievements, including in- VB termediate results. 3 Succession of the Project's Ideal This project is regarded as being the prototype for all subsequent projects to be sponsored by MITI. It is largely due to the herculean efforts of the researchers, under the leadership of Dr. Fuchi and other excellent research leaders, that have led to the revolutionary advances being demonstrated at this conference. In the light of these achievements, and with an eye to the future, I can now state that there is no question of the need to make international contributions the basis of the policies governing future technological development at MITI. This ideal will be passed on to all subsequent research and development projects. A case in point is the Real World Computing (RWC) project scheduled to start this year. This project rests on a foundation of international cooperation. Indeed, the basic plan, approved by a committee a few days ago, specifically reflects the international exchange of opinions. The RWC project is a particularly challenging project that aims to investigate the fundamental principles of human-like flexible information processing and to implement it as a new information processing technology, taking full advantage of advancing hardware technologies. We will not fail to make every effort to achieve the project's objective~ for use as common assets for all mankind. 4 International Response As I mentioned earlier, I believe that the Fifth Generation Computer System Project has made valuable international contributions from its earliest stages. The project has stimulated international interest and responses from its outset. The great number of foreign participants present today illustrates this point. Around the world, a number of projects received their initial impetus from our project: these include the Strategic Computing Initiative in the U.S.A., the EC's Esprit project, and the Alvey Project in the United Kingdom. These projects were initially launched to compete with the Fifth Generation Computer Systems Project. Now, however, I strongly believe that since our ideal of international contributions has come to be understood around the globe, together with the realization that technology can not and should not be divided by borders, each project is providing the stimulus for the others, and all are making major contributions to the advancement of information processing technologies. 5 Free Access to the Project's Software One of the great virtues of science, given an open environment, between researchers using a common base of technology. IS the collaboration Vlll Considering this, it would be impractical for one person or even one nation to attempt to cover the whole range of technological research and development. Therefore, the necessity of international cooperation is self-evident from the standpoint of advancing the human race as a whole. In this vein, MITI has decided to promote technology globalism in the fields of science and technology, based on a concept of "international cooperative effort for creative activity and international exchange to maximize the total benefit of science and technology to mankind." We call this concept "techno-globalism". It is also important to establish an environment based on "techno-globalism", that supports international collaboration in basic and original research as a resource to solve problems common to all mankind as well as the dissemination of the resulting achievements. This could be done through international cooperation. To achieve this "techno-globalism" all countries should, as far as possible, allow free and easy access to their domestic technologies. This kind of openness requires the voluntary establishment of environments where anyone can access technological achievements freely, rather than merely asking other countries for information. It is this kind of international cooperation, with the efforts of both sides complementing each other, that can best accelerate the advancement of technology. We at MITI have examined our policies from the viewpoint of promoting international technological advancement by using the technologies developed as part of this project, the superbness of which- has encouraged us to set a new policy. Our project's resources focused mainly on a variety of software, including parallel operating systems and parallel logic programming languages. To date, the results of such a national project, sponsored by the government, were available only for a fee and could be used only under various conditions once they became the property of the government. Therefore, generally speaking, although the results have been available to the public, in principle, they have not been available to be used freely and widely. As I mentioned earlier, in the push toward reaching the goal of promoting international cooperation for technological advancement, Japan should take the initiative in creating an environment where all technologies developed in this project can be accessed easily. Now, I can formally announce that, concerning software copyrights in the research and development phase which are not the property of the government, the Institute for New Generation Computer Technology(ICOT), the owner of these copyrights of software products is now preparing to enable their free and and open use without charge. The adoption of this policy not only allows anyone free access to the software technologies developed as part of the project, but also make it possible for interested parties to inherit the results of our research, to further advance the technology. I sincerely hope that our adopting this policy will maximize the utilization of researchers' abilities, and promote the advancement of the technologies of knowledge information processing and parallel processing, toward which all efforts have been concentrated during the project. This means that our adopting this policy will not merely result in a one-way flow of technologies from Japan, but enhance the benefit to all mankind of the technological advancements brought on by a two-way flow of technology and the mutual benefits thus ix obtained. I should say that, from the outset of the Fifth Generation Computer Systems Project, we decided make international contributions an important objective of the project. We fashioned the project as the model for managing the MITI-sponsored research and development projects that were to follow. Now, as we near the completion of the project, we have decided to adopt a policy of free access to the software to inspire further international contributions to technological development. I ask all of you to understand the message in this decision. I very much hope that the world's researchers will make effective use of the technologies resulting from the project and will devote themselves to further developing the technologies. Finally, I'd like to close by expressing my heartfelt desire for this international conference to succeed in providing a productive forum for information exchange between participants and to act as a springboard for further advancements. Thank you very much for bearing with me. Hideaki Kumano Director General Machinery and Information Industries Bureau Ministry of International Trade and Industry (MITI) xi PREFACE Ten years have passed since the FGCS project was launched with the support of the Japanese government. As soon as the FGCS project was announced it had a profound effect not only on computer scientists but also on the computer industry. Many countries recognized the importance of the FGCS project and some of them began their own similar national projects. The FGCS project was initially planned as a ten-year project and this final fourth FGCS conference, therefore, has a historical meaning. For this reason the conference includes an ICOT session. The first volume contains a plenary session and the ICOT session. The plenary session is composed of many reports on the FGCS project with three invited lectures and a panel discussion. In the ICOT session, the logic-based approach and parallel processing will be emphasized through concrete discussions. In addition to these, many demonstration programs have been prepared by ICOT at the conference site, the participants are invited to visit and discuss these exhibitions. Through the ICOT session and the exhibitions, the participants will understand clearly the aim and results of the FGCS project and receive a solid image of FGCS. The second volume is devoted to the technical session which consists of three invited papers and technical papers submitted to this conference. Due to the time and space limitation of the conference, only 82 papers out of 256 submissions were selected by the program committee after careful and long discussion of many of the high quality papers submitted. It is our hope that the conference program will prove to be both worthwhile and enjoyable. As a program chairperson, it is my great pleasure to acknowledge the support of a number of people. First of all, I would like to give my sincere thanks to the program committee members who put a lot of effort into making the program attractive. lowe much to the three program vice-chairpersons, Professor Makoto Amamiya, Dr. Shigeki Goto and Professor Fumio Mizoguchi. Many ICOT members, including Dr. Kazunori Ueda, Ken Satoh, Keiji Hirata, and Hideki Yasukawa have worked as key persons to organize the program. Dr. Koichi Furukawa, in particular, has played an indispensable role in overcoming many problems. I would also like to thank the many referees from many countries who replied quickly to the referees sheets. Finally, I would like to thank the secretariat at ICOT, they made fantastic efforts to carry out the administrative tasks efficiently. Hozumi Tanaka Program Chairperson xiii CONFERENCE COMMITTEES Steering Committee Chairperson: Members: Kazuhiro Fuchi Hideo Aiso Setsuo Arikawa Ken Hirose Takayasu Ito Hiroshi Kashiwagi Hajime Karatsu Makoto Nagao Hiroki Nobukuni Iwao Toda Eiiti Wada ICOT Keio Univ. Kyushu Univ. Waseda Univ. Tohoku Univ. ETL Tokai Univ. Kyoto Univ. NTT Data NTT Univ. of Tokyo Conference Committee Hidehiko Tanaka Chairperson: Vice-Chairperson: Koichi Furukawa Members: Makoto Amamiya Yuichiro Anzai Shigeki Goto Mitsuru Ishizuka Kiyonori Konishi Takashi Kurozumi Fumio Mizoguchi Kunio Murakami Sukeyoshi Sakai Masakazu Soga Hozumi Tanaka Shunichi Uchida Kinko Yamamoto Toshio Yokoi Akinori Yonezawa Toshitsugu Yuba Univ. of Tokyo _ ICOT Kyushu Univ. Keio Univ. NTT Univ. of Tokyo NTT Data ICOT Science Univ. of Tokyo Kanagawa Univ. ICOT(Chairperson, Management Committee) ICOT(Chairperson, Technology Committee) Tokyo Institute of Technology ICOT JIPDEC EDR Univ. of Tokyo ETL Program Committee Chairperson: Hozumi Tanaka Vice-Chairpersons: Makoto Amamiya Shigeki Goto Fumio Mizoguchi Members: Koichi Furukawa Kazunori Ueda Ken Satoh Keiji Hirata Hideki Yasukawa Hitoshi Aida Yuichiro Anzai Arvind Ronald J. Brachman John Conery Doug DeGroot Koichi Fukunaga Jean-Luc Gaudiot Atsuhiro Goto Satoshi Goto Seif Haridi Ken'ichi Hagihara Tokyo Institute of Technology Kyushu Univ. NTT Science Univ. of Tokyo ICOT ICOT ICOT ICOT ICOT Univ. of Tokyo Keio Univ. MIT AT&T Univ. of Oregon Texas Instruments IBM Japan, Ltd. Univ. of Southern California NTT NEC Corp. SICS Osaka Univ. XlV Makoto Haraguchi Ryuzo Hasegawa Hiromu Hayashi Nobuyuki Ichiyoshi Mitsuru Ishizuka Tadashi Kanamori Yukio Kaneda Hirofumi Katsuno Masaru Kitsuregawa Shigenobu Kobayashi Philip D. Laird Catherine Lassez Giorgio Levi John W. Lloyd Yuji Matsumoto Dale Miller Kuniaki Mukai Hiroshi Motoda Katsuto Nakajima Ryohei Nakano Kenji Nishida Shojiro Nishio . Stanley Peters Ant6nio Porto Teodor C. Przymusinski Vijay Saraswat Taisuke Sato Masahiko Sato Heinz Schweppe Ehud Shapiro Etsuya Shibayama Kiyoshi Shibayama Yoav Shoham Leon Sterling Mark E. Stickel MamoruSugie Akikazu Takeuchi Kazuo Taki Jiro Tanaka Yuzuru Tanaka Philip Treleaven Sxun Tutiya Shalom Tsur D.H.D. Warren Takahira Yamaguchi Kazumasa Yokota Minoru Yokota Tokyo Institute of Technology ICOT Fujitsu Laboratories ICOT Univ. of Tokyo Mitsubishi Electric Corp. Kobe Univ. NTT Univ. of Tokyo Tokyo Institute of Technology NASA IBM T.J. Watson Univ. di Pisa Univ. of Bristol Kyoto Univ. Univ. of Pennsylvania Keio Univ. Hitachi Ltd. Mitsubishi Electric Corp. NTT ETL Osaka Univ. CSLI, Stanford Univ. Univ. Nova de Lisboa Univ. of California at Riverside Xerox PARC ETL Tohoku Univ. Institut fOr Informatik The Weizmann Institute of Science Ryukoku Univ. Kyoto Univ. Stanford Univ. Case Western Reserve Univ. SRI International Hitachi Ltd. Sony CSL ICOT Fujitsu Laboratories Hokkaido Univ. University College, London Chiba Univ. MCC Univ. of Bristol Shizuoka Univ. ICOT NEC Corp. Publicity Committee Chairperson: Kinko Yamamoto Vice-Chairperson: Kunio Murakami Members: Akira Aiba Yuichi Tanaka JIPDEC Kanagawa Univ. ICOT ICOT Demonstration Committee Chairperson: Takashi Kurozumi Vice-Chairperson: Shunichi Uchida ICOT ICOT xv LIST OF REFEREES Abadi, Martin A bramson, Harvey Agha, Gul A. Aiba, Akira Aida, Hitoshi Akama, Kiyoshi Ali, Khayri A. M. Alkalaj, Leon Amamiya, Makoto Amano, Hideharu Amano, Shinya America, Pierre Anzai, Yuichiro Aoyagi, Tatsuya Apt, Krzysztof R. Arikawa, Masatoshi Arikawa, Setsuo Arima, Jun Arvind Baba, Takanobu Babaguchi, Noboru Babb, Robert G., II Bancilhon, Fran<;ois Bansal, Arvind K. Barklund, Jonas Beaumont, Tony Beeri, Catriel Beldiceanu, Nicolas Benhamou, Frederic R. Bibel, Wolfgang Bic, Lubomir Biswas, Prasenjit Blair, Howard A. Boku, Taisuke Bonnier, Staffan Boose, John Borning, Alan H. Boutilier, Craig E. Bowen, David Brachman, Ronald J. Bradfield, J. C. Bratko, Ivan Brazdil, Pavel Briot, Jean-Pierre Brogi, Antonio Bruynooghe, Maurice Bry, Fran<;ois Bubst, S. A. Buntine, Wray L. Carlsson, Mats Chikayama, Takashi Chong, Chin Nyak Chu, Lon-Chan Ciepielewski, Andrzej Clancey, William J. Clark, Keith L. Codish, Michael Codognet, Christian Conery, John Consens, Mariano P. Crawford, James M., Jr. Culler, David E. Dahl, Veronica Davison, Andrew de Bakker, Jaco W. de Maindreville, Christophe Debray, Saumya K. Deen, S. M. DeGroot, Doug del Cerro, Luis Farinas Demolombe, Robert Denecker, Marc Deransart, Pierre Dincbas, Mehmet Drabent, Wlodzimierz Duncan, Timothy Jon Dutra, Ines Fahlman, Scott E. Falaschi, Moreno Faudemay, Pascal Feigenbaum, Edward Fitting, Melvin C. Forbus, Kenneth D. Fribourg, Laurent Fujisaki, Tetsu Fujita, Hiroshi Fujita, Masayuki Fukunaga, Koichi Furukawa, Koichi Gabbrielli, Maurizio Gaines, Brian R. Gardenfors, Peter Gaudiot, Jean-Luc Gazdar, Gerald Gelfond, Michael Gero, John S. Giacobazzi, Roberto Goebel, Randy G. Goodwin, Scott D. Goto, Atsuhiro Goto, Satoshi Goto, Shigeki Grama, Ananth Gregory, Steve Gunji, Takao Gupta, Anoop Hagihara, Kenichi Hagiya, Masami Han, Jiawei Hanks, -Steve Hara, Hirotaka Harada, Taku Haraguchi, Makoto Haridi, Seif Harland, James Hasegawa, Ryuzo Hasida, K6iti Hawley, David J. Hayamizu, Satoru Hayashi, Hiromu Henry, Dana S. Henschen, Lawrence J. Herath, J ayantha Hewitt, Carl E. Hidaka, Yasuo Higashida, Masanobu Hiraga, Yuzuru Hirata, Keiji Hobbs, Jerry R. Hogger, Christopher J. Hong, Se June Honiden, Shinichi Hori, Koichi Horita, Eiichi Hori~chi, Kenji Hsiang, Jieh Iannucci, Robert A. Ichikawa, Itaru XVI Ichiyoshi, Nobuyuki Ida, Tetsuo Ikeuchi, Katsushi Inoue, Katsumi Ishida, Toru Ishizuka, Mitsuru Iwasaki, Yumi I wayama, Makoto Jaffar, Joxan J ayaraman, Bharat Kahn, Gilles Kahn, Kenneth M. Kakas, Antonios C. Kameyama, Yukiyoshi Kanade, Takeo Kanamori, Tadashi Kaneda, Yukio Kaneko, Hiroshi Kanellakis, Paris Kaplan, Ronald M. Kasahara, Hironori Katagiri, Yasuhiro Katsuno, Hirofumi Kautz, Henry A. Kawada, TsutonlU Kawamura, Tadashi Kawano, Hiroshi Keller, Robert Kemp, D'avid Kifer, Michael Kim, Chinhyun Kim, Hiecheol Kim, WooYoung Kimura, Yasunori Kinoshita, Yoshiki Kitsuregawa, Masaru Kiyoki, Yasushi Kluge, Werner E. Kobayashi, Shigenobu Kodratoff, Yves Kohda, Youji Koike, Hanpei Komorowski, Jan Konagaya, Akihiko Kono, Shinji Konolige, Kurt Korsloot, Mark Koseki, Yoshiyuki Kraus, Sarit Kumar, Vipin K unen, Kenneth Kunifuji, Susumu Kurita, Shohei K urokawa, Toshiaki Kusalik, Anthony J. Laird, Philip D. Lassez, Catherine Leblanc, Tom Lescanne, Pierre Leung, Ho-Fung Levesque, Hector J. Levi, Giorgio Levy, J ean-J acques Lieberman, Henry A. Lindstrom, Gary Lloyd, John W. Lusk, Ewing L. Lytinen, Steven L. Maher, Michael J. Makinouchi, Akifumi Manthey, Rainer Marek, Victor Marriott, Kim Martelli, Maurizio Maruoka, Akira Maruyama, Fumihiro Maruyama, Tsutomu Masunaga, Yoshifumi Matsubara, Hitoshi Matsuda, Hideo Matsumoto, Yuji Matsuoka, Satoshi McCune, William, W. Memmi, Daniel Mendelzon, Alberto O. Menju, Satoshi Meseguer, Jose Michalski, Richard S. Michie, Donald Miller, Dale A. Millroth, Hakan Minami, Toshiro Minker, Jack Miyake, Nobuhisa 1Iliyano, Satoru Miyazaki, Nobuyoshi Miyazaki, Toshihiko Mizoguchi, Fumio Mizoguchi, Riichiro Mori, Tatsunori Morishita, Shinichi Morita, Yukihiro Motoda, Hiroshi Mowtesi, Dawilo Mukai, K uniaki Mukouchi, Yasuhito Murakami, Kazuaki Murakami, Masaki M uraki, Kazunori Muraoka, Yoichi N adathur, Gopalan Naganuma, Jiro N agashima, Shigeo Nakagawa, Hiroshi Nakagawa, Takayuki Nakajima, Katsuto Nakamura, J unichi Nakano, Miyuki Nakano, Ryohei Nakashima, Hideyuki Nakashima, Hiroshi Nakata, Toshiyuki N akayatna, Masaya N aqvi, Shamim A. N atarajan, Venkat Nikhil, Rishiyur, S. Nilsson, J 0rgen Fischer Nilsson, Martin Nishida, Kenji Nishida, Toyoaki Nishikawa, Hiroaki Nishio, Shojiro Nitta, Izumi Nitta, Katsumi N oye, Jacques N umao, Masayuki N umaoka, Chisato 'Rorke, Paul V. Ogura, Takeshi o hki, Masaru Ohmori, I{enji Ohori, Atsushi Ohsuga, Akihiko Ohsuga, Setsuo Ohwada, Hayato Oka, Natsuki Okumura, Manabu Ono, Hiroakira Ono, Satoshi Overbeek, Ross A. o XVII Oyanagi, Shigeru Palamidessi, Catuscia Panangaden, Prakash Pearl, Judea Pereira, Fernando C. Pereira, LUIs MonIz Petrie, Charles J. Plaisted, David A. Plumer, Lutz Poole, David Popowich, Fred P. Porto, Antonio Przymusinski, Teodor C. Raina, Sanjay Ramamohanarao, Kotagiri Rao, Anand S. Reddy, U day S. Ringwood, Graem A. Robinson, John Alan Rojas, Raul Rokusawa, Kazuaki Rossi, Francesca Rossi, Gianfranco Russell, Stuart J. Sadri, Fariba Saint-Dizier, Patrick Sakai, Hiroshi Sakai, Ko Sakai, Shuichi Sakakibara, Yasubumi Sakama, Chiaki Sakurai, Akito Sakurai, Takafumi Sangiorgi, Davide Santos Costa, Vltor Saraswat, Vijay A. Sargeant, John Sato, Masahiko Sato, Taisuke Sato, Yosuke Satoh, Ken Schweppe, Heinz Seki, Hirohisa Seligman, Jerry M. Sergot, Marek J. Sestito, Sabrina Shanahan, Murray Shapiro, Ehud Shibayama, Etsuya Shibayama, Kiyoshi Shibayama, Shigeki Shimada, Kentaro Shin, Dongwook Shinohara, Takeshi Shintani, Toramatsu Shoham, Yoav Simonis, Helmut Sirai, Hidetosi Smith, Jan Magnus Smolka, Gert Sterling, Leon S. Stickel, Mark E. Stolfo, Salvatore. J. Subrahmani an , V. S. Sugano, Hiroyasu Sugie, Mamoru Sugiyama, Masahide Sundararajan, Renga Suwa, Masaki Suzuki, Hiroyuki Suzuki, Norihisa Takagi, Toshihisa Takahashi, Mitsuo Takahashi, N aohisa Takahashi, Yoshizo Takayama, Yukihide Takeda, Masayuki Takeuchi, Akikazu Takeuchi, Ikuo Taki, Kazuo Tarnai, Tetsuo Tamura, Naoyuki Tanaka, Hozumi Tanaka, J iro Tanaka, Katsumi Tanaka, Yuzuru Taniguchi, Rin-ichiro Tatemura, Jun'ichi Tatsuta, Makoto Terano, Takao Tick, Evan M. Toda, Mitsuhiko Togashi, Atsushi Tojo, Satoshi Tokunaga, Takenobu Tomabechi, Hideto Tomita, Shinji Tomiyama, J;'etsuo Touretzky, David S. Toyama, Yoshihi to Tsuda, Hiroshi Tsur, Shalom Tutiya, Syun U chihira, N aoshi U eda, Kazunori Uehara, K uniaki Ueno, Haruki van de Riet, Reinder P. van Emden, Maarten H. Van Hentenryck, Pascal Van Roy, Peter L. Vanneschi, Marco Wada, Koichi Wah, Benjamin W. Walinsky, Clifford Walker, David Waltz, David L. Warren, David H. D. Warren, David Scott Watanabe, Takao Watanabe, Takuo Watanabe, Toshinori ",\iVatson, Ian Watson, Paul Weyhrauch, Richard W. Wilk, Pau~ F. Wolper, Pierre Yamaguchi, Takahira Yamamoto, Akihiro Yamanaka, Kenjiroh Yang, Rong Yap, Roland Yardeni, Eyal Yasukawa, Hideki Yokoo, Nlakoto Yokota, Raruo Yokota, Kazumasa Yokota, Minoru Yokoyama, Shoichi Yonezaki, N aoki Yonezawa, Akinori Yoo, Namhoon Yoon, Dae-Kyun Yoshida, Hiroyuki Yoshida, Kaoru Yoshid~, Kenichi Yoshida, N orihiko Yoshikawa, Masatoshi Zerubia, Josiane B. XIX CONTENTS OF VOLUME 1 PLENARY SESSIONS Keynote Speech Launching the New Era Kazumro Fuchi ........................3 General Report on ICOT Research and Developnlent Overview of the Ten Years of the FGCS Project Takashi K urozurru . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . .. 9 Summary of Basic Resear:ch Activities of the FGCS Project .20 Koichi Furukawa . . . . . . . . . . . . . . . . . . . . . . . . Summary of the Parallel Inference Machine and its Basic Software Sh uni chi Uchida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 Report on ICOT Research Results Parallel Inference Machine PIM Kazuo Taki . . . . . . . . . . . . . . . . . . . . . . . Operating System PIMOS and Kernel Language KL1 Takashi Chikayama . . . . . . . . . . . . . . . . . . Towards an Integrated Knowledge-Base Management System: Overview of R&D on Databases and Knowledge-Bases in the FGCS Project Kazumasa Yokota and Hideki Yasukawa . . . . . . . . . . . . . . . . . . . . . . . . Constraint Logic Programming System: CAL, GDCC and Their Constraint Solvers Akira Aibaand Ryuzo Hasegawa . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parallel Theorem Provers and Their Applications Ryuzo Hasegawa and Masayuki Fujita Natural Language Processing Software Yuichi Tanaka . . . . . . . . . . . . . . . . . . . . . . . Experimental Parallel Inference Software Katsumi Nitta, Kazuo Taki and Nobuyuki Ichiyoshi Invited Lect ures Formalism vs. Conceptualism: Interfaces between Classical Software Development Techniques and Knowledge Engineering Dines Bj¢rner . . . . . . . . . . . . . . . . . . . . . . . . . . .. . The Role of Logic in Computer Science and Artificial Intelligence J. A. Robinson . . . Programs are Predicates C. A. R. Hoare . .. Panel Discussion! A Springboard for Information Processing in the 21st Century PANEL: A Springboard for Information Processing in the 21st Century Robert A. Kowalski (Chairman) . . . . . . . . . . . . . . . . . . . . Finding the Best Route for Logic Programming Herve Ga1laire . . . . . . . . . . . . . . . . . . The Role of Logic Programming in the 21st Century Ross Overbeek . . . . . . . . . . . . . . Object-Based Versus Logic Programming Peter Wegner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Concurrent Logic Programming as a Basis for Large-Scale Knowledge Information Processing Koichi Furukawa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50 .73 .89 113 132 155 166 191 199 211 219 220 223 225 230 xx Knowledge Information Processing in the 21st Century Shunichi Uchida " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 IeOT SESSIONS "Parallel VLSI-CAD and KBM Systems LSI-CAD Programs on Parallel Inference Machine Hiroshi Date, Yukinori Matsumoto, Kouichi Kimura, Kazuo Taki, Hiroo Kato and Masahiro Hoshi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 Parallel Database Management System: Kappa-P Moto Kawamura, Hiroyuki Sato, Kazutomo Naganuma and Kazumasa Yokota . . . . . . . . 248 Objects, Properties, and Modules in QUIXOTE: Hideki Yasukawa, Hiroshi Tsuda and Kazumasa Yokota . . . . . . . . . . . . . . . . . . . . . . 257 Parallel Operating System, PIM OS Resource Management Mechanism of PIMOS Hiroshi Yashiro, Tetsuro Fujise, Takashi Chikayama, Masahiro Matsuo, Atsushi Hori and K umiko vVada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 The Design of the PIMOS File System Fumihide Itoh, Takashi Chikayama, Takeshi Mori, Masaki Sat 0, Tatsuo Kato and Tadashi Sato . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 ParaGraph: A Graphical Tuning Tool for Multiprocessor Systems Seiichi Aikawa, Mayumi Kamiko, Hideyuki Kubo, Fumiko Matsuzawa and Takashi Chikayama . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 Genetic Information Processing Protein Sequence Analysis by Parallel Inference Machine Masato Ishikawa, Masaki Hoshida, Makoto Hirosawa, Tomoyuki Toya, Kentaro Onizuka and Katsumi Nitta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Folding Simulation using Temperature Parallel Simulated Annealing Makoto Hirosawa, Richard J. Feldmann, David Rawn, Masato Ishikawa, Masaki Hoshida and George Michaels . . . . . . . . . . . . ". . . . . . . . . . . . . . . . . . . . . . . . . . . Toward a Human Genome Encyclopedia Kaoru Yoshida, Cassandra Smith, Toni Kazic, George Michaels, Ron Taylor, David Zawada, Ray Hagstrom and Ross Overbeek . . . . . . . . . . . . . . . . . . . . . . . . . . Integrated System for Protein Information Processing Hidetoshi Tanaka . . . . " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 300 307 321 Constraint Logic Progralnming and Parallel Theorenl. Proving Parallel Constraint Logic Programming Language GDCC and its Parallel Constraint Solvers Satoshi Terasaki, David J. Hawley, Hiroyuki Sawada, Ken Satoh, Satoshi Menju, Taro Kawagishi, Noboru Iwayama and Akira Aiba . . . . . . . . . . . . . . . . . . . . . . . . 330 cu-Prolog for Constraint-Based Grammar Hiroshi Tsuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Model Generation Theorem Provers on a Parallel Inference Machine Masayuki Fujita, Ryuzo Hasegawa, Miyuki Koshimura and Hiroshi Fujita 357 Natural Language Processing On a Grammar Formalism, Knowledge Bases and Tools for Natural Language Processing in Logic Programming Hiroshi Sana and Fumiyo Fukumoto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 xxi Argument Text Generation System (Dulcinea) Teruo Ikeda, Akira Kotani, Kaoru Hagiwara and Yukihiro Kubo . . . . . . . . . . . . . . . . . 385 Situated Inference of Temporal Information Satoshi Tojo and Hideki Yasukawa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 A Parallel Cooperation Model for Natural Language Processing Shigeichiro Yamasaki, Michiko Turuta, Ikuko Nagasawa and Kenji Sugiyama . . . . . . . . . 405 Parallel Inference Machine (PIM) Architecture and Implementation of PIM/p Kouichi Kumon, Akira Asato, Susumu Arai, Tsuyoshi Shinogi, Akira Hattori, . . . 414 Hiroyoshi Hatazawa and Kiyoshi Hirano . . . . . . . . . . . . . . . . . . . . Architecture and Implementation of PIM/m Hiroshi Nakashima, Katsuto Nakajima, Seiichi Kondo, Yasutaka Takeda, Yu Inamura, Satoshi Onishi and Kanae Masuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 Parallel and Distributed Implementation of Concurrent Logic Programming Language KLl Keiji Hirata, Reki Yamamoto, Akira Imai, Hideo Kawai, Kiyoshi Hirano, Tsuneyoshi Takagi, Kazuo Taki, Akihiko Nakase and Kazuaki Rokusawa 436 A uthor Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .i xxiii CONTENTS OF VOLUME 2 FOUNDATIONS Reasoning about ProgralTIS Logic Program Synthesis from First Order Logic Specifications Tadashi Kawamura . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sound and Complete Partial Deduction with Unfolding Based on Well-Founded Measures Bern Martens, Danny De Schreye and Maurice Bruynooghe . . . . . . . . . . . . . . . . . A Framework for Analyzing the Termination of Definite Logic Programs with respect to Call Patterns Danny De Schreye, Kristof Verschaetse and Maurice Bruynooghe . . . . . . . . . . . . . . . Automatic Verification of GHC-Programs: Termination Lutz Pliimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Analogy Analogical Generalization Takenao Ohkawa, Toshiaki Mori, Noboru Babaguchi and Yoshikazu Tezuka Logical Structure of Analogy: Preliminary Report Jun Arima . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Abduction (1) Consistency-Based and Abductive Diagnoses as Generalised Stable Models Chris Preist and Kave Eshghi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Forward-Chaining Hypothetical Reasoner Based on Upside-Down Meta-Interpretation Yoshihiko Ohta and Katsumi Inoue . . . . . . . . . . . . . . . . . . . . . . . . . Logic Programming, Abduction and Probability David Poole . . . . . . . . . . . . . . . . . . . Abduction (2) Abduction in Logic Programming with Equality P. T. Cox, E. Knill and T. Pietrzykowski Hypothetico-Dedudive Reasoning Chris Evans and Antonios C. Kakas . . . . . . . . . . . . . . . . . . . . . . . . . . . Acyclic Disjunctive Logic Programs with Abductive Procedures as Proof Procedure Phan Minh Dung . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Semantics of Logic Programs Adding Closed '\iVorld Assumptions to Well Founded Semantics Luis Moniz Pereira, Jose J. Alferes and Joaquim N. Aparicio . . . . . . . . . . . Contributions to the Semantics of Open Logic Programs A. Bossi, M. Gabbrielli, G. Levi and M. C. Meo . . . . . . . . . . . . . . . . . . . A Generalized Semantics for Constraint Logic Programs Roberto Giacobazzi, Saumya K. Debray and Giorgio Levi Extended Well-Founded Semantics for Paraconsistent Logic Programs Chiaki Sakama . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 473 481 489 ." 497 .505 514 522 530 539 546 .. 555 562 570 581 . 592 Invited Paper Formalizing Database Evolution in the Situation Calculus Raymond Reiter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600 xxiv Machine Learning Learning Missing Clauses by Inverse Resolution Peter Idestam-Almquist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 A Machine Discovery from Amino Acid Sequences by Decision Trees over Regular Patterns Setsuo Arikawa, Satoru Kuhara, Satoru Miyano, Yasuhito Mukouchi, Ayumi Shinohara and Takeshi Shinohara . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " 618 Efficient Induction of Version Spaces through Constrained Language Shift Claudio Carpineto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 Theorem Proving Theorem Proving Engine and Strategy Description Language Massimo Bruschi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634 ANew Algorithm for Subsumption Test Byeong Man Kim, Sang Ho Lee, Seung Ryoul Maeng and Jung Wan Cho . . . . . . . . . . 643 On the Duality of Abduction and Model Generation Marc Denecker and Danny De Schreye . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650 Functional Programming and Constructive Logic Defining Concurrent Processes Constructively Yukihide Takayama .. '. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Realizability Interpretation of Coinductive Definitions and Program Synthesis with Streams Makoto Tatsuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MLOG: A Strongly Typed Confluent Functional Language with Logical Variables Vincent Poirriez . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ANew Perspective on Integrating Functional and Logic Languages John Darlington, Yi-ke Guo and Helen Pull . . . . . . . . . . . .' . . . . . . . . . . . . . . . . . . Telnporal Reasoning A Mechanism for Reasoning about Time and Belief Hideki Isozaki and Yoav Shoham . . . . . . . . Dealing with Time Granularity in the Event Calculus Angelo Montanari, Enrico Maim, Emanuele Ciapessoni and Elena Ratto 658 666 674 682 694 702 ARCHITECTURES & SOFTWARE Hardware Architecture and Evaluation UNIRED II: The High PerforII?-ance Inference Processor for the Parallel Inference Machine PIE64 Kentaro Shimada, Hanpei Koike and Hidehiko Tanaka . . . . . . . . . . . . . . . . . . . . .. Hardware Implementation of Dynamic Load Balancing in the Parallel Inference Machine PIM/c T. Nakagawa, N. Ido, T. Tarui, M. Asaie and M. Sugie . . . . . . . . . . . . . . . . . . . Evaluation of the EM-4 Highly Parallel Computer using a Game Tree Searching Problem Yuetsu Kodama, Shuichi Sakai and Yoshinori Yamaguchi . . . . . . . . . . . . . . . . . OR-Parallel Speedups in a Knowledge Based System: on Muse and Aurora Khayri A. M. Ali and Roland Karlsson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 723 731 739 Invited Paper A Universal Parallel Computer Architecture William J. Dally . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746 xxv AND-Parallelisrn. and OR-Parallelism An Automatic Translation Scheme from Prolog to the Andorra Kernel Language Francisco Bueno and Manuel Hermenegildo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759 Recomputation based Implementations of And-Or Parallel Prolog Gopal Gupta and Manuel V. Hermenegildo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770 Estimating the Inherent Parallelism in Prolog Programs David C. Sebr and Laxmikant V. Kale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783 Implementation Techniques Implementing Streams on Parallel Machines with Distributed Memory Koicbi Konisbi, Tsutomu Maruyama, Akibiko Konagaya, Kaoru Yosbida and Takasbi Cbikayama . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791 Message-Oriented Parallel Implementation of Moded Flat GHC Kazunori Ueda and Masao Morita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799 Towards an Efficient Compile-Time Granularity Analysis Algorithm X. Zbong, E. Tick, S. Duvvuru, L. Hansen, A. V. S. Sastry and R. Sundararajan 809 Providing Iteration and Concurrency in Logic Programs through Bounded Quantifications Jonas Barklund and Hakan Millrotb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817 Extension of Logic Programming An Implementation for a Higher Level Logic Programming Language Antbony S. K. Cbeng and Ross A. Paterson . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825 Implementing Prolog Extensions: a Parallel Inference Machine Jean-Marc Alliot, Andreas Herzig and Mamede Lima-Marques . . . . . . . . . . . . . . . . . . 833 Parallel Constraint Solving in Andorra-I Steve Gregory and Rong Yang . . . . . . . . . . . . . . . . . . . . 843 A Parallel Execution of Functional Logic Language with Lazy Evaluation Jong H. Nang, D. W. Sbin, S. R. Maeng and Jung W. Cbo . . . . . . . . . . . . . . . . . . . . 851 Task Scheduling and Load Analysis Self-Organizing Task Scheduling for Parallel Execution of Logic Programs Zbeng Lin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Asymptotic Load Balance of Distributed Hash Tables Nobuyuki Icbiyosbi and Kouicbi Kimura 859 869 Concurrency Constructing and Collapsing a Reflective Tower in Reflective Guarded Horn Clauses Jiro Tanaka and Fumio Matono . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877 CHARM: Concurrency and Hiding in an Abstract Rewriting Machine 887 Andrea Corradini, Ugo Montanari and Francesca Rossi . . .... Less Abstract Semantics for Abstract Interpretation of FGHC Programs Kenji Horiucbi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897 Databases and Distributed SystelTIS Parallel Optimization and Execution of Large Join Queries .907 Eileen Tien Lin, Edward Omiecinski and Sudbakar Yalamancbili . . . . . . . Towards an Efficient Evaluation of Recursive Aggregates in Deductive Databases 915 Alexandre Lefebvre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Distributed Programming Environment based on Logic Tuple Spaces .......... 926 Paolo Ciancarini and David Gelernter . . . . . . . . . . . . . . . . . XXVI Programming EnvirOlU11.ent Visualizing Parallel Logic Programs with VISTA E. Tick . . . . . . . . . . . . . . . . . . . . . . Concurrent Constraint Programs to Parse and Animate Pictures of Concurrent Constraint Programs Kenneth M. Kahn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Logic Programs with Inheritance Yaron Goldberg, William Silverman and Ehud Shapiro . . . . . . . . . . . . . . . . . . . Implementing a Process Oriented Debugger with Reflection and Program Transformation Munenori Maeda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 934 943 951 961 Prod uction Systel11.S ANew Parallelization Method for Production Systems E. Bahr, F. Barachini and H. Mistelberger . . . . . . . . . . . . . . . . . . . . . . . . . . 969 Performance Evaluation of the Multiple Root Node Approach to the Rete Pattern Matcher for Production Systems Andrew Sohn and Jean-Luc Gaudiot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977 APPLICATIONS & SOCIAL IMPACTS Constraint Logic Programn1.ing Output in CLP(R) Joxan Jaffar, Michael J. Maher, Peter J. Stuckey and Roland H. C. Yap Adapting CLP(R) to Floating-Point Arithmetic J. H. M. Lee and M. H. van Emden .. Domain Independent Propagation Thierry Le Provost and Mark Wallace . . . . . . . . A Feature-Based Constraint System for Logic Programming with Entailment Hassan Ai't-Kaci, Andreas Podelski and Gert Smolka . . . . . . . . . . . . Qualitative Reasoning Range Determination of Design Parameters by Qualitative Reasoning and its Application to Electronic Circuits Masaru Ohki, Eiji Oohira, Hiroshi Shinjo and Masahiro Abe Logical Implementation of Dynamical Models Yoshiteru Ishida . . . . . . . . . . . . . . . . . . . . . . . . . . . . Knowledge Representation The CLASSIC Knowledge Representation System or, KL-ONE: The Next Generation Ronald J. Brachman, Alexander Borgida, Deborah L. McGuinness, Peter F. PatelSchneider and Lori Alperin Resnick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Morphe: A Constraint-Based Object-Oriented Language Supporting Situated Knowledge Shigeru Watari, Y,asuaki Honda and Mario Tokoro . . . . . . . . . . . . On the Evolution of Objects in a Logic Programming Framework F. Nihan Kesim and Marek Sergot . . . . . . . . . . . . . . . . . . . . . . . . .987 .996 1004 1012 1022 1030 1036 1044 1052 Panel Discussion: Future Direction of Next Generation Applications The Panel on a Future Direction of New Generation Applications Fumio Mizoguchi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061 Knowledge Representation Theory Meets Reality: Some Brief Lessons from the CLASSIC Experience Ronald J. Brachman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063 XXVll Reasoning with Constraints Catherine Lassez Developments in Inductive Logic Programming Stephen A1uggleton . . . . . . . . . . . . . . . . . . . . . Towards the General-Purpose Parallel Processing System Kazuo Taki .. . . . . . . . . . . . . . . . . . . . . . . . . Knowledge-Based SystelTIS A Hybrid Reasoning System for Explaining Mistakes in Chinese Writing Jacqueline Castaing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Automatic Generation of a Domain Specific Inference Program for Building a Knowledge Processing System Takayasu I{asahara, Naoyuki Yamada, Yasuhiro Kobayashi, Katsuyuki Yoshino and Kikuo Yoshimura . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Knowledge-Based Functional Testing for Large Software Systems Uwe Nonnenmann and John K. Eddy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Diagnostic and Control Expert System Based on a Plant Model Junzo Suzuki, Chiho Konuma, Mikito Iwamasa, Naomichi Sueda, Shigeru Mochiji and Akimoto Kamiya . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1066 1071 1074 1076 1084 1091 1099 Legal Reasoning A Semiformal Metatheory for Fragmentary and Multilayered Knowledge as an Interactive Metalogic Program Andreas Hamfelt and Ake Hansson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 1107 HELIC-II: A Legal Reasoning System on the Parallel Inference Machine Katsumi Nitta, Yoshihisa Ohtake, Shigeru Maeda, Masayuki Ono, Hiroshi Ohsaki and Kiyokazu Sakane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1115 Natural Language Processing Chart Parsers as Proof Procedures for Fixed-Mode Logic Programs David A. Rosenblueth . . . . . . . . . . . . . . . . . . . . A Discourse Structure Analyzer for Japanese Text I{. Sumita, K. Ono, T. Chino, T. Ukita and S. Amano . . . . . . . Dynamics of Symbol Systems: An Integrated Architecture of Cognition Koiti Hasida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Knowledge Support Systems Mental Ergonomics as Basis for New-Generation Computer Systems M. H. van Emden .. . . . . . . . . . . . . . . . . . . . . . . . . . . An Integrated Knowledge Support System B. R. Gaines, M. Linster and M. L. G. Shaw . . . . . . . . . . . . Modeling the Generational Infrastructure of Information Technology B. R. Gaines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1125 1133 1141 1149 1157 1165 Parallel Applications Co-HLEX: Co-operative Recursive LSI Layout Problem Solver on Japan's Fifth Generation Parallel Inference Machine Toshinori Watanabe and Keiko Komatsu . . . . . . . . . . . .. 1173 A Cooperative Logic Design Expert System on a Multiprocessor Yoriko Minoda, Shuho Sawada, Yuka Takizawa, Fumihiro Maruyama and Nobuaki I{awato . . . . . . . . . . . . . . . . . . . . . . . . . . . 1181 A Parallel Inductive Learning Algorithm for Adaptive Diagnosis Yoichiro N akakulci, Yoshiyuki Koseki and Midori Tanaka 1190 xxviii Parallel Logic Simulator based on Time Warp and its Evaluation Yukinori lVlatsumoto and Kazuo Taki . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1198 Invited Paper Applications of Machine Learning: Towards Knowledge Synthesis Ivan Bratko 1207 A uthor Index . . . i PLENARY SESSIONS PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON FIFTH GENERATION COMPUTER SYSTEMS 1992, edited by ICOT. © ICOT, 1992 3 Launching the New Era Kazuhiro Fuchi Director, Research Center Institute for New Generation Computer Technology (ICOT) 4-28, Iv1ita l-chome, Minato-ku, Tokyo 108, Japan Thank you for coming to FGCS'92. As you know, we have been conducting a ten-year research project on fifth generation computer systems. Today is the tenth anniversary of the founding of our research center, making it exactly ten years since our project actually started. The first objective of this international conference is to show what we have accomplished in our research during these ten years. Another objective of this conference is to offer an opportunity for researchers to present the results of advanced research related to Fifth Generation Computer Systems and to exchange ideas. A variety of innovative studies, in addition to our own, are in progress in many parts of the world, addressing the future of computers and information processing technologies. I constantly use the phrase "Parallel Inference" as the keywords to simply and precisely describe the technological goal of this project. Our hypothesis is that parallel inference technology will provide the core for those new technologies in the future-technologies that will be able to go beyond the framework of conventional computer technologies. During these ten years I have tried to explain this idea whenever I have had the chance. One obvious reason why I have repeated the same thing so many times is that I wish its importance to be recognized by the public. However, I have another, less obvious, reason. When this project started, an exaggerated image of the project was engendered, which seems to persist even now. For example, some people believed that we were trying, in this project, to solve in a mere ten years some of the most difficult problems in the field of artificial intelligence (AI), or to create a machine translation system equipped with the same capabilities as humans. In those days, we had to face criticism, based upon that false image, that it \V,1.S a reckless project trying to tackle impossible goals. Now we see criticism, from inside and outside the country, that the project has failed because it has been unable to realize those grand goals. The reason why such an image was born appears to have something to do with FGCS'Sl-a conference we held one year before the project began. At that confer- ence we discussed many different dreams and concepts. The substance of those discussions was reported as sensational news all over the world. A vision with such ambitious goals, however, can never be materialized as a real project in its original form. Even if a project is started in accordance with the original form, it cannot be managed and operated within the framework of an effective research scheme. Actually, our plans had become much more modest by the time the project was launched. For example, the development of application systems, such as a machine translation system, was removed from the list of goals. It is impossible to complete a highly intelligent system in ten years. A preliminary stage is required to enhance basic studies and to reform computer technology itself. We decided that we should focus our efforts on these foundational tasks. Another reason is that, at that time in Japan, some private companies had already begun to develop pragmatic, low-level machine-translation systems independently and in competition with each other. Most of the research topics related to pattern recognition were also eliminated, because a national project called "Pattern Information Processing" had already been conducted by the Ministry of International Trade and Industry for ten years. We also found that the stage of the research did not match our own. We thus deliberately eliminated most research topics covered by Pattern Information Processing from the scope of our FGCS project. However, those topics themselves are very important and thus remain major topics for research. They may become a main theme of another national project of Japan in the future. Does all this mean that FGCS'Sl was deceptive? I do not think so. First, in those days, a pessimistic outlook predominated concerning the future development of technological research. For example, there was a general trend that research into artificial intelligence would be of no practical use. In that sort of situation, there was considerable value in maintaining a positive attitude toward the future of technological research-whether this meant ten years or fifty. I believe that this was the very reason 4 why we received remarkable reactions, both positive and negative, from the public. The second reason is that the key concept of Parallel Inference was presented in a clear-cut form at FGCS'Sl. Let me show you a diagram (Figure 1). This diagram is the one I used for my speech at FGCS'81, and is now a sort of "ancient document." Its draft was completed in 1980, but I had come up with the basic idea four years earlier. After discussing the concept with my colleagues for four years, I finally completed this diagram. Here, you can clearly see our concept that our goal should be a "Parallel Inference Machine." We wanted to create an inference machine, starting with study on a variety of parallel architectures. For this purpose, research into a new language was necessary. We wanted to develop a 5G-kernel language--what we now call KLl. The diagram includes these hopes of ours. The upper part of the diagram shows the research infrastructure. A personal inference machine or workstation for research purposes should be created, as well as a chip for the machine. We expected that the chip would be useful for our goal. The computer network should be consolidated to support the infrastructure. The software aspects are shown in the bottom part of the diagram. Starting with the study on software engineering and AI, we wanted to build a framework for high-level symbol processing, which should be used to achieve our goal. This is the concept I presented at the FGCS'81 conference. I would appreciate it if you would compare this diagram with our plan and the results of the final stage of this project, when Deputy Director Kurozumi shows you them later. I would like you to compare the original structure conceived 12 years ago and the present results of the project so that you can appreciate what has been accomplished and criticize what is lacking or what was immature in the original idea. Some people tend to make more of the conclusions drawn by a committee than the concepts and beliefs of an individual. It may sound a little bit beside point, but I have heard that there is a proverb in the West that goes, "The horse designed by a committee will turn out to be a camel." The preparatory committee for this project had a series of enthusiastic discussions for three years before the project's launching. I thought that they were doing an exceptional job as a committee. Although the committee's work was great, however, I must say that the plan became a camel. It seems that their enthusiasm created some extra humps as well. Let me say in passing that some people seem to adhere to those humps. I am surprised that there is still such a so-called bureaucratic view even among academic people and journalists. This is not the first time I have expressed this opinion of mine about the goal of the project. I have, at least in Japanese, been declaring it in public for the past ten years. I think I could have been discharged at any time had my opinion been inappropriate. As the person in charge of this project, I have pushed forward with the lines of Parallel Inference based upon my own beliefs. Although I have been criticized as still being too ambitious, I have always been prepared to take responsibility for that. Since the project is a national project, it goes without saying that it should not be controlled by one person. I have had many discussions with a variety of people for more than ten years. Fortunately, the idea of the project has not remained just a personal belief but has become a common belief shared by the many researchers and research leaders involved in the project. Assuming that this project has proved to be successful, as I believe it has, this fact is probably the biggest reason for its success. For a research project to be successful, it needs to be favored by good external conditions. But the most important thing is that the research group involved has a common belief and a common will to reach its goals. I have been very fortunate to be able to realize and experience this over the past ten years. So much for introductory remarks. I wish to outline, in terms of Parallel Inference, the results of our work conducted over these ten years. I believe that the remarkable feature of this project is that it focused upon one language and, based upon that language, experimented with the development of hardware and software on a large scale. From the beginning, we envisaged that we would take logic programming and give it a role as a link that connects highly parallel machine architecture and the problems concerning applications and software. Our mission was to find a programming language for Parallel Inference. A research group led by Deputy Director Furukawa was responsible for this work. As a result of their efforts, Veda came up with a language model, GHC, at the beginning of the intermediate stage of the project. The two main precursors of it were Parlog and Concurrent Prolog. He enhanced and simplified them to make this model. Based upon GHC, Chikayama designed a programming language called KL1. KL1, a language derived from the logic programming concept, provided a basis for the latter half of our project. Thus, all of our research plans in the final stage were integrated under a single language, KLl. For example, we developed a hardware system, the Multi-PSI, at the end of the intermediate stage, and demonstrated it at FGCS'88. After the conference we made copies and have used them as the infrastructure for software research. In the final stage, we made a few PIM prototypes, a Parallel Inference Machine that has been one of our final research goals on the hardware side. These prototypes are being demonstrated at this conference. 5 (Year) 1 @ © 5 Network 10 -----(optiC:5) ---- (Reducing to chips) } - - - - - - - - - - - - Personal inference machine PROLOG machine + a v ~ (comparable to large-scale) machine currently used LISP ) APL SMALL TALK PS, etc ~ (funct i~na 1) programming log lC (New software) Intelligent programming environments © Designing and prototype - building environments © Various machines (chip, module) © Super machine ~ rendered intelligent New language ,~, @ " ",~, " "" ~G Core ~anguage "" Parallel \\ ,\ \\ \\ '~ Data flow machine (Inference Associative Databa se mach ine symbol manipulation Other ideas Planning Programming © Software --- (Accumulation) Knowledge engineering Problem solving ---------- -------- - - Software engineering Games (Basic theories) Research for artificial intelligence QA - language understanding Knowledge base Fig_ ( Theorem proving ( Consultations Conceptional development diagram T. Moto-oka (ed.): Fifth Generation Computer Systems (Proc. FGCS'81), JIPDEC: North-Holland, 1982, p. 113 Each prototype has a different architecture in its interconnection network and so forth, and the architecture itself is a subject of research. Viewed from the outside, however, all of them are KL1 machines. Division Chief Uchida and Laboratory Chief Taki will show you details on PIM later. What I want to emphasize here is that all of these prototypes are designed, down to the level of internal chips, with the assumption that KL1, a language that could be categorized as a very high-level language, is a "machine language." On the software side as well, our research topics were integrated under the KL1 language. All the application software, as well as the basic software such as operating systems, were to be written in KL1. We demonstrated an operating system called PIMOS at FGCS'88, which was the first operating system software written in KL1. It was immature at that time, but has been improved since then. The full-fledged version of PIMOS now securely backs the demonstrations being shown at this conference. Details will later be given by Laboratory Chief Chikayama, but I wish to emphasize that not only have we succeeded in writing software as complicated and huge as an operating system entirely in KL1, but we have also proved through our own experience that KL1 is much more appropriate than conventional languages for writing system software such as operating systems. One of the major challenges in the final stage was to 6 demonstrate that KL1 is effective not only for basic software, such as operating systems and language implementations, but also for a variety of applications. As Laboratory Chief Nitta will report later, we have been able to demonstrate the effectiveness of KL1 for various applications including LSI-CAD, genetic analysis, and legal reasoning. These application systems address issues in the real world and have a virtually practical scale. But, again, what I wish to emphasize here is that the objective of those developments has been to demonstrate the effectiveness of Parallel Inference. In fact, it was in the initial stage of our project that we first tried the approach of developing a project around one particular language. The technology was at the level of sequential processing, and we adopted ESP, an expanded version of Prolog, as a basis. Assuming that ESP could playa role of KLO, our kernel language for sequential processing, a Personal Sequential Inference machine, called PSI, was designed as hardware. We decided to use the PSI machine as a workstation for our research. Some 500 PSIs, including modified versions, have so far been produced and used in the project. SIMPOS, the operating system designed for PSI, is written solely in ESP. In those days, this was one of the largest programs written in a logic programming language. Up to the intermediate stage of the project, we used PSI and SIMPOS as the infrastructure to conduct research on expert systems and natural language processing. This kind of approach is indeed the dream of researchers, but some of you may be skeptical about our approach. Our project, though conducted on a large scale, is still considered basic research. Accordingly, it is supposed to be conducted in a free, unrestrained atmosphere so as to bring about innovative results. Some of you may wonder whether the policy of centering around one particular language restrains the freedom and diversity of research. But this policy is also based upon my, or our, philosophy. I believe that research is a process of "assuming and verifying hypotheses." If this is true, the hypotheses must be as pure and clear as possible. If not, you cannot be sure of what you are trying to verify. A practical system itself could include compromise or, to put it differently, flexibility to accommodate various needs. However, in a research project, the hypotheses must be clear and verifiable. Compromises and the like could be considered after basic research results have been obtained. This has been my policy from the very beginning, and that is the reason why I took a rather controversial or provocative approach. We had a strong belief that our hypothesis of focusing on Parallel Inference and KL1 had sufficient scope for a world of rich and free research. Even if the hypothesis acted as a constraint, we believed that it would act as a creative constraint. I would be a liar if I was to say that there was no resistance among our researchers when we decided upon the above policy. KL1 and parallel processing were a completely new world to everyone. It required a lot of courage to plunge headlong into this new world. But once the psychological barrier was overcome, the researchers set out to create new parallel programming techniques one after another. People may not feel like using new programming languages such as KLl. Using established languages and systems only, or a kind of conservatism, seems to be the major trend today. In order to make a breakthrough into the future, however, we need a challenging and adventuring spirit. I think we have carried out our experiment with such a spirit throughout the ten-year project. Among the many other results we obtained in the final stage was a fast theorem-proving system, or a prover. Details will be given in Laboratory Chief Hasegawa's report, but I think that this research will lead to the resurrection of theorem- proving research. Conventionally, research into theorem proving by computers has been criticized by many mathematicians who insisted that only toy examples could be dealt with. However, very recently, we were able to solve a problem labelled by mathematicians as an 'open problem' using our prover, as a result of collaborative research with Australian National University. The applications of our prover is not limited to mathematical theorem proving; it is also being used as the inference engine of our legal reasoning system. Thus, our prover is being used in the mathematics world on one hand, and the legal world on the other. The research on programming languages has not ended with KLl. For example, a constraint logic programming language called eDee has been developed as a higherlevel language than KLl. We also have a language called Quixote. From the beginning of this project, I have advocated the idea of integrating three types of languages-logic, functional, and object-oriented-and of integrating the worlds of programming and of databases. This idea has been materialized in the Quixote language; it can be called a deductive object-oriented database language. Another language, CIL, was developed by Mukai in the study of natural language processing. CIL is a semantics representation language designed to be able to deal with situation theory. Quixote incorporates CIL in a natural form and therefore has the characteristics of a semantics representation language. As a whole, it shows one possible future form of knowledge representation languages. More details on Quixote, along with the development of a distributed parallel database management system, Kappa-P, will be given by Laboratory Chief Yokota. Thus far I have outlined, albeit briefly, the final results 7 of our ten-year project. Recalling what I envisaged ten years ago and what I have dreamed and hoped would materialize for 15 years, I believe that we have achieved as much as or more than what I expected, and I am quite satisfied. Naturally, a national project is not performed for mere self-satisfaction. The original goal of this project was to create the core of next-generation computer technologies. Various elemental technologies are needed for future computers and information processing. Although it is impossible for this project alone to provide all of those technologies, we are proud to be able to say that we have created the core part, or at least provided an instance of it. The results of this project, however, cannot be commercialized as soon as the project is finished, which is exactly why it was conducted as a national project. I estimate that it takes us another five years, which could be called a period for the "maturation of the technologies", for our results to actually take root in society. I had this prospect in mind when this project started ten years ago, and have kept declaring it in public right up until today. Now the project is nearing its end, but my idea is still the same. There is often a gap of ten or twenty years between the basic research stage of a technology and the day it appears in the business world. Good examples are UNIX, C, and RISC, which has become popular in the current trend toward downsizing. They appear to be up-to-date in the business world, but research on them has been conducted for many years. The frank opinions of the researchers involved will be that industry has finally caught up with their research. There is thus a substantial time lag between basic research and commercialization. Our project, from its very outset, set an eye on technologies for the far distant future. Today, the movement toward parallel computers is gaining momentum worldwide as a technology leading into the future. However, skepticism was dominant ten years ago. The situation was not very different even five years ago. When we tried to shift our focus on parallel processing after the initial stage of the project, there was a strong opinion that a parallel computer was not possible and that we should give it up and be happy with the successful results obtained in the initial stage. In spite of the skepticism about parallel computers that still remains, the trend seems to be changing drastically. Thanks to consta,nt progress in semiconductor technology, it is now becoming easier to connect five hundred, a thousand, or even more processor chips, as far as hardware technology is concerned. Currently, the parallel computers that most people are interested in are supercomputers for scientific computation. The ideas there tend to still be vague regarding the software aspects. Nevertheless, a new age is dawning. The software problem might not be too serious as long as scientific computation deals only with simple, scaledup matrix calculations, but it will certainly become serious in the future. Now suppose this problem has been solved and we can nicely deal with all the aspects of large-scale problems with complicated overall structures. Then, we would have something like a general-purpose capability that is not limited to scientific computation. We might then be able to replace the mainframe computers we are using now. The scenario mentioned above is one possibility leading to a new type of mainframe computer in the future. One could start by connecting a number of processor chips and face enormous difficulties with parallel software. However, he or she could alternatively start by considering what technologies will be required in the future, and I suspect that the answer should be the Parallel Inference technology which we have been pursuing. I am not going to press the above view upon you. However, I anticipate that if anybody starts research without knowing our ideas, or under a philosophy that he or she believes is quite different from ours, after many twists and turns that person will reach more or less the same concept as ours-possibly with small differences such as different terminology. In other words, my opinion is that there are not so many different essential technologies. It may be valuable for researchers to struggle through a process of research independently from what has already been done, finally to find that they have followed the same course as somebody else. But a more efficient approach would be to build upon what has been done in this FGCS project and devote energy to moving forward from that point. I believe the results of this project will provide important insights for researchers who want to pursue general-purpose parallel computers. This project will be finished at the end of this year. As for "maturation of the Parallel Inference technology", I think we will need a new form of research activities. There is a concept called "distributed cooperative computing" in the field of computation models. I expect that, in a similar spirit, the seeds generated in this project will spread both inside and outside the country and sprout in many different parts of the world. For this to be realized, the results of this project must be freely accessible and available worldwide. In the software area, for example, this means that it is essential to disclose all our accomplishments including the source codes and to make them "international common public assets." MITI Minister Watanabe and the Director General of the E1ureau announced the policy that the results of our project could be utilized throughout the world. Enormous effort must have been made to formulate such a policy. I find it very impressive. We have tried to encourage international collaboration for ten years in this project. As a result, we have 8 enjoyed opportunities to exchange ideas with many researchers involved in advanced studies in various parts of the world. They have given us much support and cooperation, without which this project could not have been completed. In that regard, and also considering that this is a Japanese national project that aims at making a contribution, though it may only be small, toward the future of mankind, we believe that we are responsible for leaving our research accomplishments as a legacy to future generations and to the international community in a most suitable form. This is now realized, and I believe it is an important springboard for the future. Although this project is about to end, the end is just another starting point. The advancement of computers and information processing technologies is closely related to the future of human society. Social thought, ideologies, and social systems that fail to recognize its significance will perish as we have seen in recent world history. We must advance into a new age now. To launch a new age, I fervently hope that the circle of those who share our passion for a bright future will continue to expand. Thank you. PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON FIFTH GENERATION COMPUTER SYSTEMS 1992, edited by ICOT. © ICOT, 1992 9 Overview of the Ten Years of the FGCS Project Takashi Kurozumi Institute for New Generation Computer Technology 4-28, Mita 1-chome, Minato-ku, Tokyo 108, Japan Kurozumi @ icot.or.jp Abstract This paper introduces how the FGCS Project started, its overall activities and the results of the FGCS project. The FGCS Project was launched in 1982 after a three year preliminary study stage. The basic framework of the fifth generation computer is parallel processing and inference processing based on logic programming. Fifth generation computers were viewed as suitable for the knowledge information processing needs of the near future. ICOT was established to promote the FGCS Project. This paper shows not only, ICOT's efforts in promoting the FGCS project, but relationship between ICOT and related organizations as well. I, also, conjecture on the parallel inference machines of the near future. 1 Preliminary Study Stage for the FGCS Project The circumstances prevailing during the preliminary stage of the FGCS Project, from 1979 to 1981, can be summarized as follows. .J apanese computer technologies had reached the level of the most up-to-date overseas computer technologies. ·A change of the role of the Japanese national project for computer technologies was being discussed whereby there would be a move away from improvement of industrial competi ti veness by catching up with the latest European computer technologies and toward world-wide scientific contribution through the risky development of leading computer technologies. In this situation, the Japanese Ministry of International Trade and Industry (MIT!) started study on a new project - the Fifth Generation Computer Project. This term expressed MITI's will to develop leading technologies that would progress beyond the fourth generation computers due to appear in the near future and which would anticipate upcoming trends. The Fifth Generation Computer Research Committee and its subcommittee (Figure 1-1) were established in 1979. It took until the end of 1981 to decide on target technologies and a framework for the project. Figure 1-1 Organization of the Fifth Generation Computer Committee Well over one hundred meetings were held with a similar number of committee members participating. The following important near-future computer technologies were discussed . Inference computer technologies for knowledge processing Computer technologies to process large-scale data bases and knowledge bases High performance workstation technologies Distributed functional computer technologies Super-computer technologies for scientific calculation These computer technologies were investigated and discussed from the standpoints of international contribution by developing original Japanese technologies, the important technologies in future, social needs and conformance with Japanese governmental policy for the national project. Through these studies and discussions, the committee decided on the objectives of the project by 10 the topic with foreign researchers. the end of 1980, and continued future studies of technical matters, social impact, and project schemes. The committee's proposals for the FGCS Project are summarized as follows. CD The concept of the Fifth Generation Computer: To have parallel (non-Von Neumann) processing and inference processing using knowledge bases as basic mechanisms. In order to have these mechanisms, the hardware and software interface is to be a logic program language (Figure 1-2) . ® The objectives of the FGCS project: To develop these innovative computers, capable of knowledge information processing and to overcome the technical restrictions of conventional computers. 2 2.1 (Intelligent Assistant for Human Activities) OBasic Mechanisn of H/w & S/W....:; *Logicallnference Processing (based on Logic Programming) *Highly Parallel Processing Concept of the Fifth Generation Computer ® The goals of the FGCS project: To research and develop a set of hardware and software technologies for FGCS, and to develop an FGCS prototype system consisting of a thousand element processors with inference execution speeds of between 100M LIPS and 1G LIPS (Logical Inferences Per Second). ® R&D period for the project: Estimated to be 10 years, divided into three stages. 3-year initial stage for R&D of basic technologies 4-year intermediate stage for R&D of subsystems 3-year final stage for R&D of total prototype system MITI decided to launch the Fifth Generation Computer System (FGCS) project as a national project for new information processing, and made efforts to acquire a budget for the project. At the same time, the international conference on FGCS '81 was prepared and held in October 1981 to announce these results and to hold discussions on Stages and Budgeting in the FGCS Project The FGCS project was designed to investigate a large number of unknown technologies that were yet to be developed. Since this involved a number of risky goals, the project was scheduled over a relatively long period of ten years. This ten-year period was divided into three stages. - In the initial stage (fiscal 1982-1984), the purpose of R&D was to develop the basic computer technologies needed to achieve the goal. - In the intermediate stage (fiscal 1985-1988), the purpose of R&D was to develop small to medium subsystems. - In the final stage (fiscal 1989-1992), the purpose of R&D was to develop a total prototype system. The final stage was initially planned to be three years. After reexamination halfway through the final stage, this stage was extended to four years to allow evaluation and improvement of the total system in fiscal year 1992. Consequently, the total length of this project has been extended to 11 years. OComputer for Knowledge Information Processing System (KIPS) Figure 1-2 Overview of R&D Activities and Results of the FGCS Project (' .. 'i ( I trehmlnary: Initial Stage: Intermediate : Study : 3 years:82- 84 : Stage : Stage : (TOTAL:~8.3B): 4 years: 8S- 88 l:979-1981) .: (TOTAL: ~21.6B) o R&D of BaSIC I 0 R&D of Experimental Sth G. Computer I Small-to-Medium Scale Technology: Sub-system Final Stage 4 years: 89- 92 (3years total:~20.7B) 0 R&D of Total (Prototype) System 0 Total Evaluation " 1985 1986 1987 1988' 1989 1990 1991 1992 Budaet 1982 1983 1984' ¥400M ~2.7B ¥5.1B 1~4.7B ¥5.55B ~5.6B ¥5.7B I ¥6.5B ~7.0B ¥7.2B (¥3.6B) (for each fiscal SI.86M·, S12.6M S23.7M: S21.9M S34.5M', S35.0M S35.6M : S40.6M S43.7M SSI.4M" year) fl.30M', f8.80M f'6.6M: £l5.3M £22.0M', f22.4M £22.8M : f26.0M f28.0M £lO.OM', 10- year initial plan • R&D are carried out under the auspices of MITt. (All budget (Total budgets:¥54,6B) are covered by MITt.) " SI • ¥ 2'5, fl. ¥ 307 ('982-1985) '2 S'. ¥ 160, £I- ¥ 250 ('986-'990) '3 $1- ¥ 140, ¥ 240 (,991-) £, • Figure 2-1 Budgets for the FGCS project Each year the budget for the following years R&D activities was decided. MITI made great efforts in negotiating each year's budget with the Ministry of Finance. The budgets for each year, which are all covered by MITI, are shown in Figure 2-1. The total budget for the 3-year initial stage was about 8 billion yen. For the 4-year intermediate stage, it was about 22 billion yen. The total budget for 1989 to 1991 was around 21 billion yen. The budget for 1992 is estimated to be 3.6 billion yen. II Consequently, the total budget for the II-year period of the project will be about 54 billion yen. 2.2 R&D subjects of each stage At the beginning, it was considered that a detailed R&D plan could not be decided in detail for a period as long as ten years. The R&D goals and the means to reach these goals were not decided in detail. During the project, goals were sought and methods decided by referring back to the initial plan at the beginning of each stage. The R&D subjects for each stage, shown in Figure 2-2, were decided by considering the framework and conditions mentioned below. We defined 3 groups of 9 R&D subjects at the beginning of the initial stage by analyzing and rearranging the 5 groups of 10 R&D subjects proposed by the Fifth Generation Computer Committee. At the end of the initial stage, the basic research themes of machine translation and speech, figure and image processing were excluded from this project. These were excluded because computer vender efforts on these technologies were recognized as having become very active. In the middle of the intermediate stage, the task of developing a large scale electronic dictionary was transferred to EDR (Electronic Dictionary Research Center), and development of CESP (Common ESP system on UNIX) was started by AIR (AI language Research Center). The basic R&D framework for promoting this project is to have common utilization of developed software by unifying the software development environment (especially by unifying programming languages). By utilizing software development systems and tools, the results of R&D can be evaluated and improved. Of course, considering the nature of this project, there is another reason making it difficult or impossible to use commercial products as a software development environment. In each stage, the languages and the software· development environment are unified as follows. Initial stage: Prolog on DEC machine Intermediate stage: ESP on PSI and SIMPOS Final stage: KLI on Multi-PSI (or PIM) and PIMOS (PSI machines are also used as pseudo multi-PSI systems.) (Figure 2-6) 2.3 Overview of R&D Results of Hardware System Hardware system R&D was carried out by the subjects listed listed below in each stage. CD Initial stage iscal ear » >< Final Stage Intermediate Stage X Initial Stage 119821 '83 I '84 19851 '861 '871 '88 19891 '90 I '911 '92 < OBasic SIW System 8Basic SIW System .5G Kernel Languages .Problem Solving & Inference SIWM .K8 Management SIWM .'ntelligent Interface .5G Kernel Languages .Problem Solving & Inference SIWM .K8 Management S/WM .'ntelligent Interface S/WM .'ntelli!i1ent Programming .Experlmental Application SIWM(Software module) .'ntelligent Programming S/WM OPiiot Model for Software Development .SIM Hardware .SIM Software Software Development .Network System lor -Hardware System Development Support .PIM Functional Mechanism .K8M Functional Mechanism Figure 2-2 ~stem for Basic SIW .Development Support System .Pilot Model for Parallel .Hardware System • Inference subsystem .k8 Subsystem • Expenm.entll l l'aral.lel Application System .Knowledge Programming S/w System .Knowledge construction & Utilization .Natural Language Interface .Problem Solving & Programming(CLP.Prover) • Advanced Inference Method • Basic Software System .Inference Control Module (PIMOS) .K8 Management Modul (KflMS: Kappa & Quixote) .Prototype Hardware System Transition of R&D subjects in each stage ® Functional mechanism modules and simulators for PIM (Parallel Inference Machine) of the hardware system ® Functional mechanism modules and simulators for KBM (Knowledge Base Machine) of the hardware system CD SIM (Sequential Inference Machine) hardware of pilot model for software development @ Intermediate Stage ® Inference subsystem of the hardware system. ® Knowledge base subsystem of the hardware system CD Pilot model for parallel software development of the development support system. ® Final Stage ® Prototype hardware system Figure 2-3 Transition of R&D results of Hardware System The major R&D results on SIM were the PSI (Personal Sequential Inference Machine) and CHI (high performance back-end inference unit). In the initial stage, PSI- I (CD CD) was developed as KLO (Kernel Language Version 0) machine. PSI- I had 12 around 35 KLIPS (Logical Inference Per Second) execution speed. Around 100 PSI- I machines were used as main WSs (workstations) for the sequential logic programming language, ESP, in the first half of the intermediate stage. CHI- I (CD ©) showed around 200 KLIPS execution speed by using WAM instruction set and high-speed devices. In the intermediate stage, PSI was redesigned as multiPSI FEP (Front End Processor) and PSI- IT, and has performance of around 330-400 KLIPS. CHI was also redesigned as CHI- IT (® ©), with more than 400 KLIPS performance. PSI- IT machines were the main WSs for ESP after the middle of the intermediate stage, and were able to be used for KLI by the last year of the intermediate stage. PSIIII was developed as a commercial product by a computer company by using PIM/m CPU technologies, with the permission of MITI, and by using UNIX. R&D on PIM continued throughout the project, as follows. In the initial stage, experimental PIM hardware simulators and software simulators with 8 to 16 processors were trial-fabricated based on data flow and reduction mechanisms (@®). In the intermediate stage, we developed multiPSI VI, which was to construct 6 PSI-Is, as the first version of the KLI machine. The performance of this machine was only several KLIPS because of the KLI emulator (® ©). It did, however, provide evaluation and experience by developing a very small parallel as in KLl. This meant that we could develop multi-PSI V2 wi th 64 PSI- IT CPU s connected by a mesh network (® ®). The performance of each CPU for KLI was around 150 KLIPS, and the average performance of the full multi-PSI V2 was 5 MLIPS. This speed was enough to significantly improved to encourage efforts to develop various parallel KLI software programs including an practical as. After development of multi-PSI V2, we promote the design (® ®) and trial-fabrication of PIM experimental models (@®). At present, we are completing development of prototype hardware consisting of 3 large scale PIM modules and 2 small scale experimental PIM modules (@ ®). These PIM modules are designed to be equally suited to the KLI machine for inference and knowledge base management, and to be able to be installed all programs written by KLl. This is in spite of their using different architecture. The VPIM system is a KLl-b language processing system which gives a common base for PIM firmware for KLl-b developed on conventional computers. R&D on KBM continued until the end of the intermediate stage. An experimental relational data base machine (Delta) with 4 relational algebraic engines was trial-fabricated in the initial stage (CD ®). During the intermediate stage, a deductive data base simulator was developed to use PSIs with an accelerator for comparison and searching. An experimental system was also developed with multiple-multiple name spaces, by using CHI. Lastly, a know ledge base hard ware simulator with unification engines and multi-port page memory was developed in this stage (® (li)). We developed DB/KB management software, called Kappa, on concurrent basic software themes. At the beginning of the final stage, we thought that adaptability of PIM with Kappa for the various descri ption forms for the knowledge base was more important than effectivity of KBM with special mechanism for the specific KB forms. In other words, we thought that deductive object-oriented DB technologies was not yet matured to design KBM as a part of the prototype system. 2.4 Overview of R&D Results of Software Systems The R&D of software systems was carried out by a number of subjects listed below in each stage. CD Initial stage · Basic software ® 5G Kernel Languages ® Problem solving and inference software module CD Knowledge base management software module @ Intelligent interface software module ® Intelligent programming software module CD SIM software of pilot model for development support ® Basic software system in the intermediate stage ®-® (as in the initial stage) CD Experimental application system for basic software module @ Final stage · Basic software system ® Inference Control module ® KB management module · Knowledge programming software CD Problem solving and programming module @ Natural language interface module ® Knowledge construction and utiljzation module CD Advanced problem solving inference method 13 ® Experimental parallel application system To make the R&D results easy to understand, I will separate the results for languages, basic software, knowledge programming and application software. 2.4.1 R&D results of Fifth Generation Computer languages As the first step in 5G language development, we designed sequential logic programming languages KLO and ESP (Extended Self-contained Prolog) and developed these language processors (CD @). KLO, designed for the PSI hardware system, is based on Prolog. ESP has extended modular programming functions to KLO and is designed to describe large scale software such as SIMPOS and application systems. As a result of research on parallel logic programming language, Guarded Horn Clauses, or GHC, was proposed as the basic specification for KLI (Kernel Language Version 1) (CD @). KLI was, then, designed by adding various functions to KLI such as a macro description (@@). KLI consists of a machine level language (KLl-b (base) ), a core language (KLl-c) for writing parallel software and pragma (KL1-p) to describe the division of parallel processes. Parallel inference machines, multi-PSI and PIM, are based on KLl-b. Various parallel software, including PIMOS, is written in KLl-c and KLl-p. A'um is an object oriented language. The results of developing the A'um experimental language processor reflect improvements in KLI (@@, ®@). To research higher level languages, several languages were developed to aid description of specific research fields. CIL (Complex Indeterminate Language) is the extended language of Prolog that describes meanings and situations for natural language processing (CD @, @ @). CRL (Complex Record Language) was developed as a knowledge representation language to be used internally for deductive databases on nested relational DB software (@ ©). CAL (Contrainte Avec Logique) is a sequential constraint logic language for constraint programming (@(0). Mandala was proposed as a knowledge representation language for parallel processing, but was not adopted because it lacks a parallel processing environment and we had enough experience with it in the initial stage (CD©). Quixote is designed as a knowledge representation language and knowledge-base language for parallel processing based on the results of evaluation by CIL and CRL. Quixote is also a deductive object-oriented database language and play the key role in KBMS. A language processor is currently being developed for Quixote. GDCC(Guarded Definite Clause with Constraints) Figure 2-4 Transi tion of R&D of 5G Languages is a parallel constraint logic language that processes CAL results. 2.4.2 R&D Results of Basic Software (OS) In the initial stage, we developed a preliminary programming and operating system for PSI, called SIMPOS, using ESP (CD ® CD). We contiJ;lued to improve SIMPOS by adding functions corresponding to evaluation results. We also took into account the opinions of inside users who had developed software for the PSI machine using SIMPOS (@@CD). Since no precedent parallel OS which is suited for our aims had been developed anywhere in the world, we started to study parallel OS using our experiences of SIMPOS development in the initial stage. A small experimental PIMOS was developed on the multi-PSI VI system in the first half of the intermediate stage (@(0). Then, the first version of PIMOS was developed on the multi-PSI V2 system, and was used by KLI users (@ (0). PIMOS continued to be improved by the addition of functions such as remote access, file access and debugging support (®@). The Program Development Support System was also developed by the end of the intermediate stage (@(0). Figure 2-5 Transition of basic software R&D 14 Paragraph was developed as a parallel programming support system for improving concurrency and load distribution by the indication results of parallel processing (@@). In regard to DB/KB management software Kaiser was developed as a experimental relationai DB management software in the initial stage (CD @). Then, Kappa- I and Kappa- II were developed to provide the construction functions required to build a large scale DB/KB that could be used for natural language processing, theorem proving and various expert systems (@ @). KappaI and Kappa- II ,based on nested relational model are aimed at the database engine of deductiv~ object-oriented DBMS. . Recently, a parallel version of Kappa, Kappa-P, I~ b~ing developed. Kappa-P can manage dIstnbuted data bases stored on distributed disks in PIM. (@ ®) Kappa-P and Quixote constitute the KBMS. 2.4.3 R&D Results of Problem Solving and Programming Technologies Throughout this project, from the viewpoint of similarity mathematical theorem proving and program specification, we have been investigating proving technologies. The CAP (Computer Aided Proof) system was experimentally developed in the initial stage (@ 0). TRS (Term Rewriting System) and Metis were also developed to support specific mathematical reasoning, that is, the inference associated equals sign (@0). An experimental program for program verification and composition, Argus, was developed by the end of the intermediate stage (CD 0 and @ 0). These research themes concentrated on R&D into the MGTP theorem prover in the final stage(@@). Meta-programming technologies, partial evaluation technologies and the learning mechanism were investigated as basic research on advanced problem solving and the inference method (CD®, @®, @CD). 2.4.4 . R&D Results on Natural Language Processing Technologies Natural language processing tools such as BUP (Bottom-Up Parser) and a miniature electronic dictionary were experimentally developed in the initial stage (CD @). These tools were extended improved and arranged into LTB (Language Tooi Box). LTB is a library of Japanese processing software modules such as LAX (Lexical Analyzer), SAX (Syntactic Analyzer), a text generator and language data bases (@@), @@). An experimental discourse understanding system, DUALS, was implemented to investigate context processing and semantic analysis using these language processing tools (CD @),@ @). An experimental argument system, called Dulcinia is being implemented in the final stage (@@). ' 2.4.5 R&D Results on Knowledge Utilization Technologies and Experimental Application Systems In the intermediate stage we implemented experimental knowledge utilization tools such as APRICOT, based on hypothetical reasoning technology, and Qupras, based on qualitative reasoning technology (@ ©). At present, we are investigating such inference mechanisms for expert systems as assumption based reasoning and case based reasoning, and implementing these as knowledge utilization tools to be applied to the experimental application system (@0). As an application system, we developed, in ~rol~g, an. experimental CAD system for logic cirCUlt deSIgn support and wiring support in the initial stage. We also developed severaJ experimental expert systems such as a CAD system for layout and logic circuit design, a troubleshooting system, a plant control system and a go-playing system written in ESP (@CD, etc.). Small to medium parallel programs written in KLI were also developed to test and evaluate parallel systems by the end of the intermediate stage. These were improved for application to PIM in the final stage. These programs are PAX (a parallel semantics analyzer), Pentomino solver, shortest path solver and Tsume-go. We developed several experimental parallel systems, implemented using KLI in the final stage, such as LSI-CAD system (for logical simulation, wire routing, block layout, logical circuit design), ¥enetic information processing system, legal Inference system based on case based reasoning, expert systems for troubleshooting, plant control and go-playing (3g). Some of these experimental systems were developed from other earlier sequential systems in the intermediate stage while others are new application fields that started in the final stage. 2.5 Infrastructure of the FGCS Project As explained in 2.2, the main language used for software implementation in the initial stage was Prolog. In the intermediate stage, ESP was mainly used, and in the final stage KLI was the principle language. Therefore, we used a Prolog processing system on a conventional computer and terminals in the initial stage. SIMPOS on PSI ( I and II) was used as the workbench for sequential programming in 15 for Software Development. Simulation & Communication Research Department and Research Laboratories Networks LAN Figure 2-6 the intermediate stage. We are using PSI (II and ill) as a workbench and remote terminals to parallel machines (multi-PSIs and PIMs) for parallel programming in the final stage. We have also used conven tional machines for simulation to design PIM and a communication (E-mail, etc.) system. In regard to the computer network system, LAN has been used as the in-house system, and LAN has been connected to domestic and international networks via gateway systems. 3 Working Groups Infrastructure for R&D Promoting Organization of the FGCS Project ICOT was established in 1982 as a non-profit core organization for promoting this project and it began R&D work on fifth generation computers in June 1982, under the auspices of MITI. Establishment of ICOT was decided by considering the following necessity and effectiveness of a centralized core research center for promoting originative R&D, · R&D themes should be directed and selected by powerful leadership, in consideration of hardware and software integration, based on a unified framework of fifth generation computers, throughout the ten-year project period. · It was necessary to develop and nurture researchers working together because of the lack of researchers in this research field. · A core center was needed to exchange information and to collaborate with other organizations and outside researchers. ICOT consists of a general affairs office and a research center (Figure 3-1) . The organization of the ICOT research center was changed flexibly depending on the progress being made. In the initial stage, the research center consisted of a research planning department and three research laboratories. The number of Figure 3-1 ICOT Organization laboratories was increased to five at the beginning of the intermediate stage. These laboratories became one research department and seven laboratories in 1990. Final StaJle ;> <:: Initia! Stage X Intermediate Stage Fiscal 119821 '83 L '84119851 '861 '871 '88119891 '90 '911 '921 Year IDirector I Deputy Directors Dl!puty Director H1st R.Lab. 2nd R.Lab. J 1st R.Lab. 2nd R.Lab. 3rd R.Lab. 14th R.Lab. H3rd R.Lab. I I Research Dep. 1st R.Lab. 2nd R.lab. Jr R.Lao. 4th R.Lab. 5th R.Lab.' ~t h R.Lab. 7th R.Lab. 5th R.Lab. *R.Lab.:Research Laboratory fL.fResearch P\anninq Department / Section 95 I 1 DD I 100 1 100 I organization The number of researchers at the ICOT research center has increased yearly, from 40 in 1982 to 100 at the end of the intermediate stage. All researchers at the ICOT research center have been transferred from national research centers, public organizations, and computer vendors, and the like. To encourage young creative researchers and promote originative R&D, the age of dispatched researchers is limited to 35 years old. Because all researchers are normally dispatched to the ICOT research center for three to four years, ICOT had to receive and nurture newly transferred researchers. We must make considerable effort to continue to consisten tly lead R&D in the fifth generation computer field despite researcher rotation. This rotation has meant that we were able to maintain a staff of researchers in their 30's, and also could easily change the structure of organization in the ICOT research center. In total, 184 researchers have been transferred to 16 the ICOT research center with an average transfer period of 3 years and eight months (including around half of the dispatched researchers who are presently at ICOT). The number of organizations which dispatched researchers to IeOT also increased, from 11 to 19. This increase in participating organizations was caused by an expanding scheme of the supporting companies, around 30 companies, to dispatch researchers to ICOT midway through the intermediate stage. The themes each laboratory was responsible for changed occasionally depending on the progress being made. Figure 3-3 shows the present assignment of research themes to each research laboratory. Research Planning => Research planning Department & Section & management (PIMOS) => ·Basic software (Kappa & Quixote) => ·Constraint logic programming software => ·Prover & its application => . Natural => language interface software ·Parallel application system ·Knowledge utilization software (as of 1991) Figure 3-3 ICOT research center organization Every year we invited several visiting researchers from abroad for several weeks at ICOT's expense to discuss and to exchange opinion on specific research themes with ICOT researchers. Up to the present, we have invited 74 researchers from 12 countries in this program. We also received six long-term (about one year each) visiting researchers from foreign governmental organizations based on memorandums with the National Science Foundation (NSF) in the United States, the Institute National de Recherche en Informatique et Automatiqeu (INRIA) in France, and the Department of Trade and Industry (DTI) in the United Kingdom (Figures 3-2 and 3-4). Figure 3-4 shows the overall structure for promoting this project. The entire cost for the R&D activities of this project is supported by MITI based on the entrust contract between MITI and ICOT. Yearly and at the beginning of each stage we negotiate our R&D plan with MIT!. MITI receives advice of this R&D plan and evaluations of R&D results and ICOT research activities from the FGCS project advisory committee. ICOT executes the core part of R&D and has contracts with eight computer companies for Transfering Research Staff From o Public Organizations (ETL,MEL,N'IT,JIPDEC) .Computer Companies (14) Visiting Researchers RESEARCH Collaboration .Domestic ETL,MEL,EDR etc. oOverseas ANL,NIH,SICS, ANU,LBL Figure 3-4 • Invited Researchers • Dispatched Researchers From NSF,INRIA,DTI Programming & Development work o Computer Companies (8) Structure for promoting FGCS project experimental production of hardware and developmental software. Consequently, ICOT can handle all R&D activities, including the developmental work of computer companies towards the goals of this project. ICOT has set up committee and working groups to discuss and to exchange opinions on overall plans results and specific research themes with researchers and research leaders from universities and other research institutes. Of course, construction and the themes of working groups are changed depending on research progress. The number of people in a working group is around 10 to 20 members, so the total number in the committee and working groups is about 150 to 250 each year. Another program for information exchange and collaborative research activities and diffusion of research results will be described in the. following chapter. 4 Distribution of R&D Results and International Exchange Activities Because this project is a national project in which world-wide scientific contribution is very important, we have made every effort to include our R&D ideas, processes and project results when presenting ICOT activities. We, also, collaborate with outside researchers and other research organizations. We believe these efforts have contributed to progress in parallel and knowledge processing computer technologies. I feel that the R&D efforts in these fields have increased because of the stimulative effect of this project. We hope that R&D efforts will continue to increase through distribution of this projects R&D results. I believe that many outside researchers have also made significant contributions to this project through 17 their discussions and information exchanges with ICOT researchers. ICOT Research ~ collaboration -Domestic ETl,EDRetc. -Overseas :~~:~~~,SICS Accepting Dispatched Researchers(total :8) (From NSF,INRIA,DTIl Hosting Conferences & Workshops -International Conference on FGCS ('81 :84:88:92) Co-sponser with U.S.(NSF), France(lNRIA),Sweden & Italy r::-~=;.:LL--'. ...-"--::,....:....,-:....-.:..:..::..:.:...:.:..::::.. U.K.(IED of DT\) -Domestic Conferences Figure 4-1 We could, for example, produce GHC, a core language of the parallel system, by discussion with researchers working on Parlog and Concurrent Prolog. We could, also, improve the performance of the PSI system by introducing the W AM instruction set proposed by Professor Warren. We have several programs for distributing the R&D results of this project, to exchange information and to collaborate with researchers and organizations. CD One important way to present R&D activities and results is publication and distribution of ICOT journals and technical papers. We have published and distributed quarterly journals, which contain introductions of ICOT activities, and technical papers to more than 600 locations in 35 countries. We have periodically published and sent more than 1800 technical papers to around 30 overseas locations. We have sent TRs (Technical Reports) and TMs (Technical Memos) on request to foreign addresses. These technical papers consist of more than 700 TRs and 1100 TMs published since the beginning of this project up to January 1992. A third of these technical papers are written in English. @ In the second program ICOT researchers discuss research matters and exchange information with outside researchers. ICOT researchers have made more than 450 presentations at international conferences and workshops, and at around 1800 domestic conferences and workshops. They have visited many foreign research organizations to discuss specific research themes and to explain ICOT activities. Every year, we have welcomed around 150 to 300 foreign researchers and specialists in other fields to exchange information with them and explain ICOT activities to them. As already described in the previous chapter, we have so far invited 74 active researchers from specific technical fields related to FGCS technologies. We have also received six longterm visiting researchers dispatched from foreign governmental organization based on agreemen t. These visi ting researchers conducted research at ICOT and published the results of that research. @ We sponsored the following symposiums and workshops to disseminate and exchange information on the R&D results and on ICOT activities. We hosted the International Conference on FGCS'84 in November 1984. Around 1,100 persons participated and the R&D results of the initial stage were presented. This followed the International Conference on FGCS'81, in which the FGCS project plan was presented. We also hosted the International Conference on FGCS'88 in November 1988. 1,600 persons participated in this symposium, and we presented the R&D results of the intermediate stage. We have held 7 Japan-Sweden (or Japan-Swederi-Italy) workshops since 1983 (co-sponsored with institute or universities in Sweden and Italy), 4 Japan-France AI symposiums since 1986, (co-sponsored with INRIA of France), 4 Japan-U.S. AI symposiums since 1987 (cosponsored with NSF of U.S.A.), and 2 Japan-U.K. workshops since 1989 (cosponsored with DTI of U.K.). Participating researchers have become to known each other well through presentations and discussions during these symposiums and workshops. We have also hosted domestic symposiums on this project and logic programming conferences every year. @) Because the entire R&D cost of this project has been provided by the government such intellectual property rights (IPR) as p~tents, which are produced in this project, belong to the Japanese government. These IPR are managed by AIST (Agency of Industrial Science and Technology). Any company wishing to produce commercial products that use any of these IPR must get permission to use them from AIST. For example, PSI and SIMPOS have already been commercialized by companies licensed by AIST. The framework for managing IPR must 18 impartially utilize IPR acquired through this project. That is, impartial permission to domestic and foreign companies, and among participating companies or others is possible because of AIST. @ Software tools developed in this project that are not yet managed as IPR by AIST can be used by other organizations for non-commercial aims. These software tools are distributed by ICOT according to the research tools permission procedure. We, now, have more than 20 software tools, such as PIMOS, PDSS, Kappa-II, the A'um system, LTB, the CAP system, the cuprolog system and the TRS generator. In other cases, we make the source codes of some programs public by printing them in technical papers. ® On specific research themes in the logic programming field, we have collaborated with organizations such as Argonne National Laboratory (ANL), National Institute of Health (NIH), Lawrence Berkeley Laboratory (LBL), Swedish Institute of Computer Science (SICS) and Australia National University (ANU). 5 Forecast of Some Aspects of 5GMachines LSI technologies have advance in accordance with past trends. Roughly speaking, the memory capacity and the number of gates of a single chip quadruple every three years. The number of boards for the CPU of an inference machine was more than ten for PSI- I , but only three for PSI- II and single board for PIM. The number of boards for 80M bytes memory was 16 for PSI- I , but only four for PSI- II and a single forPIM(m). Figure 5-1 shows the anticipated trend in board numbers for one PE (processor element: CPU and memory) and cost for one PE based on the actual value of inference machines developed by this project. The trend shows that, by the year 2000, around ten PEs will fit on one board, around 100 PEs will fit in one desk side cabinet, and 500 to a 1,000 PEs will fit in a large cabinet. This trend also shows that the cost of one PE will halve every three years. Figure 5-2 shows the performance trends of 5G machines based on the actual performance of inference machines developed by this project. The sequential inference processing performance for one PE quadrupled every three years. The improvement in parallel inference processing performance for one PE was not as large as it was for sequential processing, because PIM performance is estimated at around two and one half times that ~. Several -'cosrii'p-E' -. ~ MUPSlPE I(Relative Cost I ·:o.:".p':i.r~d. ,::,::i~~~I~? j , • 10 .... ,... 3Jl00 ...........•. (3. _. ~~!~~tiat) 130KlIPSIPE (Parallel) ..300.400. l (5e~L~~~~I) -·---e€)_._. 0.1 19§2 ·16Mbits DRAMMemory Figure 5-1 -64Mbits DRAM Memory '256Mbit, DRAM Memory Size and cost trends of 5G machines of multi-PSI. Furthermore, Figure 5-2 shows the performance of one board for both sequential and parallel processing, and the performance of a conventional micro-processor with CISC and RISC technology. In this figure, future improvements in the performance of one PE are estimated to be rather lower than a linear extension of past values would indicate because of the uncertainty of whether future technology will be able to elicit such performance improvements. Performance for one board is estimated at about 20 MLIPS, which is 100 times faster than PIM. Thus, a parallel machine with a large cabinet size could have 1 GLIPS. These parallel systems will have the processing speeds needed for various knowledge processing applications in the near future. Performance 1 10 GIPS LIPS 100 1M MIPS LIP 10 100 MIPS LIPS 1 10K MIPS LIPS Fiscal Year 19§2 Figure 5-2 2000 Performance trends of 5G machines Several parallel applications in this project, such as CAD, theorem provers, genetic information processing, natural language processing, and legal reasoning are described in Chapter 2. These applications are distributed in various fields and aim at cultivating new parallel processing application fields. We believe that parallel machine applications will be extended to various areas in industry and society, because parallel technology will become 19 common for computers in the near future. Parallel application fields will expand gradually according to function expansion by the use of advanced parallel processing and knowledge processing technologies. 6 Final Remarks I believe that we have shown the basic framework of the fifth generation computer based on logic programming to be more than mere hypothesis. By the end of the initial stage, we had shown the fifth generation computer to be viable and efficient through the development of PSI, SIMPOS and various experimental software systems written in ESP and Prolog. I believe that by the end of the intermediate stage, we had shown the possibility of realizing the fifth generation computer through the development of a parallel logic programming software environment which consisted of multi-PSI and PIMOS. And I hope you can see the possibility of an era of parallel processing arriving in the near future by looking at the prototype system and the R&D results of the FGCS Project. Acknowledgment This project has been carried out through the efforts of the researchers at ICOT, and with the support of MITI and many others outside ofICOT. We wish to extend our appreciation to them all for the direct and indirect assistance and co-operation they have provided. References [Motooka, et a11981] Proceedings of the International Conference on Fifth Generation Computer Systems, 1981, J1PDEC [Kawanobe, et a11984] K.Kawanobe, et al. ICOT Research and Development, Proceeding of the International Conference on Fifth Generation Computer Systems 1984, 1984, ICOT [Kurozumi, et a11987] T.Kurozumi, et al. Fifth Generation Computer Systems Project, 1987, ICOTTM303 [Kurozumi, et a11988] T.Kurozumi, et al. ICOT Research and development, Proceedings of the International Conference on Fifth Generation Computer Systems 1988, 1988, ICOT [Kurozumi, 1990] T.Kurozumi. Fifth Generation Computer Systems Project-Outline of Plan and Results, 1990, ICOT TM-996 PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON FIFTH GENERATION COMPUTER SYSTEMS 1992 edited by ICOT. © ICOT, 1992 ' 20 Summary of Basic Research Activities of the FGCS Project Koichi Furukawa Institute for New Generation Computer Technology 4-28, Mita 1-chome, Minato-ku, Tokyo 108, Japan furukawa@icot.or.jp Introduction Abstract 1 The Fifth Generation Computer Project was launched in 1982, with the aim of developing parallel computers dedicated to knowledge information processing. It is commonly believed to be very difficult- to parallelize knowledge processing based on symbolic computation. We conjectured that logic programming technology would solve this difficulty. We conducted our project while stressing two seemingly different aspects of logic programming: one was establishment of a new information technology, and the other was pursuit of basic AI and software engineering research. In the former, we developed a concurrent logic programming language, GHC, and its extension for practical parallel programming, KL1. The invention of GHCjKLl enabled us to conduct parallel research on the development of software technology and parallel hardware dedicated to the new language. In the Fifth Generation Computer Project, two main research targets were pursued: knowledge information processing and parallel processing. Logic programming was adopted as a key technology for achieving both targets simultaneously. At the beginning of the project, we adopted Prolog as our vehicle to promote the entire research of the project. Since there were no systematic research attempts based on Prolog before our project, there were many things to do, including the development of a suitabie workstation for the research, experimental studies for developing a knowledge-based system in Prolog and investigation into possible parallel architecture for the language. We rapidly succeeded in promoting research in many directions. From this research, three achievements are worth noting. The first is the development of our own workstation dedicated to ESP, Extended Self-contained Prolog. We developed an operating system for the workstation completely in ESP [Chikayama 88]. The second is the application of partial evaluation to meta programming. This enabled us to develop a compiler for a new programming language by simply describing an interpreter of the language and then partially evaluating it. We applied this technique to derive a bottom-up parser for context free grammar given a bottom up interpreter for them. In other words, partial evaluation made meta programming useful in real applications. The third achievement was the development of constraint logic programming languages. We developed two constraint logic programming languages: CIL and CAL. CIL is for natural language processing and is based on the incomplete data structure for representing "Complex Indeterminates" in situation theory. It has the capability to represent structured data like Minsky's frame and any relationship between slots' values can be expressed using constraints. CIL was used to develop a natural language understanding system called DUALS. Another constraint logic programming language, CAL, is for non-linear equations. Its inference is done using the Buchberger algorithm for computing the Grobner Basis which is a variant of the Knuth-Bendix completion algorithm for a term rewriting We also developed several constraint logic programming languages which are very promising as high level languages for AI applications. Though most of them are based on sequential Prolog technology, we are now integrating constraint logic programming and concurrent logic programming and developing an integrated Ian.,. guage, GDCC. In the latter, we investigated many fundamental AI and software engineering problems including hypothetical reasoning, analogical inference, knowledge representation, theorem proving, partial evaluation and program transformation. As a result, we succeeded in showing that logic programming provides a very firm foundation for many aspects of information processing: from advanced software technology for AI and software engineering, through system programming and parallel programming, to parallel architecture. The research activities are continuing and latest as well as earlier results strongly indicate the truth of our conjecture and also the fact that our approach is appropriate. 21 system. We encountered one serious problem inherent to Prolog: that was the lack of concurrency in the fundamental framework of Prolog. We recognized the importance of concurrency in developing parallel processing technologies, and we began searching for alternative logic programming languages with the notion of concurrency. We noticed the work by Keith Clark and Steve Gregory on Relational Language [Clark Gregory 81] and Ehud Shapiro on Concurrent Prolog [Shapiro 83]. These languages have a common feature of committed choice nondeterminism to introduce concurrency. We devoted our efforts to investigating these languages carefully and Ueda finally designed a new committed choice logic programming language called GHC [Ueda 86a] [UedaChikayama 90], which has simpler syntax than the above two languages and still have similar expressiveness. We recognized the importance of GHC and adopted it as the core of our kernel language, KL1, in this project. The introduction of KL1 made it possible to divide the entire research project into two parts: the development of parallel hardware dedicated to KL1 and the development of software technology for the language. In this respect, the invention of GHC is the most important achievement for the success of the Fifth Generation Computer Systems project. Besides these language oriented researches, we performed many fundamental researches in the field of artificial intelligence and software engineering based on logic and logic programming. They include researches on nonmonotonic reasoning, hypothetical reasoning, abduction, induction, knowledge representation, theorem proving, partial evaluation and program transformation. We expected that these researches would become important application fields for our parallel machines by the affinity of these problems to logic programming and logic based parallel processing. This is now happening. In this article, we first describe our research efforts in concurrent logic programming and in constraint logic programming. Then, we discuss our recent research activities in the field of software engineering and artificial intelligence. Finally, we conclude the paper by stating the dirction of future research. 2 Concurrent Logic Programming In this section, we pick up two important topics in concurrent logic programming research in the project. One is the design principles of our concurrent logic programming language Flat GHC (FGHC) [Ueda 86a] [UedaChikayama 90], on which the aspects of KL1 as a concurrent language is based. The other is search paradigms in FGHC. As discussed later, one drawback of FGHC, viewing as a logic programming language, is the lack of search capability inherent in Prolog. Since the capability is related to the notion of completeness in logic programming, recovery of the ability is essential. 2.1 Design Principles of FGHC The most important feature of FGHC is that there is only one syntactic extension to Prolog, called the commitment operator and represented by a vertical bar "I". A commitment operator divides an entire clause into two parts called the guard part (the left-hand side of the bar) and the body part (the right-hand side). The guard of a clause has two important roles: one is to specify a condition for the clause to be selected for the succeeding computation, and the other is to specify the synchronization condition. The general rule of synchronization in FGHC is expressed as dataflow synchronization. This means that computation is suspended until sufficient data for the computation arrives. In the case of FGHC, guard computation is suspended until the caller is sufficiently instantiated to judge the guard condition. For· example, consider how a ticket vending machine works. After receiving money, it has to wait until the user pushes a button for the destination. This waiting is described as a clause such that "if the user pushed the 160-yen button, then issue a 160-yen ticket". The important thing is that dataflow synchronization can be realized by a simple rule governing head unification which occurs when a goal is executed and a corresponding FGHC clause is called: the information flow of head unification must be one way, from the caller to the callee. For example, consider a predicate representing service at a front desk. Two clauses define the predicate: one is for during the day, when more customers are expected, and another is for after-hours, when no more customers are expected. The clauses have such definitions as: serve ([First I Rest]) : -do_service(First) , serve(Rest). serve([]) :- true I true. Besides the serve process, there should be another process queue which makes a waiting queue for service. The top level goal looks like: ?- queue(Xs), serve(Xs). where "?-" is a prompt to the user at the terminal. Note that the execution of this goal generates two processes, queue and serve, which share a variable Xs. This shared variable acts as a channel for data transfer from one process to the other. In the above example, we assume that the queue process instantiates XS and the serve process reads the value. In other words, queue acts as a generator of the value of XS and serve acts as the consumer. The process queue instantiates XS either to a 22 list of servees represented by [ , , .. .] or to an empty list []. Before the instantiation, the value of Xs remains undefined. Suppose Xs is undefined. Then, the head unification invoked by the goal serve(Xs) suspends because the equations Xs = [First I Rest] and Xs = [] cannot be solved without instantiating Xs. But such instantiation violates the rule of one-way unification. Note that the term [First I Rest] in the head of serve means that the clause expects a non-empty list to be given as the value of the argument. Similarly, the term [] expects an empty list to be given. Now, it is clear that the unidirectionality of information flow realizes dataflow synchronization. This principle is very important in two aspects: one is that the language provides a natural tool for expressing concurrency, and the other is that the synchronization mechanism is simple enough to realize very efficient parallel implementation. 2.2 Search Paradigms in FGHC There is one serious drawback to FGHC because of the very nature of committed choice; that is, it no longer has an automatic search capability, which is one of the most important features of Prolog. Prolog achieves its search capability by means of automatic backtracking. However, since committed choice uniquely determines a clause for succeeding computation of a goal, there is no way of searching for alternative branches other than the branch selected. The search capability is related to the notion of completeness of the logic programming computation procedure and the lack of the capability is very serious in that respect. One could imagine a seemingly trivial way of realizing search capability by means of or-parallel search: that is, to copy the current computational environment which provides the binding information of all variables that have appeared so far and to continue computations for each alternative case in parallel. But this does not work because copying non-ground terms is impossible in FGHC. The reason why it is impossible is that FGHC cannot guarantee when actual binding will occur and there may be a moment when a variable observed at some processor remains unchanged even after some goal has instantiated it at a different processor. One might ask why we did not adopt a Prolog-like language as our kernel language for parallel computation. There are two main reasons. One is that, as stated above, Prolog does not have enough expressiveness for concurrency, which we see as a key feature not only for expressing concurrent algorithms but also for providing a framework for the control of physical parallelism. The other is that the execution mechanism of Prolog-like languages with a search capability seemed too complicated to develop efficient parallel implementations. We tried to recover the search capability by devising programming techniques while keeping the programming language as simple as possible. We succeeded in inventing several programming methods for computing all solutions of a problem which effectively achieve the completeness of logic programming. Three of them are listed as follows: (1) Continuation-based method [Ueda 86b] (2) Layered stream method [OkumuraMatsumoto 87] (3) Query compilation method [Furukawa 92] In this paper, we pick up (1) and (3), which are complementary to each other. The continuation-based method is suitable for the efficient processing of rather algorithmic problems. An example is to compute all ways of partitioning a given list into two sublists by using append. This method mimics the computation of ORparallel Prolog using AND-parallelism of FGHC. ANDserial computation in Prolog is translated to continuation processing which remembers continuation points in a stack. The intermediate results of computation are passed from the preceding goals to the next goals through the continuation stack kept as one of the arguments of the FGHC goals. This method requires input/output mode analysis before translating a Prolog program into FGHC. This requirement makes the method impractical for d~tabase applications because there are too many possible input-output modes for each predicate. The query compilation method solves this problem. This method was first introduced by Fuchi [Fuchi 90] when he developed a bottom-up theorem prover in KLl. In his coding technique, the multiple binding problem is avoided by reversing the role of the caller and the callee in straightforward implementation of database query evaluation. Instead of trying to find a record (represented by a clause) which matches a given query pattern represented by a goal, his method represents each query component with a compiled clause, represents a databasae 'with a data structure passed around by goals, and tries to find a query component clause which matches a goal representing a record and recurses the process for all potentially applicable records in the database1 . Since every record is a ground term, there is no variable in the caller. Variable instantiation occurs when query component clauses are searched and an appropriate clause representing a query component is found to match a currently processed record. Note that, as a result of reversing the representation of queries and databases from straightforward representation, the information flow is now from the caller (database) to the callee (a query component). This inversion of information flow avoids deadlock in query processing. Another important trick is that each time a query clause is called, a fresh variable is created for each variable in the query component. This mechanism is used for making a new environment 1 We need an auxiliary query clause which matches every record after failing to match the record to all the real query clauses. 23 for each OR-parallel computation branch. These tricks make it possible to use KLI variables to represent object level variables in database queries and, therefore, we can avoid different compilation of the entire database and queries for each input/output mode of queries. The new coding method stated above is very general and there are many applications which can be programmed in this way. The only limitation of this approach is that the database must be more instantiated than queries. In bottom-up theorem proving, this requirement is referred to as the range-restrictedness of each axiom. Range-restrictedness means that, after successfully finding ground model elements satisfying the antecedent of an axiom, the new model element appearing as the consequent of the axiom must be ground. This restriction seems very strong. Indeed, there are problems in the theorem proving area which do not satisfy the condition. We need a top-down theorem prover for such problems. However, many real life problems satisfy the range-restrictedness because they almost always have finite concrete models. Such problems include VLSI-CAD, circuit diagnosis, planning, and scheduling. We are developing a parallel bottom-up theorem prover called MGTP (Model Generation Theorem Prover) [FujitaHasegawa 91] based on SATCHMO developed by Manthey and Bry [MantheyBry 88]. We are investigating new applications to utilize the theorem prover. We will give an example of computing abduction using MGTP in Section 5. 3 Constraint mlng Logic Program- We began our constraint logic programming research almost at the beginning of our project, in relation to the research on natural language processing. Mukai [MukaiYasukawa 85] developed a language called CIL (Complex Indeterminates Language) for the purpose of developing a computational model of situation semantics. A complex indeterminate is a data structure allowing partially specified terms with indefinite arity. During the design phase of the language, he encountered the idea of freeze in Prolog II by Colmerauer [Colmerauer 86]. He adopted freeze as a proper control structure for our CIL language. From the viewpoint of constraint satisfaction, CIL only has a passive way of solving constraint, which means that there is no active computation for solving constraints such as constraint propagation or solving simultaneous equations. Later, we began our research on constraint logic programming involving active constraint solving. The language we developed is called CAL. It deals with non-linear equations as expressions to specify constraints. Three events triggered the research: one was our preceding efforts on developing a term rewrit- ing system called METIS for a theorem prover of linear algebra [OhsugaSakai 91]. Another event was our encounter with Buchberger's algorithm for computing the Grabner Basis for solving non-linear equations. Since the algorithm is a variant of the Knuth-Bendix completion algorithm for a term rewriting system, we were able to develop the system easily from our experience of developing METIS. The third event was the development of the CLP(X) theory by Jaffar and Lassez which provides a framework for constraint logic programming languages [JaffarLassez 86]. There is further remarkable research on constraint logic programming in the field of general symbol processing [Tsuda 92]. Tsuda developed a language called cu-Prolog. In cu-Prolog, constraints are solved by means of program transformation techniques called unfold/fold transformation (these will be discussed in more detail later in this paper, as an optimization technique in relation to software engineering). The unfold/fold program transformation is used here as a basic operation for solving combinatorial constraints among terms. Each time the transformation is performed, the program is modified to a syntactically less constrained program. Note that this basic operation is similar to term rewriting, a basic operation in CAL. Both of these operations try to rewrite programs to get certain canonical forms. The idea of cu-Prolog was introduced by Hasida during his work on dependency propagation and dynamical programming [Hasida 92]. They succeeded in showing that context-free parsing, which is as efficient as chart parsing, emerges as a result of dependency propagation during the execution of a program given as a set of grammar rules in cu-Prolog. Actually, there is no need to construct a parser. cu-Prolog itself works as an efficient parser. Hasida [Hasida 92] has been working on a fundamental issue of artifici~l intelligence and cognitive science from the aspect of a computational model. In his computation model of dynamical programming, computation is controlled by various kinds of potential energies associated with each atomic constraint, clause, and unification. Potential energy reflects the degree of constraint violation and, therefore, the reduction of energy contributes constraint resolution. Constraint logic programming greatly enriched the expressiveness of Prolog and is now providing a very promising programming environment for applications by extending the domain of Prolog to cover most AI problems. One big issue in our project is how to integrate constraint logic programming with concurrent logic programming to obtain both expressiveness and efficiency. This integration, however, is not easy to achieve because (1) constraint logic programming focuses on a control scheme for efficient execution specific to each constraint solving scheme, and (2) constraint logic programming essentially includes a search paradigm which re- 24 quires some suitable support mechanism such as automatic backtracking. It turns out that the first problem can be processed efficiently, to some extent, in the concurrent logic programming scheme utilizing the data flow control method. We developed an experimental concurrent constraint logic programming language called GDCC (Guarded Definite Clauses with Constraints), implemented in KL1 [HawleyAiba 91]. GDCC is based on an ask-tell mechanism proposed by Maher [Maher 87], and extended by Saraswat [Saraswat 89]. It extends the guard computation mechanism from a simple one-way unification solving problem to a more general provability check of conditions in the guard part under a given set of constraints using the ask operation. For the body computation, constraint literals appearing in the body part are added to the constraint set using the tell operation. If the guard conditions are not known to be provable because of a lack of information in the constraints set, then computation is suspended. If the conditions are disproved under the constraints set, then the guard computation fails. Note that the provability check controls the order of constraint solving execution. New constraints appearing in the body of a clause are not included in the constraint set until the guard conditions are known to be provable. The second problem of realizing a search paradigm in a concurrent constraint logic programming framework has not been solved so far. One obvious way is to develop an OR-parallel search mechanism which uses a full unification engine implemented using ground term representation of logical variables [Koshimura et al. 91]. However, the performance of the unifier is 10 to 100 times slower than the built in unifier and, as such, it is not very practical. Another possible solution is to adopt the new coding technique introduced in the previous section. We expect to be able to efficiently introduce the search paradigm by applying the coding method. The paradigm is crucial if parallel inference machines are to be made useful for the numerous applications which require high levels of both expressive and computational power. 4 Advanced Software EngineerIng Software engineering aims at supporting software development in various dimensions; increase of software productivity, development of high quality software, pursuit of easily maintainable software and so on. Logic programming has great potential for many dimensions in software engineering. One obvious advantage of logic programming is the affinity for correctness proof when given specifications. Automatic debugging is a related issue. Also, there is a high possibility of achieving automatic program synthesis from specifications by applying proof techniques as well as from examples by applying ind uetion. Program optimization is another promising direction where logic programming works very well. In this section, two topics are picked up: (1) meta programming and its optimization by partial evaluation, and (2) unfold/fold program transformation. 4.1 Meta Programming and Partial Evaluation We investigated meta programming technology as a vehicle for developing knowledge-based systems in a logic programming framework inspired by Bowen and Kowalski's work [BowenKowalski 83]. It was a rather direct way to realize a knowledge assimilation system using the meta programming technique by regarding integrity constraints as meta rules which must be satisfied by a knowledge base. One big problem of the approach was its inefficiency due to the meta interpretation overhead of each object level program. We challenged the problem and Takeuchi and Furukawa [Takeuchi Furukawa 86] made a brealdhrough in the problem by applying the optimization technique of partial evaluation to meta programs. We first derived an efficient compiled program for an expert system with uncertainty computation given a meta interpreter of rules with certainty factor. In this program, we succeeded in getting three times speedup over the original program. Then, we tried a more non-trivial problem of developing a meta interpreter of a bottom-up parser and deriving an efficient compiled program given the interpreter and a set of grammar' rules. We succeeded in obtaining an object program known as BUP, developed by Matsumoto [Matsumoto et al. 83]. The importance of the BUP meta-interpreter is that it is not a vanilla meta-interpreter, an obvious extension of the Prolog interpreter in Prolog, because the control structure is totally i::lifferent from Prolog's top-down control structure. After our first success of applying partial evaluation techniques in meta programming, we began the development of a self-applicable partial evaluator. Fujita and Furukawa [FujitaFurukawa 88] succeeded in developing a simple self-applicable partial evaluator. We showed that the partial evaluator itself was a meta interpreter very similar to the following Prolog interpreter in Prolog: solve(true) . solve((A,B)) solve(A) solve(A) , solve(B). clause(A,B), solve(B). where it is assumed that for each program clause, H :- B, a unit clause, clause(H ,B), is asserted 2 • A goal, solve (G), simulates an immediate execution ofthe subject goal, G, and obtains the same result. This simple definition of a Prolog self-interpreter, sol ve, suggests the following partial solver, psol ve. 2clauseC-,_) is available as a built-in procedure in the DECsystem-lO Prolog system. 25 psolve(true,true). psolve«A,B),(RA,RB)) psolve(A,RA), psolve(B,RB). psolve(A,R) :clause(A,B), psolve(B,R). psolve(A,A) :- '$suspend'(A). The partial solver, psol ve (G ,R), partially solves a given goal, G, returning the result, R. The result, R, is called the residual goal(s) for the given goal, G. The residual goal may be true when the given goal is totally solved, otherwise it will be a conjunction of subgoals, each of which is a goal, ~, suspended to be solved at '$suspend' (~), for some reason. An auxiliary predicate, '$suspend' (P), is define-d for each goal pattern, P, by the user. Note that psolve is related to solve as: solve(G) :- psolve(G,R), solve(R). That is, a goal, G, succeeds if it is partially solved with the residual goal, R, and R in turn succeeds (is totally solved). The total solution for G is thus split into two tasks: partial solution for G and total solution for the residual goal, R. We developed a self-applicable partial evaluator by modifying the above psol ve program. The main modification is the treatment of built-in predicates in Prolog and those predicates used to define the partial evaluator itself to make it self-applicable. We succeeded in applying the partial evaluator to itself and generated a compiler by partially evaluating the psol ve program with respect to a given interpreter, using the identical psol ve_ We further succeeded in obtaining a compiler generator, which generates different compilers given different interpreters, by partially evaluating the psol ve program with respect to itself, using itself. Theoretically, it was known that self-application of a partial evaluator generates compilers and a compiler generator [Futamura 71]. There were many attempts to realize self-applicable partial evaluators in the framework of functional languages for a long time, but no successes were reported until very recently [Jones et al. 85], [Jones et al. 88], [GomardJones 89]. On the other hand, we succeeded in developing a self-applicable partial evaluator in a Prolog framework in a very short time and also in a very elegant way. This proves some merits of logic programming languages over functional programming languages, especially in its binding scheme based on unification. 4.2 Unfold/Fold Program Transformation Program transformation provides a powerful methodology for the development of software, especially the derivation of efficient programs either from their formal specification or from decralative but possibly inefficient programs. Programs written in declarative form are often inefficient under Prolog's standard left to right control rule. Typical examples are found in programs based on a generate and test paradigm. Seki and Furukawa [SekiFurukawa 87] developed a program transformation method based on unfolding and folding for such programs. We will explain the idea in some detail. Let gen_ test (L) be a predicate defined as follows: gen_test(L) :- gen(L), test(L). where L is a variable representing a list, gen(L) is a generator of the list L, and test (L) is a tester for L. Assume both gen and test are incremental and are defined as follows: gene []) . gene [x IL]) gen_element(X) , gen(L). test ([]) . test([XIL]) :- test_element (X) , test(L). Then, it is possible to fuse two processes gen and test by applying unfold/fold transformation as follows: gen_test([XIL]) :- gen([XIL]), test([XIL]). unfold at gen and test gen_test([XIL]) :- gen_element(X) , gen(L), test_element (X) , test(L). fold by gen_ test gen_test([XIL]) :- gen_element(X) , test_element(X), gen_test(L). If the tester is not incremental, the above unfold/fold transformation does not work. One example is to test that all elements in the list are different from each other. In this case, the test predicate is defined as follows: test ([]) . test([XIL]) :- non_member(X,L), test(L). non_member(_,[]). non_member(X,[yIL]):dif(X,Y), non_member(X,L). where dif (X, Y) is a predicate judging that X is not equal to Y. Note that this test predicate is not incremental because a test for the first element X of the list requires the information of the entire list. The solution we gave to this problem was to replace the test predicate with an equivalent predicate with incrementality. Such an equivalent program test' is obtained by adding an accumulator as an extra argument of the test predicate defined as follows: 26 test' «(] ,_). test'([XIL] ,Ace) non_member(X,Acc), test'(L,[XIAcc]). The relationship between test and test' is given by the following theorem: unifiable to each pattern is associated with the pattern and only those patterns having the same associated subset of clauses are generalized. Note that a goal pattern is unfolded only by clauses belonging to the associated subset. Therefore the suppression of over-generalization also suppresses unnecessary expansion of clauses by unnecessary unfolding. Theorem test(L) = test'(L,[]) Now, the original gen_ test program becomes gen_test(L) :- gen(L), test'(L,[]). We need to introduce the following new predicate to perform the unfold/fold transformation: gen_test'(L,Acc) :- gen(L), test'(L.Acc). By applying a similar transformation process as before, we get the following fused recursive program of gen_ test': gen_test' «(] ,_). gen_test'([XIL],Acc) :- gen_element(X), non_member(X,Acc) , gen_test'(L,[XIAcc]). By symbolically computing the two goals ?- teste [Xi, ... ,Xn]). ?- test' ([Xi, ... ,Xn]). and comparing the results, one can find that the reordering of pair-wise comparisons by the introduction of the accumulator is analogous to the exchange of double summation L,i!iL,j!! Xij = L,j!iL,iJI Xij. Therefore, we refer to this property as structural commutativity. One of the key problems of unfold/fold transformation is the introduction of a new predicate such as gen_test' in the last example. Kawamura [Kawamura 91] developed a syntactic rule for finding suitable new predicates. There were several attempts to find appropriate new predicates using domain dependent heuristic knowledge, such as append optimization by the introduction of difference list representation. Kawamura's work provides some general criteria for selecting candidates for new predicates. His method first analyzes a given program to be transformed and makes a list of patterns which may possibly appear in the definition of new predicates. This can be done by unfolding a given program and properly generalizing all resulting patterns to represent them with a finite number of distinct patterns while avoiding over-generalization. One obvious strategy to avoid over-generalization is to perform least general generalization by Plotkin [Plotkin 70]. Kawamura also introduced another strategy for suppressing unnecessary generalization: a subset of clauses of which the head can be 5 Logic-based AI Research For a long time, deduction has played a central role in research on logic and logic programming. Recently, two other inferences, abduction and induction, received much attention and much research has been done in these new directions. These directions are related to fundamental AI problems that are open-ended by their nature. They include the frame problem, machine learning, distributed problem solving, natural language understanding, common sense reasoning, hypothetical reasoning and analogical reasoning. These problems require non-deductive inference capabilities in order to solve them. Historically, most AI research on these problems adopted ad hoc heuristic methods reflecting problem structures. There was a tendency to avoid a logic based formal approach because of a common belief in the limitation of the formalism. However, the limitation of logical formalism comes only from the deductive aspect of logic. Recently it has been widely recognized that abduction and induction based on logic provide a suitable framework for such problems requiring open-endedness in their formalism. There is much evidence to support this observation. • In natural language understanding, unification grammar is playing an important role in integrating syntax, semantics, and discourse understanding. • In non-monotonic reasoning, logical formalism such as circumscription and default reasoning and its compilation to logic based programs are studied ex~ tensively. • In machine learning, there are many results based on logical frameworks such as the Model Inference System, inverse resolution, and least general generalization. • In analogical reasoning, analogy is naturally described in terms of a formal inference rule similar to logical inference. The associated inference is deeply related to abductive inference. In the following, three topics related to these issues are picked up: they are hypothetical reasoning, analogy, and knowledge representation. 27 5.1 Hypothetical Reasoning A logical framework of hypothetical reasoning was studied by Poole et al. [Poole et al. 87]. They discussed the relationship among hypothetical reasoning, default reasoning and circumscription, and argued that hypothetical reasoning is all that is needed because it is simply and efficiently implemented and is powerful enough to implement other forms of reasoning. Recently, the relationship of these formalisms was studied in more detail and many attempts were made to translate non-monotonic reasoning problems into equivalent logic programs with negation as failure. Another direction of research was the formulation of abduction and its relationship' to negation as failure. There was also a study of the model theory of a class of logic programs, called general logic programs, allowing negation by failure in the definition of bodies in the clausal form. By replacing negation-by-failure predicates by corresponding abducible predicates which usually give negative information, we can formalize negation by failure in terms of abduction [EshghiKowalski 89] A proper semantics of general logic programs is given by stable model semantics [GelfondLifschitz 88]. It is a natural extension of least fixpoint semantics. The difference is that there is no Tp operator to compute the stable model directly, because we need a complete model for checking the truth value of the literal of negation by failure in bottom-up fixpoint computation. Therefore, we need to refer to the model in the definition of the model. This introduces great difficulty in computing stable models. The trivial way is to assume all possible models and see whether the initial models are the least ones satisfying the programs or not. This algorithm needs to search for all possible subsets of atoms to be generated by the programs and is not realistic at all. Inoue [Inoue et ai. 92] developed a much more efficient algorithm for computing all stable models of general logic programs. Their algorithm is based on bottom-up model generation method. Negation-by-failure literals are used to introduce hypothetical models: ones which assume the truth of the literals and the others which assume that they are false. To express assumed literals, they introduce a modal operator. More precisely, they translate each rule of the form: false, whereas, KA means that we assume that A is true. Although K and NK are modal operators, we can treat KA and NKA as new predicates independent from A by adding the following constraints: NKA, A -: NKA, KA for every atom A. (1) (2) By this translation, we obtain a set of clauses in first order logic and therefore it is possible to compute all possible models for the set using a first order bottom-up theorem prover, MGTP, described in Section 2. After computing all possible models for the set of clauses, we need to select only those models M which satisfy the following condition: For every ground atom A, if KA E M, then A EM. (3) Note that this translation scheme defines a coding method of original general logic programs which may contain negation by failure in terms of pure first order logic. Note also that the same technique can be applied in computing abduction, which means to find possible sets of hypotheses explaining the observation and not contradicting given integrity constraints. Satoh and Iwayama [SatohIwayama 92] independently developed a top-down procedure for answering queries to a general logic program with integrity constraints. They modified an algorithm proposed by Eshghi and Kowalski [EshghiKowalski 89] to correctly handle situations where some proposition must hold in a model, like the requirement of (3). Iwayama and Satoh [IwayamaSatoh 91] developed a mixed strategy combining bottom-up and top-down strategies for computing the stable models of general logic programs with constraints. The procedure is basically bottom-up. The top-down computation is related to the requirement of (3) and as soon as a hypothesis of K A is asserted in some model, it tries to prove A by a top-down expectation procedure. The formalization of abductive reasoning has a wide range of applications including computer aided design and fault diagnosis. Our approach provides a uniform scheme for representing such problems and solving them. It also provides a way of utilizing our parallel inference machine, PIM, for solving these complex AI problems. 5.2 to the following disjunctive clause which does not contain any negation-by-failure literals: -t for every atom A. Formal Approach to Analogy Analogy is an important reasoning method in human problem solving. Analogy is very helpful for solving problems which are very difficult to solve by themselves. AI+ 1 /\ ••• /\ Am - t (NKAm+l /\ .. , /\ NKAn /\ AI) V KAm+l V ... V KAn. Analogy guides the problem solving activities using the knowledge of how to solve a similar problem. Another The reason why we express the clause with the anaspect of analogy is to extract good guesses even when tecedent on the left hand side is that we intend to use there is not enough information to explain the answer. this clause in a bottom-up way; that is, from left to right. There are three major problems to be solved in order In this expression, NKA means that we assume that A is to mechanize analogical reasoning [Arima 92]: 28 • searching for an appropriate base of analogy with respect to a given target, • selecting important properties shared by a base and a target, and • selecting properties to be projected through an analogy from a base to a target. Though there was much work on mechanizing analogy, most of this only partly addressed the issues listed above. Arima [Arima 92] proposed an attempt to answer all the issues at once. Before explaining his idea, we need some preparations for defining teqIlinology. Analogical reasoning is expressed as the following inference rule: S(B) 1\ PCB) SeT) peT) J(x,s,p) = Jatt(s,p) 1\ Jobj(X,S), (5) The first component, Jatt(s,p), corresponds to information extracted from a base. The reason why it does not depend on x comes from the observation that information in the base of the analogy is independent from the choice of an object x. The second component, Jobj(X, s), corresponds to information extracted from the similarity and therefore it does not contain p as its parameter. Example: Negligent Student where T represents the target object, B the base object, S the similarity property between T and B, and P the projected property. This inference rule expresses that if we assume an object T is similar to another object B in the sense that they share a common property S then, if B has another property P, we can analogically reason that T also has the same property P. Note that the syntactic similarity of this rule to modus ponens. If we generalize the object B to a universally quantified variable X and replace the and connective to the implication connective, then the first expression of the rule becomes SeX) :) P(X), thereby the entire rule becomes modus ponens. Arima [Arima 92] tried to link the analogical reasoning to deductive reasoning by modifying the expression S(B) 1\ PCB) to 'v'x.(J(x) 1\ Sex) :) P(x)), and p represent the similarity property and the projected property. From the nature of analogy, we do not expect that there is any direct relationship between the object x and the projected property p. Therefore, the entire J(x,s,p) can be divided into two parts: (4) where J(x) is a hypothesis added to Sex) in order to logically conclude P(x). If there exists such a J(x), then the analogical reasoning becomes pure deductive reasoning. For example, let us assume that there is a student (StudentB) who belongs to an orchestra club and also neglects study. If one happens to know that another student (StudentT) belongs to the orchestra club, then we tend to conclude that he also neglects study. The reason why we derive such a conclusion is that we guess that the orchestra club is very active and student members of this busy club tend to neglect study. This reason is an example of the hypothesis mentioned above. Arima analyzed the syntactic structure of the above J( x) by carefully observing the analogical situation. First, we need to find a proper parameter for the predicate J. Since it is dependent on not only an object but also the similarity property and the projected property, we assume that J has the form of J(x,s,p), where s First, let us formally describe the hypothesis described earlier to explain why an orchestra member is negligent of study. It is expressed as follows: 'v'x,s,p.( Enthusiastic(x,s) 1\ BusyClub(s) I\Obstructive_to(p, s) 1\ Member _of (x, s) :) NegligenLof(x,p) ) (6) where x, s, and p are variables representing a person, a club and some human activity, respectively. The meaning of each predicate is easy to understand and the explanations are omitted. Since we know that both StudentB and StudentT are members of an orchestra, Members_of(X,s) corresponds to the similarity property Sex) in (4). On the other hand, since we want to reason the negligence of a student, the projected property P(x) is NegligenLof(x,p). Therefore, the rest of the expression ·in (6): Enthusiastic(x, s) 1\ BusyClub(s) 1\ Obstructive_to(p,s) corresponds to J(x,s,p). From the syntactic feature of this expression, we can conclude that JObj(X,S) = Enthusiastic(x,s), Jatt(s,p) = BusyClub(s) 1\ Obstructive_to(p,s). The reason why we need Jobj is that we are not always aware of an important similarity like Enthusiastic. Therefore, we need to infer an important hidden similarity from the given similarity such as Member _0 f. This inference requires an extra effort in order to apply the above framework of analogy. The restriction on the syntactic structure of J(x,s,p) is very important since it can be used to prune a search space to access the right base case given the target. This function is particularly important when we apply our analogical inference framework to case based reasoning systems. 29 5.3 Knowledge Representation Knowledge representation is one of the central issues in artificial intelligence research. Difficulty arises from the fact that there has been no single knowledge representation scheme for representing various kinds of know ledge while still keeping the simplicity as well as the efficiency of their utilization. Logic was one of the most promising candidates but it was weak in representing structured knowledge and the changing world. Our aim in developing a knowledge representation framework based on logic and logic programming is to solve both of these problems. From the structural viewpoint, we developed an extended relational database which can handle nonnormal forms and its corresponding programming language, CRL [Yokota 88aJ. This representation allows users to describe their databases in a structured way in the logical framework [Yokota et al. 88b]. Recently, we proposed a new logic-based knowledge representation language, Quixote [YasukawaYokota 90]. Quixote follows the ideas developed in CRL and CIL: it inherits object-orientedness from the extended version of CRL and partially specified terms from CIL. One of the main characteristics of the object-oriented features is the notion of object identity. In Quixote, not only simple data atoms but also complex structures are candidates for object identifiers [Morita 90J. Even circular structures can be represented in Quixote. The non-well founded set theory by Aczel [Aczel 88] was adopted to characterize them as a mathematical foundation for such objects, and unification on infinite trees [Colmerauer 82J was adopted as an implementation method. 6 Conclusion In this article, we summarized the basic research activities of the FGCS project. We emphasized two different directions of logic programming research. One followed logic programming languages where constraint logic programming and concurrent logic programming were focussed. The other followed basic research in artificial intelligence and software engineering based on logic and logic programming. This project has been like solving a jigsaw puzzle. It is like trying to discover the hidden picture in the puzzle using logic and logic programming as clues. The research problems to be solved were derived naturally from this image. There were several difficult problems. For some problems, we did not even have the right evaluation standard for judging the results. The design of GHC is such an example. Our entire picture of the project helped in guiding our research in the right direction. The picture is not completed yet. We need further efforts to fill in the remaining spaces. One of the most important parts to be added to this picture is the integration of constraint logic programming and concurrent logic programming. We mentioned our preliminary language/system, GDCC, but this is not yet matured. We need a really useful language which can be efficientlly executed on parallel hardware. Another research subject to be pursued is the realization of a database in KLl. We are actively constructing a parallel database but it is still in the preliminary stages. We believe that there is much affinity between databases and parallelism and we expect a great deal of parallelism from database applications. The third research subject to be pursued is the parallel implementation of abduction and induction. Recently, there has been much work on abduction and induction based on logic and logic programming frameworks. They are expected to provide a foundation for many research themes related to knowledge acquisition and machine learning. Also, both abduction and induction require extensive symbolic computation and, therefore, fit very well with PIM architecture. Although further research is needed to make our results really useful in a wide range of large-scale applications, we feel that our approach is in the right direction. Acknowledgements This paper reflects all the basic research activities in the Fifth Generation Computer Systems project. The author would like to express his thanks to all the researchers in ICOT, as well as those in associated companies who have been working on this project. He especially would like to thank Akira Aiba, Jun Arima, Hiroshi Fujita, K6iti Hasida, Katsumi Inoue, Noboru Iwayama, Tadashi Kawamura, Ken Satoh, Hiroshi Tsuda, Kazunori Ueda, Hideki Yasukawa and Kazumasa Yokota for their help in greatly improving this work. Finally, he would like to express his deepest thanks to Dr. Fuchi, the director of ICOT, for providing the opportunity to write this paper. References [Arima 92] J. Arima, Logical Structure of Analogy. In Proc. of the International Conf. on Fifth Generation Computer Systems 1992, Tokyo, 1992. [Aczel 88] P. Aczel, Non- Well Founded Set Theory. CLSI Lecture Notes No. 14, 1988. [Aiba et al. 88] A. Aiba, K. Sakai, Y. Sato, D.J. Hawley, and R. Hasegawa, Constraint Logic Programming Language CAL. In Pmc. of the International Conf. on Fifth Generation Computing Systems 1988, Tokyo, 1988. [Bowen Kowalski 83] K. Bowen and R. Kowalski, Amalgamating Language and Metalanguage 30 in Logic Programming. In Logic Programming, K. Clark and S. Tarnlund (eds.), Academic Press, 1983. [FujitaHasegawa 91] H. Fujita and R. Hasegawa, A [Clark Gregory 81] K. 1. Clark and S. Gregory, A Re- tional Conference on Logic Programming, Paris, 1991. Model Generation Theorem Prover in 1(Ll Using a Ramified-Stack Algorithm. In Proc. of the Eighth Interna- lational Language for Parallel Programming. In Proc. ACM Conf. on Func- tional Programming Languages and Computer Architecture, ACM, 1981. [Clark Gregory 86] K. L. Clark and S. Gregory, PARLOG: Parallel Programming in Logic. Research Report DOC 84/4, Dept. of Computing, Imperial College of Science and Technology, London. Also in ACM. Trans. Prog. Lang. Syst., Vol. 8, No.1, 1986. [Chikayama 88] T. Chikayama, Programming in ESP Experiences with SIMPOS -, In Programming of Future Generation Computers, Fuchi and Nivat (eds.), NorthHolland, 1988. [Colmerauer 82] A. Colmerauer, Prolog and Infinite Trees. In Logic Programming, K. L. 'Clark and S. A. Tarnlund (eds.), Academic Press, 1982. [Colmerauer 86] A. Colmerauer, Theoretical Model of Prolog II. In Logic Programming and Its Applications, M. Van Caneghem and D. H. D. Warren (eds.), Albex Publishing Corp, 1986. [FuchiFurukawa 87] K. Fuchi and K. Furukawa, The Role of Logic Programming in the Fifth Generation Computer Project. New Generation Computing, Vol. 5, No.1, Ohmsha-springer, 1987. [EshghiKowalski 89] K. Eshghi and R.A. Kowalski, Abduction compared with negation by failure, in: Proceedings of the Sixth International Conference on Logic Programming, Lisbon, Portugal, 1989. [Fuchi 90] K. Fuchi, An Impression of 1(Ll Programming - from my experience with writing parallel provers . -. In Proe. of KLI Programming Workshop '90, ICOT, 1990 (in Japanese). [FujitaFurukawa 88] H. Fujita and K. Furukawa, A SelfApplicable Partial Evaluator and Its Use in Incremental Compilation. New Generation Computing, Vol. 6, Nos.2,3, Ohmsha/Springer- Verlag, 1988. [Furukawa 92] K. Furukawa, Logic Programming as the Integrator of the Fifth Generation Computer Systems Project, Communication of the ACM, Vol. 35, No.3, 1992. [Futamura 71] Y. Futamura, Partial Evaluation of Computation Process: An Approach to a Compiler-Compiler. Systems, Computers, Controls 2, 1971. [GelfondLifschitz 88] M. Gelfond and V. Lifschitz, The stable model semantics for logic programming, In Proceedings of the Fifth International Conference and Symposium on Logic Programming, Seattle, WA,1988. [GomardJones 89] C. K. Gomard and N. D. Jones, Compiler Generation by Partial Evaluation: A Case Study. In Proc. of Information Processing 89, G. X. Ritter (ed.), NorthHolland, 1989. [Hasida 92] K. Hasida, Dynamics of Symbol Systems - An Integrated Architecture of Cognition. In Proc. of the International Conf. on Fifth Generation Computer Systems 1992, Tokyo, 1992. [HawleyAiba 9l] D. Hawley and A. Aiba, Guarded Definite Clauses with Constraints - Preliminary Report. Technical Report TR-713, ICOT, 1991. [Inoue et al. 92] K. Inoue, M. Koshimura and R. Hasegawa, Embedding Negation as Failure into a Model Generation Theorem Prover. To appear in CADE11: The Eleventh International Confer- ence on A utomated Deduction, Saratoga Springs, NY, June 1992. [IwayamaSatoh 91] N. Iwayama and K. Satoh, A Bottom-·up Procedure with Top-down Expectation for General Logic Programs with Integrity Constraints. ICOT Tech- nical Report TR-625, 1991. [JaffarLassez 86] J. Jaffar and J-L. Lassez, Constraint Logic Programming. Technical Report, Department of Computer Science, Monash University, 1986. 31 [Jones et al. 85] N.D. Jones, P. Sestoft, and H. S¢ndergaard, An Experiment in Partial Evaluation: The Generation of a Compiler Generator. In J-.P. Jouannaud (ed.), Rewriting Techniques and Applications, LNCS-202, Springer-Verlag, pp.124-140, 1985. Layered Streams, In Proc. 1987 International Symposium on Logic Programming, pp. 224-232, San Francisco, September 1987. [Plotkin 70] G. D. Plotkin, A note on inductive generalization. In B. Meltzer and D. Michie (eds.), Machine Intelligence 5, 1970. [Jones et al. 88] N. D. Jones, P. Setstoft and H. Sondergaard, MIX: a self-applicable partial evaluator for experiments in compiler generator,Journal of LISP and Symbolic Computation, 1988. . [Poole et al. 87] D. Poole, R. Goebel and R. Aleliunas, Theorist: A logical Reasoning System for Defaults and Diagnosis, N. Cercone and G. McCalla (eds.),' The Knowledge [Kawamura 91] T. Kawamura, Derivation of Efficient Frontier: Essays in the Representation of Knowledge, Springer-Verlag, pp.331- Logic Programs by Synthesizing New Predicates. Proc. of 1991 International Logic Programming Symposium, pp.611 - 625, San Diego, 1991. 352 (1987). [SakaiAiba 89] K. Sakai and A. Aiba, CAL: A Theoretical Background of Constraint Logic Programming and its Applications. J. Sym- [Koshimura et al. 91] M. Koshimura, H. Fujita and R. Hasegawa, bolic Computation, Vo1.8, No.6, pp.589603, 1989. Utilities for Meta-Programming in KL1. In Proc. of KLI Programming Workshop'91, ICOT, 1991 (in Japanese). [Maher 87] M. J. Maher, Logic semantics for a class of committed-choice programs. In Proc. of the 4th Int. Conf. on Logic Programming, MIT Press, 1987. rMantheyBry 88] R. Manthey and F. Bry, SATCHMO: A Theorem Prover Implemented in Prolog. In Proc. of CADE-88, Argonne, Illi- [Saraswat 89] [SatohIwayama 92] K. Satoh and N. Iwayama, A Correct Top-down Proof Procedure for a General Logic Program with Integrity Constraints. In Proc. of the 3rd International Workshop on Extensions of Logic Programming, E. Lamma and P. Mello nois, 1988. [Matsumoto et al. 83] Yuji Matsumoto, H. Tanaka, H. Hirakawa, H. Miyoshi and H. Yasukawa, BUP: A Bottom-up Parser Embedded in Prolog, New Generation Computing, Vol. 1, 1983. [Morita et ai. 90] Y. Morita, H. Haniuda and K. Yokota, Object Identity in Quixote. Technical Report TR-601, ICOT, 1990. [MukaiYasukawa 85] K. Mukai, and H. Yasukawa, Complex Indeterminates in Prolog and its Application to Discourse Models. New Generation Computing, Vol. 3, No.4, 1985. [OhsugaSakai 91] A. Ohsuga and K. Sakai, Metis: A Term Rewriting System Generator. In Software Science and Engineering, 1. Nakata and M. Hagiya (eds.), World Scientific, 1991. [OkumuraMatsumoto 87] Akira Okumura and Yuji Matsumoto, Parallel Programming with V. Saraswat, Concurrent Constraint Programming Languages. PhD thesis, Carnegie-Mellon University, Computer Science Department, 1989. (eds.), Facalta di Ingegneria, Universita di Bologna, Italy, 1992. [SekiFurukawa 87] H. Seki and K. Furukawa, Notes on Transformation techniques for Generate and Test Logic Programs. In Proc. 1987 Symposium on Logic Programming, iEEE Computer Society Press, 1987. [Shapiro 83] E. Y. Shapiro, A Subset of Concurrent Prolog and Its Interpreter. Tech. Report TR-003, Institute for New Generation Computer Technology, Tokyo, 1983. [Sugimura' et al. 88] R. Sugimura, K. Hasida, K. Akasaka, K. Hatano, Y. Kubo, T. Okunishi, and T. Takizuka, A Software En,vironment for Research into Discourse Understanding Systems. In Proc. of the International Conf. on Fifth Generation Computing Systems 1988, Tokyo, 1988. [TakeuchiFu'rukawa 86] A. Takeuchi and K. Furukawa, Partial Evaluation of Prolog Programs 32 and Its Application to Meta Programming. In Proc. IFIP'86, North-Holland, 1986. [Taki 88] K. Taki, The Parallel Software Research and Development Tool: Multi-PSI system. In Programming of Future Genera- tion Computers, K. Fuchi and M. Nivat (eds.), North-Holland, 1988. [Taki 89] K. Taki, The FGCS Computing Architechlre. In Proc. IFIP'89, NorthHolland, 1989. [Tanaka Yoshioka 88] Y. Tanaka, and T. Yoshioka, Overview of the Dictionary and Lexical Knowledge Base Research. In Proc. FGCS'88, Tokyo, 1988. [Tsuda 92] H. Tsuda, cu-Prolog for Constraintbased Grammar. In Proc. of the International Conf. on Fifth Generation Computer Systems 1992, Tokyo, 1992. [Veda 86a] K. Veda, Guarded Horn Clauses. In Logic Programming '85, E. Wada (ed.), Lectl.,lre Notes in Computer Science, 221, Springer-Verlag, 1986. [Veda 86b] K. Veda, 1I1aking Exhaustive Search Programs Deterministic. In Proc. of the Third Int. Conf. on Logic Programming, Springer-Verlag, 1986. [VedaChikayama 90] K. Veda and T. Chikayama, Design of the J{ ernel Language for the Parallel Inference 1I1achine. The Computer Journal, Vol. 33, No.6, .pp. 494-500; 1990. [Warren 83] D. H. D. Warren, An Abstract Prolog Instruction Set. Technical Note 304, Artificial Intelligence Center, SRI, 1983. [YasukawaYokota 90] H. Yasukawa and K .. Yokota, Labeled Graphs as Semantics of Objects. Technical Report TR-600, ICOT, 1990. [Yokota 88a] K. Yokota, Deductive Approach for Nested Relations. In Programming of Future Generation Computers II, K. Fuchi and L. Kott (eds.), NorthHolland, 1988. [Yokota et al. 88b] K. Yokota, M. Kawamura and A. Kanaegami, Overview of the Knowledge Base Management System(KAPPA). In Pt.()c. of the International Conf. on Fifth Grmeration Computing Systems 1988, Tokyo, 1988. PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON FIFTH GENERATION COMPUTER SYSTEMS 1992, edited by ICOT. © ICOT, 1992 33 Summary of the Parallel Inference Machine and its Basic Software Shunichi Uchida Institute for New Generation Computer Technology 4-28, Mita 1-chome, Minato-ku, Tokyo 108, Japan uchida@icot.or.jp Abstract This paper aims at a concise introduction to the PIM and its basic software, including the overall framework of the project. Now an FGCS prototype system is under development. Its core is called a parallel inference system which includes a parallel inference machine, PIM, and its operating system, PIMOS. The PIM includes five hardware modules containing about 1,000 element processors in total. On the parallel inference system, there is a knowledge base management system (KBMS). The PIMOS and KBMS make a software layer called a basic software of the prototype system. These systems are already being run on the PIM. On these systems, a higher-level software layer is being developed. It is called a know ledge programming software. This is to be used as a tool for more powerful inference and know ledge processing. It contains language processors for constraint logic programming languages, parallel theorem provers and natural language processing systems. Several experimental application programs are also being developed for both general evaluation of the PIM and the exploration of new application fields for knowledge processing. These achievements with the PIM and its basic software easily surpass the research targets set up at the beginning of the project. 1 Introduction Since the fifth generation computer systems project (FGCS) was started in June, 1982, 10 years have passed, and the project is approaching its goal. This project assumed that "logic" was the theoretical backbone of future knowledge information processing, and adapted logic programming as the kernel programming language of fifth generation computer systems. In addition to the adaptation of logic programming, highly parallel processing for symbolic computation was considered indispensable for implementing practical knowledge information processing systems. Thus, the project aimed to create a new computer technology combining knowledge process- Knowledge and Symbol Processing Applications and Parallel Evaluation and Benchmark Programs Knowledge Processing ( Knowledge Programming System Kernel of FGCS l@@ij~1 !l/'iliarQl/'ilcQ IJIsll/'il~ ~<9 l}(i'Ilo'WIGd~GMS<9 11111111 Parallel OS and KBMS PIMOS iQllJIbtO~9 KII~~II-P Logic Programming Language ~11;;:11 Parallel Inference Machine PIM 1,000 PEs in total ( Multi-PSI System, 64 PEs) Technical Framework Prototype System of FGCS Figure 1: Framework of FGCS Project ing with parallel processing using logic programming. Now an FGCS prototype system is under development. This system integrates the major research achievements of these 10 years so that they can be evaluated and demonstrated. Its core is called a parallel inference system which includes a parallel inference machine, PIM, and its operating system, PIMOS. The PIM includes five hardware modules containing about 1,000 element processors in total. It also includes a language processor for a parallel logic language, KL 1. On the parallel inference system, there is a knowledge base management system (KBMS). The KBMS includes a database management system (DBMS), Kappa-P, as its lower layer. The KBMS provides a knowledge representation language, Quixote, 34 based on the deductive (and) object-oriented database. The PIMOS and KBMS make a software layer called a basic software of the prototype system. These systems are already being run on the PIM. The PIM and basic software are now being used as a new research platform for building experimental parallel application programs. They are the most complete of their kind in the world. On this platform, a higher-level software layer is being developed. This is to be used as a tool for more powerful inference and knowledge processing. It contains language processors for constraint logic programming languages, parallel theorem provers, natural language processing systems, and so on. These software systems all include the most advanced knowledge processing techniques, and are at the leading edge of advanced software SCIence. Several experimental application programs are also being developed for both general evaluation of the PIM and the exploration of new application fields for knowledge processing. These programs include a legal reasoning system, genetic information processing systems, and VLSI CAD systems. They are now operating on the parallel inference system, and indicate that parallel processing of knowledge processing applications is very effective in shortening processing time and in widening the scope of applications. However, they also indicate that more research should be made into parallel algorithms and load balancing methods for symbol and knowledge processing. These achievements with the PIM and its basic software easily surpass the research targets set up at the beginning of the project. This paper aims at a concise introduction to the PIM and its basic software, including the overall framework of the project. This project is the first Japanese national project that aimed at making a contribution to world computer science and the promotion of international collaboration. We have published our research achievements wherever possible, and distributed various programs from time to time. Through these activities, we have also been given much advice and help which was very valuable in helping us to attain our research targets. Thus, our achievements in the project are also the results of our collaboration with world researchers on logic programming, parallel processing and many related fields. 2 2.1 Research Targets and Plan Scope of R&D The general target of the project is the development of a new computer technology for knowledge information processing. Having "mathematical logic" as its theoretical backbone, various research and development themes were established on software and hardware technologies focusing on knowledge and symbol processing. These themes are grouped into the following three categories: 2.1.1 Parallel inference system The core portion of the project was the research and development of the parallel inference system which contains the PIM, a KL1language processor, and the PIMOS. To make the goal of the project clear, a FGCS prototype system was considered a major target. This was to be build by integrating many experimental hardware and software components developed ar0und logic programming. The prototype system was defined as a parallel inference system which is intended to have about 1,000 element processors and attain more than 100M LIPS (Logical Inference Per Second) as its execution speed. It was also intended to have a parallel operating system, PIMOS, as part of the basic software which provides us with an efficient parallel programming environment in which we can easily develop various parallel application programs for symbol and knowledge processing, and run them efficiently.- Thus, this is regarded as the development of a super computer for symbol and knowledge processing. It was intended that overall research and development activities would be concentrated so that the major research results could he integrated into a final prototype system, step by step, over the timespan allotted to the project. 2.1.2 KBMS and knowledge programming software Themes in this category aimed to develop a basic software technology and theory for knowledge processing. • Knowledge representation and knowledge base management • High-level problem solving and inference software • N aturallanguage processing software These research themes were intended to create new theories and software technologies based on mathematical logic to describe various knowledge fragments which are parts of "natural" knowledge bases produced in our social systems. We also intended to store them in a computer system as components of "artificial" knowledge bases so that they can be used to build various intelligent systems. To describe the knowledge fragments, a knowledge representation language has to be provided. It can be regarded as a very high-level programming language execu ted by a sophisticated inference mechanism which is much cleverer than the parallel inference system. Natural language processing research is intended to cover 35 lE~psrijm~rn~m~ #\p~~ij~~ij©)rn Sw~~~ms Parallel VLSI-CAD Systems Legal Reasoning System Genetic Information Processing Systems Other parallel expert systems ----..I_ _---IK...;.;,rn_©)_w~~~~ ~O'@oo~~ijrn~__ ( Natural Language ~@ifilwIlO'~ Processing System_-=s~ ~/~_ _--..;"'-- ~-~---...- Parallel OS, PIMOS KL 1 Programming Env. Parallel KBMS/DBMS Kappa-P + Quixote PIMIk PIM/c PIM/i PIM/m Figure 2: Organization of Prototype System research on knowledge representation methods and such inference mechanisms, in addition to research on easyto-use man-machine interface functions. Experimental software building for some of these research themes was done on the sequential inference machines because the level of research was so basic that computational power was not the major problem. 2.1.3 Benchmarking and evaluation systems • Benchmarking software for the parallel inference system • Experimental parallel application software To carry out research on an element technology in computer science, it is essential that an experimental software system is built. Typical example problems can then be used to evaluate theories or methods invented in the progress of the research. To establish general methods and technologies for knowledge processing, experimental systems should be developed for typical problems which need to process knowledge fragments as sets of rules and facts. These problems can be taken from engineering systems, including machine design and the diagnosis of machine malfunction, or from social systems such as medical care, government services, and company management. Generally, the exploitation of computer technology for knowledge processing is far behind that for scientific calculation. Recent expert systems and machine translation systems are examples of the most advanced knowledge processing systems. However, the numbers of rules and facts in their knowledge bases are several hundreds on average. This scale of knowledge base may not be large enough to evaluate the maximum power of parallel inference system having about 1,000 element processors. Thus, research and development on large-scale application systems is necessary not only for knowledge processing research but also for the evaluation of the parallel inference system. Such application systems should be widely looked for in many new fields. The scope of research and development in this project is very wide, however, the parallel inference system is central to the whole project. It is a very clear research target. Software research and development should also cover diverse areas in recent software technology. However, it has "logic" as the common backbone. It was also intended that major research achievements should be integrated into one prototype system. This has made it possible for us to organize all of our research and development in a coherent way. At the beginning of the project, only the parallel inference machine was defined as a target which was described very clearly. The other research targets described above were not planned at the 36 beginning of the project. They have been added in the middle of the intermediate stage or at the final stage. 2.2 Overall R&D plan After three years of study and discussions on determining our major research fields and targets, the final research and development plan was determined at the end of fiscal 1981 with the budget for the first fiscal year. At that time, practical logic programming languages had begun to be used in Europe mainly for natural language processing. The feasibility and potential of logic languages had not been recognized by many computer scientists. Thus, there was some concern that the level of language was too high to describe an operating system, and that the overhead of executing logic programs might be too large to use it for practical applications. This implies that research on logic programming was in its infancy. Research on parallel architectures linked with highlevel languages was also in its infancy. Research on dataflow architectures was the most advanced at that time. Some dataflow architecture was thought to have the potential for knowledge and symbol processing. However, its feasibility for practical applications had not yet been evaluated. Most of the element technologies necessary to build the core of the parallel inference system were still in their infancy. We then tried to define a detailed research plan step by step for the la-year project period. We divided the la-year period into three stages, and defined the research to be done in each stage as follows: • Initial stage (3 years) : -Research on potential element technologies -Development of research tools 3 3.1 Inference System in the Initial Stage Personal Sequential Inference Machine (PSI-I) To actually build the parallel inference system, especially a productive parallel programming environment which is now provided by PIMOS, we needed to develop various element technologies step by step to obtain hardware and software components. On the way toward this development, the most promising methods and technologies had to be selected from among many alternatives, followed by appropriate evaluation processes. To make this selection reliable and successful, we tried to build experimental systems which were as practical as possible. In the initial stage, to evaluate the descriptive power and execution speed of logic languages, a personal sequential machine, PSI, was developed. This was a logic programming workstation. This development was also aimed at obtaining a common research tool for software development. The PSI was intended to attain an execution speed similar to DEClO Prolog running on a DEC20 system, which was the fastest logic programming system in the world. To begin with, a PSI machine language, KLO, was designed based on Prolog. Then a hardware system was designed for the KLO. We employed tag architecture for the hardware system. Then we designed a system description language, ESP, which is a logic language having a class and inheritance mechanisms to make program modules efficiently.[Chikayama 1984] ESP was used not only to write the operating system for PSI, which is named SIMPOS, but also to write many experimental software systems for knowledge processing research. • Final stage (3 years) : -Second selection of major element technologies for final targets -Experimental building of a final full-scale system The development of the PSI machine and SIMPOS was successful. We were impressed by the very high software productivity of the logic language. The execution speed of the PSI was about 35K LIPS and exceeded its target. However, we realized that we could improve its architecture by using the optimization capability of a compiler more effectively. We produced about 100 PSI machines to distribute as a common research tool. This version of the PSI is called PSI-I. At the beginning of the project, we made a detailed research and development plan only for the initial stage. We decided to make detailed plans for the intermediate and final stages at the end of the stage before, so that the plans would reflect the achievements of the previous stage. The research budget and manpower were to be decided depending on the achievements. It was likely that the project would effectively be terminated at the end of the initial stage or the intermediate stage. In conjunction with the development of PSI-I and SIMPOS, research on parallel logic languages was actively pursued. In those days, pioneering efforts were being made on parallel logic languages such as P ARLOG and Concurrent Prolog. [Clark and Gregory 1984], [Shapiro 1983] We learned much from this pioneering research, and aimed to obtain a simpler language more suited for a machine language for a parallel inference machine. Near the end of the initial stage, a new parallel logic language, GHC was designed. [Ueda 1986] • Intermediate stage (4 years) -First selection of major element technologies for final targets -Experimental building of medium-scale systems 37 Table 1: Development of Inference Systems ~QJl@I1ilUDtSlO '82-'84 Initial Stage I( ~tSlI1'@lOO@O Inference Tech. Sequential Logic Programming Il Languages, 1}:{1b® and ~®~ Inference Tech. J J Machme, (parallel Logic Programming ( sequential_Inference PSI-I and SIMPOS, ~I}:{IbO~® f1®ij' ~Ib® • Languages ~1Xl~ and ~1.6 u I ............................................................................................... ·..··r......·....·..·..·..·. ·....··..··J·..··················..·..·................ ..... 1tR fa !'IIJM '85-'88 ( Inter- ;~ mediate Stage 1=j:lW) New model of PSI, PSI-II, ~®I}:{IbO~® f1®ij' 1}:{1b® :·. "~~r" ~i~;;~:::;~;:;·;; 3.2 Effect of PSI development on the research plan Efficiency in program production One of the important questions related to logic language was the feasibility of writing an operating system which needs to describe fine detailed control mechanisms. Another was its applicability to writing large-scale programs. SIMPOS development gave us answers to these questions. The SIMPOS has a multi-window-based user interface, and consists of more than 100,000 ESP program lines. It was completed by a team of about 20 software researchers and engineers over about two years. Most of the software engineers were not familiar with logic languages at that time. We found that logic languages have much higher productivity and maintainability than conventional von Neumann languages. This was obvious enough to convince us to describe a parallel operating system also in a logic language. 3.2.2 IWn ® I COOIP>~~ {J@)!l' ~Ib 'ij E Parallel OS, ~DIMl@® and Small Application Programs ! . ·. . ·.·.·. r. ···~~i~~;ii::~:=;··:~~···. .· . The experience gained in the development of PSI-I and SIMPOS heavily affected the planning of the intermediate stage. 3.2.1 """ Execution performance The PSI-I hardware and firmware attained about 35K LIPS. This execution speed was sufficient for most knowledge processing applications. The PSI had an 80 MB main memory. It was a. very big memory compared to mainframe computers at that time. We found that this large memory and fast execution speed made a logic language a practical and highly productive tool for software proto typing. The implementation of the PSI-I hardware required 11 printed circuit boards. As the amount of hardware became clear, we established that we could obtain an element processor for a parallel machine if we used VLSI chips for implementation. For the KLO language processor which was implemented in the firmware, we estimated that better optimization of object code made by the compiler would greatly improve execution speed. (Later, this optimization was made by introducing of the "WAM" code.[Warren 1983]) The PSI-I and SIMPOS proved that logic languages are a very practical and productive vehicle for complex knowledge processing applications. 4 Inference Systems in the Intermediate Stage 4.1 A parallel inference system 4.1.1 Conceptual design of KL1 and PIJYIOS The most important target in the intermediate stage was a parallel implementation of a KL1 language processor, and the development of a parallel operating system, PIMOS. The full version of GHC, was still too complex for the machine implementation. A simpler version, FGHC, was designed.[Chikayama and Kimura 1985] Finally, a practical parallel logic language, KL1, was designed based on FGHC. The KL1 is a parallel language classified as an 38 AND-parallel logic programming language. Its language processor includes an automatic memory management mechanism and a dataflow process synchronization mechanism. These mechanisms were considered essential for writing and compiling large parallel programs. The first problem was whether they could be implemented efficiently. The second problem was what kind of firmware and hardware support would be possible and effective. In addition to problems in implementing the KLI language processor, the design of PIMOS created several important problems. The role of PIMOS is different from that of conventional operating systems. PIMOS does not need to do primary process scheduling and memory management because these tasks are performed by the language processor. It still has to perform resource management for main memory and element processors, and control the execution of user programs. However, a much more difficult role was added. It must allow a user to divide a job into parallel processable processes and distribute them to many element processors. Processor loads must be well balanced to attain better execution performance. In knowledge and symbol processing applications, the dynamic structure of a program is not regular. It is difficult to estimate the dynamic program structure. It was desirable that PIMOS could offer some support for efficient job division and load balancing problems. These problems in the language processor and the operating system were very new, and had not been studied as practical software problems. To solve these problems, we realized that we must have appropriate parallel hardware as a platform to carry out practical software experiments using a trial and error. 4.1.2 PSI-II and Multi-PSI system In conjunction with the development of KLI and PIMOS, we needed to extend our research and develop new theories and software technologies for knowledge processing using logic programming. This research and development demanded improvement of PSI-I machines in such aspects as performance, memory size, cabinet size, disk capacity, and network connection. We decided to develop a smaller and higherperformance model of PSI, to be called PSI-II. This was intended to provide a better workstation for use as a common tool and also to obtain an element processor for the parallel hardware to be used as a platform for parallel software development. This hardware was called a multi-PSI system. It was regarded as a small-scale experimental version of the PIM. As many PSI-II machines were produced, we anticipated having very stable element processors for the multi-PSI system. The PSI-II used VLSI gate array chips for its CPU. The size of the cabinet was about one sixth that of PSI1. Its execution speed was 330K LIPS, about 10 times faster than that of PSI-I. This improvement was attained mainly through employment of the better compiler optimization technique and improvement of its machine architecture. The main memory size was also expanded to 320 MB so that prototyping of large applications could be done quickly. In the intermediate stage, many experimental systems were built on PSI-I and PSI-II systems for knowledge processing research. These included small-to-medium scale expert systems, a natural language discourse understanding system, constraint logic programming systems, a database management system, and so on. These systems were all implemented in the ESP language using about 300 PSI-II machines distributed to the researchers.. as their personal tools. The development of the multi-PSI system was completed in the spring of 1988. It consists of 64 element processors which are connected by an 8 by 8 mesh network. One element processor is contained in three printed circuit boards. Eight element processors are contained in one cabinet. Each element processor has an 80 MB main memory. Thus, a multi-PSI was to have about 5GB memories in total. This hardware was very stable, as we had expected. We produced 6 multi-PSI systems and distributed them to main research sites. 4.1.3 KLI language processor and PIMOS This was the first trial implementation of a distributed language processor of a parallel logic language, and a parallel operating system on real parallel hardware, used as a practical tool for parallel knowledge processing applications. The KLI distributed language processor was an integration of various complex functional modules such as a distributed garbage collector for loosely-coupled memories. The automatic process synchronization mechanism based on the dataflow model was also difficult to implement over the distributed element processors. Parts of these mechanisms had to be implemented combined with some PIMOS functions such as a dynamic on-demand loader for object program codes. Other important func-tions related to the implementation of the language processor were support functions like system debugging, system diagnostic, and system maintenance functions. In addition to these functions for the KLI language processor, many PIMOS functions for resource management and execution control had to be designed and implemented step by step, with repeated partial module building and evaluation. This partial module building and evaluation was done for core parts of the KLllanguage processor and PIMOS, using not only KLI but also ESP and C languages. An appropriate balance between the functions of the language processor and the functions of PIMOS was considered. The language processor was implemented in a PSI-II firmware for the first time. It worked as a pseudo parallel simulator of KLl, and was used as a PIMOS 39 400KlIPS (Sequential LP.L.:KLO) • Machine language: KLl-b • Max. 64PEs and two FEPs (PSI-II) connected to LAN • Architecture of PE: - Microprogram control (64 bits/word) - Machine cycle: 200ns, Reg.file: 64W - Cache: 4 KW, set associative/write-back - Data width: 40 bits/word - Memory capacity: 16MW (80MB) • Network: - 2-dimensional mesh - 5MB/s x 2 directions/ch with 2 FIFO buffers/ch - Packet routing control function Figure 3: Multi-PSI System: Main features and Appearance development tool. It was eventually extended and transported to the multi-PSI system. In the development of PIMOS, the first partial module building was done using the C language in a Unix environment. This system is a tiny subset of the KLI language processor and PIMOS, and is called the PIMOS Development Support System (PDSS). It is now distributed and used for educational purposes. The first version of PIMOS was released on the PSI-II with the KLI firmware language processor. This is called a pseudo multi-PSI system. It is currently used as a personal programming environment for KLI programs. With the KLI language processor fully implemented in firmware, one element processor or a PSI-II attained about 150 KLIPS for a KLI program. It is interesting to compare this speed with that for a sequential ESP program. As a PSI-II attains about 300 KLIPS for a sequential ESP program, the overhead for KLI caused by automatic process synchronization halves the execution speed. This overhead is compensated for by efficient parallel processing. A full-scale multi-PSI system of 64 element processors could attain 5 - 10 MLIPS. This speed was considered sufficient for the building of experimental software for symbol and knowledge processing applications. On this system, simple benchmarking programs and applications such as puzzle programs, a naturallanguage parser and a Go-game program were quickly developed. These programs and the multi-PSI system was demonstrated in FGCS'88.[Uchida et al. 1988] These proved that KLI and PIMOS could be used as a new platform for parallel software research. 4.2 4.2.1 Overall design of the parallel inference system Background of the design The first question related to the design of the parallel inference system was what kind of functions must be provided for modeling and programming complex problems, and for making them run on large-scale parallel hardware. When we started this project, research on parallel processing still tended to focus on hardware problems. The major research and development interest was in SIMD or MIMD type machines applied for picture processing or large-scale scientific calculations. Those applications were programmed in Fortran or C. Control of parallel execution of those programs, such as job division and load balancing, was performed by built-in programs or prepared subroutine libraries, and could not be done by ordinary users. Those machines excluded most of the applications which include irregular computations and require general parallel programming languages and environments. This tendency still continues. Among these parallel machines, some dataflow machines were exceptional and had the potential to have functional languages and their general parallel programming environment. We were confident that a general parallel programming 40 language and environment is indispensable for writing parallel programs for large-scale symbol and knowledge processing applications, and that they must provide such functions as follows: there were no prior examples, we could not make any reliable quantitative estimation of the overhead caused by these software systems. This implementation was therefore considered risky too. 1. An automatic memory management mechanism for distributed memories (parallel garbage collector) Finally, we decided not to make an element processor too complex , so that our hardware engineers could provide the software researchers with a large-scale hardware platform stable enough to make the largest-scale software experiments in the world. 2. An automatic process synchronization mechanism based on a dataflow scheme 3. Various support mechanisms for attaining the best job division and load balancing. The first two are to be embedded in the language processor. The last is to be provided in a parallel operating system. All of these answer the question of how to write parallel programs and map them on parallel machines. This mapping could be made fully automatic if we limited our applications to very regular calculations and processing. However, for the applications we intend, the mapping process, which includes job division and loadbalancing, should be done by programmers using the functions of the language processor and operating system. 4.2.2 A general parallel programming environment Above mechanisms for mapping should be implemented in the following three layers: 1. A parallel hardware system consisting of element processors and inter-connection network (PIM hardware) 2. A parallel language processor consisting of run-time routines, built-in functions, compilers and so on (KLI language processor) 3. A parallel operating system including a programming environment (PIMOS) At the beginning of the intermediate stage, we tried to determine the roles of the hardware, the language processor and the operating system. This was really the start of development. One idea was to aim at hardware with many functions and using high density VLSI technology, as described in early papers on dataflow machine research. It was a very challenging approach. However, we thought it too risky because changes to the logic circuits in VLSI chips would have a long turn-around time even if the rapid advance of VLSI technology was taken into account. Furthermore, we thought it would be difficult to run hundreds of sophisticated element processors for a few days to a few weeks without any hardware faults. Implementation of the language processor and the operating system was thought to be very difficult too. As However, we ~ried to add cost-effective hardware support for KLI to the element processor, in order to attain a higher execution speed. We employed tag architecture to support the autom:atic memory management mechanism as well as faster execution of KLI programs. The automatic synchronization mechanism was to be implemented in firmware. The supports for job division and load balancing were implemented partially by the firmware as primitives of the KLI language, but they were chiefly implemented by the operating system. In a programming environment of the operating system, we hoped to provide a semi-automatic load balancing mechanism as an ultimate research goal. PIMOS and KLI hide from users most of the architectural details of the element processors and network system of PIM hardware. A parallel prograII}. is modeled and programmed depending on a parallel model of an application problem and algorithms designed by a programmer. The programmer has great freedom in dividing programs because a KLI program is basically constructed from very fine-grain processes. As a second step, the programmer can decide the grouping of fine-grain processes in order to obtain an appropriate granularity as divided jobs, and then specify how to dispatch them to element processors using a special notation called "pragma". This two step approach in parallel programming makes it easy and productive. We decided to implement the memory management mechanism and the synchronization mechanism mainly in the firmware. The job division and load balancing mechanism was to be implemented in the software. We decided not to implement uncertain mechanisms in the hardware. The role of the hardware system was to provide a stable platform with enough element processors, execution speed, memory capacity, number of disks and so on. The demands made on the capacity of a cache and a main memory were much larger than those of a general purpose microprocessor of that time. The employment of tag architecture contributed to the simple implementation of the memory management mechanism and also increased the speed of KLI program execution. 41 R&D in the final stage 5 5.1 Planning of the final stage At the end of the intermediate stage, an experimental medium-scale parallel inference system consisting of the multi-PSI system, the KL1 language processor, and PIMOS was successfully completed. On this system, several small application programs were developed and run efficiently in parallel. This proved that symbol and knowledge processing problems had sufficient parallelism and could be written in KL1 efficiently. This success enabled us to enter the final stage. Based on research achievements and newly developed tools produced in the intermediate stage, we made a detailed plan for the final stage. One general target was to make a big jump from the hardware and software technologies for the multi-PSI system to the ones for the PIM, with hundreds of element processors. Another general target was to make a challenge for parallel processing of large and ·complex knowledge processing applications which had never been tackled anywhere in the world, using KL1 and the PIM. Through the research and development directed to these targets, we expected that a better parallel programming methodology would be established for logic programming. Furthermore, the development of large and complex application programs would not only encourage us to create new methods of building more intelligent systems systematically but could also be used as practical benchmarking programs for the parallel inference system. We intended to develop new techniques and methodologies. 1. Efficient parallel software technology (a) Parallel modeling and programming techniques -Parallel programming paradigms -Parallel algorithms (b) Efficient mapping techniques of parallel processes to parallel processors -Dynamic load balancing techniques - Performance debugging support 2. New methodologies to build intelligent systems using the power of the parallel inference system (a) Development of a higher-level reasoning or inference engine and higher-level programming languages (b) Methodologies for knowledge representation and knowledge base management (methodology for knowledge programming) The research and development themes in the final stage were set up as follows: 1. PIM hardware development We intended to build several models with different architectures so that we could compare mapping problems between the architectures and program models. The number of element processors for all the modules was planned about 1,000. 2. The KL1 language processor for the PIM modules We planned to develop new KLllanguage processors which took the architectural differences on the PIM modules into account. 3. Improvement and extension of PIMOS We intended to develop an object-oriented language, AYA, over KL1, a parallel file system, and extended performance debugging tools for its programming environment. 4. Parallel DBMS and KBMS We planned to develop a parallel and distributed database management system, using several disk drives connected to PIM element processors, was intended to attain high throughput and consequently a high information retrieval speed. As we had already developed a data base management system, Kappa-II, which employed a nested relational model on the PSI machine, we decided to implement a parallel version of Kappa- II. However, we redesiged its implementation, employing the distributed database model and using KL1. This parallel version is called Kappa-P. We plan to develop a knowledge base management system on the Kappa-P. This would be based on the deductive object-oriented DB, having a knowledge representation language, Quixote. 5. Research on knowledge programming software We intended to continue various basic research activities to develop new theories, methodologies and tools for building knowledge processing application systems. These activities were grouped together as research on knowledge programming software. This included research themes such as a parallel constraint logic programming language, mathematical systems including theorem provers, natural language processing systems such as a grammar design system, and an intelligent sentence generation system for man-machine interfacing. 6. Benchmarking and experimental parallel application systems To evaluate the parallel inference system and the various tools and methodologies developed in the above themes, we decided to make more effort to 42 explore new applications of parallel knowledge processing. We began research into a legal expert system, a genetic information processing systems and so on. 5.2 R&D results in the final stage The actual research activities into the themes described above differed according to characteristics. In the development of the parallel inference system, we focused on the integration of PIM hardware and some software components. In our research on knowledge programming software, we continued basic research and experimental software building to create new theories and develop parallel software technologies for the future. 5.2.1 PIM hardware and KLI language processor A role of the PIM hardware was to provide software researchers with an advanced platform which would allow large-scale software development for knowledge processing. Another role was to obtain various evaluation data in the architecture and hardware structure of the element processors and network systems. In particular, we wanted to analyze the performance of large-scale parallel programs on various architectures (machine instruction sets) and hardware structures, so that hardware engineers could design more powerful and cost-effective parallel hardware in the future. In the conceptual design of the PIM hardware, we realized that there were many alternative designs for the architecture of an element processor and the structure of a network system. For the architecture of an element processor, we could choose between a CISC type instruction set implemented in firmware and a RISC type instruction set. On the interconnection network, there were several opinions, including a two dimensional mesh network like the multi-PSI, a cross-bar switch, and a common bus and coherent cache. To design the best hardware, we needed to find out the mapping relationships between program behavior and the hardware architectures and structures. We had to establish criteria for the design of the parallel hardware, reflecting the algorithms and execution structures of application programs. To gather the basic data we needed to obtain this design criteria, we tried to categorize our design choices into five groups and build five PIM modules. The main features of these five modules are listed in Table 2. The number of element processor required for each module was determined depending on the main purpose of the module. Large modules have 256 to 512 element processors, and were intended to be used for software experiments. Small modules have 16 or 20 element processors and were built for architectural experiments and evaluation. All of these modules were designed to support KL1 and PIMOS, so that software researchers could run one program on the different modules and compare and analyze the behaviors of parallel program execution. A PIM/m module employed architecture similar to the multi-PSI system. Thus, its KL1 language processor could be developed by simply modifying and extending that of the multi-PSI system. For other modules, namely PIM/p, PIM/c, PIM/k, and PIM/i, the KL1 language processor had to be newly developed because all of these modules have a cluster structure. In a cluster, four to eight element processors were tightly coupled by a shared memory and a common bus with coherent caches. While communication between element processors is done through the common bus and shared memory, communication between clusters is done via a packet switching network. These four PIM modules have different machine instruction sets. We intended to avoid the duplication of development work for the KL11anguage processor. We used the KL1.C language to write PIMOS and the usual application programs. A KL1-C program is compiled into the KL1B language, which is similar to the "WAM" as shown in Figure 5. We defined an additional layer between the KL1-B language and the real machine- instruction. This layer is called the virtual hardware layer. It has a virtual machine instruction set called "PSL". The specification of the KL1-B interpreter is described in PSL. This specification is semi-automatically converted to a real interpreter or runtime routines dedicated to each PIM modules. The specification in PSL is called a virtual PIM processor (the VPIM processor for short) and is common to four PIM modules. PIM/p, PIM/m and PIM/c are intended to be used for large software experiments; the other modules were intended for architectural evaluations. We plan to produce a PIM/p with 512 element processors, and a PIM/m with 384 element processors. Now, at the beginning of March 1992, a PIM/m of 256 processors has just started to run a couple of benchmarking programs. We aimed at a processing speed of more than 100 MLIPS for the PIM modules. The PIM/m with 256 processors will attain more than 100 MLIPS as its peak performance. However, for a practical application program, this speed may be much reduced, depending on the characteristics of the application program and the programming technique. To obtain better performance, we must attempt to augment the effect of compiler optimization and to implement a better load balancing scheme. We plan to run various benchmarking programs and experimental application programs to evaluate the gain and loss of implemented hardware and software functions. 43 EXPERIMENTAL PARALLEL APPLICATIONS PROGRAMS • Parallel VLSI-CAD system • Legal inference system • Parallel Go playing system • Natural language analysis tool • Genetic information analysis tool Software group for functional demonstration and parallel application experiment . Parallel expert system - Logic design - Equipment diagnosis . Parallel software development support - Parallel algorithm - Intelligent programming environment . Constraint programming - Parallel constraint processing syste m (GDCC) . Automatic parallel theorem-proving system - MGTP prover • Discourse processing system - Contextual analysis - Language knowledge base • General-purpose Japanese language pr ocessing system • Paral~r natural language analysis experimental system . Parallel programming support - Visualization tool (ParaGragh) • Deduction/object-oriented DB - Knowledge representation language Quixote • Gene DB/KB application experiment I Figure 4: Research Themes in the Final Stage Table 2: Features of PIM modules Item PIMlp PIMlc PIMlm PIMJj PIM/k Machine instructions RISC-type + Horizontal microinstructions Horizontal microinstructions RISC-type RiSe-type ~roinstructions Target cycle time 60nsec 65nsec 50nsec 100 nsec 100 nsec LSI devices Standard cell Gate array Cell base Standard cell Custom Process Technology . (line width) .0.96 pm O.Spm O.Spm 1.2 pm 1.2 )1ITl Machine configuration Multicluster Multicluster connections (S PEs connections (S PEs linked to a shared + CC linked to a shared memory) rnemoryl;!'a hypercu network in a crossbar network Two-dimensional mesh network connections Shared memory Two-level parallel cache connections connections through a parallel cache Number of PEs connected 512 PEs 256 PEs 16 PEs 256 PEs 16 PEs 44 r- I Kll Program Compilation into an intennediate languge, KLI-U (similar to WAM of Prolog). ......... ~.~.1.~.~..~.~.~.~........ rnlCI"C are many transfonnation methods corresponding to hardware architectures. Runtime Libraries, ••• • •• • • Microprograms, or ........::.... Object Codes Transformation Specification of KL 1-8 Abstract Machine .................................... Real Hardware (PIM/p, PIM/m, PIM/c, PIM/i, PIM/k, Multi-PSI) Uirtual Hardware (Shared-memory Multiprocessors + Loosely-coupled Network) Figure 5: KLI Language Processor and VPIM Multiple Hypercube Network ,, , ,, ,, ,, , ,, ,, ,, ,, ,, ,, ,, I I ,,, , ,,, , ••• , ,,, ,, , II I Clustero -. ---------------- ----, Ouster{ I cfusteris • Machine language: KLl-b • Architecture of PE and cluster - RISC + HLlC(Microprogrammed) - Machine cycle: 60ns, Reg.file: 40bits x 32W - 4 stage pipeline for RISC inst. - Internal Inst. Mem: 50 bits x 8 KW - Cache: 64 KB, 256 column, 4 sets, 32B/block - Protocol: Write-back, Invalidation - Data width: 40 bits/word - Shared Memory capacity: 256 MB • Max. 512 PEs, 8 PE/cluster and 4 clusters/cabinet • Network: - Double hyper-cube (Max 6 dimensions) - Max. 20MB/sec in each link Figure 6: PIM model P: Main Features and Appearance of a Cabinet 45 • Machine language: KL1-b • Architecture of PE: - Microprogram control (64 bits/word x 32 KW) - Data width: 40 bits/word - Machine cycle: 60ns. Reg.file: 40 bits x 64W - 5 stage pipeline - Cache: 1 KW for Inst .. 4 KW for Data - Memory capacity: 16MW x 40 bits (80 MB) • Max. 256 PEs, 32 PE/cabinet • Network: - 2-dimensional mesh - 4.2MB/s x 2 directions/ch Figure 7: PIM model M: Main Features and Appearance of four Cabinets 5.2.2 Development of PIMOS PIMOS was intended to be a standard parallel operating system for large-scale parallel machines used in symbol and knowledge processing. It was designed as an independent, self-contained operating system with a programming environment suitable for KLl. Its functions for resource management and execution control of user programs were designed as independent from the architectural details of the PIM hardware. They were implemented based on an almost completely non-centralized management scheme so that the design could be applied to a parallel machine with one million element processors.[Chikayama 1992] PIMOS is completely written in KLl. Its management and control mechanisms are implemented using a "meta-call" primitive of KLl. The KL1 language processor has embedded an automatic memory management mechanism and a dataflow synchronization mechanism. The management and control mechanisms are then implemented over these two mechanisms. The resource management function is used to manage the memory resources and processor resources allocated to user processes and input and output devices. The program execution control function is used to start and stop user processes, control the order of execution following priorities given to them, and protect system programs from user program bugs like the usual sequential operat- ing systems. PIMOS supports multiple users, accesses via network and so on. It also has an efficient KL1 programming environment. This environment has some new tools for debugging parallel programs such as visualization programs which show a programmer the status of load balancing in graphical forms, and other monitoring and measurement programs. 5.2.3 Knowledge base management system The know ledge base management system consists of two layers. The lower layer is a parallel database management system, Kappa-P. Kappa-P is a database management system based on a nested relational model. It is more flexible than the usual relational database management system in processing data of irregular sizes and structures, such as natural language dictionaries and biological databases. The upper layer is a knowledge base management system based on a deductive object-oriented database. [Yokota and Nishio 1989] This provides us with a knowledge representation language, Quixote. [Yokota and Yasukawa 1992] These upper and lower layers are written in KL1 and are now operational on PIMOS. The development of the database layer, Kappa, was started at the beginning of the intermediate stage. 46 Kappa aimed to manage the "natural databases" accumulated in society, such as natural language dictionaries. It employed a nested relational model so that it could easily handle data sets with irregular record sizes and nested structures. Kappa is suitable not only for natural language dictionaries but also for DNA databases, rule databases such as legal data, contract conditions, and other "natural databases" produced in our social systems. The first and second versions of Kappa were developed on a PSI machine using the ESP language. The second version was completed at the end of the intermediate stage, and was called Kappa-II.[Yokota et al. 1988] In the final stage, a parallel and distributed implementation of Kappa was begun. It is written in KL1 and is called Kappa-P. Kappa-P is intended to use large PIM main memories for implementing the main memory database scheme, and to obtain very high throughput rate for disk input and output by using many disks connected in parallel to element processors. In conjunction with the development of Kappa-II and Kappa-P, research on a knowledge representation language and a know ledge base management system was conducted. After repeated experiments in design and implementation, a deductive object-oriented database was employed in this research. At this point the design of the knowledge representation language, Quixote, was completed. Its language processor, which is the knowledge base management system, is under development. This language processor is being built over Kappa-P. Using Quixote, construction of a knowledge base can then he made continuously from a simple database. This will start with the accumulation of passive fact data, then gradually add active rule data, and will finally become a complete knowledge base. The Quixote and Kappa-P system is a new knowledge base management system which has a high-level knowledge representation language and the parallel and distributed database management system as the base of the language processor. The first versions of Kappa-P and Quixote are now almost complete. It is interesting to see how this big system operates and how much its overhead will be. 5.2.4 Knowledge programming software This software consists of various experimental programs and tools built in theoretical research and development into some element technologies for knowledge processing. Most of these programs and tools are written in KLl. These could therefore be regarded as application programs for the parallel inference system. 1. Constraint logic programming system In the final stage, a parallel constraint logi~ programming language, GDCC, is being developed. This language is a high-level logic language which has a constraint solver as a part of its language processor. The language processor is implemented in KL1 and is intended to use parallel processing to make its execution time faster. The GDCC is evaluated by experimental application programs such as a prograIIi for designing a simple handling robot.[ Aiba and Hasegawa 1992] 2. Theorem proving and program transformation A model generation theorem prover, MGTP, is being implemented in KLl. For this application, the optimization of load balancing has been made successfully. The power of parallel processing is almost proportional to the number of element processors being used. This prover is being used as a rulebased reasoner for a legal reasoning system. It en-::' abIes this system to use knowledge representation based on first order logic, and to contribute to easy knowledge programming. 3. Naturallanguage processing Software tools and linguistic data bases are being developed for use in implementing natural language interfaces. The tools integrated into a library called a Language Tool Box (LTB). The LTB includes natural language parsers, a sentence generators, and the linguistic databases and dictionaries including syntactic rules and so on. 5.2.5 Benchmarking and experimental parallel application software This software includes benchmarking programs for the parallel inference system, and experimental parallel application programs which were built for developing parallel programming methodology, knowledge representation techniques, higher-level inference mechanisms and so on. In the final stage, we extended the application area to include larger-scale symbol and knowledge processing applications such as genetic information processing and legal expert systems. This was in addition to engineering applications such as VLSI-CAD systems and diagnostic systems for electronic equipment. [Nitta 1992] 1. VLSI CAD programs Several VLSI CAD programs are being developed for use in logic simulation, routing, and placement. This system is aimed at developing various parallel algorithms and load balancing methods. As there are sequential programS which have similar functions to these programs, we can compare the performance of the PIM against that of conventional machines. 47 2. Genetic information processing programs Sequence alignment programs for proteins and a protein folding simulation program are being developed. Research on an integrated database for biological data is also being made using Kappa. 3. A legal reasoning system This system infers possible judgments on a crime using legal rules and past cases histories. It uses the parallel theorem prover, MGTP, as a core of the rule- based reasoner. This system is making full use of important research results of this project, namely, the PIM, PIMOS, MGTP and high-level inference and knowledge representation techniques. 4. A Go game playing system The search space of a Go game is too large to apply any exhaustive search method. For a human player, there are many text books to show typical position sequences of putting stones which is called "Joseki" patterns. This system has s~me of the Joseki patterns and some heuristic rules as its knowledge base to win the game against a human player. It aims to attain 5 to 10 "kyuu" level. The applications we have described all employ symbol and knowledge processing. The parallel programs have been programmed in KLI in a short time. Particularly for the CAD and sequence alignment programs, the processing speed has improved almost proportionally to the number of element processors. However, as we can see in the Go playing system, which is a very sophisticated program, the power of the parallel inference system can not always increase its intelligence effectively. This implies that we cannot effectively transcribe "natural" knowledge bases written in text books .on Go into data or rules in "artificial" knowledge base of the system which would make the system " clever". We need to make more effort to find out a better program structure and better algorithms to make full use of the merit of parallel processing. 6 6.1 Evaluation of the parallel inference system General purpose parallel programming environment The practical problems in symbol and knowledge processing applications have been written efficiently in KLl, and solved quickly using a PIM which has several hundred element processors. Productivity of parallel software using in KLI has been proved to be much higher than in any conventional language. This high productivity is apparently a result of using the automatic memory management mechanism and the automatic dataflow synchronization mechanism. Our method of specifying job division and load balancing has been evaluated and proved successful. KLI programming takes a two-step approach. In the first step, a programmer writes a program concentrating only on the program algorithms and a model. When the program is completed, the programmer adds the specifications for job division and load balancing using a notation called "pragma" as the second step. This separation makes the programming work simple and productive. The specification of the KLllanguage has been evaluated as practical and adequate for researchers. However, we realize that application programmers need a simpler and higher-level KLI language specification which is a subset of KLI. In the future, several application-oriented KLI language specifications should be provided, just as the von Neumann language set has a variety of different languages such as Fotran, Pascal and Cobol. 6.2 Evaluation of KL1 and PIMOS The functions of PIMOS, some of which are implemented as KLI functions, have been proved to be effective for running and debugging user programs on parallel hardware. The resource management and execution mechanisms in particular work as we had expected. For instance, priority control of user processes permits programmers to use about 4,000 priority levels and enables them to write various search algorithms and speculative computations very easily. We are convinced that the KLI and PIMOS will be the best practical example for general purpose parallel operating systems in the future. 6.3 Evaluation of hardware support for language functions In designing of the PIM hardware and the KLllanguage processor, we thought it more important to provide a usable and stable platform which has a sufficient number of element processor for parallel software experiments than to build many dedicated functions into the element processor. Only the dedicated hardware support built in the element processor was tag architecture. Instead, we added more support for the interconnection between element processors such as message routing hardware and a coherent cache chip. We did not embed complex hardware support, such as a matching store of a dataflow machine, or a contentaddressable memory. We thought it risky because an implementation of the complex hardware would take a long turn around time even by a very advanced VLSI technology. We also considered that we should create a new optimization technique for a compiler dedicated to 48 the embedded complex hardware support, and that this would not easy too. The completion of PIM hardware is now one year behind the original schedule, mainly because we had many unexpected problems in the design of the random logic circuits, and in submicron chip fabrication. If we had employed a more complex design for the element processor, the PIM hardware would have been further from completion. 6.3.1 Comparison of PIM hardware with commercially available technology Rapid advances have been made in RISe processors recently. Furthermore, a few MIMD parallel machines which use a RISe processor as their element processor have started to appear in the market. When we began to design the PIM element processor, the performances of both RISe and elSe processors were as low as a few MIPS. At that time, a dedicated processor with tag architecture could attain a better performance. However, now some RISe processors have attained more than 50 MIPS. It is interesting to evaluate these RISe processors for KLI program execution speed. We usually compare the execution speed of a PIM element processor to that of a general-purpose microprocessor, regarding 1 LIPS as approximately equivalent to 100 IPS. This means that a 500 KLIPS PIM element processor should be comparable to a 50 MIPS microprocessor. However, the characteristics of KLI program execution are very different from those of the usual benchmark programs for general-purpose microprocessors. The locality of memory access patterns for practical KLI programs is lower than for standard programs. As the length of the object codes for a RISe instruction set has to be longer than a elSe or dedicated instruction set processors, the cache miss ratio will be greater. Then, simple comparison with the PIM element processor and some recent RISe chips using announced peak performance is not meaningful. Thus, the practical implementation of the KLllanguage processor on a typical RISe processor is necessary. Most of the MIMD machines currently on the market lack a general parallel programming environment. The porting of the KLI language processor may allow them to employ new scientific applications as well as symbol and knowledge processing applications. In the future processor design, we believe that a general purpose microprocessor should have tag architecture support as apart of its standard functions. 6.3.2 Evaluation of high-level programming overhead Parallel programming in KLI is very productive, especially for large-scale and complex problems. The control of job division and load balancing works well for hundreds of element processors. No conventional language is so productive. However, if we compare the processing speed of a KLI program with that of a conventional language program with similar functions within a single element processor, we find that the KLI overhead is not so small. This is a corrunon trade-off problem between high-level programming and low-level programming. One straightforward method of compensating is to provide a simple subroutine call mechanism to link e language programs to KLI programS. Another method is to improve the optimization techniques of compilers. This method is more elegant than the first. Further research on optimization technique should be undertaken. 7 Conclusion It is obvious that a general-purpose parallel programming langu,age and environment is indispensable for solving practical problems of knowledge and symbol processing. The straightforward extension of conventional von Neumann languages will not allow the use of hundreds of element processors except for regular scientific calculations. We anticipated the difficulties in efficient implementation of the automatic memory management and synchronization mechanisms. However, this has been now achieved. The productivity and maintainability of KLI is much higher than we expected. This more than compensates for the overhead in high-level language programming. Several experimental parallel application programs on the parallel inference system have proved that most large-scale knowledge processing applications contain potential parallelism. However, to make full use of this parallelism, we need to have more parallel algorithms and paradigms to actually program the applications. The research and development targets of this FGeS project have been achieved, especially as regards the parallel inference system. We plan to distribute the KLI language processor and PIMOS as free software or public domain software, expecting that they will be ported to many MlMD machines, and will provide a research platform for future knowledge processing technology. Acknowledgment The development of the FGeS prototype system was conducfed jointly by many people at lCOT, cooperating manufacturers, and many researchers in many countries. The author would like to express my gratitude to all the people who have given us much advise and help for more than 10 years. 49 References [Uchida 1987] S. Uchida. "Inference Machines in FGCS Project", TR 278, ICOT, 1987. [Uchida et al. 1988] S. Uchida, K. Taki, K. Nakajima, A. Goto and T. Chikayama, "Research and Development of The Parallel Inference System in The Intermediate Stage of The project", Proc. Int. Conf. on Fifth Generation Computer Systems, Tokyo, Nov.28-Dec.2, 1988. [Go to et al. 1988] A. Goto, M. Sato, K. Nakajima, K. Taki, and A. Matsumoto. " Overview of the Parallel Inference Machine Architecture (PIM)", In Proc. of the International Conference on Fifth Generation Computing Systems 1988, Tokyo, Japan, November 1988. [Taki 1992] K. Taki, "Parallel Inference Machine, PIM", Proc. Int. Conf. on Fifth Generation Computer Systems, Tokyo, Jul.1-5, 1992. [Chikayama 1984] T. Chikayama, "Unique Features of ESP", In Proc. Int. Conf. on Fifth Generation Computer Systems 1984, ICOT, 1984, pp. 292-298. on Fifth Generation Computer Systems 1988, ICOT, 1988, pp. 230-251. [Chikayama 1992] T. Chikayama, "Operating System PIMOS and Kernel Language KL1", Proc. Int. Conf. on Fifth Generation Computer Systems, Tokyo, Jul.15, 1992. [Uchida et al. 1988] S. Uchida, "The Research and Development of Natural Language Processing Systems in the Intermediate Stage of the FGCS Project", Proc. Int. Conf. on Fifth Generation Computer Systems, Tokyo, Nov.28-Dec.2, 1988. [Yokota et al. 1988] K. Yokota, M. Kawamura, and A. Kanaegami, "Overview of the Knowledge Base Management System (KAPPA)", Proc. Int. Conf. on Fifth Generation Computer Systems, Tokyo, Nov.28-Dec.2, 1988. [Yokota and Nishio 1989] K. Yokota and S. Nishio, "Towards Integration of Deductive Databases and ObjectOriented Databases-A Limited Survey", Proc. Advanced Database System Symposium, Kyoto, Dec., 1989. [Warren 1983] D.H.D. Warren, "An Abstract Prolog Instruction Set", Technical Note 309, Artificial Intelligence Center, SRI, 1983. [Yokota and Yasukawa 1992] K.Yokota and H. Yasukawa, "Towards an Integrated KnowledgeBase Management System", Proc. Int. Conf. on Fifth Generation Computer Systems, Tokyo, Jul.1-5, 1992. [Clark adn Gregory 1983] Keith L. Clark and Steve Gregory, "Parlog: A parallel logic programming language", Research Report TR-83-5, Imperial College, March 1983. [ Aiba and Hasegawa 1992] A. Aiba and R. Hasegawa, "Constraint Logic Programming System", Proc. Int. Conf. on Fifth Generation Computer Systems, Tokyo, Jul.1-5, 1992. [Clark and Gregory 1984] K. 1. Clark and S. Gregory, "Notes on Systems Programming in PARLOG", In Proc. Int. Conf. on Fifth Generation Computer Systems 1984, ICOT;'1984, pp. 299-306. [Nitta 1992] K. Nitta, K. Taki, and N. Ichiyoshi, "Development of Parallel Application Programs of the Parallel Inference Machine", Proc. Int. Conf. on Fifth Generation Computer Systems, Tokyo, Jul.1-5, 1992. [Shapiro 1983] E. Y. Shapiro, "A subset of Concurrent Prolog and Its Interpreter", TR 003, ICOT, 1987. [Ueda 1986] K. Ueda. Guarded Horn Clauses, "In Logic Programming", '85, E. Wada (ed.), Lecture Notes in Computer Science 221, Springer-Verlag, 1986, pp.168179. [Ueda 1986] K. Ueda, "Introduction to Guarded Horn Clauses", TR 209, ICOT, 1986-. [Chikayama and Kimura 1985] T. Chikayama and Y. Kimura, "Multiple Reference Management in Flat GHC", In Proc. Fourth Int. Conf. on Logic Programming, MIT Press, 1987, pp. 276-293. [Chikayama el al. 1988] T. Chikayama, H. Sato and T. Miyazaki, "Overview of the Parallel Inference Machine Operating System (PIMOS)" , In Proc. Int. Conf. PROCEEDINGS OF THE INTERNA nONAL CONFERENCE ON FIFTH GENERA nON COMPUTER SYSTEMS 1992, edited by ICOT. © ICOT, 1992 50 Parallel Inference Machine PIM Kazuo Taki First Research Laboratory Institute for New Generation Computer Technology 4-28, Mita l-chome, Minato-ku', Tokyo 108, JAPAN taki@icot.or.jp The parallel inference machine, PIM, is the prototype hardware system in the Fifth Generation Computer Systems (FGCS) project. The PIM system aims at establishing the basic technologies for large-scale parallel machine architecture, efficient kernel language implementation and many aspects of parallel software, that must be required for high performance knowledge information processing in the 21st century. The PIM system also supports an R&D environment for parallel software, which must extract the full power of the PIM hardware. The parallel inference machine PIM is a large-scale parallel machine with a distributed memory structure. The PIM is designed to execute a concurrent logic programming language very efficiently. The features of the concurrent logic language, its implementation, and the machine architecture are suitable not only for knowledge processing, but also for more general large problems that arise dynamic and non-uniform computation. Those problems have not been covered by commercial parallel machines and their software systems targeting scientific computation. The PIM system focuses on this new domain of parallel processing. There are two purposes to this paper. One is to report an overview of the research and development of the PIM hardware and its language system. The other is to clarify and itemize the features anp advantages of the language, its implementation and the hardware structure with the view that the features are strong and indispensable for efficient parallel processing of large problems with dynamic and non-uniform computation. 1 Introduction The Fifth Generation Computer Systems (FGCS) project aims at establishing basic software and hardware technologies that will be needed for high-performance knowledge information processing in the 21st century. The parallel inference machine PIM is the prototype hardware system and offers gigantic computation power ( Interfaces) Application Programs Abstract • I KL 1 Language == • PIMOS Protocol PIMOS f- KL 1 Parallel Implementation PIM Hardware • KL 1 Machine Language or Microprogram Figure 1: Overview of the PIM System to the knowledge information processing. The PIM system includes an efficient language implementation of KL1, which is the kernel language and a unique interface between hardware and software. Logic programming was chosen as the common basis of research and development for the project. The primary working hypothesis was as follows. "Many problems of future computing, such as execution efficiency (of parallel processing), descriptive power of languages, software productivity, etc., will be solved drammatically with the total reconstruction of those technologies based on logic programming. Following the working hypothesis, R&D on the PIM system started from scratch with the construction of hardware, a system software, a language system, application software and programming paradigms, all based on logic programming. Figure 1 gives an overview of the system structure. The kernel language KL1 was firstly designed for efficient· concurrent programming and parallel execution of knowledge processing prob.1ems. Then, R&D on the PIM hardware with distributed-memory MIMD architecture and the KLI language implementation on it were carried out, both aiming at efficient KLI execution in 51 parallel. A machine roughly with 1000 processors was primarily targeted. Each of these processors was to be a high-speed processor with hardware support for symbolic processing. The PIM system also focused on realizing a useful R&D environment for parallel software which could extract the real computing power of the PIM. The preparation of a good R&D environment was an important project policy. KL1 is a concurrent logic programming language primarily targeting knowledge processing. Since the language had to be a common basis for various types of knowledge processing, it became a general-purpose concurrent language suitable for symbolic processing, without shifting to a specific reasoning mechanism or a certain knowledge representation paradigm. Our R&D led to the language features of KL1 being very suitable for covering the dynamic and non-uniform large problems that are not covered by commercial parallel computers and their software systems for scientific computation. Most knowledge processing problems are included in the problem domain of dynamic and nonuniform computation. The PIM hardware and the KL1 language implementation support the efficiency of the language features. Thus, the PIM system covers this new domain of parallel processing. This paper focuses on two subjects. One is the R&D report of the PIM hardware and the KL1language implementation on it. The other is to clarify and itemize the features and advantages of the language, its implementation and the hardware structure with the view th?-t .the features are strong and indispensable for efficient parallel processing of large problems with dynamic and nonuniform computation. Any parallel processing system targeting this problem domain must consider those features. Section 2 scans the R&D history of parallel processing systems in the FGCS project, with explanation of some of the keywords. Section 3 characterizes the PIM system. Many advantageous features of the language, its parallel implementation and hardware structure are described with the view that the features are strong and indispensable for efficient programming and execution of the dynamic and non-uniform large problems. Section 4 presents the machine architecture of PIM. Five different models have been developed for both research use and actual software development. Some hardware specifications are also reported. Section 5 briefly describes the language implementation methods and techniques, to give a concrete image of several key features of the KL1 implementation. Section 6 reports some measurements and evaluation mainly focusing on a low-cost implementation of small-grain concurrent processes and remote synchronization, which support the advantageous features of KLl. Overall efficiency, as demonstrated by a few benchmark programs, is shown, including the most recent measurements on PIM/m. Then, section 7 con- cludes this paper. Several important research issues of parallel software are reported in other papers: the parallel operating system PIMOS is reported in [Chikayama 1992] and the load balancing techniques controlled by software are reported in [Nitta et al. 1992]. 2 R&D History This section shows the R&D history of parallel processing systems in the FGCS project. Important research items and products of the R&D are described briefly, with explanations of several keywords. There are related reports for further information [Uchida 1992] [Uchida et al. 1988]. 2.1 Start of the Mainstream of R&D Mainstream of R&D of the parallel processing systems started at the beginning of the intermediate stage of the FGCS project, in 1985. Just before that time, a concurrent logiclanguage GHC [Ueda 1986] had been designed, which was chosen as the kernel language of the R&D. Language features will be described in section 3.4. Development of small hardware and software systems was started based on the kernel language GHC as a hardware and software interface. The hardware system was used as a testbed of parallel software research. Experiences and evaluation results was fed back to the next R & D of larger hardware and software system, which was the bootstrapping of R fj D. It was started from development of the Multi-PSI [Taki 1988]. Purpose of the hardware development was not only the architectural research of a knowledge processing hardware, but also a preparation of a testbed for efficient language implementation of the kernel language. The Multi-PSI also focused to be a useful tool and environment of parallel software research and development. That is, the hardware was not just an experimental machine, but a reliable system being developed in short period, with measurements and debugging facilities for software development. After construction of the MultiPSI/VI and /V2 with language implementations, various parallel programs and technology and knowhow of parallel software have been accumulated [Nitta et al. 1992] [Chikayama 1992]. The systems have been used for the advanced software development environment for the parallel inference machines. 2.2 Multi-PSI/VI" The first hardware was the Multi-PSI/VI [Taki 1988] [Masuda et al. 1988], started in operation in spring 1986. The personal sequential inference machine PSI [Taki et al. 1984] was used for processing elements. It was a development result of the initial stage of the 52 project. Six PSI machines were connected by a mesh network, which supported so called wormhole routing. The first distributed implementation of GHC was built on it [Ichiyoshi et al. 1987]. (Distributed implementation means a parallel implementation on a distributed memory hardware). Execution speed was slow (IK LIPS = logical inference per second) because an interpreter system was written in ESP (the system description language of the PSI). However, basic algorithms and techniques of distributed implementation of GHC was investigated in it. Several small parallel programs were written and executed on it for evaluation, and primary experimentations of load balancing were also carried out. 2.3 From GHC To KLl Since GHC had only basic functions that the kernel concurrent logic language had to support, language extensions were needed for the next more practical system. Kernel language KLI was designed with considerations of execution efficiency, operating system supports, and some built-in functions [Ueda and Chikayama 1990] [Chikayama 1992]. An intermediate language KLI-B, which was the target language of KLI compiler, was also designed [Kimura and Chikayama 1987]. In the MultiPSI/V2 and a PIM model, binary code of KLI-B is directly interpreted by microprogram; that is, KLI-B is machine language itself. In the other PIM models, KLlB code is converted to lower-level machine instruction sequences and executed by hardware. 2.4 Multi-PSI/V2 The second hardware system was the Multi-PSI/V2 [Takeda et al. 1988] [Nakajima 1992]' which was improved in performance and functions enough to be called as the first experimental parallel inference machine. It started in operation in 1988 and was demonstrated in the FGCS '88 international conference. The Multi-PSI/V2 included 64 processors, each of which were equivalent to the CPU of PSIII [Nakashima and Nakajima 1987], smaller and faster model of the PSI. Processors were connected with two dimensional mesh network with improved speed (lOM Bytes/s, full duplex in each channel). KLI-B was the machine language of the system, executed by microprogram. Almost all the runtime functions of KLI was implemented in microprogram. The KLI implementation was improved much in execution efficiency, reducing inter-processor communication messages, efficient garbage collections, etc. compared with Multi-PSI/VI. lt attained 130K LIPS (in KLI append) in single processor speed. Table 1 to 4 include specifications of the Multi-PSI/V2. Since 1988, more than 15 systems, large system with 64 processors and small with 32 or 16 processors, have been in operation for parallel software R & D in ICOT and in cooperating companies. A strong simulator of the Multi-PSI/V2 was also developed for software development environment. It was called the pseudo Multi-PSI, available on the Prolog workstation, PSI-II. A very special feature was caused by similarity of the PSI-II CPU and processing element of the Multi-PSI/V2. Usually, PSI-II executed ESP language with dedicated microprogram. However, it loaded KLI microprogram dynamically at the activation of the simulator system. The simulator executed KLI programs as similar speed as that of the Multi-PSI/V2 single processor. Since the PIMOS could be also executed on the simulator, programmers could use the simulator as sim: ilar environment as the real Multi-PSI/V2, except for speedup with multiple processors and process scheduling. The pseudo Multi-PSI was the valuable system for initial debugging of KL1 programs. 2.5 Software Oevelopment Multi-PSI/V2 on the Parallel operating system PIMOS (the first version) and four small application programs (benchmark programs) [Ichiyoshi 1989] had been developed until FGCS'88. Much efforts was paid in PIMOS development to realize a good environment of programming, debugging, execution and measurements of parallel programs. In the development of small application programs, several important research topics of parallel software were investigated, such as concurrent algorithms with large concurrency without increase of complexity, programming paradigms and techniques of efficient KLI programs, and dynamic and static load balancing schemes for dynamic and non-uniform computation. The PIMOS has been improved in several versions, and ported to the PIM until 1992. The small application programs, pentomino [Furuichi et al. 1990], bestpath [Wada and Ichiyoshi 1990], PAX (natural language parser) and tsume-go (a board game) were improved, measured and analyzed until 1989. They are still used as test and benchmark programs on the PIM. These development gave observations that the KLI system on the Multi-PSI/V2 with PIMOS has reached sufficient performance level for practical usage, and has realized sufficient functions for describing complex concurrent programs and for experimentations of softwarecontrolled load balancing. Several large-scale parallel application programs have been developed from late 1989 [Nitta et al. 1992] and still continuing. Some of them have been ported to the PIM. 53 2.6 Parallel Inference Machine PIM 2.6.1 Five PIM Models Design of the parallel inference machine PIM was started in concurrent with manufacturing of the Multi-PSI/V2. Some research items in hardware architecture were omitted in the development of the Multi-PSI/V2, because of short development time needed for starting the parallel software development. So, PIM took a greedy R&D plan, focusing both the architectural research and realization of software development environment. The first trial to the novel architecture was the multiple clusters. A small number of tightly-coupled processors with shared-memory formed a cluster. Many clusters were connected with high speed network to construct the PIM system with several hundred processors. Benefits of the architecture will be discussed in section 3.7. Many component technologies had to be developed or improved to realize the new system, such as parallel cache memory suitable for frequent inter-processor communications, high speed processors for symbolic processing, improvement of the network, etc. For R&D of better component technologies and their combinations, the development plan of five PIM models was made, so that different component architecture and their combinations could be investigated with assigning independent research topics or roll on each model. Two models, PIM/p [Kumon et al. 1992] and PIM/ c [Nakagawa et al. 1992], took the multi-cluster structure. They include several hundreds processors, maximum 512 in PIM/p and 256 in PIM/ c. They were developed both for the architectural research and software R&D. Each investigated different network architecture and processor structure. The other two models, PIM/k [Sakai et al. 1991] and PIM/i [Sato et al. 1992], were developed for the experimental use of intra-cluster architecture. Two-layered coherent cache memory which enabled larger number of processors in a cluster, broadcast-typed coherent cache memory, and a processor with 1IW-type instruction set were tested. The other model, PIM/m [Nakashima et al. 1992], did not take the multi-cluster structure, but focused the rigid compatibility with the Multi-PSI/V2, having improved processor speed and larger number of processors. The maximum number of processors will be 256. The performance of a processor will be four to five times larger at peek speed, and 1.5 to 2.5 times larger in average than the Multi-PSI/V2. The processor was similar to the CPU of PSI- UX, the most recent version of the PSI machine. A simulator, pseudo-PIM/m, was also prepared like the pseudo Multi-PSI. The PIM/m targeted the parallel software development machine mostly among the models. Architecture and specifications of each model will be reported in section 4. Experimental implementations of some 1SIs of these models have started in 1989. The final design was almost fixed in 1990, and manufacturing of whole system was proceeded with in 1991. From 1991 to spring 1992, assembly and test of the five models have carried on. 2.6.2 Software Compatibility K11 language is common among all the five PIM models. Except for execution efficiency, any K11 programs including PIMOS can run on the all models. Hardware architecture is different between two groups, Multi-PSI and PIM/m as the one, and the other PIM models as the other. However, from programmers' view, abstract architecture are designed similar as follows. The load allocation to processors are fully controlled by programs on the Multi-PSI and the PIM/m. It is sometimes written by programmers directly, and sometimes specified by load allocation libraries. Programmers are often researchers of load balancing techniques. On the other hand, load balancing in a cluster is completely controlled by the K11 runtime system (not by KL1 programs) among the PIM models with the multi-cluster structure. That is, programmers does not have to think of multiple processors in a cluster, but specify load allocation· to each cluster in their programs. It means that a processor of the Multi-PSI or PIM/m corresponds to a cluster of the PIM models with the multi-cluster structure, which simplifies portation of KL1 programs. 2.7 KLI Implementation for PIM KL1 system must be the first regular system in the world which can execute large-scale parallel symbolic processing programs very efficiently. Execution mechanisms or algorithms of KL1 language had been developed for distributed memory architectures sufficiently on the MultiPSI/V2. Some mechanisms and algorithms should be expanded for the multi-cluster architecture of PIM. Ease of porting the KL1 system to four different PIM models was also considered in the language implementation method. Only the PIM/m inherited the KL1 implementation method directly from the Multi-PSI/V2. To expand the execution mechanisms or algorithms suitable for the multi-cluster architecture, several technical topics were focused, such as avoiding data update contentions among processors in a cluster, automatic load balancing in a cluster, expansion of an intercluster message protocol applicable for the message outstripping, parallel garbage collection in a cluster, etc. [Hirata et al. 1992]. For easiness of porting the KL1 system to four different PIM models, a common specification of K11 system "VPIM (virtual PIM)" was written in "C" -like description language "PSL", targeting a common virtual hardware. VPIM was the executable specification of KL1 execution algorithms, which was translated to C language and executed to examine the algorithms. VPIM has been 54 translated to lower-level machine languages or microprograms automatically or by hands according to each PIM structure. Preparation of the description language started in 1988. Study of efficient execution mechanisms and algorithms continued until 1991, then, VPIM was completed. Porting the VPIM to four PIM models partially started in autumn 1990, and continued to spring 1992. Now, the KL1 system with PIMOS is available on each PIM model. On the other hand, KL1 system on the PIM/m, which was implemented in microprogram, was made from conversion of Multi-PSI/V2 microprogram by hands or partially in automatic translation. Prior to the other PIM models, PIM/m started in operati6n with the KL1 system and PIMOS in summer 1991. 2.8 Performance and System Evaluation Measurements, analysis, and evaluation should be done on various levels of the system shown below. 1. Hardware architecture and implementations 2. Execution mechanisms or algorithms of KL1 implementation 3. Concurrent algorithms of applications (algorithms for problem solving, independent from mapping) and their implementations 4. Mapping (load allocation) algorithms 5. Total system performance of a certain application program on a certain system Various works have been done on the Multi-PSI/V2. and 2 were reported in [Masuda et al. 1988] and [Nakajima 1992]. 3 to 5 were reported in [Nitta et al. 1992], [Furuichi et al. 1990], [Ichiyoshi 1989] and [Wada and Ichiyoshi 1990]. Primary measurements have just started on each PIM models. Some intermediate results are included in [Nakashima et al. 1992] and [Kumon et at. 1992]. Total evaluation of the PIM system will be done in the near future, however, some observations and discussions are included in section 6. 3 Characterizing the PIM and KLI system PIM and KL1 system have many advantageous features for very efficient parallel execution of large-scale knowledge processing which often shows very dynamic runtime characteristics and non-uniform computation, much different from numerical applications on vector processors and SIMD machines. This section clarifies the characteristics of the targeted problem domain shortly, and describes the various advantageous features of PIM and KL1 system, that are dedicated for the efficient programming and processing in the problem domain. They will give the total system image and help to clarify the difference and similarity of the system with other large-scale multiprocessors, recently available in the market. 3.1 Summary of Features The total image of PIM and KL1 system are briefly scanned as follows. Detailed features and their benefits, and reasons why they were chosen are presented in the following sections. Distributed memory MIMD machine: Global structure of the PIM is the distributed memory MIMD machine in which hundreds computation nodes are connected by highspeed network. Scalability and ease of implementations are focused. Each computation node includes single processor or several tightly-coupled processors, and large memory. Processors are dedicated for efficient symbolic proc cessing. Logic programming language: The kernel language KL1 is a concurrent logic programming language, which is single language for system and application descriptions. Language implementation and hardware design are based on the language specification. KL1 is not a high-level knowledge representation language nor a language for certain type of reasoning, but a general-purpose language for concurrent and parallel programming, especially suitable for symbolic computations. KL1 has many beneficial features to write parallel programs in those application domains, described below. Application domain: Primary applications are largescale knowledge processing and symbolic computation. However, large numerical computation with dynamic features, or with non-uniform data and non-uniform computation (non-data-parallel computation) are also targeted. Language implementation: One KL1 system is implemented on a distributed memory hardware, which is not a collection of many KL1 systems implemented on each processing node. A global name space is supported for code, logical variables, etc. Communication messages between computation nodes are handled implicitly in KL1 system, not by KL1 programs. An efficient implementation for small-grain concurrent processes is taken. 55 becomes small, large directory memory is needed, which increases the hardware cost. These implementations focus to realize the beneficial features of KL1 language for the application domains described before. Single assignment languages need special memory management such as dynamic memory allocation and garbage collection. These management should be done as locally as possible for the sake of efficiency. Local garbage collection requires separation of local and global address spaces with some indirect referencing mechanism or address translation, even in a scalable shared memory architecture. Merits of the low-cost communication in the shared memory architecture decrease significantly for such the case. Policy of load balancing: Load balancing between computation nodes should be controlled by KL1 programs, not by hardware nor by the language system automatically. Language system has to support enough functions and efficiency for the experiments of various loadbalancing schemes with software. 3.2 Basic Choices These are the reasons to choose the distributed memory structure. (1) Logic programming: The first choice was to adopt logic programming as the basis of the kernel language. The decision is mainly due to the insights of ICOT founders, who expected that logic programming was suitable for both knowledge processing and parallel processing. A history, from vague expectations on logic programming to the concrete design of the KL1 language, is explained in [Chikayama 1992]. (2) Middle-out approach: A middle-out approach of R&D was taken, placing the KL1 language as the central layer. Based on the language specification, design of the hardware and the language implementation started downward, and writing the PIMOS operating system and parallel" software started upward. (3) MIMD machine: The other choices concerned with basic hardware architecture. Dataflow architecture before mid 1980 was considered not providing enough performance against hardware costs, according to observations for research results in initial stage of the project. SIMD architecture seemed inefficient on applications with dynamic characteristics or low dataparallelism that are often seen in knowledge processing. MIMD architecture remained without major demerits and was most attractive from the viewpoint of ease of implementation with standard components. (4) Distributed memory structure: Distributed memory structure is suitable to construct very large system, and easy to implement. Recent large-scale shared memory machines with directory- based cache coherency mechanisms claims good scalability. However, when the block size (the coherency management unit) is large, the interprocessor communication with frequent small data transfer seems inefficient. KL1 programs require the frequent small data transfer. When the block size 3.3 Characterizing the Applications (1) Characterization: Characteristics of knowledge processing and symbolic computation are often much different from those of numerical computation on vector processors and SIMD machines. Problem formalizations for those machines usually based on data-parallelism, parallelism for regular computation on uniform data. However, the characteristics of knowledge and symbolic computations on parallel machines tend to be very dynamic and non-uniform. Contents and amount of computation vary dynamically depending on time and space. For example, when a heuristic search problem is mapped on a parallel machine, workload of each computation node changes drastically depending on expansion and pruning of the search tree. Also, when a knowledge processing system is constructed from many heterogeneous 0 bjects, each object arises non-uniform computation. Computation loads of these problems are hardly estimated before execution. Some classes of large numerical computation without data-parallelism also show the dynamic and non-uniform characteristics. Those problems which has dynamism and nonuniformity of computation are called the dynamic and non-uniform problems in this paper, implying not only the know ledge processing and symbolic computation but also the large numerical computation without data-parallelism. The dynamic and non-uniform problems tends to include the programs with more complex program structure than the dat-a-parallel problems. (2) Requirements for the system: Most of the software systems on recent commercial MIMD machines with hundreds of processors target the dataparallel computation, but they almost don't care other paradigms. 56 The dynamic and non-uniform problems arise new requirements mainly on software systems and a few on hardware systems, which are listed below. 1. Descriptive power for complex concurrent programs 2. Easy to remove bugs 3. Ease of dynamic load balancing 4. Flexibility for changing the load allocation and scheduling schemes to cope with difficulty on estimating actual computation loads before execution 3.4 Characterizing the Language This subsection itemizes several advantageous features of 1\.L1 that satisfy the requirements listed in the previous section. Features and characteristics of the concurrent logic programming language 1\.L1 are described in detail in [Chikayama 1992]. The first three features have been in GRC, the basic specifications of 1\.L1. These features make descriptive power of the language large enough to write complex concurrent programs. They are the features of concurrent programming to describe logical concurrency, independent from mapping to actual processors. (load allocation) and scheduling. They are the features for parallel programming to control actual parallelism among processing nodes. (5) is prepared for operating system supports. (6) is for the effici~ncy of practical programs. (4) Pragma: Pragma is a notation to specify goal allocation to processing nodes or specify execution priority of goals. Pragma doesn't affect the semantics of a program, but controls parallelism and efficiency of actual parallel execution. Pragmas are usually attached to goals after making sure that the program is correct anyway. It can be changed very easily_ because it is syntactically separated from the correctness aspect of a program. Pragma for load allocation: Goal allocation is specified with a pragma, @node(X). X can be calculated in programs. Coupled with (1) and (2), the load allocation pragma can realize very flexible load allocation. Also coupled with (3) and the pragma, 1\.L 1 can describe a dynamic load balancing program within a framework of the pure logic programming language without side-effect. Dynamic load balancing programs are hard to be written in pure functional languages without indeterminacy. (1) Dataflow synchronization: Communication and synchronization between 1\.L1 processes are performed implicitly at all within a framework of usual unification. It is based on the dataflow model. Implicitness is available even in a remote synchronization. The feature drastically reduces bugs of synchronization and communication compared with the case of explicit description using separate primitives. The single-assignment property of logic variables supports the feature. (2) Small-grain concurrent processes: The unit of concurrent execution in 1\.L1 is each body goal of clauses, which can be regarded as a process invocation. 1\.L1 programs can thus involve a large a~ount of concurrency implicitly. (3) Indeterminacy: A goal (or process) can test and wait for the instantiation of multiple variables concurrently. The first instantiation resumes the goal execution, and when a clause is committed (selected from clauses that succeed to execute guard goals), the other wait conditions are thrown away. This function is valuable to describe "non-rigid" processing within a framework of side-effect free language. Speculative computation can be dealt with, and dynamic load distribution can be also written. The next features have been included in 1\.L1 as extensions to GRC. (4) was introduced to describe mapping Pragma for execution priority: Execution priority is specified with a pragma, @priority(Y). More than thousands priority levels are supported to control goal scheduling in detail, without rigid ordering. Combination of (3) and the priority pragma realizes the efficient control of speculative computations. Large number of priority levels can be utilized in e.g. parallel heuristic search to expand good branch of the search tree at first. (5) Shoen function (meta-control for goal group) : The shoen function is designed to handle a set of goals as a task, a unit of execution and resource management. It is mainly used in PIMOS. Start, stop and abortion of tasks can be controlled. Limit of resource consumption can be specified. When errors or exception conditions occur, the status are frozen and reported outside the shoen. (6) Functions for efficiency: 1\.L1 has several builtin functions or data types whose semantics is understood within the framework of GRC but which has been provided for the sake of efficiency. Those functions hide demerits of side-effect free languages, and also avoid an increase of computational complexity compared with sequeontial programs. 57 3.5 Characterizing the Language Implementation Language features, just described in the previous section, satisfy the requirements for a system by the dynamic and non-umform problems discussed in section 3.3. Most of special features of the language implementation focused to enlarge those advantageous features of KLI language. (1) Implicit communication: Communication and synchronization among concurrent processes are implicitly done by unifications on shared logical variables. They are supported both in a computation node and between nodes. It is especially beneficial that a remote synchronization is done implicitly as well as local. A process (goal) can migrate between computation nodes only being attached a pragma, @node(X). When the process has reference pointers, remote references are generated implicitly between the computation nodes. The remote references are used for the remote synchronizations or communications. These functions hide the distributed memory hardware from the "concurrent programming". That is, programmers can design concurrent processes and their communications, independent from their allocations to a same computation node or different nodes. Only the "parallel programming" with pragmas, a design of load allocation and scheduling, has to concern with hardware structure and network topology. Implementation features of those functions are summarized below, including the features for efficiency. • Global name space on a distributed memory hardware - in which implicit pointer management among computation nodes are supported for logical variables, structured data and program code • Implicit data transfer caused by unifications and goal (process) migration • Implicit message sending and receiving invoked with data transfer and goal sending, including message composition and decomposition • Message protocols able to reduce the number of messages, and also protocols applicable to message outstripping (2) Small-grain concurrent processes: Efficient implementation of small-grain concurrent processes are realized, coupled with low-cost communications and synchronizations among them. Process scheduling with low-cost suspension and resumption, and priority management are supported. Efficient implementation allows actual use of a lot of small-grain processes to realize large concurrency. A large number of processes also gives flexibility for the mapping and load balancing. Automatic load balancing in a cluster is also supported. It is a process (goal) scheduling function in a cluster implemented with priority management. The feature hides multiprocessors in a cluster from programmers. They do not have to think about load allocation in a cluster, but only have to prepare enough concurrency. (3) Memory management: These garbage collection mechanisms are supported. • Combination of incremental garbage collection with subset of reference counting and stop-andcollect copying garbage collection • Incremental releasing of remote reference pointers between computation nodes with weighted reference counting scheme Dynamic memory management including garbage collections looks essential both for symbolic processing and for parallel processii.g of the dynamic and non-uniform problems. Because the single assignment feature, strongly needed for the problems, requires dynamic memory allocation and reclamation. Efficiency of garbage collectors is one of key features for practical language system of parallel symbolic processing. (4) Implementation of shoen function: Shoen represents a group of goals (processes) as presented in the previous subsection. Shoen mechanism is implemented not only in a computation node but also among nodes. Namely, processes in a task can be distributed among computation nodes, and still controlled all together with shoen functions. (5) Built-in functions for efficiency: Several builtin functions and data types are implemented to keep up with the efficiency of sequential languages. (6) Including as kernel functions: Figure 2 shows the relation of KLI implementat.ion and operating system functions. KLI implementation includes so called OS kernel functions such as memory management, process management and scheduling, communication and synchronization, virtual single name space, message composition and decomposition, etc. While, PIMOS includes upper OS functions like programming environment and user interface. The reason why the OS kernel functions are included in the KLI implementation is that the implementation needs to use those functions with as light cost as possible. Cost of those functions affect the actual 58 Application Programs I PIMOS = KL 1 Language == ~ KL 1 Parallel Implementation :--OS-K~-r~el--: ~ :L _______________ Functions : I PIM Hardware - Load distribution libraries, etc. - Utility programs ( ego shell ) - Programming environment ( ego complier, tracer, performance analizer ) - Program code management - User task management - Resource management (eg. 10 resources) - Memory management - Process management - Communication, synchronization, and scheduling Single name space on a distributed memory system - Network message composition and decomposition Figure 2: KLI Implementation and OS Functions execution efficiency of the advantageous features of KLI language, such as large number of small-grain concurrent processes, implicit synchronization and communication among them (even between remote processes), indeterminacy, scheduling control with large number of priority levels, process migration specified with pragmas, etc. Those features are indispensable for concurrent and parallel programming and efficient parallel execution of large-scale symbolic computation with dynamic characteristics, or large-scale non-data-parallel numerical computations. Considering a construction of ,similar purpose parallel processing system on a standard operating system, interface level to the OS kernel may be too high (or may arise too much overhead). Some reconstruction of OS implementation layers might be needed for the standard parallel operating systems for those large-scale computation with dynamic characteristics. 3.6 Policy of Load Balancing Such o[l = a]/[l = a] 2.3 Program and Database A module concept is introduced in order to classify knowledge and handle (local) inconsistencies. Let m be a module identifier (mid) (syntactically the same as an o-term) and a be an a-term, then m: a is a proposition, which means that m supports a. Given a mid m, an a-term a, and propositions PI,··· ,Pn, a rule is defined as follows: m :: a ¢= Pb ... ,Pn. which means that a module with a mid m has a rule such that if PI,··· ,Pn hold, a holds in a module with a mid m. If a mid is omitted in Pi, m is taken as the default and if m is omitted, the rule is held in all modules. a is called a head and PI,··· ,Pn is called a body. As an a- term can be separated into an 0- term and a set of constraints, the rule can be rewritten as follows: where a ~ oIICH, Pi ~ mi : oilCi , and C B = C1 U ... U Cn. CH is a head constraint and CB is a body constraint. Their domain is a set of labeled graphs. Note that constraints by a-terms in a body can be included in CB. Compared with conventional constraint logic programming, a head constraint is new. A module is defined as a set of rules with the same mid. We define the acyclic relation among modules, a submodule relation. This. works for rule i';heritance as follows: ml ~s m2 where intrinsic attributes are out of inheritance. According to the rule, we can get the following: 01 ~ 02, 02 I I{02· l ~ a} ===> od I{01·l ~ 01 ~ 02, od I{01. l ~ a} ===> 02 I I{02.1 ~ 01 ~ 02 ~ 03, odl{02.l ~ a} ===> odl{ol.l ~ 03 I I{03· l ~ ol[l~join(a,b)] where a set of constraints are reduced by the constraint solver. Subsumption Relation and Property Inheritance 01 01 ~ 02, 01 ~ 03, 02/[l--+ a], 031 [1--+ b] ===> ol(l--+ meet(a, b)] 01 ~ 02, 01 ~ 03, 02/(l ~ a], 03/[l ~ b] ===> The right hand side of "II" is a set of constraints about properties, where ~H and ~H are a partial order generated by Hoare ordering defined by ~ and ~, respectively, and ~H is the equivalence relation. If an attribute of a label 1 is not specified for an object 0, o is considered to have a property of 1 without any constraint. The semantics of oids is defined on a set of labeled graphs as a subclass of hypersets[Aczel 1988]: an oid is mapped to a labeled graph and an attribute is related to a function on a set of labeled graphs. In this sense, attributes can be considered methods to an object as in F-logic[Kifer and Lausen 1989]. The reason for adopting a hyperset theory as the semantic domain is to handle an infinite data structure. The details can be found in [Yasukawa et al. 1992]. 2.2 Multiple inheritance is defined upward and downward as the merging of constraints: m3 ~s m4 U (ms \ m6) where ml inherits a set of rules in m2, and m3 inherits a set ~f rules defined by set operations such as m4 U (ms \ m6). Set operations such as intersection and difference are syntactically evaluated. Even if a module is parametric, that is, the mid is an o-term with variables, the submodule relation can be defined. In order to treat the exception of rule inheritance, each rule has properties such as local and overriding: a local rule is not inherited to other modules and an overriding rule obstructs the inheritance of rules with the same head from other modules. 93 pay[year= 1992, dept=X)j[raise= Y) ¢::begin_transactionj A progmm or a database is defined as a set of rules with definitions of subsumption and submodule relations. Clearly, a program can be also considered as a set of modules, where an object may have different properties if it exists in different modules. Therefore, we can classify a knowledge-base into different modules and define a submodule relation among them. If a submodule relation is not defined among two modules, even transitively, an object with the same oid may have different (or even inconsistent) properties in its modules. The semantics of a program is defined on the domain of pairs of labeled graphs corresponding to a mid and an o-term. In this framework, we can classify a large-scaled knowledge-base, which might have inconsistencies, and store it in a QUIXOTe database. 2.4 Updating and Persistence has a concept of nested transaction and allows two kinds of database update: QUIXOTe 1) incremental insert of a database when issuing a query, and 2) dynamic insert and delete of o-terms and a-terms during query processing. employee[num=Z]/[dept=X,salary= W]j -employee[num= Zl/[salary = W)j +employee[num= Z)/[salary = N eW)j end_transaction II{N ew= W * Y}. where "j" specifies sequential execution in order to suppress AND-parallel execution, "+" means insert, and "-" means delete. Except for the objects to be deleted or rolled back during query processing, all (extensional or intensional) objects in a QUIXOT£ program are guaranteed to be persistent. Such persistent objects are stored in the underlying database management system (explained in the next section) or a file system. 2.5 Query Processing and the System QUIXOTe is basically a constraint logic programming language with object-orientation features such as object identity, complex object, encapsulation, type hierarchy, and methods. However, this query processing is different from conventional query processing because of the existence of oids and head constraints. For example, consider the following program: lot [num = X)/[prizel ~ a) ¢:: X ~ 2n. lot[num=X)j[prize2~b) We can issue a query with a new database to be added to the existing database. 1) corresponds to the case. For example, consider the following sequence of queries to a database DE: query sequence to DB ?- begin_transaction. ?- Q1 with DB 1 . ?- begin_transaction. ?- Q2 with DB 2 . ?- abort_transaction. ?- Q3 with DB3 · ?- Q4. ?- end_transaction. equivalent query ¢::::} ?- Q1 to DBUDB 1 ¢::::} ?- Q1 ¢::::} ?- Q1 to DBUDB 1 UDB3 to DBUDB 1 UDB3 After successful execution of the above sequence, DE is changed to DE U DBI U DE3. Each DEi may have definitions of a subsumption relation or a submodule relation, which are merged into definitions of the existing database, If necessary, the subsumption or submodule hierarchy is reconstructed. By rolling back the transaction, such a mechanism can also be used as hypothesis reasoning. 2) makes it possible to update an o-term or its (mutable) properties during query processing, where transactions are located as subtransactions of a transaction in 1). In order to guarantee the semantics of update, so-called AND- and OR-parallel executions are inhibited. For example, the following is a simple rule for updating an employees' salary: ¢:: X ~ 3n. lot[num=X)j[prizel ~ c) ¢:: X ~ 5n. where 2n is a type with a multiple of two. Given a query ?-lot[num = 30)j[prizel = X,prize2 = YJ, the answer is X ~ meet(a, c) and Y ~ b, that is, lot[num=30)/[prizel ~ meet(a, c), prize2 ~ b). First, because of the existence of oids, all rules which possibly have the same oid must be evaluated and merged if necessary. Therefore, in QUIXOTe, a query is always processed in order to obtain all solutions. Secondly, as a rule in QUIXOTe has two kinds of constraints, a head constraint and a body constraint, each of which consists of equations and inequations of dotted terms besides the variable environment, the derivation process is different from conventional constraint logic programming: where ·Gi is a set of sub goals and Ci is a set of constraints of the related variables. On the other hand, in QUIXOTe, each node in the derivation sequence is (G, A, C), where G is a set of subgoals, A is a set of assumptions consisting of a body constraint of dotted terms, and C is a set of conclusions as a set of constraints consisting of a head constraint and a variable environment. Precisely speaking, the derivation is not a sequence but a directed acyclic graph in 94 QUIXOTe, because some subsumption relation among assumptions and constraints might force the two sequences to merge: for example, (G,A,C) and (G,A,C') are merged into (G, A, CUC'). Therefore, the derivation is shown in Figure 4, where the environment to make (Go, Ao, 0) ~ ... ......... • Users can use databases through their application programs in ESP [Chikayama 1984] or KLI [Ueda and Chikayama 1990], and through the specific window interface called Qmacs. The environment is shown in Figure 5. The first version of QUIXOTe was released in December, 1991. A second version was released in April, 1992. Both versions are written in KL1 and work on parallel inference machines (PIMs) [Goto et al. 1988] and its operating system (PIMOS) [Chikayama et al. 1988}. 3 Advanced Database Management System (Kappa) In order to process a large database in QUIXOTe efficiently, a database engine called Kappa has been developed 5. In this section, we explain its features. 3.1 Figure 4: Derivation in QUIXOTe it possible to merge two sequences is restricted: only results by the, so-called, OR-parallel that includes rules inherited by subsumption relation among rule heads can be merged innermostly. The current implementation of query processing in QUIXOTe is based on a tabular method such as OLDT in order to obtain all solutions. Sideways information passing is also implemented by considering not only binding information but also property inheritance. We list some features of the QUIXOTe system: • A QUIXOTe program is stored in persistent storage in the form of both the 'source' code and the 'object' code, each of which consists of four parts: control information, subsumption relation, submodule relation, and a set of rules. Persistence is controlled by the persistence manager, which switches where programs should be stored. A set of rules in the 'object' code is optimized to separate extensional and intensional databases as in conventional deductive databases. • When a user builds a huge database in QUIXOTe, it can be written as a set of small databases independently of a module concept. These can be gathered into one database, that is, a database can be reused in another database. • vVhen a user utilizes data and knowledge III QUIXOTe, multiple databases can be accessed simultaneously through the QUIXOTe server, although the concurrency control of the current version of QUIXOTe is simply implemented. Nested Relation and QuIXOT£ The problem is which part of QUIXOTe should be supported by a database engine because enriched representation is a trade-off in efficient processing. vVe intend for the database engine to be able to, also, play the role of a practical database management system. Considering the various data and knowledge in our knowledge information processing environment, we adopt an extended nested relational model, which corresponds to the class of an o-term without infinite structure in QUIXOTe. The term "extended" means that it supports a new data type such as Prolog term and provided extensibility as the system architecture for various applications. The reason why we adopt a nested relational model is, not surprisingly, to achieve efficient representation and efficient processing. Intuitively, a nested relation is defined as a subset of a Cartesian product of domains or other nested relations: NR ~ Ei .. - EI x··· x En D 12NR where D is a set of atomic values. That is, the relation may have a hierarchical structure and a set of other relations as a value. This corresponds to the introduction of tuple and set constructors. From the viewpoint of syntactical and semantical restrictions, there are various subclasses. Extended relational algebra are defined to each of these. In Kappa's nested relation, a set constructor is used only as an abbreviation of a set of normal relations as follows: {r[ll =a, /2= {b l ,"', bn }]} {=:::::} {r[II = a, 12 = bl ], ... ,r[ll = a, 12 = bn ]} -----------------5S ee the details in [Kawamura et al. 1992]. 95 KLI Program ESP Program Qmacs currently active Applications on PIM or FEP (PSI) Figure 5: Environment of The operation of "=>" corresponds to an unnest operation, while the opposite operation ("~") corresponds to a nest or group-by operation, although "~" is not necessarily congruent for application of nest or groupby operation sequences, That is, in Kappa, the semantics of a nested relation is the same as the coresponding relation without set constructors. The reason for taking such semantics is to retain first order semantics for efficient processing and to remain compatible to widely used relational databases. Given a nested tuple nt, let the corresponding set of tuples without a set constructor be nt. Let a nested relation be NR= {ntl,···,nt n } where nti= {til'···' tid for i = 1,···, n, then the semantics of N R is n Unti = {t ll , · · · , t 1 k,···, t nl ,···, tnk}. i=l Extended relational algebra to this nested relational database is defined in Kappa and produces results according to the above semantics, which guarantees to produce the same result to the corresponding relational database, except for treatment of the label hierarchy. A query can be formulated as a first order language, we, generally, consider this in the form of a rule constructed by nested tuples. As the relation among facts in a database is conjunctive from a proof-theoretic point of view, the semantics of a rule is clear according t.o the above semantics. For example, the following rule r[ll =X, 12 = {a, b, c}] ~ B, 1"[12= Y, 13 = {d, e}, 13= Zl, B'. can be transformed into the following set of rules without set constructors: QUIXOTE r[11=X,12=a] ~ B, r'[1 2= Y, 13 = d, 13 = Zl, r'[12 = Y, 13 = e, 13 = Z], B'. r[11=X,12=b] ~ B, r'[1 2= Y, 13=d, 13= Z], r'[12 = Y, 13 =e, 13= Z], B'. r[11=X,1 2=c] ~ B, r'[l2 = Y, l3= d, /3= Z], r'[12 = Y, 13 = e, l3= Z], B'. That is, each rule can also be unnested. The point of efficiently processing Kappa relations is to reduce the number of unnest and nest operations: that is, to process sets as directly as possible. Under the semantics, query processing to nested relations is different from conventional procedures in logic programming. For example, consider a simple database consisting of only one tuple: r[lt = {a,b},12 = {b,c}]. For a query ?-r[ll = X, /2 = X], we can get X = {b}, that is, an intersection of {a, b} and {b, c}. That is, a concept of unification should be extended. In order to generalize such a procedure, we must introduce two concepts into the procedural semantics[Yokota 1988]: 1) Residue Goals Consider the following program and a query: r[I=5'] ~ B. ?-r[l = 5]. If 5 n 5' is not an empty set during unification between r[l = 5] and r[l = 5'], new subgoals are to be r[l = 5 \ 5'], B. That is, a residue subgoal r[l = 5 \ 5'] is generated if 51 \ 52 is not an empty set, otherwise the unification fails. Note that there might be residue subgoals if there are multiple set values. 2) Binding as Constraint Consider the following database and a query: rl[l1=5d· 96 1'2[12= S2]' ?-rd!l = X], 1'2 [12 = X]. Although we can get X = Sl by unification between rdl1 = Xl and rdh = Sl] and a new subgoal 1'2[12 = SIl, the subsequent unification results in r2[l2=SlnS2] and a residue subgoal r2[l2= Sl \S2]' Such a procedure is wrong, because we should have an answer X = Sl n S2. In order to avoid this situation, the binding information is temporary and plays the role of constraints to be retained: rdl1 = X], 1'2[12 = X] ==? r2[l2 = X]II{X C Sd ==? II{X c Sl n Sd· There remains one problem where the unique representation of a nested relation is not necessarily decided in the Kappa model, as already mentioned. In order to decide a unique representation, each nested relation has a sequence of labels to be nested in Kappa. As the procedural semantics of extended relational algebra in Kappa is defined by the above concepts, a Kappa database does not necessarily have to be normalized also in the sense of nested relational models, in principle. That is, it is unnecessary for users to be conscious of the row nest structure. Furthermore, nested relational model is well known to reduce the number of relations in the case of multivalue dependency. Therefore, the Kappa model guarantees more efficient processing by reducing the number of tuples and relations, and more efficient representation by complex construction than the relational model. 3.2 Features of Kappa System The nested relational model in Kappa has been implemented. This consists of a sequential database management system J(appa-II [Yokota et al. 1988] and a parallel database management system J(appa-P [Kawamura et al. 1992]. Kappa-II, written in ESP, works on sequential inference machines (PSIs) and its operating system (SIMPOS). Kappa-P, written in KL1, works on parallel inference machines (PIMs) and its operating system (PIMOS). Although their architectures are not necessarily the same because of environmental differences, we explain their common features in this subsection, • Data Type As Kappa aims at a database management system (DBMS) in a knowledge information processing environment, a new data type, term, is added. This is because various data and knowledge are frequently represented in the form of terms. Unification and matching are added for their operations. Although unification-based relational algebra can emulate the derivation in logic programming, the features are not supported in Kappa because the algebra is not so efficient. Furthermore, Kappa discriminates one-byte character (ASCII) data from two-byte character (JIS) data as data types. It contributes to the compression of huge amounts of data such as genetic sequence data. • Command Interfaces Kappa provides two kinds of command interface: basic commands as the low level interface and extended relational algebra as the high level interface. In many applications, the level of extended relational algebra, which is expensive, is not always necessary. In such applications, users can reduce the processing cost by using basic commands. In order to reduce the communication cost between a DBMS and a user program, Kappa provides user-definable commands, which can be executed in the same process of the Kappa kernel (in Kappa-II) or the same node of each local DBMS (in Kappa-P, to be described in the next subsection). The user-definable command facility helps users design any command interface appropriate for their application and makes their programs run efficiently. Kappa's extended relational algebra is implemented as parts of such commands although it is a built-in interface. • Practical Use As already mentioned, Kappa aims, not only at a database engine of QUIXOTE, but also at a practical DBMS, which works independently of QUIXOTE. To achieve this objective, there are several extensions and facilities. First, new data types, besides the data types mentioned above, are introduced in order to store the environment under which applications work. There are list, bag, and pool. They are not, however, supported fully in extended relational algebra because of semantic difficulties. Kappa supports the same interface to such data types as in SIMPOS or PIMOS. In order to use Kappa databases from windows, Kappa provides a user-friendly interface, like a spreadsheet, which provides an ad hoc query facility including update, a browsing facility with various output formats and a customizing facility. • Main A1emory Database Frequently accessed data can be loaded and re- 97 Kappa is equipped with an efficient address translation table between an ntid and a logical page (ip), and between a logical page and a physical page (pp). This table is used by the underlying file system. For extraction purposes, each node of tained in the main memory as a main memory database. As such a main memory database was designed only for efficient processing of temporary relations without additional burdens in Kappa, the current implementation does not support conventional mechanisms such as deferred update and synchronization. In Kappa-P, data in a main memory database are processed at least three times more efficiently than in a secondary storage database. Index nested relatin From an implementational point of view, there are several points for efficient processing in Kappa. We explain two of them: • ID Structure and Set Operation Each nested tuple has a unique tuple identifier (ntid) in a relation, which is treated as an 'object' to be operated explicitly. Abstractly speaking, there are four kinds of 'object's, such as a nested t1lple, an ntid, a set whose element is a ntid, and a relation whose element is a nested tuple. Their commands for transformation are basically supported, as in Figure 6, although the set t nested tuple lp Ip ntid Figure 7: Access Network for Secondary DBMS a nested tuple has a local pointer and counters in the compressed tuple, although there is a trade-off in update operations' efficiency. nested tuple Each entry in an index reflects the nested structure: that is, it contains any necessary sub-ntids. The value in the entry can be the result of string operations such as substring and concatenation of the original values, or a result extracted by a user's program. nested relation Figure 6: 'Object's in Kappa and Basic Operations is treated as a stream in Kappa-P. Most operations are processed in the form of an ntid or a set. In order to process a selection result, each subtupIe in a nested tuple also has a sub-ntid virtually. Set operations (including unnest and nest operation) are processed mainly in the form of a (sub)ntid ·or a set without reading the corresponding tuples. • Storage Structure A nested tuple, which consists of unnested tuples in the semantics, is also considered as a set of unnested tuples to be accessed together. So, a nested tuple is compressed without decomposition and stored on the same page, in principle, in the secondary storage. For a huge tuple, such as a genetic sequence, contiguous pages are used. In order to access a tuple efficiently, there are two considerations: how to locate the necessary tuple efficiently, and how to extract the necessary attributes efficiently from the tuple. As in Figure 7, 3.3 Parallel Database System (Kappa-P) Management Kappa-P ha.s va.rious unique fea.tures as a parallel DBMS. In this subsectio~, we give a brief overview of them. The overall configuration of Kappa- P is shown in Figure 8. There are three components: an interface (J/F) process, a server DBMS, and a local DBMS. An IfF process, dynamically created by a user program, mediates between a user program and (server or local) DBMSs by streams. A server DBMS has a global map of the location of local DBMSs and makes a user's stream connect directly to an appropriate local DBMS (or multiple local DBMSs). In order to avoid a bottleneck in communication, there might be many server DBMSs with replicates global maps. A local DBMS can be considered as a single nested relational DBMS, corresponding to Kappa-II, where users' data is stored. 98 It;F rocessl ( It;F roceSS2 ( ) Server DBMS m Server DBMS 2 ) IfF Processk ..................................•................... '" Local DBMS l ----~~----- Local DBMS 2 ,--~~------ Local DBMS n Figure 8: Configuration of Kappa-P Users' data may be distributed (even horizontally partitioned) or replicated into multiple local DBMSs. If each local DBMS is put in a shared memory parallel processor, called a cluster in PIM, each local DBMS works in parallel. Multiple local DBMSs are located in each node of distributed memory parallel machine, and, together, behave like a distributed DBMS. User's procedures using extended relational algebra are transformed into procedures written in an intermediate language, the syntax of which is similar to KLl, by an interface process. During the transformation, the interface process decides which local DBMS should be the coordinator for the processing, if necessary. Each procedure is sent to the corresponding local DBMS, and processed there. Results are gathered in the coordinator and then processed. Kappa-P is different from most parallel DBMS, in that most users' applications also work in the same parallel inference machine. If Kappa-P coordinates a result from results obtained from local DBMSs, as in conventional distributed DBMSs, even when such coordination is unnecessary, the advantages of parallel processing are reduced. In order to avoid such a situation, the related processes in a user's application can be dispatched to the same node as the related local DBMS as in Figure 9. This function contributes not only to efficient processing but also to customization of the cOlmnand interface besides the user-defined command facility. 4 Applications vVe are developing three applications on QUIXOTE and Kappa, and give an overview of each research topic in this section. Figure 9: User's Process in Kappa Node 4.1 Molecular Biological Database Genetic information processing systems are very important not only from scientific and engineering points of view but also from a social point of view, as shown in the Human Genome Project. Also, at ICOT, we are engaged in such systems from thr viewpoint of knowledge information processing. In this subsection, we explain such activities, mainly focusing on molecular biological databases in QUIXOTE and Kappa 6. 4.1.1 Requirements for Databases Molecular Biological Although the main objective of genetic information processing is to design proteins as the target and to produce them, there remain too many technical difficulties presently. Considering the whole of proteins, we are only just able to gather data and knowledge with much noise. In such data and knowledge there are varieties such as sequences, structures, and functions of genes and proteins, which are mutually related. A gene in the 6S ee the details in [Tanaka 1992]. 99 genetic sequence (DNA) in the form of a double helix is copied to a mRN A and translated into an amino acid sequence, which becomes a part (or a whole) of a protein. Such processes are called the Central Dogma in biology. There might be different amino acids even with the same functions of a protein. The size of a unit of genetic sequence data ranges from a few characters to around 200 thousand, and w111 become longer as genome data is gradually analyzed fyrther. The size of a human genome sequence equals about 3 billion characters. As there are too many unknown proteins, the sequence data is fundamental for homology searching by a pattern called a motif and for multiple alignment a.mong sequences for prediction of the functions of unknown proteins from known ones. There are some problems to be considered for molecular biological databases: • how to store large values, such a.s sequences, and process them efficiently, • how to represent structure data and what operations to apply them, • how to represent functions of protein such as chemical reactions, and • how to represent their relations and link them. From a database point of view, we should consider some points in regard to the above data and knowledge: • representation of complex data as in Figure 2, • treatment of partial or noisy information in unstable data, • inference rules representing functions, as in the above third item, and inference mechanisms, and • representation of hierarchies such as biological concepts and molecular evolution. After considering the above problems, we choose to build such databases on a DOOD (QUIxoTE, conceptually), while a large amount of simple data is stored in Kappa-P and directly operated through an optimized window interface, for efficient processing. As cooperation with biologists is indispensable in this area, we also implemented an environment to support them. The overall configuration of the current implementation is shown in Figure 10. 4.1.2 Molecular Biological Information 111 QuXXOT£ and Kappa Here, we consider two kinds of data as quence data and protein function data. First, consider a DNA sequence. Such need inference rules, but needs a strong homology searching. In our system, such examples: sedata does not capability for data is stored Interface for Biologists Molecular Biological Applications Kappa-P Figure 10: Integrated System on QUIXOTE and Kappa directly in Kappa, which supports the storage of much data as is and creates indexes from the substrings extracted from the original by a user program. Sequenceoriented commands for information retrieval, which use such indexes, can be embedded into Kappa a.s userdefined commands. Furthermore, since the complex record shown in Figure 3 is treated like a nested relation, the representation is also efficient. Kappa shows its effectiveness as a practical DBMS. Secondly, consider a chemical reaction of enzymes and co-enzymes, whose scheme is as follows: Sources + Co-enzymes Enzymes ===} Products Environments As an example of metabolic reaction, consider the Krebs cycle in Figure 11. Chemical reactions in the Krebs cycle are written as a set of facts in QUIXOTE as in Figure 12. In the figure, 01 ~ 02/[' .. J means oIl[' .. J and 01 ~ 02' In order to obtain a reaction chain (path) from the above facts, we can write the following rules in QUIXOTE: reaction[jrom =X, to = YJ ¢: H! ~ reaction/[sources+ f-- X, products+ f-- ZJ, reaction[jrom=X, to= Y] II{ {X, Y, Z} ~ reaction}. reaction[jrom=X, to=X] ¢:II{X ~ reaction}. Although there are a lot of difficulties in representing such functions, QUIXOTE makes it possible to write them down easily. Another problem is how to integrate a Kappa database with a QUIXOTE database. Although one of the easiest ways is to embed the Kappa interface into QUIXOTE, it costs more and might destroy a uniform representation in QUIXOTE. A better way would be to manage common oids both in Kappa and in QUIXOTE, and guarantee the common object, however we have 100 pyruvate • acetyl-CoA " oxyaloaceta" ~ (8) malate t(7) (1) Krebs Cycle fumarate ~) • ~trate (2) ~ (2) Ie.is-aconitate t (~(nsocitrate succinate ~) (4Va-ketOglutarate krebs_cycle :: {{ krebsl r;;reaction/ [sources'" f - {acetylcoa, oxaloacetate} , products+ f - {citrate, coa}, enzymes f - citrate_synthase, energy = -7.7]. krebs2 r;; reaction! [sources-f f - citrate, products+ f - {isocitrate, h2o}, enzymes f - aconitase]. succinyl-CoA ENZYMES (1) citrate synthase (2) aconitate (3) isocitrate dehydrogenase (4) a-ketoglutarate dehydrogenase complex (5) succinyl-CoA synthetase (6) succinate dehydrogenase (7) fumarase (8) malate dehydrogenas Figure 11: Krebs Cycle in Metabolic Reaction not implemented such a facility in Kappa. The current implementation puts the burden of the uniformity on the user, as in Figure 10. 4.2 Legal Reasoning System (TRIAL) Recently, legal reasoning has attracted much attention from researchers in artificial intelligence, with high expectations for its big application. Some prototype systems have been developed. We also developed such a system as one of the applications of our DOOD system 7 4.2.1 Requirements for Legal Reasoning Systems and TRIAL First, we explain the features of legal reasoning. The analytical legal reasoning process is considered as consisting of three steps: fact findings, statutory interpretation, and statutory application. Although fact findings is very important as the starting point, it is too difficult for current technologies. So, we assume that new cases are already represented in the appropriate form for our system. Statutory interpretation is one of the most interesting themes from an artificial intelligence point of view. Our legal reasoning system, TRIAL, focuses on statutory interpretation as well as statutory application. 7See the details in [Yamamoto 1990], although the new version is revised as in this section. krebs8 r;; reaction! [sources-f f - malate, products+ f - oxaloacetate, enzymes f - malate_dehydrogenase, energy = 7.1]. }} Figure 12: Facts of Krebs Cycle in QUIXOTe Although there are many approaches to statutory interpretation, we take the following steps: • analogy detection Given a new case, similar precedents to the case are retrieved from an existing precedent database. • rule transformation Precedents (interpretation rules) extracted by analogy detection are abstracted until the new case can be applied to them. • deductive reasoning Apply the new case in a deductive manner to abstract interpretation rules transformed by rule transformation. This step may include statutory application because it is used in the same manner. Among the steps, the strategy for analogy detection is essential in legal reasoning for more efficient detection of better precedents, which decides the quality of the results of legal reasoning. As the primary objective of TRIAL at the current stage is to investigate the possibilities of QUIXOTe in the area and develop a prototype system, we focus only on a small target. That is, to what extent should interpretation rules be abstl'acted for a new case, in order to get an answer with a plausible explanation, but not for general abstraction mechanism. 4.2.2 TRIAL on Legal Precedent Databases All data and knowledge in TRIAL is described in QUIXOTe. The system, written in KL1, is constructed on QUIXOTE;. The overall architecture is shown in Figure 13. In the figure, QUIXOTE; supports the functions of rule transformation (Rule Transformer) and deductive reasoning (Deductive Reasoner) as the native functions besides the database component, while TRIAL 101 casel :: judge[case=X]/[judge----t job-causality] ¢=rel[state= Y, emp= Z]/[cause=X] II{X ~ parrn.case, Interface Component ........................................................................................... Y~parm.status, Z ~parm.emp};; case2 :: judge[case=X]/[judge----t job-execution] ¢= Xj[while = Y, result = Z], Y~job ~easoner Comp?nent : : :........................................................... : ~ : : :: ~ j Rule j ~ Transformer : : ............................ :: : j j QUIXOTe Database Component j.............................. ~ (------ : .......................................................................................... : Figure 13: Architecture of TRIAL supports the function of analogy detection (Analogy Detector) besides the interface component. Consider a simplified example related to "karoshi" (death from overwork) in order to discuss the analogy detector. A new case, new-case, is as follows: j'vfary, a driver, employed by a company, '(5)), died from a heart-attack while taking a catnap between jobs. Can this case be applied to the worker's compensation law? This is represented as a module new-case in as follows: QUIXOTe new-case:: {{new-casej[who=mary, while = catnap, result = heart-attack]; ; rel[state = employee, emp=mary] j[affil = org[name = "5"], job----t driver]}} where ";;" is a delimiter between rules. The module is stored ill the new case database. Assume that there are two abstract precedents 8 of job-causality and jobexecution: SIn this paper, we omit the rule transformation step and assume that abstract interpretation rules are given. II{X ~ parm.case, Y ~parm.while, Z ~parm.result}. Note that variables X, Y, and Z in both rules are restricted by the properties of an object parm. That is, they are already abstracted by parm and their abstract level is controlled by parm's properties. Such precedents are retrieved from the precedent database by analogy detection and abstracted by rule transformation. We must consider the labor'-law (in the statute database) and a theory (in the theory database) as follows: labor-law:: org[name=X] /[1'esp----t c01npensation[obj = Y, money = salary]] ¢=judge[case----t case] /[who= Y, result - t disease, judge ----t insurance], r'el[state= Z, emp= Y] j[affil =org[name=Xjj. theory:: Judge[case= X]/[judge----t insurance] ¢=judge[case = X]j[judge ----t job-causality], judge[case= X]/[judge----t job-execution] II{X ~ case}. Furthermore, we must define the parm object as follows: parm :: parm/[case=case, state = rel, while = job, result = disease, emp = person]. In order to use parm for casel and case2, we define the following submodule relation: parm ~s casel U case2' This information is dynamically defined during l'ule transfol'mation. Furthermore, we must define the subsumption relation: case rel disease job person job-causality job-execution ~ ~ ~ ~ ~ ~ ~ new-case employee heart-attack catnap mary znsurance znsurance \02 Such definitions are stored in the dictionary in advance. Then, we can ask some questions with a hypothesis to the above database: 1) If new-case inherits parm and theory, then what kind of judgment can we get? ?-new-case : judge[case = new-case]j[judge =X] if new-case ;;Js parm U theory. we can get three answers: • X = job-execution • if new-case : judger case = new-case] has a property judge ~ job-causality, then X ~ insurance • if new-case : rel[state = employee, emp mary] has a property cause = new-case, then X ~ insurance Two of these are answers with assumptions. 2) If new-case inherits labor-law and parm, then what kind of responsibility should the organization which Mary is affiliated to have? ?-new-case : org[name= "S"]j[resp=X] if new-case ;;Js parm U labor-law. we can get two answers: • if new-case: judge[case = new-case] has a property judge ~ job-causality, then X ~ compensation [obj =mary, money = salary] • if new-case:rel[state=employee, emp=mary] has a property cause = new-case, then X ~ compensation [obj = mary, money = salary] For analogy detection, the parm object plays an essential role in determining how to abstract rules as in casel and case2, what properties to be abstracted in parm, and what values to be set in properties of parm. In TRIAL, we have experimented with such abstraction, that is, analogy detection, in QUIXOTE. For the user interface of TRIAL, QUIXOTE returns explanations (derivation graphs) with corresponding answers, if necessary. The TRIAL interface shows this graphically according to the user's request. By judging an answer from the validity of the assumptions and the corresponding explanation, the user can update the database or change the abstraction strategy. 4.3 Temporal Inference Temporal information plays an important role in natural language processing. A time axis in natural language is, however, not homogeneous as in natural science but is relative to the events in rriind: shrunken in parts and stretched in others. Furthermore, the relativity is different depending on the observer's perspective. This work aims to show the paradigm of an inference system that merges temporal information extracted from each lexical item and resolves any temporal ambiguity that· a word may have 9. 4.3.1 Temporal Information in Natural Language We can, frequently, make different expressions for the same real situation. For example, Don Quixote attacks a windmill. Don Quixote attacked a windmill. Don Quixote is attacking a windmill. Such different expressions are related to tense and aspects. How should we describe the relation between them? According to situation theory, we write a support relation between a situation s and an in/on (7 as follows: s p (7. For example, if one of the above examples is supported in a situation s, it is written as follows: s p~ attack, Don Quixote, windmill ~, where attack is a relation, and "Don Quixote" and windmill are parameters. However, strictly speaking, as such a relation is cut out from a prespective P, we should write it as follows: s p (7 -¢::::? P(s' p (7'). Although we might nest perspectives on such a relation, we assume some reflective property: P(s' p (7') ===? P(s')P(p)P((7'). In order to consider how to represent P(s') and P( (7') from a temporal point of view, we introduce a partial order relation among sets of time points. Assume that a set of time points are partially ordered by ::S, then we can define ::St and ~ among sets TI and T2 as follows: TI :5t T2 d~ Vt l E TI, Vt 2 E T 2. tl ::::; t 2. TI ~ T2 d.;j Vt 1 E T 1 . tl E T 2. We omit the subscript t if there is no confusion. In order to make tense and aspects clearer, we introduce the following concepts: 9S ee the details in [Tojo and Yasukawa 1992]. 103 1) discrimination of an utterance situation u and a described situation s, and inj[v_rel = [rel = R, cls=CLS, per=P], args = Args], 2) duration (a set of linear time points, decided by a start point and an end point) of situations and an infon. The duration of T is written as II Tilt. We can see the relation among three durations of an utterance situation, a described situation, and an infon in Figure 14. If there is no confusion, we use a simple O the.utte~ance SItuatIon 1 a mental time axi~ <:=) • : mental time of a : mental location of s : mental location of u Figure 14: Relation of Three Durations notation: SI :::; S2 instead of II SI lit:::; II s211t and SI ~ S2 instead of II Sll1t~1I s211t. By the above definitions, we can define tense and aspects when s F a as follows (P(F) is written as F): s[s :::; s[s J s[s C s[a:::; u] u] u] u] F F F 1= ~ past,a». ~ present, a ~ ~ where v_reI takes a verb relation and args takes the arguments. R is a verb, CLS is the classification, and P is a temporal situation. For example, "John is running" is written as follows: inj[v_rel = [reI = run, cIs = act 2 , = [jov = ip, pov = pres]], args = [agt = john]]. pers That is, the agent is john, and the verb is run, which is classified in act2 (in-progress state or res7.Litant state), and the perspective is in-progress state as the field of view (an oval in Figure 14) and present as the point of view (. in Figure 14). The discourse situation which supports such a verbalized infon is represented as follows: dsit[jov = ip, pov = pres, src = » . progressive, a perfect, a » . ». where s is a described situation, u is an utterance situation, and a is an infon. C in s[ C] is a constraint, which is intended to be a perspective. The above rules are built-in rules (or axioms) for temporal inference in UJ, where the first two arguments are the same as the above infon's pers and the third argument is the utterance situation. According to the translation, we show a small example, which makes it possible to reduce temporal ambiguity in expression. QUIXOTE:. 4.3.2 Temporal Inference in QuIXOTE: We define a rule for situated inference as follows: where s, SI, •.. ,Sn are situations with perspectives. This rule means that S F a if SI 1= aI, " ' , and Sn 1= an' Such rules can be easily translated into a subclass of QUIXOTE: by relating a situation with perspectives to a module, an infon to an o-term, and partial order among duration to subsumption relation. However, there is one restriction: a constraint in a rule head may not include subsumption relations between o-terms, because such a relation might destroy a subsumption lattice. A verbalized infon is represented as an o-term as follows 10: lOAn o-term T[/I [II 01,"', In 02]' = = = ol,···,ln = 02] can be abbreviated as 1) Given an expression exp = E, each morpheme is processed in order to check the temporal information: mi[7.l=U, exp=[], e=D,infon=Infon]. mi[u= U, exp= [ExpIR], e=D, infon= Infon] ¢.d_cont[exp=Exp, sit =D, infon = Infon, mi[u=U, exp=R,e=D,infon=Infon]. Temporal information for each morpheme is intersected in D: that is, ambiguity is gradually reduced. 2) Temporal information in a pair of a discourse situation and a verbalized infon is defined by the following rules: 104 d_cont[exp=Exp, sit = dsit[Jov =Fov, pov= Pov, src= U] infon =inf[v_rel = V _rel, args= Args]] ¢=diet : v[cls=CLS,rel=R,jorm=Exp] II{V _rel= [rel=R, cls=CLS,pers= P]} d_cont[ exp = Exp, sit = dsit[Jov= Fov, pov = Pov, src= U] infon=inf[v_rel= V _rel, args= Args]] ¢=diet : auxv[asp=ASP, form= Exp], map[cis=CLS, asp=ASP,fov=Fov] II{V _rel= [rel= _, cis =CLS,pers= P], P= [Jov=Fov,pov = _};; d_cont [exp = Exp, sit = dsit[J ov = Fov, pov = Pov, sre= U] infon =inJ[v_rel = V _rel, args = ArgslJ ¢=dict : affix[pov = Pov, form=ru] II{V _rei = [rel = _, cis = _, pers = P], P = [Jov= _,pov=Pov]} 3) There is a module diet, where lexical information is defined as follows: diet:: {{ v[cis = aetI,rel = puLon, form =ki];; v[cls = aet 2 , rel = run, form =hashi];; v[cls = aet 3 , rei = understand, form =waka]; ; auxv[asp = state, form =tei];; affix[pov = pres,form =ru];; affix[pov = past, form =ru]}} where form has a value of Japanese expression. Further, mapping of field of view is also defined as a set of (global) facts as follows: more general framework of grammar in logic programming, HPSG and JPSG are considered to be better, because morphology, syntax, semantics, and pragmatics are uniformly treated as constraints. From such a point of view, we developed a new constraint logic programming (CLP) language, cu-Prolog, and implemented a JPSG (Japanese Phrase Structure Grammar) parser in it 11. 5.1.1 Constraints in Unification-Based Grammar First, consider various types constraint-based grammar: of constraints III • A disjunctive feature structure is used as a basic information structure, defined like nested tuples or complex objects as follows: 1) A feature structure is a tuple consisting of pairs of a label and a value: [h =Vl,"', In=v n]. 2) A value is an atom, a feature structure, or a set {fl,' .. ,fn} of feature structures. • In JPSG, grammar rules a.re descri.bed in the form of a binary tree as in Figure 15, each node of which is a feature structure: in which a specific map[cls = aet1,asp = state,fov = {ip,tar,res}]. map[cis = aet2,asp = state,fov = {ip,res}]. map[ cls = aet3, asp = state, f ov = {tar, res}]. If some Japanese expression is given in a query, the corresponding temporal information is returned by the above program. dependenLdaughter "0 head_daughter H Figure 15: Phrase Structure in JPSG 5 Towards More Flexible Systems In order to extend a DOOD system, we take other approaches for more flexible execution control, mainly focusing on natural language applications as its examples. 5.1 Constraint Thansformation There are many natural language grammar theories: transformational and constraint-base grammar such as GB, unification-based and rule-based gra~ar such as GPSG and LFG, and unification-based and constraintbased grammar such as HPSG and JPSG. Considering a feature (attribute) decides whether D works as a complement or as a modifier. Note that each grammar, called a structural principle, is expressed as the constraints among three features, lvI, D, and H, in the local phrase structure tree. As shown in the above definition, feature structures are very similar to the data structure in DOOD 12. VVe will see some requirements of natural language processing for our DOOD system and develop applications_ on the DOOD system. llSee the details in [Tsuda 1992]. 12This is one of the reason why we decided to 'design QUIXOTE. See the appendix. 105 5.1.2 eu-Prolog In order to process feature structures efficiently, we have developed a new CLP called cu-Prolog. A rule is defined as follows 13: where H, B 1 , ••• ,Bn are atomic formulas, whose arguments can be in the form of feature structures and are constraints in the form of an equation 1 , •.• among feature structures, variables, and atoms, or an atomic formula defined by another set of rules. There is a restriction for an atomic formula in constraints in order to guarantee the congruence of constraint solving. This can be statically checked. The semantic domain is a set of relations of partially tagged trees, as in CIL[Mukai 1988] and the constraint domain is also the same. The derivation in cu-Prolog is a sequence of a pair (G, e) of a set of subgoals and a set of constraints, just as in conventional CLP. Their differences are as follows: e ,em • All arguments in predicates can be feature structures, that is, unification between feature structures is necessary. • A computation rule does not select a rule which does not contribute to constraint solving: in the case of ({A} U G, e), A' ~ Bile', and AO = A'O, the rule is not selected if a new constraint CO U e' 0 cannot be reduced. • The constraint solver is based on unfold/fold transformation, which produces new predicates dynamically in a constraint part. 'Disjunction' in feature structures of cu-Prolog is treated basically as 'conjunction', just as in an o-term in QUIXOT£ and a nested term in Kappa (CRL). However, due to the existence of a predicate, disjunction is resolved (or unnested) by introducing new constraints and facts: H ~p([l={a,b}]) {::=} H ~ p([l=XDII{new-p(X)}. new_p(a). new_p(b). That is, in cu-Prolog, disjunctive feature structures are processed in OR-parallel, in order to avoid set unification as in CRL. Only by focusing on the point does the efficiency seem to depend on whether we want to obtain all solutions or not. One of the distinguished features in cu-Prolog is dynamic unfold/fold transformation during query processing, which contributes much to improving the efficiency of query processing. Some examples of a JPSG parser 13 As we are following \'lith the syntax of QUIXOT£, the following notation is different from eu-Prolog. in cu-Prolog appear in [Tsuda 1992]. As predicatebased notation is not essential, language features in cu-Prolog can be encoded into the specification of QUIXOT£ and the constraint solver can also be embedded into the implementation of QUIXOT£ without changing semantics. 5.2 Dynamical Programming This work aims to extend a framework of constraint throughout computer and cognitive sciences 14. In some sense, the idea originates in the treatment of constraints in cu-Prolog. Here, we describe an outline of dynamical programming as a general framework of treating constraints and an example in natural language processing. 5.2.1 Dynamics of Symbol Systems As already mentioned in Section 2, partial information plays an essential role in knowledge information processing systems. So, knowing how to deal with the partiality will be essential for future symbol systems. We employ a constraint system, which is independent of information flow. In order to make the system computationally more tractable than conventional logic, it postulates a dynamics of constraints, where the state of the system is captured in terms of potential energy. Consider the following program in the form of clauses: p(X) ~ r(X, Y),p(Y). r(X, Y) ~ q(X). Given a query ?-p(A),q(B), the rule-goal graph as used in deductive databases emulates top-down evaluation as in Figure 16. However, the graph presupposes a cer- ?-p(A), q(B) t p(X) + ~ r(X, Y),p(Y) t r(X, Y) I ~ q(X) Figure 16: Rule-Goal Graph tain information flow such as top-down or bottom-up evaluation. More generally, we consider it in the form in Figure 17. where the lines represent (partial) equations among variables, and differences between variables are not written for simplicity. We call such a graph a constraint network. In this framework, computation proceeds by propagating constraints in a node (a variable or an atomic 14See the details in [Hasida 1992]. 106 Tom has a telescope when he sees the girl, or the girl has the telescope when Tom sees her. Consider a set of facts: Figure 17: Constraint network (1) take(tom, telescope). (2) have( tom, tel escope). (3) have(girl, telescope). and an inference rule: constraint) to others on the constraint network. In order to make such computation possible, we note the dynamics of constraints, as outlined below: 1) An activation value is assigned to each atomic constraint (an atomic formula or an equation). The value is a real number between a and 1 and is considered as the truth value of the constraint. (4) Symbolic computation is also controlled on the basis of the same dynamics. This computational framework is not restricted in the form of Horn clauses. 5.2.2 Integrated Architecture of Natural Language Processing In traditional natural language processing, the system is typically a sequence of syntactic analysis, semantic analysis, pragmatic analysis, extralinguistic inference, generation planning, surface generation, and so on. However, syntactic analysis does not necessarily precede semantic and pragmatic comprehension, and generation planning is entwined with surface generation. Integrated architecture is expected to remedy such a fixed information flow. Our dynamics of constraint is appropriate for such an architecture. Consider the following example: Tom. took a telescope. He saw a girl with it. 'vVe assume that he and it are anaphoric with Tom and the telescope, respectively. However, with it has attachment ambiguity: '¢: take(X, Y). By constructing the constraint networks of (1),(2),(4) and (1),(3),(4) as in Figure 18, we can see that there .---.. / { take( 2) Based on activation values, normalization energy is defined for each atomic constraint, deduction eneT'!}y and abduction energy are defined for each clause, and assimilation energy and completion energy are defined for possible unifications. The potential eneT'!}y U is the sum of the above energies. 3) If the current state of a constraint is represented in terms of a point x of Euclidean space, U defines a field of force F of the point x. F causes spreading activation when F =f. O. A change of x is propagated to neighboring parts of the constraint network, in order to reduce U. In the long run, the assignment of the activation values settles upon a stable equilibrium satisfying F = O. have(X, Y) {takeT )} ),-,take( , )} )} L, {have( , I), -,take( , )} {have( {have( , I)} {have( ., )} ./ Constraint Network of (2) Constraint Network of (3) Figure 18: Constraint Networks of Alternatives are two cycles (involving tom and telescope) in the left network ((1), (2), and (4)), while there is only one cycle (girl) in the right network ((1), (3), and (4)). From the viewpoint of potential energy, the former tends to excite more strongly than the latter, in other words, (2) is more plausible than (3). Although, in natural language processing, resolution of ambiguity is a key point, the traditional architecture has not been promising, while our integrated architecture based on a dynamics of constraint network seems to give more possibilities not only for such applications but also for knowledge-base management systems. 6 Related Works Our database and knowledge-base management system in the framework of DOOD has many distinguished features in concept, size, and varieties, in comparison with other systems. The system aims not only to propose a new paradigm but also to provide database and knowledge- base facilities in practice for many knowledge information processing systems. There are many works, related to DOOD concepts, for embedding object-oriented concepts into logic programming. Although F-logic[Kifer and Lausen 1989] has the richest concepts, the id-term for object identity is based on predicate-based notation and properties are insufficient from a constraint point of view. Furthermore, it lacks update functions and a module concept. 107 QUIXOTE has many more functions than F-logic. Although, in some sense, QUIXOTE might be an overspecification language, users can select any subclass of QUIXOTE. For example, if they use only a subclass of object terms, they can only be conscious of the sublanguage as a simple extension of Prolog. As for nes ted relational models, there are many works since the proposal in 1977, and several models have been implemented: Verso [Verso 1986], DASDBS [Schek and Weikum 1986], and AIM-P [Dadam et al. 1986]. However, the semantics of our model is different from theirs. As the (extended) NF2 model of DASDBS and AIM-P has setbased (higher order) semantics~ it is very difficult to extend the query capability efficiently, although the semantics is intuitively familiar to the user. On the other hand, as Verso is based on the universal relation schema assumption, it guarantees efficient procedural semantics. However, the semantics is intuitively unfamiliar to the user: even if t tf. (JIT and t tf. (J2T for a relation T, it might happen that t E (JIT U (J2T. Compared with them, Kappa takes simple semantics, as mentioned in Section 3. This semantics is retained in o-terms in QUIXOTE and disjunctive feature structures in cu-Prolog for efficient computation. As for genetic information processing, researchers in logic programming and deductive databases have begun to focus on this area as a promising application. However, most of these works are devoted to query capabilities such as transitive closure and prototyping capabilities, while there are few works which focus on data and knowledge representation. On the other hand, QUIXOTE aims at both the above targets. As for legal reasoning, there are many works based on logic programming and its extensions. Our work has not taken their functions into consideration, but has reconsidered them from a database point of view, especially by introducing a module concept. 7 Future Plans and Concluding Remarks We have left off some functions due to a shortage in man power and implementation period. We are considering further extensions through the experiences of our activities, as mentioned in this paper. First, as for QUIXOTE, we are considering the following improvements and extensions: • Query transformation techniques such as sideways information passing and partial evaluation are not fully applied in the current implementation. Such optimization techniques should be embedded. in QUIXOTE, although constraint logic programming needs different devices from conventional deductive databases. Furthermore, for more efficient query processing, flexible control mechanisms, such as in cu-Prolog and dynamical programming, would be embedded. • For more convenience for description in we consider meta-functions as HiLog [Chen et al. 1989]: QUIXOTE, tc(R)(X, Y) :- R(X, Y) tc(R)(X, Y) :- tc(R)(X, Z), tc(R)(Z, Y) In order to provide such a function, we must introduce new variables ranging over basic objects. This idea is further extended to a platform language of QUIXOTE. For example, although we must decide the order relation (such as Hoare, Smyth, or Egli-Milner) among sets in order to introduce a set concept, the decision seems to depend on the applications. For more applications, such a relation would best be defined by a platform language. The current QUIXOTE would be a member of a family defined in such a platform language. • Communication among QUIXOTE databases plays an important role not only for distributed knowledge-bases but also to support persistent view, persistent hypothesis, and local or private databases. Furthermore, cooperative query processing among agents defined QUIXOTE is also considered, although it closely depends on the ontology of object identity. • In the current implementation, QUIXOTE objects can also be defined in KLl. As it is difficult to describe every phenomena in a single language, as you know, all languages should support interfaces to other languages. Thus, in QUIXOTE too, a multi-language system would be expected. • Although, in the framework of DOOD, we have focused mainly on data modeling extensions, the direction is not necessarily orthogonal from logical extensions and computational modeling extensions: set grouping can emulate negation as failure and the procedural semantics of QUIXOTE can be defined under the framework of object-orientation. However, from the viewpoint of artificial intelligence, non-monotonic reasoning and 'fuzzy' logic should be further embedded, and, from the viewpoint of design engineering, other semantics such as object-orientation, should also be given . As for Kappa, we are considering the following improvements and extensions: • In comparison with other DBMSs by Wisconsin Benchmark, the performance of Kappa can be further improved, especially in extended relational 108 algebra, by reducing inter-kernel communication costs. This should be pursued separately from the objective. • It is planned for Kappa to be accessed not only from sequential and parallel inference machines but also from general purpose machines or workstations. Furthermore, we should consider the portability of the system and the adaptability for an open system environment. One of the candidates is heterogeneous distributed DBMSs based on a client-server model, although Kappa-P is already a kind of distributed DBMS. • In order to provide Kappa with more applications, customizing facilities and service utilities should be strengthened as well as increasing compatibility with other DBMSs. In order to make Kappa and QUIXOT& into an integrated knowledge-base management system, further extensions are necessary: • takes nested transaction logic, while Kappa takes flat transaction logic. As a result, QUIXOT& guarantees persistence only at the top level transaction. In order to couple them more tightly, Kappa should support nested transaction logic. QUIXOT& • From the viewpoint of efficient processing, users cannot use Kappa directly through QUIXOT&. This, however, causes difficulty with object identi ty, because Kappa does not have a concept of object identity. A mechanism to allow Kappa and QUIXOT& to share the sa.me object space should be considered. • Although Kappa-P is a naturally parallel DBMS, current QUIXOT& is not necessarily familiar wi th parallel processing, even though it is implemented in 1\L1 and works in parallel. For more efficient processing, we must investigate parallel processing in Kappa and QUIXOT£.. We must develop bigger applications than those we mentioned in this paper. Furthermore, we must increase the compatibility with the conventional systems: for example, from Prolog to QUIXOT& and from the relational model to our nested relational model. We proposed a framework for DOOD, and are engaged in various R&D activities for databases and knowledge-bases in the framework, as mentioned in this paper. Though each theme does not necessarily originate from the framework, our experiences indicate that this direction is promising for many applications. Acknowledgments The authors have had much cooperation from all members of the third research laboratory of ICOT for each topic. We especially wish to thank the following people for their help in the specified topics: Hiroshi Tsuda for QUIXOTe and cu-Prolog, Moto Kawamura and Kazutomo N aganuma for J( appa, Hidetoshi Tanaka and Yuikihiro Abiru for Biological Databases, Nobuichiro Yamamoto for TRIAL, Satoshi Tojo for Temporal Inference, and Koiti Hasida for DP. We are grateful to members of the DOOD (DBPL, ETR, DDB&AI, NDB, IDB), STASS, and JPSG working groups for stimulating discussions and useful comments on our activities, and, not to mention, all members of the related projects (see the appendix) for their implementation efforts. We would also like to acknowledge Kazuhiro Fuchi and Shunichi Uchida without whose encouragement QUIXOT& and Kappa would not have been implemented. References [Aczel 1988] P. Aczel, Non- Well Founded Set Theory, CSLI Lecture notes No. 14, 1988. [Chen et al. 1989] W. Chen, M. Kifer and D.S. Warren, "HiLog as a Platform for Database Language", Proc. the Second Int. Workshop on Database Programming Language, pp.121-135, Gleneden Beach, Oregon, June, 1989. [Chikaya.ma 1984] T. Chikayama, "Unique Features of ESP", Proc. Int. Conf. on Fifth Generation Computer Systems, ICOT, Tokyo, Nov.6-9, 1984. [Chikayama et al. 1988] T. Chikayama, H. Sato, and T. Miyazaki, "Overview of the Parallel Inference Machine Operating Sistem (PIMOS)", Proc. Int. Conf. on Fifth Generation Computer Systems, ICOT, Tokyo, Nov.28-Dec.2, 1988. [Dadam et al. 1986] P. Dadam, et aI, "A DBMS Prototype to Support Extended NF2 Relations: An Integrated View on Flat Tables and Hierarchies", ACM SIGMOD Int. Conf. on Management of Data, 1986. [Delobel et al. 1991J C. Delobel, M. Kifer, and Y. Masunaga (eds.), Deductive and Object-Oriented Databases, (Proc. 2nd Int. Conf. on Deductive and Object-Oriented Databases (DOOD'91)), LNCS 566, Springer, 1991. [Goto et al. 1988] A. Goto et at., "Overview of the Parallel Inference Machine Architecture (PIM)", Proc. 109 Int. Con/. on Fifth Generation Computer Systems, Ie aT, Tokyo, Nov.28-Dec.2, 1988. [Haniuda et aI. 1991] H. Haniuda, Y. Abiru, and N. Miyazaki, "PHI: A Deductive Database Systern", Proc. IEEE Pacific Rim Conf. on Communication, Computers, and Signal Processing, May, 1991. [Hasida 1992] K. Hasida, "Dynamics of Symbol Systems - An Integrated Architecture of Cognition", Proc. Int. Con/. on Fifth Generation Computer Systems, IeOT, Tokyo, June 1-5, 1992. [Kawamura et aI. 1992] M. Kawamura, H. Naganuma, H. Sato, and K. Yokota, "Parallel Database Management System J(appa-P", Proc. Int. Con/. on Fifth Generation Compute1' Systems, IeOT, Tokyo, June 1-5, 1992. [Kifer and Lausen 1989] M. Kifer and G. Lausen, "FLogic - A Higher Order Language for Reasoning about Objects, Inheritance, and Schema", Proc. ACM SIGMOD Int. Con/. on Management of Data, pp.134-146, Portland, June, 1989. [Kim et al. 1990] "V. Kim, J.-M. Nicolas, and S. Nishio (eds.), Deductive and Object-Oriented Databases, (Proc. 1st Int. Con/. on Deductive and ObjectOriented Databases (DOOD89)) , North-Holland, 1990. [Miyazaki et al. 1989] N. Miyazaki, H. Haniuda, K. Yokota, and H. Itoh, "A Framework for Query Transformation", Journal of Information Processing, vol.l2, No.4, 1989. [Mukai 1988] K. Mukai, "Partially Specified Term in Logic Programming for Linguistic Analysis", Proc. Int. Con/. on Fifth Generation Computer Systems, IeOT, Tokyo, Nov.28-Dec.2, 1988. [Schek and Weikum 1986] H.-J. Schek and G. Weikum, "DASDBS: Concepts and Architecture of a Database System for Advanced Applications", Tech. Univ. of Darmstadt, Technical Report, DVSI-1986-Tl, 1986. [Tanaka 1992] H. Tanaka, "Integrated System for Protein Information Processing", Proc. Int. Con/. on Fifth Generation Computer Systems, IeOT, Tokyo, June 1-5, 1992. [Tojo and Yasukawa 1992] S. Tojo and H. Yasukawa, "Situated Inference of Temporal Information", Proc. Int. Con/. on Fifth Generation Computer Systems, IeOT, Tokyo, June 1-5, 1992. [Tsuda 1992] H. Tsuda, "cu-Prolog for ConstraintBased Grammar", Proc. Int. Con/. on Fifth Generation Computer Systems, IeOT, Tokyo, June 15, 1992. [Ueda and Chikayama 1990] K. Ueda and T. Chikayama, "Design of the Kernel Language for thr Parallel Ingerence Machine", The Computer Journal, vo1.33, no.6, 1990. [Verso 1986] J. Verso, "VERSO: A Data Base Machine Based on Non lNF Relations", INRIA Technical Report, 523, 1986. [Yamamoto 1990] N. Yamamoto, "TRIAL: a Legal Reasoning System (Extended Abstract)", Joint French-Japanese Workshop on Logic Programming, Renne, France, July, 1991. [Yasukawa et al. 1992] H. Yasukawa, H. Tsuda, and K. Yokota, "Object, Properties, and Modules in QUIXOT£", Proc. Int. Con/. on Fifth Generation Computer Systems, IeOT, Tokyo, June 1-5, 1992. [Yokota 1988] K. Yokota, "Deductive Approach for Nested Relations", Programming of Future Generation Computers II, eds. by K. Fuchi and L. Kott, North-Holland, 1988. [Yokota et al. 1988] K. Yokota, M. Kawamura, and A. Kanaegami, "Overview of the Knowledge Base Management System (KAPPA)", Proc. Int. Conf. on Fifth Generation Computer Systems, IeOT, Tokyo, Nov.28-Dec.2, 1988. [Yokota and Nishio 1989] K. Yokota and S. Nishio, "Towards Integration of Deductive Databases and Object-Oriented Databases - A Limited Survey", Proc. Advanced Database System Symposium, Kyoto, Dec., 1989. [Yoshida 1991] K. Yoshida, "The Design Principle of the Human Chromosome 21 Mapping Knowledgebase (Version CSH91)", Inetrnal Technical Report of Lawrence Berkley Laboratory, May, 1991. 110 Appendix Notes on Projects for Database and Knowledge-Base Management Systems In this appendix, we describe an outline of projects on database and knowledge-base management systems in the FGCS project. A brief history is shown in Figure 19 15. Among these projects, Mitsubishi Electric Corp. has cooperated in Kappa-I, Kappa-II, Kappa-P, DO-l, CIL, and QUIXOTE projects, Oki Electric Industry Co., Ltd. has cooperated in PHI (DO-c/» and QUIXOTE projects, and Hitachi, Ltd. has cooperated in ETA (DO-7J) and QUIXOTE projects. a. Kappa Projects In order to provide database facilities for knowledge information processing systems, a Kappa 16 project begun in September, 1985 (near the beginning of the intermediate stage of the FGCS project). The first target was to build a database wi th electronic dictionaries including concept taxonomy for natural language processing systems and a database for mathematical knowledge for a proof checking system called CAP-LA. The former database was particularly important: each dictionary has a few hundred thousands entries, each of which has a complex data structure. We considered that the normal relational model could not cope with such data and decided to adopt a nested relational model. Furthermore, we decided to add a new type term for handling mathematical knowledge. The DBMS had to be written in ESP and work on PSI machines and under the SIMPOS operating system. As we were afraid of whether the system in ESP would work efficiently or not, we decided on the semantics of a nested relation and started to develop a prototype system called Kappa-I. The system, consisting of 60 thousands lines in ESP, was completed in the spring of 1987 and was shown to work efficiently for a large amount of dictionary data. The project was completed in August, 1987 after necessary measurement of the processing performance. After we obtained the prospect of efficient DBMS on PSI machines, we started the next project, KappaII[Yokota et al. 1988J in April, 1987, which aims at a practical DBMS based on the nested relational model. Besides the objective of more efficient performance than Kappa-I, several improvements were planned: a main memory database facility, extended relational 15 At the initial stage of the FGCS project, there were other projects for databases and knowledge-based: Delta and Kaiser, however these were used for targets other than databases and know ledge- bases. 16 A term Kappa stands for know/edge application oriented gdvanced database management system. algebra, user-definable command facility, and userfriendly window interface. The system, consisting of 180 thousand lines in ESP, works 10 times more efficiently in PSI-II machines than Kappa-I does in PSI-I. The project was over in March, 1989 and the system was widely released, not only for domestic organizations but also for foreign ones, and mainly for genetic information processing. To handle larger amounts of data, a parallel DBMS project called Kappa-P[Kawamura et al. 1992J was started in February, 1989. The system is written in KLl and works under an environment of PIM machines and the PIMOS operating system. As each local DBMS of Kappa-P works on a single processor with almost the same efficiency as Kappa-II, the system is expected to work on PIM more efficiently than KappaII, although their environments are different. b. Deductive Database Projects There were three projects for deductive databases. First, in parallel with the development of Kappa, we started a deductive database project called CRL (complex record language) [Yokota 1988], which is a logic programming language newly designed for treating nested relations. CRL is based on a subclass of complex objects constructed by set and tuple constructors and with a module concept. The project started in the summer of 1988 and the system, called DO-l, was completed in November, 1989. The system works on Kappa-II. The query processing strategy is based on methods of generalized magic sets and semi-naive evaluation. In it, rule inheritance among modules based on submodule relations are dynamically evaluated. Secondly, we started a project called PHI [Haniuda et al. 1991] in the beginning of the intermediate stage (April, 1985). This aimed at more efficient query processing in traditional deductive databases than other systems. The strategy is based on three kinds of query transformation called Horn clause transformation (HCT)[Miyazaki et al. 1989J: HCT/P executes partial evaluation or unfolding, HCT IS propagates binding information without rule transformation, and HCT/R transforms a set of rules in order to restrict the search space and adds related new rules. The HCT/R corresponds to the generalized magic set strategy. By combining these strategies, PHI aims at more efficient query processing. The consequent project is called DO-c/>, in which we aim at a deductive mechanism for complex objects. Thirdly, we started a project called ETA in April, 1988, which aimed at knowledge-base systems based on knowledge representation such as semantic networks. One year later, the project turned towards extensions of deductive databases and was called DO-7J. III ~~1~9~8~5~+1~1~9~8~6~~~1~9~8~7__~~1~9~8~8~+-~19~8~9~~~1~9~9~O__~~1~9~9~1~+-~1~92 (Kappa-r)~---..---.... ~------------------~-r--~ '--~~-./ ( PHI )r----------------~~__~ ~--------_H~~--~ elL QuIXOTE EB (Parallel) KIPS (Natural Language, Mathematical Knowledge, Biological Information, Legal Precedents, ... ) Figure 19: Brief History of Projects on Database and Knowledge-Base Management Systems "DO" in the above projects stands for deductive and object-oriented databases and is shown to adopt a concept of DOODs [Yokota and Nishio 1989] as its common framework. c. elL Project A language called GIL (complex indeterminates language) was proposed in April, 1985 [Mukai 1988]. The language aimed at semantic representation in natural language processing and was used not only in the discourse understanding system called DUALS, but also for representing various linguistic information. The implementation of CIL was improved several times and CIL was released to many researchers in natural language processing. The language is a kind of constraint logic programming and closely relates to situation theory and semantics. The language is based on partially specified terms, each of which is built by a tuple constructor. A set constructor was introduced into partia.lly specified terms in another language cu-Prolog, as mentioned in Section 5.1. d. QuIXOTE Project We tried to extend CRL not only for nested relations but a.lso for DOODs, a.nd to extend CIL for more efficient representation, such as the disjunctive feature structure. After these efforts, we proposed two new languages: Jllan, as an extension of CRL, and QUINT, as an extension of CIL. While designing their specifications, we found many similarities between Jllan and QUINT, and between concepts in databases and natural language processing, and decided to integrate these languages. The integrated language is QUIxoTf;[Yasukawa et ai. 1992] (with Spanish pronun- ciation) 17. As the result of integration, QUIXOTE has various features, as mentioned in this paper. The QUIXOTE project was started in August, 1990. The first version of QUIXOTE was released to restricted users in December, 1991, and the second version was released for more applications at the end of March, 1992. Both versions are written in KLI and work on parallel inference machines. e. Working Groups on DOOD and STASS At the end of 1987, we started to consider integration of logic and object-orientation concepts in the database area. After discussions with many researchers, we formed a working group for DOOD and started to prepare a new international conference on deductive and object-oriented databases 18. The working group had four sub-working-groups in 1990: for database programming languages (DBPL), deductive databases and artificial intelligence (DDB&AI), extended term representation (ETR), and biological databases (BioDB). In 1991, the working group was divided into intelligent databases (IDB) and next generation databases (NDB). In their periodic meetings 19, we discussed not only problems of DOOD but also directions and problems l70ur naming convention follows the DON series, such as Don Juan and Don Quixote, where DON stands for "Deductive Object-Oriented Nucleus". l8Most of the preparation up until the first international conference (DOOD89) was continued by Professor S. Nishio of Osaka University. 19Their chairpersons are Yuzuru Tanaka of Hokkaido U. for DOOD, Katsumi Tanaka of Kobe U. for DBPL, Chiaki Sakama of ASTEM for DDB&AI and IDB, Shojiro Nishio of Osaka U. for ETR, Akihiko Konagaya of NEC for BioDB, and Masatoshi Yoshikawa of Kyoto Sangyo U. for NDB. 112 of next generation databases. These discussions contributed greatly to our DOOD system. From another point of view, we formed a working group (STS) 20 for situation theory and situation semantics in 1990. This also contributed to strengthening other aspects of QUIXOTe and its applications. 20The chairperson is Hozumi Tanaka of Tokyo Institute of Technology. PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON FIFTH GENERATION COMPUTER SYSTEMS 1992 edited by ICOT. © ICOT, 1992 ' 113 CONSTRAINT LOGIC PROGRAMMING SYSTEM CAL, (iDCC AND THEIR CONSTRAINT SOLVERS- Akira Aiba and Ryuzo Hasegawa Fourth Research Laboratory Institute for New Generation Computer Technology 4-28, Mita l-chorne, Minato-ku, Tokyo 108, Japan {aiba, hasegawa}@icot.or.jp Abstract This paper describes constraint logic programming languages, CAL (Contrainte Avec Logique) and GDCC (Guarded Definite Clauses with Constraints), developed at lCOT. CAL is a sequential constraint logic programming language with algebraic, Boolean, set, and linear constraint solvers. GDCC is a parallel constraint logic programming language with algebraic, Boolean, linear, and integer parallel constraint solvers. Since the algebraic constraint solver utilizes the Buchberger algorithm, the solver may return answer constraints including univariate nonlinear equations. The algebraic solvers of both CAL and GDCC have the functions to approximate the real roots of univariate equations to obtain all possible values of each variable. That is, this function gives us the situation in which a certain variable has more than one value. To deal with this situation, CAL has a multiple environment handler, and GDCC has a block structure. We wrote several application programs in GDCC to show the feasibility of the constraint logic programming language. 1 Introduction The Fifth Generation Computer System (FGCS) project is a Japanese national project that started in 1982. The aim of the project is to research and develop new computer technologies for knowledge and symbol processing parallel computers. The FGCS prototype system has three layers: the prototype hardware system, the basic software system, and the knowledge programming environment. Parallel application software has been developed for these. The constraint logic programming system is one of the systems that form, together with the knowledge base construction and the programming environment, the knowledge programming environment. In this paper, we describe the overall research results of constraint logic programming systems in lCOT. The programming paradigm of constraint logic programming (CLP) was proposed by A. Colmerauer [Colmerauer 1987] and J. Jaffar and J-L. Lassez [Jaffar and Lassez 1987] as an extension of logic programming by extending its computation domain. Jaffar and Lassez showed that CLP possesses logical, functional, and operational semantics which coincide with each other, in a way similar to logic programming [van Emden and Kowalski 1976]. In 1986, we began to research and develop high-level programming languages suitable for problem solving to achieve our final goal, that is, developing efficient and powerful parallel CLP languages on our parallel machine. The descriptive power of a CLP language is strongly depend on its constraint solver, because a constraint solver determines the domain of problems which can be handled by the CLP language. Almost all existing CLP languages such as Prolog III [Colmerauer 1987] and CLP(n) [Jaffar and Lassez 1987] has a constraint solver for linear equations and linear inequalities. Unlike the other CLP languages, we focused on nonlinear algebraic equation constraints to deal with problems which are described in terms of nonlinear equations such as handling robot problem. For the purpose, we selected the Buchberger algorithm for a constraint solver of our languages. Besides of nonlinear algebraic equations, we were also interested in writing Boolean constraints, set constraints, linear constraints, and hierarchical constraints in our framework. For Boolean constraints, we modify the Buchberger algorithm to be able to handle Boolean constraints, and later, we developed the algorithm for Boolean constraints based on the Boolean unification. For set constraints, we expand the algorithm for Boolean constraints based on the Buchberger algorithm. We also implemented the simplex method to deal with linear equations and linear inequalities same as the other CLP languages. Furthermore, we tried to handle hierarchical constraints in our framework. We developed two CLP language processors, first we implemented a language processor for sequential CLP 114 language named CAL (Contrainte A vee Logique) on sequential inference machine PSI, and later, we imple. mented a language processor for parallel CLP language named GDCC (Guarded Definite Clauses with Constraints), based on our experiments on extending CAL processor by introducing various functions. In Section 2, we briefly review CLP, and in Section 3, we describe CAL. In Section 4, we describe GDCC, and in Section 5, we describe various constraint solvers and their parallelization. In Section 6, we introduce application programs written in our languages. 2 eLP and the role of the constraint solver CAL and GDCC belong to the family of CLP languages. The concept of CLP stems from the common desire for easy programming. In fact, as claimed in the literature [Jaffar and Lassez 1987, Sakai and Aiba 1989], the CLP is a scheme of programming languages with the following outstanding features: • Natural declarative semantics. • Clear operational semantics that coincide with the declarative semantics. Therefore, it gives the user a paradigm of declarative (and thus, hopefully easy) programming and gives the machine an effective mechanism for execution that coincide with the user's declaration. For example, in Prolog (the most typical instance of CLP), we can read and write programs in declarative style like ". " if ... and ... ". The system execute these by a series of operations with unification as its basic mechamsm. Almost every CLP language has a similar programming style and a mechanism which plays the similar role to the unification mechanism in Prolog, and the execution of programs depends on the mechanism heavily. We call such a mechanism the constraint solver of the language. Usually, a CLP language aims at a particular field of problems and its solver has special knowledge to solve the problems. In the case of Prolog, the problems are syntactic equalities between terms, that is, the unification. On the other hand, CAL and GDCC are tuned to deal with the following: • algebraic equations • Boolean equations • set inclusion and membership • linear inequalities These relations are called constraints. In the CLP paradigm, a problem is expressed as constraints on the objects in the problem. Therefore, an often cited benefit of CLP is that "One does not need to write an implementation but a specification." In other words, all that a programmer should write in CLP is constraints between the objects, but not how to find objects satisfying the relation. To be more precise, such constraints are described in the form of a logical combination of formulas each of which expresses a basic unit of the relation. Though there are many others, the above benefit surely expresses an important feature of CLP. Building an equation is usually easier than solving it. Similarly, one may be able to write down the relation between the objects without knowing the method to find the appropriate values of obJects which satisfy the relation. An ideal CLP system should allow a programmer to write any combination of any well-formed formulas. The logic programming paradigm gives us a rich framework for handling logical combinations of constraints. However, we still need a powerful and flexible constraint solver to handle each constraint. To discuss the function of the constraint solver from a theoretical point of view, the declarative semantics of CLP [Sakai and Aiba 1989] gives us several criteria. Assume that constraints are given in the form of their conjunction. Then, the following are the criteria. (1) Can the solver decide whether a given constraint is satisfiable? (2) Given satisfiable constraints, is there any way for the solver to express all the solutions in simplified form? Prolog's constraint solver, the unification algorithm, answers these criteria affirmatively and so do the solvers in CAL and GDCC. In fact, they satisfy the following stronger requirements almost perfectly: (3) Given a set of constraints, can the solver compute the simplest form (called the canonical form of the constraints) in a certain sense? However, these criteria may not be sufficient from an applicational point of view. For example, we may sometimes be asked the following: (4) Given satisfiable constraints, can the solver find at least one concrete solution? Finding a concrete solution is a question usually independent of the above and may be proved theoretically impossible to answer. Therefore, we may need an approximate solution to answer this partly. As discussed later, we incorporated many of the constraint solvers and functions into CAL and GDCC. Another important feature of constraint solvers is their incrementality. An incremental solver can be given a constraint successively. It reduces each constraint as simple 115 as possible by the current set of constraints. Thus, an incremental solver finds the unsatisfiabilityof a set of constraints as early as possible and makes Prolog-type backtracking mechanism efficient. Fortunately, the solvers of CAL and GDCC are fully incremental like unification. CA This section summarizes the syntax of CAL. For a detailed description of CAL syntax, refer to the CAL User's Manual [CAL Manual]. 3.1 CAL language The syntax of CAL is similar to that of Prolog, except for its constraints. A CAL program features two types of variables: logical variables denoted by a sequence of alphanumeric characters starting with an uppercase letter (as with Prolog variables), and constraint variables denoted by a sequence of alphanumeric characters starting with a lowercase letter. Constraint variables are global variables, while logical variables are local variables within the clauses in which they occur. This distinction is introduced to simplify incremental querying. The following is an example CAL program that features algebraic constraints. This program derives a new property for a triangle, the relation which holds among the lengths of the three edges and the surface area, from the three known properties. :- public triangle/4. surface_area(H,L,S) :- alg:L*H=2*S. right(A,B,C) :- alg:A-2+B-2=C-2. triangle(A,B,C,S) :alg:C=CA+CB, right (CA,H,A), right(CB,H,B), surface_area(H,C,S) . The first clause, "surface_area", expresses the formula for computing the surface area S from the height H and the baseline length L. The second expresses the Pythagorean theorem for a right-angled triangle. The third asserts that every triangle can be divided into two right-angled triangles. (See Figure 1.). In the following query, heron, shows the name of the file in which the CAL source program is defined. ?- alg:pre(s,10), heron:triangle(a,b,c,s). This query asks for the general relationship between the lengths of the three edges and the surface area. CB ~.---------------C----------~~~ CAL - Sequential CLP Language 3 Figure 1: The third clause The invocation of alg: pre (s , 10) defines the precedence of the variable s to be 10. Since the algebraic constraint solver utilizes the Buchberger algorithm, ordering among monomials is essential for computation. This command changes the precedence of variables. Initially, the precedences of all variables are assigned to O. Therefore, in this case, the precedence of variable s is raised. To this query, the system responds with the following equation 1: s-2 = -1/16*b-4+1/8*a-2*b-2-1/16*a-4 +1/8*c-2*b-2+1/8*c-2*a-2-1/16*c-4. This equation is, actually, a developed form of Heron's formula. 'When we call the query ?- heron:triangle(3,4,5,s). the CAL system returns the following answer: If a variable has finitely many values in all its solutions, there is a way of obtaining a univariate equation with the variable in the Grabner base. Therefore, if we can add a function that enables us to compute the approximate values of the solutions of univariate equations, we can approximate all possible value of the variable. For this purpose, we implemented a method of approximating the real roots of univariate polynomials. In CAL, all real roots of univariate polynomials are isolated by obtaining a set of intervals, each of which contains one real root. Then, each isolated real root is approximated by the given precision. For application programs, we wanted to use approximate values to simplify other constraints. The general method to do this is to input equations of variables and their approximate values as constraints. For this purpose, we had to modify the original algorithm to compute Grabner bases to accept approximate values. vVhen we call the query IThis equation represents the expression 116 I User Program, Query, Command I I Translator 1· alg:pre(s.1 0). heron:triangle(3. 4.5. s). alg:geuesull(eq. 1. nonlin. R).alg:fmd(R,Sol). alg:con.rlr(Sol). Translated Code R-[s"2-36]. Sol-[s-real(·. [935.2054.5183.8764.3451. [3488.342.7523.6460.57])] - Is - -6.000000099] . • - ·6.000000099 ? Inference Engine Constraints R-[s"2-36]. Sol-[5-re81(+. [935. 2054. 5183. 8764. 345J. [3488. 342. 7523. 6460. 57J)J - Is - 6.000000099] . • - 6.000000099 ~ Canno nical Form Constraint Solvers Figure 2: Overall construction of CAL language processor ?- alg:set_out_mode(float), alg:set_error1(1!1000000), alg:set_error2(1!100000000), heron:triangle(3,4,5,s), alg:get_result(eq,1,nonlin,R) , alg:find(R,S), alg:constr(S). we can obtain the answers s = -6.000000099 and s = 6.000000099, successively by backtrack. The first line of the above, alg: set_out...mode, sets the output mode to float. Without this, approximate values are output as fractions. The second line of the above, alg: seLerror1, specifies the precision used to compare coefficients in the computation of the Grabner base. The third line, set_error2, specifies the precision used to approximate real roots by the bisection method. The essence of the above query is invocations of alg:get_result/4, and alg:find/2. The fifth line, alg : get_result, selects appropriate equations from the Grabner base. In this case, univariate (specified by 1) non-linear (specified by nonlin) equations (specified by eq) are selected and unified to a variable R. R is then passed to alg: find to approximate the real roots of equations in R. Such real roots are obtained in the variable S. Then, S is again input as the constraint to reduce other constraints in the Grabner base. 3.2 Configuration of CAL system In this section, we will introduce the overall structure of the CAL system. The CAL language processor consists of a translator, a inference engine, and constraint solvers. These subsystems are combined as shown in Figure 2. The translator receives input from a user, and translates it into ESP code. Thus, a CAL source program Figure 3: CAL system windows is translated into the corresponding ESP program by the translator, which is executed by the inference engine. An appropriate constraint solver is invoked everytime the inference engine finds a constraint during execution. The constraint solver adds the newly obtained constraint to the set of current constraints, and computes the canonical form of the new set. At present, CAL offers the five constraint solvers discussed in Section 1. 3.3 Context . To deal with a situation in which a variable has more than one value, as in the above example, we introduced context and context tree. A context is a set of constraints. A new context is created whenever the set is changed. In CAL, contexts are represented as nodes of a context tree. The root of a context tree is called the root context. The user is supposed to be in a certain context called the current context. A context tree is changed in the following cases: 1. Goal execution: A new context is created as a child-node of the current context in the context tree. 2. Creation of a new set of constraints by requiring other answers for a goal: A new context is created as a sibling node of the current context in the context tree. 3. Changing the precedence: A new context is created as a child-node of the current context in the context tree. In all cases, the newly created node represents the new set of constraints and becomes the current context. Several commands are provided to manipulate the context tree: These include a command to display the contents of a context, a command to set a context as the 117 current context, and a command to delete the sub-tree of contexts from the context tree. Figure 3 shows an example of the CAL processor window. 4 GDCC Parallel CLP Programming Language There are two major levels to parallelizing CLP systems. One is the execution of the Inference Engines and the Constraint Solvers in p~ra.llel. The other is the execution of a Constraint Solvers in parallel. There are several works on the parallelization of CLP systems: a proposal of ALPS [Maher 1987] introducing constraints into committed-choice language, a report of some preliminary experiments on integrating constraints into the PEPSys parallel logic system [Van Hentenryck 1989], and a framework of concurrent constraint (cc) language for integrating constraint programming with concurrent logic programming languages [Saraswat 1989]. The cc programming language paradigm models computation as the interaction among multiple cooperating agents through the exchange of query and assertion messages into a central store as shown in Figure 4. In Figure 4, query information to the central store is represented as Ask and assertion information is represented as Tell. This paradigm is embedded in a guarded (conditional) reduction system, where the guards contain the queries and assertions. Control is achieved by requiring that the queries in a guard are true (entailed), and that the assertions are consistent (satisfiable), with respect to the current state of the store. Thus, this paradigm has high affinity with KL1 [Ueda and Chikayama 1990], our basic parallel language. c;> yP " " ,..--.........--~-.... Ask @ Query True or False Add constrain@ ... Answer constraint Tell Figure 4: The ee language schema GDCC (Guarded Definite Clauses with Constraints), which satisfies two level parallelism, is a parallel CLP language introducing the framework of ee. It is implemented in KL1 and is currently running on the MultiPSI machine. GDCC includes most of KL1, since KL1 built-in predicates and unification can be regarded as a distinguished domain called HERBRAND [Saraswat 1989]. GDCC contains Store, a central database to save the canonical forms of constraints. Whenever the system meets an Ask or Tell constraint, the system sends it to the proper solver. Ask constraints are only allowed passive constraints which can be solved without changing the content of the Store. While in the Tell part, constraints which may change the Store can be written. In the GDCC program, only Ask constraints can be written in guards. This is similar to the KL1 guard in which active unification is inhibited. GDCC supports multiple plug-in constraint solvers so that the user can easily specify a proper solver for a domam. In this section, we briefly explain the language syntax of GDCC and its computa.tion model. Then, the outline of the system is described. For further information about the implementation and the language specification, refer to [Terasaki et al. 1992]. 4.1 GDCC language A clause in GDCC has the following syntax: Head: - Ask I Tell, Goal. where, Head is a head part of a clause, "I" is a commit operator, Goal is a sequence of predicate invocations, Ask denotes Ask-constraints and invocations of KL1 built-in guard predicates, and Tell means Tell-constraints. A clause is entailed if and only if Ask is reduced to true. Any clause with guards which cannot be reduced to either true or false is suspended. The body part, the right hand side of the commit operator, is evaluated if and only if Ask is entailed. Clauses whose guards are reduced true are called candidate clauses. A GDCC program fails when either all candidate clauses are rejected or there is a failure in evaluating Tell or Goals. The next program is pony _and_man written in GDCC: pony_and_man(Heads,Legs,Ponies,Men) alg# Heads= Ponies + Men, alg# Legs= 4*Ponies + 2*Men. true I where, true is an Ask constraint which is always reduced as true. In the body, equations which begin with alg# are Tell constraints. alg# indicates that the constraints are solved by the algebraic solver. In a body part, not only Tell constraints but normal KL1 predicates can be written as well. Bi-directionality in evaluation of constraints, an important characteristic of CLP, is not spoiled by this limitation. For example, the query ?pony_and_man(5,14,Ponies,Men). will return Ponies=2, and Men=3, and the query 118 ?- pony_and_man(Heads,Legs,2,3). will return Heads=5, and Legs=14, same as in CAL. 4.2 GDCC system The GDCC system consists of the compiler, the shell, the interface and the constraint solvers. The compiler translates a GDCC source program into KL1 code. The shell translates queries and provides rudimentary debugging facili ties. The debugging facilities comprise the standard KL1 trace and spy functions, together with solver-level event logging. The shell also provides limited support for incremental querying. The interface interacts with a GDCC program (object code), sends body constraints to a solver and checks guard constraints using results from a solver. Query Solve guard constraints roots in univariate equations. There are two constraint sets in this example, one includes X = v'2 and the other includes X = -v'2. In the CAL system, the system selects one constraint set from these two and solves it, then, the other is computed by backtracking (i. e. , a system forces a failure). In committed-choice language GDCC, however, we cannot use backtracking to handle multiple environments. A similar problem occurs when a meta operation to constraint sets is required such as when computing a maximum value with respect to a given objective function. Before executing a meta operation, all target constraints must be sent to the solver. In a sequential CLP, this can be controlled when this description is written in a program. While in GDCC, we need another kind of mechanism to specify a synchronization point, since the sequence of clauses in a program does not relate to the execution sequence. Introducing local constraint sets, however, which are independent to the global ones, can eliminate these problems. Multiple environments are realized by considering each multiple local constraint as one context. An inference engine and constraint solvers can be synchronized after evaluating a local constraint set. Therefore, we introduced a mechanism called block to describe the scope of a constraint set. vVe can solve a certain goal sequence with respect to a local constraint set in a block. To encapsulate failure in a block, the shoen mechanism of PIMOS [Chikayama et al. 1988] is used. GDCC sonrce Figure 5: System Configuration of GDCC The GDCC system is shown in Figure 5. The components are concurrent processes. Specifically, a GDCC program and the constraint solvers may execute in parallel, synchronizing only when, and to the extent, necessary at the program's guard constraints. That is, program execution proceeds by selecting a clause, and attempting to solve the guards of all its clauses in parallel. If one guard succeeds, the evaluation of the other guards is abandoned, and execution of the body can begin. In parallel with execution of the body goals by the inference engine, any constraints occurring in the body are passed to the constraint solver as they are being produced by the inference engine. This style of cooperation is very loosely synchronized and more declarative than sequential CLP. 4.3 Block In order to apply GDCC to problems such as handling robot design problem [Sato and Aiba 1991], there were two major issues: handling multiple environments and synchronizing the inference engine with the constraint solvers. For instance, when the solution X 2 = 2 is derived from the algebraic solver, it must be solved in more detail using a function to compute the approximate real -5 Constraint Solvers and Parallelization In this section, constraint solvers for both CAL and GDCC are briefly described. First, we describe the algebraic constraint solver for both CAL and GDCC. Then, we describe two Boolean constraint solvers - one is a solver utilizing the modified Buchberger algorithm and the other is a solver utilizing the incremental Boolean elimination algorithm. The former is for both CAL and GDCC, while the later is for CAL alone. Third, an integer constraint solver for GDCC is described, and fourth, a hierarchical constraint solver for CAL and GDCC is described. In the next subsection,a set constraint solver for CAL is described. And in the last subsection, a preHminary consideration on efficiency improvement of the algebraic constraint solver by applying dependency analysis of constraints. All constraint solvers for CAL are written in ESP, and those for GDCC are written in KL1. 5.1 Algebraic Constraint Solver The constraint domain of the algebraic solver is multivariate (non-linear) algebraic equations. The Buchberger 119 algorithm [Buchberger 1985] is a method to solve nonlinear algebraic equations which have been widely used in computer algebra over the past years. Recently, several attempts have been made to parallelize the Buchberger algorithm, with generally disappointing results in absolute performance [Ponder 1990, Senechaud 1990, Siegl 1990], except in shared-memory machines [Vidal 1990, Clarke et al. 1990]. 'liVe parallelize the Buchberger algorithm while laying emphasis on absolute performance and incrementality rather than on. deceptive parallel speedup. We have implemented several versions and continue to improve the algorithm. In this section, we outline both the sequential version and the parallel version of the Buchberger algorithm. 5.1.1 Grabner base and Buchberger algorithm Without loss of generality, we can assume that all polynomial equations are in the form of p = O. Let E = {PI = 0, ... ,pn = O} be a system of polynomial equations. Buchberger introduced the notion of a Grabner base and devised an algorithm to compute the basis of a given set of polynomials. A rough sketch of the algorithm is as follows (see [Buchberger 1985] for a precise definition). Let a certain ordering among monomials and a system of polynomials be gi ven. An equation can be considered a rewrite rule which rewrites the greatest monomial in the equation to the polynomial consisting of the remaining monomials. For example, if the ordering is Z > X > B > A, a polynomial equation, Z - X + B = A, can be considered to be the rewrite rule, Z - t X -B+A. A pair of rewrite rules LI - t RI and L2 - t R 2, of which LI and L2 are not mutually prime, is called a critical pair, since the least common multiple of their left-hand sides can be rewritten in two different ways. The S-polynomial of such a pair is defined as: where lcm(L I , L 2 ) represents the least common multiplier of LI and L 2 • If further rewriting does not succeed in rewriting the S-polynomial of a cri tical pair to zero, the pair is said to be divergent and the S-polynomial is added to the system of equations. By repeating this procedure, we can eventually obtain a confluent rewriting system. The confluent rewriting system thus obtained is called a Grabner base of the original system of equations. If a Grabner base does not have two rules, one of which rewrites the other, the Grabner base is called reduced. The reduced Grabner base can be considered a canonical form of the given constraint set since it is unique with respect to the given ordering of monomials. If all the solutions of a equation f = are included in the solution set of E, then f is rewritten to zero by the Grabner base of E. On the contrary, if a set of polynomials E ° has no solution, then the Grabner base of E includes "1". Therefore, this algorithm has good properties for deciding the satisfiability of a given constraint set. 5.1.2 Parallel Algorithm The coarse-grained parallelism in the Buchberger algorithm, suitable for the distributed memory machine, is the parallel rewriting of a set of polynomials. However, since the convergence rate of the Buchberger algorithm is very sensitive to the order in which polynomials are converted into rules, implementation must carefully select small polynomials at an early stage. We have implemented solvers in three different architectures; namely, a pipeline, a distributed architecture, and a master-slave architecture. We briefly mention here the master-slave architecture since this solver has comparatively good performance. Figure 6 shows the architecture. New rule (global minimum) Load balance info. Figure 6: Architecture of master-slave type solver The set of polynomials E is physically partitioned with each slave taking a different part. The initial rule set of G(E) is duplic?-ted so that all slaves use the same rule set. New polynomials are distributed to the slaves by the master. The outline of the reduction cycle is as follows. Each slave rewrites its own polynomials by the G(E), selects the local minimum polynomial from them, and sends its leading power product to the master. The master processor waits for reports from all the slaves, and selects the global minimum power products. The minimum polynomial can be decided only after all slaves finish reporting to the master. A polynomial, however, which is not the minimum can be decided quickly. Thus, the notminimum message is sent to slaves as soon as possible, and the processors that receive the not-minimum message reduce polynomials by the old rule set while waiting for a new rule. While the slave is receiving the minimum message, the slave converts the polynomial into a new rule and sends it to the master. The master sends the new rule to all slaves except the owner. If more than one candidate have equal power products, then all of these 120 candidates are converted to rules by slaves and they go to final selection at the master. Table 1 shows the results of the benchmark problems. The problems are adopted from [Boege et al. 1986, Backelin and Froberg 1991]. Refer to [Terasaki et ai. 1992] for further details. Timing and speedup of the master-slave Table 1: arch.( unit:sec) Problems Katsura-4 Katsura-5 Cyc.5-roots Cyc.6-roots 5.2 1 8.90 1 86.74 1 27.58 1 1430.18 1 2 7.00 1.27 57.81 1.50 21.08 1.31 863.62 1.66 Processors 4 8 6.53 5.83 1.53 1.36 39.88 31.89 2.18 2.72 19.27 19.16 1.44 1.43 433.73 333.25 4.29 3.30 16 9.26 0.96 36.00 2.41 25.20 1.10 323.38 4.42 Boolean Constraint Solver There are several algorithms that solve Boolean constraints, but we do not know so many that we can get the canonical form of constraints, one that can calculate solu tions incrementally and that uses no parameter variables. These criteria are important for using the algorithm as a constraint solver, as we described in Section 2. First, we implemented the Boolean Buchberger algorithm [Sato and Sakai 1988] for the CAL system, then we tried to parallelize it for the GDCC system. This algorithm satisfies all of these criteria. Moreover, we developed another sequential algorithm named Incremental Boolean elimination, that also satisfies all these criteria, and we implemented it for the CAL system. 5.2.1 Constraint Solver by Buchberger Algorithm We first developed a Boolean constraint solver based on the modified Buchberger algorithm called the Boolean Buchberger algorithm [Sato and Sakai 1988, Aiba et al. 1988]. Unlike the Buchberger algorithm, it works on the Boolean ring instead of on the field of complex numbers. It calculates the canonical form of Boolean constraints called the Boolean Grabner base. The constraint solver first transforms formulas including some Boolean operators such as inclusive-or (V) and! or not (.) to expressions on the Boolean ring before applying the algorithm. We parallelized the Boolean Buchberger algorithm in KL1. First we analyzed the execution of the Boolean Buchberger algorithm on CAL for some examples, then we found the large parts that may be worth parallelizing, rewriting formulas by applying rules. We also tried to find parts in the algorithm which can be parallelized by analyzing the algorithm itself. Then, we decided to adopt a master-slave parallel execution model. In a master-slave model, one master processor plays the role of the controller and the other slave processors become the reducers. The controller manages Boolean equations, updates the temporary Grabner bases (GB) stored in all slaves, makes S-polynomials and self-critical pair polynomials, and distributes equations to the reducers. Each reducer has a copy of GB and reduces equations which come from the controller by GB, and returns non-zero reduced equations to the controller. When the controller becomes idle after distributing equations, the controller plays the role of a reducer during the process of reduction. For the 6-queens problem, the speedup ratio of 16 processors to a single processor is 2.96. Because the parallel execution part of the problem is 77.7% of whole execution, the maximum speedup ratio is 4.48 in our model. The difference is due to the task distribution overhead, the update of GB in each reducer, and the imbalance of distributed tasks. Then, we improved our implementation so as not to make redundant critical pairs. This improvement causes the ratio of parallel executable parts to decrease, so the improved version becomes faster than the origInal version, but the speedup ratio of 16 processors to a single processor drop to 2.28. For more details on the parallel algorithm and results, refer to [Terasaki et al. 1992]. 5.2.2 Constraint Solver by Incremental Boolean Elimination Algorithm Boolean unification and SL-resolution are well known as Boolean constraint solving algorithms other than the Boolean Buchberger algorithm. Boolean unification is used in CHIP [Dincbas et ai. 1988] and SL-resolution is used in Prolog III [Colmerauer 1987]. Boolean unification itself is an efficient method. It becomes even more efficient using the binary decision diagrams (BDD) as data structures to represent Boolean formulas. Because the solutions by Boolean unification include extra variables introduced during execution, it cannot calculate any canonical form of the given constraints if we execute it incrementally. For this reason, we developed a new algorithm, Incremental Boolean elimination. As with the Boolean unification, this algorithm is based on Boole's elimination, but it introduces no extra variables, and it can calculate a canonical form of the given Boolean constraints. We denote Boolean variables by x, y, z, ... , and Boolean polynomials by A, B, C,. ... We represent all Boolean formulas only by logical connectives and (x) and exclusive-or (+). For example, we can represent Boolean formulas F!\ G, F V G and -,F by F x G, F x G + F + G and F + 1. We use the expression Fx=G to represent the formula obtained by substituting all occurrences of variable x in formula F with formula G. We omit x symbols 121 as usual when there is no confusion. We assume that there is a total order over variables. We define the normal Boolean polynomials recursively as follows. 1. The two constants 0, and 1 are normal. 2. If two normal Boolean polynomials A and B consist of only variables smaller than x, then Ax + B is normal, and we denote it by Ax EB B. We call A the coefficient of x. If variable x is at a maximum in formula F, then we can transformF to the normal formula (Fx=o+Fx=l)XEBFx=o. Hence we assume that all polynomials are normal. Boole's elimination says that if a Boolean formula F is 0, then Fx=o x Fx=l (= G) is also 0. Because G does not include x, if F includes x, then G includes fewer variables than F. Similarly we can get polynomials with fewer variables gradually by Boole's eliminations. Boolean unification unifies x with (Fx=o + Fx=l + 1)u + Fx=o after eliminating variable x from formula F, where u is a free extra variable. This unification means the substitution x with (Fx=o+Fx=l +1)u+Fx=o, when a new Boolean constraint with variable x is given, the result of the substitution contains u instead of x. Therefore, Boolean unification unifies u with a formula with another extra variable. Incremental Boolean elimination applies the following reduction to every formula instead of transforming F = to x = (Fx=o + Fx=l + 1)u + Fx=o and unifying x with (Fx=o + Fx=l + l)u + Fx=o. That is why the Incremental Boolean elimination needs no extra variables. ° Reduction A formula Cx (C ;j. 1) is reduced by the formula Ax EB B = shown below. This reductlon tries to reduce the coefficient of x to 1 if possible, otherwise it tries to reduce it to the sma.llest formula possible. ° Cx Cx -1 X -1 + BC + B (A + 1)Cx + BC (AC + A + C == 1) (otherwise) When a new Boolean constraint is given, the following operation is executed, since Incremental Boolean elimination does not execute unification. ° Merge Operation Let Cx EB D = be a new constraint, and suppose that we have a constraint AxEBB = 0. Then we make the merged constraint (AC + A +C)x EB (BD + B + D) = the new solution. If the normal form of AC D + BC + CD + D is not 0, we successively apply the merge operation to it. ° This operation is an expansion of Boole's elimination. That is, if we have no constraint yet, we can consider A and B as O. In this case, the merge operation is the same as Boole's elimination. Example Consider the following constraints. Exactly one of five variables a, b, c, d, e (a < b < c < d < e) is l. a 1\ b = 0, a 1\ c = 0, a 1\ d = 0, a 1\ e = 0, b 1\ c = 0, b 1\ d = 0, b 1\ e = 0, c 1\ d = 0, c 1\ e = 0, d 1\ e = 0, aVbVcVdVe=1 By Incremental Boolean elimination, we can obtain the following canonical solution. e (c+b+a)xd (b+a)xc ax b d+c+b+a+1 ° ° ° The solution can be interpreted as follows. Because the solution does not have an equation of the form A x a = B, variable a is free. Because a x b = 0, if a = 1 then the variable b is 0. Otherwise b is free. The discussion continues and, finally, because e = d + c + b + a + 1, if a, b, c, d are all 0, then variable e is 1. Otherwise e. is 0. By assignment of or 1 to all variables in increasing order of < under a solution by Boolean Incremental elimination, we can easily obtain any assignments that satisfy the given constraints. Thus, by introducing an adequate order to variables, we can obtain a favorite enumeration of assignments satisfy the given constraints. ° 5.3 Integer Linear Constraint Solver The constraint solver for the integer linear domain checks the consistency of the given equalities and inequalities of the rational coefficients, and, furthermore, gives the maximum or minimum values of the objective linear function under these constraint conditions. The purpose of this constraint solver is to provide an efficient constraint solver for the integer optimization domain by achieving a computation speedup incorporating pa.rallel execution into the search process. The integer linea.r solver utilizes the rational linear solver (parallellinea.r constraint solver) for the optimization procedure to obtain an evaluation of relaxed linear problems created in the course of its solution. A rational linear solver is realized by the simplex algorithm. We implemented the integer linear constraint solver for GDCC. 5.3.1 Integer Linear Programming and Branch and Bound Method In the following, we discuss a parallel search method employed in this integer linear constraint solver. The problem we are addressing is a mixed integer programming problem, namely, to find the maximum or minimum value of a given linear function under the integer linear constraints. The problem can be defined as follows: The problem is to minimize the following objective function on variables 122 Xj which run on real numbers, and variables Yj which run on integers: n Z m = L:Pi Xi + i=l L:qi Yi i=l under the linear constraint conditions: n m L: aij Xi + L: i=l bij Yi I: -:5. Ys -:5. [y:] y:' = [y:] 2: ej, for j = 1, ... ,1, i=l n m L:CijXi+ L:dijYi=/j, forj= 1, ... ,k, i=l i=l [Y;]+l-:5.ys -:5. u ; y:/1 = [y:]+l 'Figure 7: Branching of Nodes where Xi E R, and Yi Xi 2: 0, for i = 1, ... , n E Z, where li:S Yi :SUi, Ij,Uj EZ, fori=I, ... ,m and The method we use is the Branch-and-Bound algorithm. Our algorithm checks in the first place the solution of the original problem without requiring variables Yi in the above to take integer value. We call this problem a continuously relaxed problem. If the continuously relaxed problem does not have an integer solution, then we proceed by dividing the original problem into two subproblems successively, producing a tree structured search space. Continuously relaxed problems can be solved by the simplex algorithm, and if the original integer variables have exact integer values, then it yields the solution to the integer problem. Otherwise, we select an integer variable Ys which takes a non-integer value Ys for the solution of continuously relaxed problems, and imposes two different interval constraints derived from neighboring integers of the value Ys, Is -:5. Ys -:5. [Y3] and [Y3] + 1 -:5. Ys -:5. Us to the already existing constraints, and obtains two child problems (See Figure 7). Continuing this procedure, which is called branching, we go on dividing the search space to produce more constrained sub-problems. Eventually this process leads to a sub-problem with the continuous solution which is also the integer solution of the problem. We can select the best integer solution from among those found in the process. While the above branching process only enumerates integer solutions, if we have a measure to guarantee that a sub-problem cannot have a better solution compared to the already obtained integer solution in terms of the optimum value of the objective function, then we can skip that su b-problem and only need to search the rest of the nodes. Continuously relaxed problems give a measure for this, since these relaxed problems always have better optimum values for the objective function than the original integer problems. Sub-problems whose continuously relaxed problems have no better optimum than the integer solution obtained already cannot give a better optimum value, which means it is unnecessary to search further (bounding pro ced ure) . We call these sub-problems obtained through the branching process search nodes. The following two important factors decide the order in which the sequential search process goes through nodes in the search space: 1. The priorities of sub-problems(nodes) in deciding the next node on which the branching process works. 2. Selection of a variable out of the integer variables with which the search space is divided. It is preferable that the above selections are done in such a way that the actual nodes searched in the process of finding the optimal form as small a part of the total search space as possible. vVe adopted one of the best heuristics of this type from operations research as a basis of our parallel algorithm( [Benichou et ai. 1971]). 5.3.2 Parallelization Method of Branch-and-Bound As a parallelization of the Branch-and-Bound algorithm, we distribute search nodes created through the branching process to different processors, and let these processors work on their own sub-problems following a sequential search algorithm. Each sequential search process communicates with other processes to transmit information on the most recently found solutions and on pruning subnodes, thus making the search proceed over a network of processors. We adopted one of the best search heuristics used in sequential algorithms. Heuristics are used for controlling the schedule of the order of sub-nodes to be searched, in order to reduce the number of nodes needed to get to the final result. Therefore, it is important in designing parallel versions of search algorithms to balance the distributed load among processors, and to communicate information for pruning as fast as possible between these processors. 123 We considered a parallel algorithm design derived from the above sequential algorithm to be implemented on the distributed memory parallel machine Multi-PSI. Our parallel algorithm exploits the independence of many sub-processes created through the branching procedure in the sequential algorithm and distributes these processes to different processors (see Figure 8). Scheduling of sub-problems is done by the use of the priority control facility provided from the KL1 language (See[Oki et ai. 1989]). The incumbent solutions are transferred between processors as global data to be shared so that each processor can update the current incumbent solution as soon as possible. o o o ~o~ EJEJ EJ Figure 8: Generation of Parallel Processes 5.3.3 Experimental Results We implemented the above parallel algorithm in the KL1 language and experimented with the job-shop scheduling problem as an example of mixed-integer problems. Below are the results of computation speedups for a "4 job 3 machine" problem and the total number of searched nodes to get to the solution. Table 2: Speedup of the Integer Linear Constraint Solver processors speedup number of nodes 1.0 242 2 4 8 1.5 248 1.9 395 2.3 490 The above table shows the increase of the number of searched nodes as the number of processors grows. This is for one reason because of the speculative computation inherent in this type of parallel algorithm. Another reason is that the communication latency produces unnecessary computation which could have been avoided if incumbent solutions are communicated instantaneously from the other processor and the unnecessary nodes are pruned. It is in this way that we get the problem in parallel programming of how to reduce the growth in size of the total search space when multi-processors are used compared with that traversed on one processor using sequential algorithms. 5.4 5.4.1 Hierarchical Constraint Solver Soft Constraints and Constraint Hierarchies We have proposed a logical foundation of soft constraints in [Satoh 1990] by using a meta-language which expresses interpretation ordering. The idea of formalizing soft constraints is as follows. Let hard constraints be represented in first-order formulas. Then an interpretation which satisfies all of these first-order formulas can be regarded as a possible solution and soft constraints can be regarded as an order over those interpretations because soft constraints represent criteria applying to possible solutions for choosing the most preferred solutions. We use a metalanguage which represents a preference order directly. This meta-language can be translated into a second-order formula to provide a syntactical definition of the most preferred solutions. Although this framework is rigorous and declarative, it is not computable in general because it is defined by a second-order formula. Therefore, we have to restrict the class of constraints so that these constraints are computable. Therefore, we introduce the following restriction to make the framework computable. 1. We fix the considered domain so that interpretations of domain-dependent relations are fixed. 2. Soft and hard constraints consist of domaindependent relations only. If we accept this restriction, the soft constraints can be expressed in a first-order formula. Moreover, there is a relationship between the above restricted class of soft constraints and hierarchical CLP languages (HCLP languages) [Borning et ai. 1989, Satoh and Aiba 1990b], as shown in [Satoh and Aiba 1990a]. HCLP language is a language augmenting CLP language with labeled constraints. An HCLP program consists of rules of the form: h : - bb ... ,bn where h is a predicate, and bI , ... , bn are predicate invocations or constraints or labeled constraints. Labeled constraints are of the form: label C where C is a constraint in which only domain-dependent functional symbols can be functional symbols and label is a label which expresses the strength of the constraint C. As shown in [Satoh and Aiba 1990a], we can calculate the most preferable solutions by constraint hierarchies 124 in the HCLP language. Based on this correspondence, we have implemented an algorithm for solving constraint hierarchy on the PSI machine with the following features. 1. There are no redundant calls of the constraint solver for the same combination of constraints since it calculates reduced constraints in a bottom-up manner. 2. If an inconsistent combination of constraints is found by calling the constraint solver, it is registered as a nogood and is used for detecting further contradiction. Any extension of the combination will not be processed so as to avoid unnecessary combinations. 3. Inconsistency is detected without a call of the constraint solver if a processed combination subsumes a registered nogood. In [Borning et al. 1989], Borning et al. give an algorithm for the solving constraint hierarchy. However, it uses backtracking to get an alternative solution and so may redundantly call the constraint solver for the same combination of constraints. Our implemented language is called CHAL (Contrainte Hierarchiques avec Logique) [Satoh and Aiba 1990b], and is an extension of CAL. 5.4.2 Table 3: Performance of Parallel Hierarchical Constraint Solver( unit: sec) problems Tele4 5queen 6queen 1 43 1 69 1 517 1 2 32 1.34 39 1.77 264 1.96 Processors 4 8 32 32 1.34 1.34 26 21 2.65 3.29 136 77 3.80 6.71 16 29 1.48 19 3.63 50 10.34 Table 3 shows the speedup ration for three examples. Tele4 is to solve ambiguity in natural language phrases. 5queen arid 6queen are to solve the 5 queens and 6 queens problem. We represent these problems in Boolean constraints and use the Boolean Buchberger algorithm [Sato and Sakai 1988, Sakai and Aiba 1989] to solve the constraints. According to Table 3, we obtain 1.34 speedup for Tele4, 3.63 speedup for 5queen, and 10.34 speedup for 6queen. Although 6queen is a large problem for the Boolean Buchberger algorithm and gives us the largest speedup, the speedup saturates at around 16 processors. This expresses that the load is not well-distributed and we have to look for a better load-balancing method in the future. Parallel Solver for Constraint Hierarchies The algorithms we have implemented on the PSI machine have the following parallelism. 1. Since we construct a consistent constraint set in a bottom-up manner, the check for consistency for each independent constraint set can be done in parallel. 2. We can check if a constraint set is included in nogoods in parallel for each independent constraint set. 3. There is parallelism inside a domain-dependent constraint solver. 4. We can check for answer redundancy in parallel. Among these parallelisms, the first one is the most coarse and the most suitable for implementation on the Multi-PSI machine. So, we exploit the first parallelism. Then, features of the parallel algorithm become the following. 1. Each processor constructs a maximal consistent constraint set from a given constraint set in a bottom-up manner in parallel. However, oncea constraint set is given, there is no distribution of tasks. So, we make idle processors require some task from busy processors and if a busy processor can divide its task, then it sends the task to the idle processor. 2. By pre-evaluation of a parallel algorithm, we found that the nogood subsumption check and the redundancy check have very large overheads. So, we do not check nogood subsumptions and we check redundancy only at the last stage of execution. 5.5 Set Constraint Solver The set constraint solver handles any kind of constraint presented in the following conjunction of predicates. where each predicate Fi(X,X) is a predicate constructed from predicate symbols E, ~, =J. and =, function symbols n, U, and ."', element variables x, and set variables X, and some symbols of constant elements. For the above constraints, the solver gives the answer of the form: fl(X,X) =0 hl(X) = 0 hm(x) = 0 where hl(X) = 0, ... , hm(x) = 0 give the necessary and sufficient conditions for satisfying the constraints. Moreover, for each solution for the element variables, the system of whole equations instantiated by the solution puts the original constraints into a normal form (i.e. a solution). For more detailed information on the constraint solver, refer to [Sato et al. 1991]. 125 Let us first consider the following example. 0 A"'nC"'nE'" CUE ;2 B CUE ;2 D DnB'" ;2 A'" nB ~ A D AuB ;2 D In this example, {p} * {x} = 0 is the satisfiability condition. This holds if and only if x i- p. In this case, there are always A, B, C and D that satisfy the original constraints. The normal form is: D E*C A*B {x}*E*B {p} where the notation A'" denotes the complement of A. Since a class of sets forms a Boolean algebra, this constraint can be considered a Boolean constraint. Hence we can solve this by computing its Boolean Grabner base: D 5.6 We should note that there is neither an element variable nor a constant on elements in the above constraints. Hence they can be expressed as Boolean equations with variables A, B, C, D and E. This, however, does not necessarily hold in every constraint of sets. Consider the following constraints with an additional three predicates including elements. A"'nC"'nE'" 0 CuE CUE DnB'" ;2 ;2 A A'" nB ~ D AUB ;2 D ;2 (C' n {x}) U (E n {p} ) x p rt. rt. B D Dn{x,p} A B where x is an element variable and p is a constant symbol of an element. This can no longer be represented with the Boolean equations as above. For example the last formula is expressed as {p} * B = 0, where {p} is considered a coefficient. In order to handle such general Boolean equations, we extended the notion of Boolean Grabner bases [Sato et al. 1991], which enabled us to implement the set constraint solver. For the above constraint, the solver gives the following answer: {x}*E*B {p} *C *A {p} * E {x} * C {x} * A {p} * B {p} * {x} {x}*E+{x}*B+{x} {p} * C + {p} * A + {p} {p} *A {x} *B o o E+C+l o D E+C+l o A+B E*C E*C A*B *C *A {p} * E {x} * C {x} * A {p} * B A+B A+B E+C+ 1 o {x}*E+{x}*B+{x} {p} * C + {p} * A {p} * A {x} * B o o o + {p} Dependency Analysis of Constraint Set From several experiments on writing application programs, we can conclude that the powerful expressiveness of these languages is a great aid to programming, since all users have to do to describe a program is to define the essential properties of the problem itself. That is, there is no need to describe a method to solve the problem. On the other hand, sometimes the generality and power of constraint solvers turn out to be a drawback for these languages. That is, in some cases, especially for very powerful constraint solvers like the algebraic constraint solver in CAL or GDCC, it is difficult to implement them efficiently because of their generalities, in spite of great efforts. As a subsystem of language processors, efficiency in constraint solving is, of course, one of the major issues in the implementation of those language processors [Marriott and Sondergaard 1990, Cohen 1990]. In general, for a certain constraint set, the efficiency of constraint solving is strongly dependent on the order in which constraints are input to a constraint solver. However, in sequential CLF languages like CAL, this order is determined by the position of constraints in a program, because a constraint solver solves constraints accumulated by the inference engine that follows SLD-resolution. In parallel eLF languages like GDCC, the order of constraints input to a constraint solver is more important than in sequential languages. Since an inference engine and constraint solvers can run in parallel, the order of constraints is not determined by their position in a program. Therefore, the execution time may vary according to the order of constraints input to the constraint solver. In CAL and GDCC, the computation of a Grabner base is time-consuming and it is well known that the Buchberger algorithm is doubly exponential in worst-case complexity [Hofmann 1989]. Therefore, it is worthwhile to rearrange the order of constraints to make the constraint solver efficient. 126 We actually started research into the order of constraints based on dependency analysis [Nagai 1991, Nagai and Hasegawa 1991]. This analysis consisted of dataflow analysis, constraint set collection, dependency analysis on constraint sets, and determination of the ordering of goals and the preference of variables. To analyze dataflow, we use top-down analysis based on SLD-refutation. For a given goal and a program, the invocation of predicates starts from the goal without invoking a constraint solver, and variable bindings and constraints are collected. In this analysis, constraints are described in terms of graphical (bipartite graph) representation. An algebraic structure of s set of constraints is extracted using DM decomposition [Dulmage and Mendelsohn 1963], which computes a block upper triangular matrix by canonical reordering a matrix corresponding to the set of constraints. As a result of analysis, a set of constraints can be partitioned into relatively independent subsets of constraints. These partitions are obtained so that the number of variables shared among different blocks is as small as possible. Besides this partition, shared variables among partitions and shared variables among constraints inside of a block are also obtained. Based on these results, the order of goals and the precedence of variables are determined. 'vVe show the results of this method for two geometric theorem proving problems [Kapur and Mundy 1988, Kutzler 1988]: one is the theorem that three perpendicular bisectors of three edges of a triangle intersect at a point, and the other is the, so-called, nine points circle theorem. The former theorem can be represented by 5 constraints with 8 variables and gives about 3.2 times improvement. The latter theorem can be represented by 9 constraints with 12 variables and gives about 276 times improvement. 6 CAL and GDCC Application Systems To show the feasibility of CAL and GDCC, we implemented several application systems. In this section, two of these, the handling robot design support system and the Voronoi diagram construction program, are described. 6.1 Handling Robot Design Support System The design process of a handling robot consists of a fundamental structure design and a internal structure design [Takano 1986]. The fundamental structure design determines the framework of the robot, such as the degree of freedom, number of joints, and arm length. The internal structure design determines the internal details of the robot, such as the mortar torque of each joint. The handling robot design support system mainly supports the fundamental structure design. Currently, the method to design a handling robot is as follows: 1. First, the type of the robot, such as cartesian manipulator, cylindlical manipulator, or articulated manipulator has to be decided according to the requirements for the robot. 2. Then, a system of equations representing the relation between the end effector and joints is deduced. Then the system of equations is transformed to obtain the desired form of equations. 3. Next, a program to analyze the robot being designed is coded by using an imperative programming language, such as Fortran or C. 4. By executing the program, the design is evaluated. If the result is satisfactory, then the design process terminates, otherwise, the whole process should be repeated until the result satisfies the requirements. By adopting the CLP paradigm to the design process of a handling robot, through coding a CLP program representing the relation obtained in 2 in the above, the transformation can be done by executing the program. Thus, processes 2 and 3 can be supported by a computer. 6.1.1 Kinematics and Statics Program by Constraint Programming Robot kinematics represents the relation between a position and the orientation of the end effector, the length of each arm, and the rotation angle of each joint. We call a position and an orientation of the end effector, hand parameters, and we call the rest, joint parameters. Robot statics represent the relation between joint parameters: force working on the end-effector, and torque working on each joint [Tohyama 1989]. These relations are essential for analyzing and evaluating the structure of a handling robot. To make a program that handles handling robot structures, we have to describe a program independent of its fundamental structure. That is, kinematics and statics programs are constructed to handle any structure of robot by simply changing a query. Actually, these programs receive a matrix which represents the structure of a handling robot being designed in terms of a Est of lists. By manipulating the structure of this argument, any type of handling robot can be handled by the one program. For example, the following query asks the kinematics of a handling robot with three joints and three arms. robot([[cos3, sin3, 0, 0, z3, 0, 0, 1J, [cos2, sin2, x2, 0, 0, 1, 0, OJ, [cos1, sin1, 0, 0, z1, 0, 0, 1JJ, 127 5, 0, 0, 1, 0, 0, 0, 1, 0, px, py, pz, ax, ay, az, cx, cy, cz). where the first argument represents the structure of the handling robot, px, py, and pz represents a position, ax, ay, az, ex, cy, and cz represents an orientation by defining two unit vectors which are perpendicular to each other. sin's and cos's represent the rotation angle of each joint, and z3, x2, and z1 represent the length of each arm. For this query, the program returns the following answer. cos1-2 cos2-2 cos3-2 px py pz ax ay az ex ey ez 1-sin1-2 1-sin2-2 1-sin3-2 -5*cos2*sin3*sin1+z_3*sin2*sinl +5*eos3*eos1+x_2*eos1 5*cos3*sin1+x 2*sinl +5*eos1*cos2*sin3-z_3*eosl*sin2 5*sin3*sin2+z_1+z_3*eos2 -1*eos2*sin3*sin1+eos3*eos1 cos3*sin1+cosl*eos2*sin3 sin3*sin2 -1*eos1*sin3-eos3*eos2*sinl -1*sin3*sin1+eos3*eos1*eos2 eos3*sin2 That is, the parameters of the position and the orientation are expressed in terms of the length of each arm and the rotation angle of each joint. Note that this kinematics program has the full features of the CLP program. The problem of calculating hand parameters from joint parameters is called forward kinematics, and the converse is called inverse kinematics. vVe can deal with both of them with the same program. This program can be seen as a generator of programs dealing with any handling robot which has a user designed fundamental structure. Statics has the same features as the kinematics program described. That is, the program can deal with any type of handling robot by simply changing its query. 6.1.2 Construction of Design Support System The handling robot design support system should have the following functions 1. to generate the constraint representing kinematics and statics for any type of robot, 2. to solve forward and inverse kinematics, 3. to calculate the torque which works on each joint, and 4. to evaluate manipulability. The handling robot design support system consists of the following three GDCC programs in order to realize these functions, Kinematics a kinematics program Statics a statics program Determinant a program to calculate the determinant of a matrix Kinematics and Statics are the programs we described above. A matrix to evaluate the manipulability of a handling robot, called a Jacobian matrix, is obtained from the Statics program. Determinant is used to calculate the determinant of a Jacobian matrix. This determinant is called the manipulability measure and it expresses the manipulability of the robot quantitatively [Yoshikawa 1984]. To obtain concrete answers, of course, the system should utilize the GDCC ability to approximate the real roots of univariate equations. 6.2 Constructing the Voronoi Diagram We developed an application program which constructs Voronoi Diagram written in GDCC. By using the constraint paradigm, we can make a program without describing a complicated algorithm. A Voronoi diagram can be constructed by using constraints which describe only the properties or the definition of the Voronoi diagram. This program can compute the Voronoi polygon of each point in parallel. 6.2.1 Definition of the Voronoi Diagram For a given finite set of points 5 in a plane, a Voronoi diagram is a partition of the plane so that each region of the partition is a set of points in the plane closer to a point in 5 in the region than to any other points in 5 [Preparata and Shamos 1985]. In the simplest case, the distance between two points is defined as the Euclidian distance. In this case, a Voronoi diagram is defined as follows. Given a set 5 of N points in the plane, for each point Pi in 5, the Voronoi polygon denoted as V(Pi ) is defined by the following formula. where d(P, Pi) is a Euclidian distance between P and Pi' The Voronoi diagram is a partition so that each region is the Voronoi polygon of each point (see Figure 9). The vertices of the diagram are Voronoi vertices and its line segments are Voronoi edges. Voronoi diagrams are widely used in various application areas, such as physics, ecology and urbanology. 6.2.2 Detailed Design The methods of constructing Voronoi diagrams are classified into the following two categories: 1. The incremental method([Green and Sibson 1978]), and 128 Table 4: Runtime and reductions Processors Points 10 20 50 Figure 9: A Voronoi Diagram 100 200 2. The divide-and-conquer method([Shamos and Hoey 1975]). However, the simplest approach to constructing a Voronoi diagram is, of course, constructing its polygons one at a time. Given two points, Pi and Pj, a set of points closer to Pi than to Pj is just a half-plane containing Pi that is divided by the perpendicular bisector of PiPj. We name this line H(Pi , Pj). The Voronoi polygon of Pi can be obtained by the following formula. By using the linear constraint solver for GDCC, the Voronoi polygon can be constructed by the following algorithm which utilizes the above method to obtain the polygon directly. E. +- {x ;::: 0, Y;::: 0, x:::; XMax, Y:::; YMax} {loop a} for i = 1 to n C Fo +- lineaLconstraint..solver(E.) for j = 1 to n if(j i- i) then Ej Y:::; (Pjx - P;x)/(Pjy - P;y) . x +(P/y + plx - P;~ - P/x )/2 . (Pjy - p;y)2 CFj +- linear_constraint..solver(Ej U CFj_l) +- Let {eql,eq2, ... ,eqd(0 ~ k:::; n) be a set of equations obtained by changing inequality symbols in C Fj to equation symbols. {loop b} for I = 1 to k vertices := {} m:= 1 while (m =< k & number of elements of vertices i- 2) pp +- intersection( eql, eqm) if pp satisfies the constraint set C F; then vertices := {pp} U vertices m:= m+ 1 add the line segment between vertices to Voronoi edges. end. In this algorithm, the first half computes the Voronoi polygon for each point's Pi by obtaining all perpendicular bisectors of segments between Pi and other points and eliminating redundant ones. The second half computes the Voronoi edges. 2This inequality represents a half plane divided by a perpendicular bisector of (Pi, Pj) 400 1 130 1 890 1 4391 1 17287 1 52360 1 220794 1 2 67 1.936 447 1.990 2187 2.007 8578 2.015 26095 2.006 110208 2.003 4 33 3.944 241 3.685 1102 3.981 4305 4.014 13028 4.018 54543 4.048 Reductions 8 17 7.377 123 7.218 566 7.749 2191 7.887 6506 8.047 27316 8.082 15 16 7.844 88 10.077 336 13.065 1263 13.679 3500 14.959 14819 14.899 ( x 1000) 5804 42460 210490 830500 2458420 10161530 To realize the above algorithm on parallel processors, each procedure for each i in loop a in the above is assigned to a group of processes. That is, there are n process groups. Each procedure for each l in the loop b is assigned to a process in the same process group. This means that each process group contain k processes. These n x k processes are mapped onto multi-processor machines. 6.2.3 Results Table 4 shows the execution time and speedup for 10 to 400 points with 1 to 15 processors. According to the results, we can conclude that, when the number of points is large enough, we can obtain efficiency which is almost in proportion to the number of processors. By using this algorithm, we can handle the problem of constructing a Voronoi diagram in a very straight forward manner. Actually, comparing the size of the programs, this algorithm can be described in almost one third of the size of the program that is used by the incremental method. 7 Conclusion In the FGCS project, we developed two CLP languages: CAL, and GDCC to establish the knowledge programming environment, and to write application programs. The aim of our research is to construct a powerful high-level programming language which is suitable for knowledge processing. It is well known that constraints play an important role in both knowledge representation and knowledge processing. That is, CLP is a promising candidate as a high level programming language in this field. Compared with other CLP languages such as CLP(R), Prolog III, and CHIP, we can summarize the features of CAL and GDCC as follows: • CAL and GDCC can deal with nonlinear algebraic constraints. 129 • In the algebraic constraint solver, the approximate values of all possible real solutions can be computed, if there are only finite number of solutions. • CAL and GDCC have a multiple environment handler. Thus, even if there is more than one answer constraints, users can manipulate them flexibly. • Users can use multiple constraint solvers, and furthermore, users can define and implement their own constraint solvers. CAL and GDCC enable us to write possibly nonlinear polynomial equations on complex numbers, relations on truth values, relations -on sets and their elements, and linear equations and linear inequalities on real numbers. Since starting to write application programs for the algebraic constraint solver in the field of handling robot, we have wanted to compute the real roots of univariate nonlinear polynomials. We made this possible with CAL by adding a function to approximate the real roots, and we modified the Buchberger algorithm able to handle approximation values. Then, we faced the problem that a variable may have more than one value. To handle this situation in the framework of logic programming, we introduced a context tree in CAL. In GDCC, we introduced blocks into the language specification. The block in GDCC not only handle multiple values, but also localize the failure of constraint solvers. As for CAL, the following issues are still to be considered: 1. Meta facilities: Users cannot deal with a context tree from a program, that is, meta facilities in CAL are insufficient to allow users to do all possible handling of answer constraints themselves. 2. Partial evaluation of CAL programs: Although we try to analyze constraint sets by adopting dependency analysis, that work will be more effective when combined with partial evaluation technology or abstract interpretation. 3. More application programs: We still have a few application programs in CAL. By writing many application programs in various application field, we will have ideas to realize a more powerful CLP language. For this purpose, we are now implementing CAL in a dialect of ESP, called Common ESP, which can run on the UNIX operating system to be able to use CAL in various machines. tools to handle multiple contexts m GDCC's language specification. 2. More efficient constraint solvers: We need to improve both the absolute performance and the parallel speedup of the constraint solvers. 3. More application programs: Since parallel CLP language is quite new language, writing application programs may help us to make it powerful and efficient. Considering our experiences of using CAL and GDCC and the above issues, we will refine the specification and the implementation of GDCC. These refinements and experiments on various application programs clarified the need for a sufficiently efficient constraint logic programming system with high functionalities in the language facilities. Acknowledgment The research on the constraint logic programming system was carried out by researchers in the fourth research laboratory in ICOT in tight cooperation with cooperating manufactures and members of the CLP working group. Our gratitude is first due to those who have given continuous encouragement and helpful comments. Above all, we particularly thank Dr. K. Fuchi, the director of the ICOT research center, Dr. K. Furukawa, a vice director of the ICOT research center, and Dr. M. Amamiya of Kyushu University, the chairperson of the CLP working group. We would also like to thank a number of researchers we contacted outside of ICOT, in particular, members of the working group for their fruitful and enlightening discussions and comments. Special thanks go to all researchers in the fourth research laboratory: Dr. K. Sakai, Mr. T. Kawagishi, Mr. K. Satoh, Mr. S. Sato, Dr. Y. Sato, Mr. N. Iwayama, Mr. D. J. Hawley, who is now working at Compuflex Japan, Mr. H. Sawada, Mr. S. Terasaki, Mr. S. Menju, and the many researchers in the cooperating manufacturers. References As for GDCC, the following issues are still to be considered: [Aiba et al. 1988] A. Aiba, K. Sakai, Y. Sato, D. J. Hawley, and R. Hasegawa. Constraint Logic Programming Language CAL. In Proceedings of the International Conference on Fifth Generation Computer Systems 1988, November 1988. 1. Handling multiple contexts: Although current GDCC has functionalities to handle multiple contexts, users have to express everything explicitly. Therefore, we can design high-level [Backelin and Froberg 1991] J. Backelin and R. Froberg. How we proved that there are exactly 924 cyclic 7-roots. In S. M. Watt, editor, Proceedings of ISSAC'91. ACM, July 1991. 130 [Benichou et al. 1971] M. Benichou, L. M. Gauthier, P. Girodet, G. Hentges, G. Ribiere, and O. Vincent. Experiments in mixed-integer linear programming. Nlathematical Programming, (1), 1971. [Boege et al. 1986] W. Boege, R. Gebauer, and H. Kredel. Some Examples for Solving Systems of Algebraic Equations by Calculating Grabner Bases. Journal of Symbolic Computation, 2(1):83-98,1986. [Borning et al. 1989] A. Borning, M. Maher, A. Martindale, and M. Wilson. Constraint Hierarchies and Logic Programming. In Proceedings of the International Conference on Logic Programming, 1989. [Buchberger 1985] B. Buchberger. Grabner bases: An Algorithmic Method in Polynomial Ideal Theory. In N. Bose, editor, Multidimensional Systems Theory, pages 184-232. D. Reidel Publ. Comp., Dordrecht, 1985. [CAL Manual] Institute for New Generation Computer Technology. Contrante Avec Logique version 2.12 User's manual. in preparation. [Chikayama 1984] T. Chikayama. Unique Features of ESP. In Proceedings of FGCS'84, pages 292-298, 1984. [Chikayama et al. 1988] T. Chikayama, H. Sato, and T. Miyazaki. Overview of Parallel Inference Machine Operationg System (PIMOS). In International Conference on Fifth Generation Computer Systems, pages 230-251, 1988. [Dulmage and Mendelsohn 1963] A. L. Dulmage and N. S. Mendelsohn. Two algorithms for bipartite graphs. Journal of SIAM, 11(1), March 1963. [Green and Sibson 1978] P. J. Green and R. Sibson. Computing Dirichlet Tessellation in the Plane. The Computer Journal, 21, 1978. [Hofmann 1989] C. M. Hoffmann. Grabner Bases .Techniques, chapter 7. Morgan Kaufmann Publishers, Inc., 1989. [Jaffar and Lassez 1987] J. Jaffar and J-L. Lassez. Constraint Logic Programming. In 4th IEEE Symposium on Logic Programming, 1987. [Kapur and Mundy 1988] K. Kapur and J. L. Mundy. Special volume on geometric reasoning. Artificial Intelligence, 37(1-3), December 1988. [Kutzler 1988] B. Kutzler. Algebraic Approaches to Automated Geometry Theorem Proving. PhD thesis, Research Institute for Symbolic Computation, Johannes Kepler University, 1988. [Lloyd 1984] J. W. Lloyd. Foundations of Logic Programming. Springer- Verlag~ 1984. [Maher 1987] M. J. Maher. Logic Semantics for a Class of Committed-choice Programs. In Proceedings of the Fourth International Conference on Logic Programming, pages 858-876, Melbourne, May 1987. [Marriott and Sondergaard 1990] K. Marriott and H. Sondergaard. Analysis of constraint logic programs. In Proc. of NACLP '90, 1990. [Clarke et al. 1990] E. M. Clarke, D. E. Long, S. Michaylov, S. A. Schwab, J. P. Vidal, and S. Kimura. Parallel Symbolic Computation Algorithms. Technical Report CMU-CS-90-182, Computer Science Department, Carnegie Mellon University, October 1990. [Menju et al. 1991] S. Menju, K. Sakai, Y. Satoh, and A. Aiba. A Study on Boolean Constraint Solvers. Technical Report TM 1008, Institute for New Generation Computer Technology, February 1991. [Cohen 1990] J. Cohen. Constraint logic programming languages. Communications of the ACNI, 33(7), July 1990. [Nagai 1991] Y. Nagai. Improvement of geometric theorem proving using dependency analysis of algebraic constraint (in Japanese). In Proceedings of the 42nd Annual Conference of Information Processing Society of Japan, 1991. [Colmerauer 1987] A. Colmerauer. Opening the Prolog III Universe: A new generation of Prolog promises some powerful capabilities. BYTE, pages 177-182, August 1987. [Dincbas et al. 1988] M. Dincbas, P. Van Hentenryck, H. Simonis, A. Aggoun, T. Graf, and F. Berthier. The Constraint Logic Programming Language CHIP. In Proceedings of the International Conference on Fifth Generation Computer Systems 1988, November 1988. [Nagai and Hasegawa 1991] Y. Nagai and R. Hasegawa. Structural analysis of the set of constraints for constraint logic programs. Technical report TR-701, ICOT, Tokyo, Japan, 1991. lOki et al. 1989] H. Oki, K. Taki, S. Sei, and S. Furuichi. Implementation and evaluation of parallel Tsumego program on the Multi-PSI (in Japanese). In Proceedings of the Joint Parallel Processing Symposium (JSPP'89),1989. 131 [Ponder 1990] C. G. Ponder. Evaluation of 'Performance Enhancements' in algebraic manipulation systems. In J. Della Dora and J. Fitch, editors, Computer Algebra and Parallelism, pages 51-74. Academic Press, 1990. [Preparata and Shamos 1985J F. P. Preparata and M. 1. Shamos. Computational Geometry. Springer-Verlag, 1985. [Sakai and Aiba 1989] K. Sakai and A. Aiba. CAL: A Theoretical Background of Constraint Logic Programming and its Application. J01lmal of Symbolic Computation, 8:589-603, 1989. [Saraswat 1989J V. Saraswat. Concurrent Constraint PhD thesis, CarnegieMellon University, Computer Science Department, January 1989. Programming Languages. [Sato and Aiba 1991] S. Sato and A. Aiba. An Application of CAL to Robotics. Technical Report TM 1032, Institute for New Generation Computer Technology, February 1991. [Siegl 1990J K. Siegl. Grabner Bases Computation in STRAND: A Case Study for Concurrent Symbolic Computation in Logic Programming Languages. Master's thesis, CAMP-LINZ, November 1990. [Takano 1986] M. Takano. Design of robot structure (in Japanese). Journal of Japan Robot Society, 14(4), 1986. [Terasaki et al. 1992J S. Terasaki, D. J. Hawley, H. Sawada, K. Satoh, S. Menju, T. Kawagishi, N. Iwayama, and A. Aiba. Parallel Constraint Logic Programming Language GDCC and its Parallel Constarint Solvers. In International Conference on Fifth Generation Computer Systems, 1992. [Tohyama 1989] S. Tohyama. Robotics for Machine Engineer (in Japanese). Sougou Denshi Publishing Corporation, 1989. [Ueda and Chikayama 1990] K. Veda and T. Chikayama. Design of the Kernel Language for the Parallel Inference Machine. The Computer Joumai, 33(6), December 1990. [Sato and Sakai 1988] Y. Sato and K. Sakai. Boolean Grabner Base, February 1988. LA-Symposium in winter, RIMS, Kyoto University. [Vidal 1990] J. P. Vidal.. The Computation of Grabner bases on a shared memory multi-processor. Technical Report CMU-CS-90-163, Computer Science Department, Carnegie Mellon University, August 1990. [Sato et al. 1991] Y. Sato, K. Sakai, and S. Menju. Solving constraints over sets by Boolean Grabner bases (in Japanese). In Proceedings of The Logic Programming Conference '91, September 1991. [van Emden and Kowalski 1976] M. H. van Emden and R. A. Kowalski. The Semantics of Predicate Logic as a Programming Language. Journal of the ACJ'v1, 23( 4), October 1976. [Satoh 1990] K. Satoh. Formalizing Soft Constraints by Interpretation Ordering. In Proceedings of 9th European Conference on Artificial Intelligence, pages 585-590, 1990. [Van Hentenryck 1989J P. Van Hentenryck. Parallel constraint satisfaction in logic programming: Prelimiary results of chip with pepsys. In 6th International Conference on Logic Programming, pages 165-180, 1989. [Satoh and Aiba 1990a] K. Satoh and A. Aiba. Computing Soft Constraints by Hierarchical Constraint Logic Programming. Technical Report TR-610, ICOT, Tokyo, Japan, 1990. [Satoh and Aiba 1990b] K. Satoh and A. Aiba. Hierarchical Constraint Logic Language: CHAL. Technical Report TR-592, ICOT, Tokyo, Japan, 1990. [Senechaud 1990J P. Senechaud. Implementation of a parallel algorithm to compute a Grabner basis on Boolean polynomials. In J. Della Dora and J. Fi tch, editors, Computer Algebra and Parallelism, pages 159-166. Academic Press, 1990. [Shamos and Hoey 1975] M. 1. Shamos and D. Hoey. Closest-point problems. In Sixteenth Annual IEEE Symposium on Foundations of Computer Sceience, 1975. [Yoshikawa 1984] T. Yoshikawa. Measure of manipulatability of robot arm (in Japanese). Joumal of Japan Robot Society, 12(1), 1984. PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON FIFTH GENERATION COMPUTER SYSTEMS 1992, edited by ICOT. © ICOT, 1992 132 Parallel Theorem Provers and Their Applications Ryuzo Hasegawa and Masayuki Fujita Fifth Research Laboratory Institute for New Generation Computer Technology 4-28 Mita 1-chome, Minato-ku, Tokyo 108, Japan {hasegawa, rnfujita}@icot.or.jp Abstract This paper describes the results of the research and development of automated reasoning systems(ARS) being conducted by the Fifth Research Laboratory at ICOT. The major result was the development of a parallel theorem proving system MGTP (Model Generation Theorem Prover) in KL1 on a parallel inference machine, PIM. Currently, we have two versions of MGTP. One is MGTP IG, which is used for dealing with ground models. The other is MGTP IN, used for dealing with non-ground models. With MGTP IN, we have achieved a more than one-hundred-fold speedup for condensed detachment problems on a PIM/m consisting of 128 PEs. Nonmonotonic reasoning and program synthesis are taken as promising and concrete application area for MGTP provers. MGTP IG is actually used to develop legal reasoning systems in ICOT's Seventh Research Laboratory. Advanced inference and learning systems are studied for expanding both reasoning power and application areas. Parallel logic programming techniques and utility programs such as 'meta-programming' are being developed using KL1. The technologies developed are widely used to develop applications on PIM. 1 Introduction The final goal of the Fifth Generation Computer Systems (FGCS) project was to realize a knowledge information processing system with intelligent user interfaces and knowledge base systems on parallel inference machines. A high performance and highly parallel inference mechanism is one of the most important technologies to come out of our pursuit of this goal. The major goal of the Fifth Research Laboratory, which is conducted as a subgoal of the problem-solving programming module of FGCS, is to build very efficient and highly parallel automated re?-soning systems (ARS) as advanced inference systems on ~~Lrallel inference machines (PIM), taking advantage of the KL1language and PIMOS operating system. On ARS we intend to develop application systems such as natural language processing, Application Parallel Theorem Proving Figure 1: Goals of Automated Reasoning System Research at tCOT intelligent knowledgebases, mathematical theorem proving systems, and automated programming systems. Furthermore, we intend to give good feedback to the language and operating systems from KLI implementations and experiments on parallel inference hardware in the process of developing ARS. We divided ARS research and development into the following three goals (Figure 1): (1) Developing Parallel Theorem Proving Technologies on PIM Developing very efficient parallel theorem provers on PIM by squeezing the most out of the KL1language is the major part of this task. We have concentrated on the model generation method, whose inference mechanism is based on hyper-resolution. We decided to develop two types of model generation theorem provers to cover ground non-Horn problems and non-ground Horn problems. To achieve maximum performance on PIM, we have focused on the 133 We focused on automated programming as one of the major application areas for theorem provers in the non-Horn logic systems, in spite of difficulty. There has been a long history of program synthesis from specifications in formal logic. We aim to make a first-order theorem prover that will act as a strong support tool in this approach. We have set up three different ways of program construction: realizability interpretation in the constructive mathematics to generate functional programs, temporal propositionallogic for protocol generation, and the KnuthBendix completion technique for interface design of concurrent processes in Petri Net. We stressed the experimental approach in order to make practical evaluation. technological issues below: (a) Elimination of redundant computation Eliminating redundant computation in the process of model generation with the least overhead is an important issue. Potential redundancy lies in conjunctive matching at hyperresolution steps or in the case splitting of ground non-Horn problems. (b) Saving time and space by eliminating the over generation of models For the model generation method, which is based on hyper-resolution as a bottom-up process, over generation of models is an essential problem of time and space consumption. We regard the model generation method as generation and test procedures and have introduced a controlling mechanism called Lazy Model Generation. • Advanced Inference and Learning Theorem proving technologies themselves are rather saturated in their basic mechanisms. In this subgoal, extension of the basic mechanism from deductive approach to analogical, inductive, and transformational approaches is the main research target. Machine learning technologies on logic programs and meta-usage of logic are the major technologies that we decided to apply to this task. (c) Finding PIM-fitting and scalable parallel architecture PIM is a low communication cost MIMD machine. Our target is to find a parallel architecture for model generation provers, which draws the maximum power from PIM. We focused on OR parallel architecture to exploit parallelism in the case splitting of a ground nonHorn prover, MGTP /G, and on AND parallel architecture to exploit parallelism in conjunctive matching and subsumption tests of a nonground Horn prover, MGTP /N. One of the most important aims of developing theL rem provers in KLl is to draw the maximum advantage of parallel logic programming paradigms from KLl. Programming techniques developed in building theorem provers help to, or are commonly used to, develop various applications, such as natural language processing systems and knowledge base systems, on the PIM machines based on logic programming and its extension. We focused on developing meta-programming technology in KLl as a concrete base for this aim. We think it is very useful to develop broader problem solving applications on PIM and to extend KLl to support them. (2) Application A model generation theorem prover has a general reasoning power in various AI areas because it can simulate the widely applied tableaux method effectively. Building an efficient analytic tableaux prover for modal propositional logic on mod~l generation theorem provers was the basic goal of this extension. This approach could naturally be applied to abductive reasoning in AI systems and logic programming with negation as failure linked with broader practical AI applications such as diagnosis. By using analogical reasoning, we intended to formally simulate the intelligent guesswork that humans naturally do, so that results could be obtained even when deductive systems had no means to deduce to obtain a solution because of incomplete information or very long deductive steps. Taking the computational complexity of inductive reasoning into account, we elaborated the learning theories of logic programs by means of predicate invention and least-general generalization, both of which are of central interest in machine learning. In transformational approach, we used fold/unfold transformation operations to generate new efficient predicates in logic programming. The following sections describe these three tasks of research on automated reasoning in ICOT's Fifth Research Laboratory for the three years of the final stage of ICOT. 2 Parallel Theorem Proving Technologies on PIM In this section, we describe the MGTP provers which run on Multi-PSI and PIM. We present the technical essence of KLl programming techniques and algorithms that we developed to improve the efficiency of MGTP. 134 2.1 Parallel Model Generation Theorem Prover MGTP The research on parallel theorem proving systems aims at realizing highly parallel advanced inference mechanisms that are indispensable in building intelligent knowledge information systems. We started this research project on parallel theorem provers about two and a half years ago. The immediate goal of the project is to develop a parallel automated reasoning system on the parallel inference machine, PIM, based on KL1 and PIMOS technology. We aim at applying this system to various fields such as intelligent database systems, natural language processing, and automated programming. At the beginning, we set the following as the main subjects. • To develop very fast first-order parallel theorem provers As a first step for developing KL1-technology theorem provers, we adopted the model generation method on which SATCHMO is based as a main proof mechanism. Then we implemented a modelgeneration based theorem prover called MGTP. Our reason was that the model generation method is particularly suited to KL1 programming as explained later. Based on experiences with the development of MGTP, we constructed a "TP development support system" which provided us with useful facilities such as a proof tracer and a visualizer to see the dynamic behavior of the prover. • To develop applications Although a theorem prover for first-order logic has the potential to cover most areas of AI, it has not been so widely used as Prolog. One reason for this is the inefficiency of the proof procedure and the other is lack of useful applications. However, through research on program synthesis from formal specification[Hasegawa et at., 1990], circuit verification, and legal reasoning[Nitta et at., 1992], we became convinced that first-order theorem provers can be effectively used in various areas. We are now developing an automated program synthesis system, a specification description system for exchange systems, and abductive and non-monotonic reasoning systems on MGTP. • To develop KL1 programming techniques Accumulating KL1 programming techniques through the development of theorem provers is an important issue. We first developed KL1 compiling techniques to translate given clauses to corresponding KL1 clauses, thereby achieving good performance for ground clause problems. We also developed methods to parallelize MGTP by making full use of logical variables and the stream data type of KL1. • To develop KL1 meta-programming technology This is also an important issue in developing theorem provers. This issue is discussed in Section 2.1.2 Meta-Programming in KL1. We have implemented basic meta-programming tools called Meta-Library in KL1. The meta-library is a collection of KL1 programs which offers routines such as full unification, matching, and variable managements. 2.1.1 Theorem Prover in KL1 Language Recent developments in logic programming have made it possible to implement first-order theorem provers efficiently. Typical examples are PTTP by Stickel [Stickel 1988], and SATCHMO by Manthey and Bry [Manthey and Bry 1988]. PTTP is a backward-reasoning prover based on the model elimination method. It can deal with any firstorder formula in Horn clause form without loss of completeness and soundness. SATCHMO is a forward-reasoning prover based on the model generation method. It is essentially a hyperresolution prover, and imposes a condition called rangerestricted on a clause so that we can derive only ground atoms from ground facts. SATCHMO is basically a forward-reasoning prover but also allows backwardreasoning by employing Prolog over the Horn clauses. The major advantage of these systems is because the input clauses are represented with Prolog clauses and most parts of deductions can be performed through normal Prolog execution. In addition to this method we considered the following two alternative implementations of object-level variables in KL1: (1) representing object-level variables with KL1 ground terms (2) representing object-level variables with KL1 variables The first approach might be the right path in metaprogramming where object- and meta-levels are separated strictly, thereby giving it dear semantics. However, it forces us to write routines for unification, substitution, renaming, and all the other intricate operations on variables and environments. These routines would become considerably larger and more complex than the main program, and introduce overhead to orders of magnitude. In the second approach, however, most of operations on variables and environments can be performed beside the underlying system instead of running routines on top of it. Hence, it enables a meta-programmer to save writing tedious routines as well as gaining high efficiency. Furthermore, one can also use Prolog var predicates to write routines such as occurrence checks in order to make built-in unification sound, if necessary. Strictly speaking, this approach may not be chosen since it makes the 135 distinction between object- and meta-level very ambiguous. However, from a viewpoint of program complexity and efficiericy, the actual profit gained by the approach is considerably large. In KLl, however, the second approach is not always possible, as in the Prolog case. This is because the semantics of KLI never allows us to use a predicate like Prolog var. In addition, KLI built-in unification is not the same as Prolog's counterpart, in that unification in the guard part of a KLI clause is limited to one way and a unification failure in the body part is regarded as a semantic error or exception rather than as a failure which merely causes backtrack in Prolog. Nevertheless, we can take the second approach to implement a theorem prover where ground models are dealt with, by utilizing the features of KLI as much as possible. Taking the above discussions into consideration, we decided to develop both the MGTP IG and MGTP IN provers so that we can use them effectively according to the problem domain being dealt with. The ground version, MGTP IG, aims to support finite problem domains, which include most problems in a variety of fields, such as database processing and natural language processing. For ground model cases, the model generation method makes it possible to use just matching, rather than full unification, if the problem clauses satisfy the rangerestrictedness condition 1. This suggests that it is sufficient to use KLl's head unification. Thus we can take the KLI variable approach for representing object-level variables, thereby achieving good performance. The key points of KLI programming techniques developed for MGTP IG are as follows: (Details are described in the next section.) • First, we translate a given set of clauses into a corresponding set of KLI clauses. This translation is quite simple. • Second, we perform conjunctive matching of a literal in a clause against a model element by using KLI head unification. • Third, at the head unification, we can automatically obtain fresh variables for a different instance of the literal used. The non-ground version, MGTP IN, supports infinite problem domains. Typical examples are mathematical theorems, such as group theory and implicational calculus. For non-ground model cases, where full unification with occurrence check is required, we are forced to follow the KL 1 ground terms approach. However, we do 1 A clause is said to be range-restricted if every variable in the clause has at least one occurrence in its antecedent. Problems Tools Solutions Reduudancy 1 in Conjunctive ramified StaCk] 2 3 Matching MERC Unification! Subsumption (Term IndeXing) Irrelevant Clauses Meta4 Programming inKLl I Parallelism + J (partial Falsify Relevancy Test Firmware Coding (Meta-Library) 5 Overgeneration [LaZY Model Generation of Models 6 KLI programming techniques J Non-Horn Ground f P J Horn ( AND Parallel ) OR Parallel + PIM machine And Sequential Figure 2: Major Problems and Technical Solutions not necessarily have to maintain variable-binding pairs as processes in KLl. We can maintain them by using the vector facility supported by KLl, as is often used in ordinary language processing systems. Experimental results show that vector implementation is several hundred times faster than process implementation. In this case, however, we cannot use the programming techniques developed for MGTP IG. Instead, we have to use a conventional technique, that is, interpreting a given set of clauses instead of compiling it into KLI clauses. 2.1.2 Key Technologies' to 'Improve Efficiency \Ale developed several programming techniques in the process of seeking ways to improve the efficiency of model generation theorem provers. Figure 2 shows a list of the problems which prevented good performance and the solutions we obtained. In the following sections we ou tline the problems and their solutions. Redundancy in Conjunctive Matching To improve the performance of the model generation provers, it is essential to avoid, as much as possible, redundant computation in conjunctive matching. Let us consider a clause having two antecedent literals, and suppose we have a model candidate M at some stage i in the 136 proof process. To perform conjunctive matching of an antecedent literal in the clause against a model element, we need to pick all possible pairs of atoms from M. Imagine that we are to extend M with a model-extending atom .6., which is in the consequent of the clause, but not in M. Then in the next stage, we need to pick pairs of atoms from M U.6.. The number of pairs amounts to: CM U 6.)2 = M x MUM x 6. u.6. x M u.6. x .6.. However, doing this in a naive manner would introduce redundancy. This is because M x M pairs were already considered in the previous stage. Thus we must only choose pairs which contain at least one .6.. (1) RAMS Method The key point of the RAMS (Ramified Stack) method is to retain in a literal instance stack the intermediate results obtained in conjunctive matching. They are instances which are a result of matching a literal against a model element. This algorithm exactly computes a repeated combination of .6.. and an atom picked from M without duplication([Fujita and Hasegawa 1990]). For non-Horn clause cases, the literal instance stack expands a branch every time case splitting occurs, and grows like a tree. This is how the RAMS name was derived. Each branch of the tree represents a different model candidate. The ramified-stack method not only avoids redundancy in conjunctive matching but also enables us to share a common model. However, it has one drawback: it tends to require a lot of memory to retain intermediate literal instances. Al A2 A3 11 M M M 11 M M M 11 11 11 M 11 M 11 M 11 11 11 11 11 * Al,* A2'* A3 ( '* means not-unifiable) Forground,and Figure 3: Multiple-Entry Repeated Combination (MERC) Method There are some trade-off points between the RAMS method and the MERC method. In the RAMS method, every successful result of matching a literal Ai against model elements is memorized so as not to rematch the same literal against the same model element. On the other hand, the MERC method does not need such a memory to store the information of partial matching. However, it still contains a redundant computation. For instance, in the computation for [M,.6.,.6.] and [M, 6., M] patterns, the common subpattern, [M,.6.], will be recomputed. The RAMS method can remove this sort of redundancy. Speeding up U nification/Subsumption (2) MERC Method The MERC (Multi-Entry Repeated Combination) method([Hasegawa 1991]) tries to solve the above problem in the RAMS method. This method does not need a memory to retain intermediate results obtained in the conjunctive matching. Instead, it needs to prepare 2n - 1 clauses for the given clause having n literals as its antecedent. The outline of the MERC method is shown in Figure 3. For a clause having three antecedent literals, AI, A 2 , A3 -+ C, we prepare seven clauses, each of which corresponds to a repeated combination of 6. and M, and perform the conjunctive matching using the combination pattern. For example, a clause corresponding to a combination pattern [M,.6., M] first matches literal A2 against.6.. If the match succeeds, the remaining literals, Al and A 3 , are matched against an element picked out of A1. Note that each combination pattern includes at least one .6., and that the [111,111, M] pattern is excluded. Almost all computation time is used in the unification and subsumption tests in the MGTP. Term indexing is a classical way and the only way to improve this process to one-to-many unification/subsumption.: We used the discrimination tree as the indexing structure. Figure 4 shows the effect of Term Memory on a typical problem on MGTP /G. Optimal use of Disjunctive Clauses Loveland et. al. [Wilson and, Loveland 1989] indicated that irrelevant use of disjunctive clauses in the ground model generation prover rises useless case spli tting, thereby leads to serious redundant searches. Arbitrary selected disjunctive clauses in MGTP may lead to a combinatorial explosion of redundant models. An artificial yet suggestive example is shown in Figure 5. In MGTP /G, we developed two methods to deal with this problem. One method is to introduce upside-down 137 • Execution Time and No. of Reductions(Instruction Unit of KL1) (1) With TM. 784197 red / 14944 msec (2) Without TM. 1629421 red /28174 msec • The Most Dominant Operations (1) With TM (The eight best predicates are of TM operations) Predicate assocs /4 term Type/ 'L termNodes 14 termNodes1/4 bind Constant 15 Others Red 466990 4jIY1 39771 20338 20304 193003 (1 - 1) (1 (2 (2 (3 - 2) 1) 2) 1) (3 - 2) (4) (5) (6) (7) Figure 6: Compiled code in UDMI 0 500,000 (2) Without TM(member predicate takes the first rank) Predicate member I 3 c/O satisfyLiteral/9 satlstyLlteral17 do 17 Uthers true -+ gp( c, X, Y). gp( c, X, Y), p( c, X, Y) -+ false. true -+ gq(X, c, Y). gq(X, c, Y), q(X, c, Y) -+ false. true -+ gr(X, Y, c). gr(X, Y, c), r(X, Y, c) -+ false. true -+ s( a) true -+ s(b) true -+ s(c) s(X), s(Y), s(Z), gp(X, Y, Z), gq(X, Y, Z), gr(X, Y, Z) -+ p(X,Y,Z);q(X,Y,Z);r(X,Y,Z) ROd, 1214048 l/ts404 133255 46_655. 270631 29936 1 0 500,000 1,000,000 Figure 4: Speed up by Term Memory false: -p( c, X, Y) false: -q(X, c, Y) false: -r(X, Y, c) s(a) s(b) s(c) s(X), s(Y), s(Z) -+ p(X,Y,Z);q(X,Y,Z);r(X,Y,Z) (1) (2) (3) (4) (5) (6) (7) Figure 5: Example Problem to Relevancy Testing meta-interpretation(UDMI)[Stickel 1991] into MGTP /G. By using upside-down meta-interpretation, the above problem was compiled into the bottom-up rules in Figure 6. Note that this is against the range restricted rule but is safe with Prolog-unification. The other method is to keep the positive disjunctive clauses obtained by the process of reasoning. False checks are made independently on each literal in the disjunctive model elements with unit models and if the check succeeds then that literal is eliminated. The disjunctive models can be sorted by their length. This method showed considerable speed-up for n-queens problems and enumeration of finite algebra. Meta-Programming in KLI Developing fast meta-programs such as unification and matching programs is very significant in making a prover efficient. Most parts of proving processes are ~he executions of such programs. The efficiency of a prover depends on how efficient meta-programs are made. In Prolog-Technology Theorem Provers such as PTTP and SATCHMO, object-level variables 2 are directly represented by Prolog variables. With this representation, most operations on variables and environments can be performed beside the underlying system Prolog. This means that we can gain high efficiency by using the functions supported by Prolog. Also, a programmer can use the Prolog var predicate to write routines such as occurrence checks in order to make built-in unification sound, if such routines are necessary. Unfortunately in KL1, we cannot use this kind of technique. This is because: 1) the semantics of KL 1 never allow us to use a predicate like var, 2) KL1 built-in unification is not the same as its Prolog coun terpart in that unification in the guard part of a KL1 clause can only be one-way, and 3) a unification failure in the body part is regarded as a program error or exception that cannot be backtracked. We should, therefore, treat an object-level variable as constant data (ground term) rather than as a KLI variable. It forces us to write routines for unification, substitution, renaming, and all the other intricate operations of variables and environments. These routines can become extremely large and complex compared to the main program, and may make the overhead bigger. To ease the programmer's burden, we developed .A1etaLibrary. This is a collection of KL1 programs to support meta-programming in KL1 [Koshimura et al., 1990]. 2variables appearing in a set of given clauses 138 The meta-library includes facilities such as full unification with occurrence check, and variable management rou tines. The performance of each program in the metalibrary is relatively good. For example, unification program runs at 0.25 rv 1.25 times the speed of built-in unification. The major functions in meta-library are as follows. unify(X,Y, Env,-NewEnv) unify_oc(X,Y, Env,-NewEnv) rnatch(Pattern,Terget, Env, -NewEnv) oneway_unify(Pattern,Terget, Env,-NewEnv) copy_terrn(X,-NewX, Env,-NewEnv) shallow(X,Env, -NewNnv) freeze(X,-FrozenX, Env) rnelt(X,-MeltedX, Env) create_env(-Env, Size) fresh_var(Env, -VarAndNewEnv) equal(X,Y, Env, -YN) is_type(X,Env, -Type) unbound(X, Env, -YN) database (Request Stream) get_object (KL1Terrn, -Object) get_kll_term(Object, -KL1Term) Over-Generation of Models A more important issue with regard to the efficiency of model generation based provers is reducing the total amount of computation and memory space required in proof processes. Model-generation based provers must perform the following three operations. • create new model elements by applying the model extension rule to the given clauses using a set of model-extending atoms 6. and a model candidate set M (model extension). • make a subsumption test for a created atom to check if it is subsumed by the set of atoms already being created, usually by the current model candidate. • make a false check to see if the unsubsumed model element derives false by applying the model rejection rule to the tester clauses (rejection test). The problem with the model generation method is the huge growth in the number of generated atoms and in the computational cost in time and space, which is incurred by the generation processes. This problem becomes more critical when dealing with harder problems which require deeper inferences (longer proofs), such as Lukasiewicz problems. To solve this problem, it is important to recognize that proving processes are viewed as generation-and-test processes, and that generation should be performed only when required by the test. Table 1: clause) Comparison of complexities (for unit tester Algorithm Basic Full-test/Lazy Lazy & Lookahead T S G M pm 2 pm'l. f.lp 2 m 4Ct f.lm'l.Ct p2 m 4 p3 m 4 m'l. pm'l. m'l. (ft/ p )mCt m/p m t m is the number of elements in a model ca:ndidate when false is detected in the basic algorithm. p is the survival rate of a generated atom, f.l is the rate of successful conjunctive matchings (p ~ jt), and a(l ~ a ~ 2) is the efficiency factor of a subsumption test. t For this we proposed a lazy model generation algorithm[Hasegawa et ai., 1992] that can reduce the amount of computation and space necessary for obtaining proofs. Table 1 compares the complexities of the model generation algorithms 3 , where T(S/G) represents the number of rejection tests (subsumption tests/model extensions), and M represents the number of atoms stored. From a simple analysis, it is estimated that the time complexity of the model extension and subsumption test decreasesfrom O(m4) in the algorithms without lazy control to O(m) in the algorithms with lazy control. For details, refer to [Hasegawa et ai., 1992]. Parallelizing MGTP There are three major sources when parallelizing the proving processes in the MGTP prover:' multiple model candidates in a proof, multiple clauses to which model generation rules are applied, and multiple literals in conjunctive matching. Let us assume that the prime objective of using the model generation method is to find a model as a solution. There may be alternative solutions or models for a given problem. We take it as OR-paralleli-sm to seek these multiple solutions at the same time. According to our assumption, multiple model candidates and multiple clauses are taken as sources for exploiting OR-parallelism. On the other hand, multiple literals are the source of AND-parallelism since all the literals in a clause relate to a single solution, where shared variables in the clause should have compatible values. For ground non-Horn cases, it is sufficient to exploit OR parallelism induced by case splitting. For Horn clause cases, we have to exploit AND parallelism. The 3The basic algorithm taken by OTTER[McCune 1990) generates a bunch of new atoms before completing rejection tests for previously generated atoms. The full-test algorithm completes the tests before the next generation cycie, but still generates a bunch of atoms each time. Lookahead is an optimization method for testing wider spaces than in Full-test/Lazy. 139 main source of AND parallelism is conjunctive matching. Performing subsumption tests in parallel is also very effective for Horn clause cases. In the current MGTP, we have not yet considered the non-ground and non-Horn cases. (1) Parallelization of MGTP IG With the current version of the MGTP IG, we have only attempted to exploit OR parallelism on the Multi-PSI machine. (a) Processor allocation The processor allocation methods that we adopted achieve 'bounded-OR' parallelism in the sense that OR-parallel forking in the proving process is suppressed so as to meet restricted resource circumstances. One way of doing this, called simple allocation, is sketched as follows. We expand model candidates starting with an empty model using' a single master processor until the number of candidates exceeds the number of available processors, then distribute the remaining tasks to slave processors. Each slave processor explores the branches assigned without further distributing tasks to any other processors. This simple allocation scheme for task distribution works fairly well since communication costs can be minimized. (b) Speed-up on Multi-PSI One of the examples we used is the N-queens problem given below. 12 .............. J.: ..........):.............j:.....:L.../·/ / i. / / 10 ............... 1.............. .1 .......... t ~ t ... ii/)'/1/~V........ :. . . t...····· r4~-+-r-r~~+-~y,:~~: ....~-+~~~ 8 ././: ~) ./:....... o 1 2 .:.... ,...y 10 __ l:~een ~~~ ...........-- __ 12 14 6queen 4queen 16 Numb.r of PEs Figure 7: Speedup of MGTP IG on Multi-PSI (N-queens) rate is rather small for the 4-queens problem only. This is probably because in such a small problem, the constant amount of interpretation overhead would dominate the proper tasks for the proving process. (2) Parallelization of MGTP IN For MGTP IN, we have attempted to exploit AND parallelism for Horn problems. We have several choices when parallelizing modelgeneration based theorem provers: 1) proofs which change or remain unchanged according to the number of PEs used C1 : Cn : Cn + 1 : true -t p(l, l)j p(l, 2)j ... j p(l, n). true -t p(n,1)jp(n,2)j ... jp(n,n). p(Xl, Yl),p(X 2 , 12), unsaf e(X1' Yi, X 2 , 12) - t false. The first N clauses express every possible placing of queens on an N by N chess board. The last clause expresses the constraint that a pair of queens must satisfy. So, the problem would be solved when either one model (one solution) or all the models (all solutions) are obtained for the clause set. The performance has been measured on an MGTP IG prover running on a Multi-PSI using the simple allocation method stated above. The speedup obtained using up to 16 processors are shown in Figure 7. For the 10-queens problem, almost linear speedup is obtained as the number of processors increases. The speedup 2) model sharing (copying in a distributed memory architecture) or model distribution, and 3) master-slave or master-less. A proof changing prover may achieve super-linear speedup while a proof unchanging prover can achieve, at most, linear speedup. The merit of model sharing is that time consuming subsumption testing and conjunctive matching can be performed at each PE independently with minimal inter-PE communication. On the other hand, the benefit of model distribution is that we can obtain memory scalability. The communication cost, however, increases as the number of PEs increases, since generated atoms need to flow to all PEs for subsumption testing. The master-slave configuration makes it easy to build a parallel system by simply connecting a sequential version of MGTP IN on a slave PE to the master PE. However, it needs to be designed with devices so as to minimize the load on the master 140 Table 2: Performance of MGTP /N (Th 5 and Th 7) Problem Time (sec) Reductions Th5 KRPS/PE Speedup Time (sec) Reductions Th7 KRPS/PE Speedup 16 PEs 41725.98 38070940 57.03 1.00 48629.93 31281211 40.20 1.00 64 PEs 11056.12 40759689 57.60 3.77 13514.47 37407531 43.25 3.60 Speedup 16 14 12 10 8 6 ---m- #3 4 --+-....... ;:;:; ..... 2 #58 #77 ideal process. On the other hand, a master-less configuration, such as a ring connection, allows us to achieve pipeline effects with better load balancing, whereas it becomes harder to implement suitable control to manage collaborative work among PEs. 0 2 8 10 12 14 16 Figure 8: Speedup ratio MGTP /N prover on Multi-PSI using 16PEs. The execution times taken to solve these problems are 218, 12, and 37 seconds. As shown in the figure, there is no saturation in performance up to 16 PEs and greater speedup is obtained for the problems which consume more time. Given the above, we implemented a proof unchanging version of MGTP /N in a master-slave configuration based on lazy model generation. In this system, generator and subsumption processes run in a demand-driven mode, while tester processes run in a data-driven mode. The main features of this system are as follows: Table 2 shows the performance obtained by running MGTP /N for Theorems 5 and 7 [Overbeek 1990], which are also condensed detachment problems, on Multi-PSI with 64 PEs. We did not use heuristics such as sorting, but merely limited term size and eliminated tautologies. Full unification is written in KL1, which is thirty to one hundred times slower than that written in C on SUN/3s and SPARCs. Note that the average running rate per PE for 64 PEs is actually a little higher than that for 16 PEs. With this and other results, we were able to obtain almost linear speedup. 1) Proof unchanging allows us to obtain greater speedup as the number of PEs increases; 2) By utilizing the synchronization mechanism supported by KL1, sequentiality in subsumption testing is minimized; Recently we obtained a proof of Theorem 5 on PIM/m with 127 PEs in 2870.62 sec and nearly 44 billion reductions (thus 120 KRPS/PE). Taking into account the fact that the PIM/m CPU is about twice as fast as that of Multi-PSI, we found that almost linear speedup can be achieved, at least up to 128 PEs. 3) Since slave processes spontaneously obtain tasks from the master and the size of each task is well equalized, good load balancing is achieved; 4) By utilizing the stream data type of KL1, demand driven control is easily and efficiently implemented. Figure 8 displays the speedup ratio for condensed detachment problems #3, #58, and #77, taken from[McCune and Wos 1991], by running the 6 No. of PEs Our policy in developing parallel theorem provers is that we should distinguish between the speedup effect caused by parallelization and the search-pruning effect caused by strategies. In the proof changing parallelization, changing the number of PEs is merely betting, and may cause the strategy to be changed badly even though it results in the finding of a shorter proof. By using the demand driven control, we can not only suppress unnecessary model extensions and subsumption tests but also maintain a high running rate that is the key to achieving linear speedup. 4 2.2 Reflection and Parallel Meta-Programming System Reflection is the capability to feel the current state of the computation system or to dynamically modify it. The form of reflection we are interested in is the comp'l.ltational reflection proposed by [Smith 1984]. We try to 141 incorporate meta-level computation and computational reflection in logic programming language in a number of directions. As a foundation, a reflective sequential logic language R-Prolog* has been proposed [Sugano 1990]. This language allows us to deal with syntactic and semantic objects of the language itself legally by means of several coding operators. The notion of computational reflection is also incorporated, which allows computational systems to recognize and modify their own computational states. As a result, some of the extra-logical predicates in Prolog can be redefined in a consistent framework. We have also proposed a reflective parallel logic programming language RGHC (Reflective Guarded Horn Clauses ) [Tanaka and Matono 1992]. In RGHC, a reflective tower can be constructed and collapsed in a dynamic manner, using reflective predicates. A prototype implementation of RGHC has also been performed. It seems that RGHC is unique in the simplicity of its implementation of reflection. The meta-level computation can be executed at the same speed as its object-level computation. we also try to formalize distributed reflection, which allows concurrent execution of both object level and meta level computations [Sugano 1991]. The scope of reflection is specified by grouping goals that share local environments. This also models the eventual publication of constraints. We have also built up several application systems based on meta-programming and reflection. These are the experimental programming system ExReps [Tanaka 1991], the process oriented GHC debugger [Maeda et al., 1990, Maeda 1992] and the strategy management shell [Kohda and Maeda 91a, Kohda and Maeda 1991b]. ExReps is an experimental programming environment for parallel logic languages, where one can input programs and execute goals. It consists of an abstract machine layer and an execution system layer. Both layers are constructed using meta-programming' techniques. Various reflective operations are implemented in these layers. The process oriented GHC debugger provides highlevel facilities, such as displaying processes and streams in tree views. It can control a the behavior of a process by interactively blocking or editing its input stream data. This makes it possible to trace and check program execution from a programmer's point of view. A strategy management shell takes charge of a database of load-balancing strategies. When a user job is input, the current leading strategy and several experimental alternative strategies for the job are searched for in the database. Then the leading task and several experimental tasks of the job are started. The shell can evaluate the relative merits between the strategies, and decides on the leading strategy for the next stage when the tasks have terminated. 3 Applications Reasoning of Automated ARS has a wider application area if connected with logic programming and a formal approach to programming. We extended MGTP to cover modal logic. This extension has lead to abductive reasoning in AI systems and logic programming with negation as failure linked with broader practical applications such as fault diagnostics and legal reasoning. We also focused on programming, particularly parallel programs, as one of the major application area of formal logic systems in spite of difficulties. There has been a long history of program synthesis from specifications in formal logic. We are aiming to make ARS, the foundational strength of this approach. 3.1 Propositional Modal Tableaux in MGTP MGTP's proof method and the tableaux proof procedure[Smullyan 1968] are very close in computationally. Each rule of tableaux is represented by an input clause for MGTP in a direct manner. In other words, we can regard the input clauses for MGTP as a tableaux implementation language, as Horn clauses are a programming language for Prolog. MGTP tries to generate a model for a set of clauses in a bottom-up manner. When MGTP successfully generates a model, it is found to be satisfiable. Otherwise, it is found to be unsatisfiable. satisfiable apply(MGTP, ASetOfClauses) = { un sat'zs f'za bl e Since we regard MGTP as an inference system, a propositional modal tableaux[Fitting 1983, Fitting 1988] has been implemented in MGTP. apply(MGT P, TableauxProver(Formula)) ={ satisfiable unsat'zs f'za bl e In tableaux, a close condition is represented by a negative clause, an input formula by a positive ~lause and a decomposition rule by a mixed clause for MGTP in a direct manner[Koshimura and Hasegawa 1991]. There are two levels in this prover. One is the MGTP implementation level, the other is the tableaux implementation level. The MGTP level is the inference system level at which we mainly examine speedup of inference such as redundancy elimination and parallelization. At the tableaux level, inference rules, which indicate the property of a proof domain, are described. It follows that we mainly examine the property of the proof domain at the tableaux level. It is useful and helpful to have these two levels, as we can separate the description for the property of the domain from the description for the inference system. 142 3.2 Abductive Reasoning and N onmonotonic Modeling sophisticated agents capable of reasoning with incomplete information has been a major theme in AI. This kind of reasoning is not only an advanced mechanism for intelligent agents to cope with some particular situations but an intrinsically necessary condition to deal with commonsense reasoning. It has been agreed that neither human beings nor computers can have all the information relevant to mundane or everyday situations. To function without complete information, intelligent agents should draw some unsound conclusions, or augment theorems, by applying such methods as closedworld assumptions and default reasoning. This kind of reasoning is nonmonotonic: it does not hold that the more information we have, the more consequences we will be aware of. Therefore, this inference has to anticipate the possibility of later revisions of beliefs. We treat reasoning with incomplete information as a reasoning system with hypotheses, or hypothetical reasoning [Inoue 1988], in which a set of conclusions may be expanded by incorporating other hypotheses, unless they are contradictory. In hypothetical reasoning, inference to reach the best explanations, that is, computing hypotheses that can explain an observation, is called abduction. The notion of explanation has been a fundamental concept for various AI problems such as diagnoses, synthesis, design, and natural language understanding. We have investigated methodologies of hypothetical reasoning from various angles and have developed a number of abductive and nonmonotonic reasoning systems. Here, we shall present hypothetical reasoning systems built upon the MGTP [Fujita and Hasegawa 1991J. The basic idea of these systems is to translate formulas with special properties, such as nonmonotonic provability (negation as failure) and consistency of ahductive explanations, into some formulas with a kind of modality so that the MGTP can deal with them using classical logic. The extra requirements for these special properties are thus reduced to generate-and-test problems for model candidates. These, can, then, be handled by the· MGTP very efficiently through case-splitting of non-unit consequences and rejection of inconsistent model candidates. In the following, we show how the MGTP can be used for logic programs containing negation as failure, and for abduction. 3.2.1 Logic Programs and Disjunctive Databases with Negation as Failure In recent theories of logic programming and deductive databases, declarative semantics have been given to the extensions of logic programs, where the negation-asfailure operator is considered to be a nonmonotonic modal operator. In particular, logic programs or de- ductive databases containing both negation as failure (not) and classical negation (-.) can be used as a powerful knowledge representation tool, whose applications contain reasoning with incomplete knowledge [Gelfond and Lifschitz 1991], default reasoning, and abduction [Inoue 1991aJ. However, for these extended classes of logic programs, the top-down approach cannot be used for computation because there is no local property in evaluating programs. For example, there has been no top-down proof procedure which is sound with respect to the stable model semantics for general logic programs. We thus need bottom-up computation for correct evaluation of negation-as-failure formulas. In [Inoue et al., 1992a], a bottom-up computation of answer sets for any class offunction-free logic programs is provided. These classes include the extended disjunctive databases [Gelfond and Lifschitz 1991J, the proof procedure of which has not been found. In evaluating not P in a bottom-up manner, it is necessary to interpret not P with respect to a fixpoint of computation because, even if P is not currently proved, P might be proved in subsequent inferences. We thus came up with a completely different way of thinking for not. When we have to evaluate not P in a current model candidate we split the model candidate in two: (1) the model candidate where P is assumed not to hold, and (2) the model candidate where it is necessary that P holds. Each negation-as-failure formula not P is thus translated into negative and positive literals with a modality expressing belief, i.e., "disbelieve P" (written as -.KP) and "believe P" (written as KP). Based on the above discussion, we translate any logic program (with negation as failure) into a positive disjunctive program (without negation as failure) of which the MGTP can compute the minimal models. The following is an example of the translation of general logic programs. Let II be a general logic program consisting of rules of the form: Al (- A I +1 , ... , Am, not A m+1 , ••. , not An, (1) where, n 2: m 2: I 2: 0, 1 2: I 2: 0, and each Ai is an atom. Rules without heads are called integrity constraints and are expressed by l = for the form (1). Each rule in II of the form (1) is translated into the following MGTP rule: ° A I+1 , ..• , Am, -7 -.KAm +ll ···, -.KAn , All KAm +1 I ... I KAn· (2) For any MGTP rule of the form (2), if a model candidate S' satisfies A I+ 1 , . .. , Am, then S' is split into n - m + I (n 2: m 2: 0, I ::; 1) model candidates. Pruning rules with respect to "believed" or "disbelieved" literals are expressed as the following integrity constraints. These are dealt with by using object-level schemata on the MGTP. °: ; -.KA, A-7 for every atom A (3) -.KA, KA-7 for every atom A (4) Given a general logic program II, we denote the set of rules consisting of the two schemata (3) and (4) by tr(II), 143 and the MGTP rules obtained by replacing each rule (1) of II by a rule (2). The MGTP then computes the fixpoint of model candidates, denoted by M(tr(II)), which is closed under the operations of the MGTP. Although each model candidate in M(tr(II)) contains "believed" atoms, we should confirm that every such atom is actually derived from the program. This checking can be done very easily by using the following constraint. Let 5' E M(tr(II)). helpful for understanding under what conditions each model is stable or unstable. The MGTP can find all answer sets incrementally, without backtracking, and in parallel. The proposed method is surprisingly simple and does not increase the computational complexity of the problem more than computation of the minimal models of positive disjunctive programs. The procedure has been implemented on top of the MGTP on a parallel inference machine, and has been applied to a legal reasoning system. For every ground atom A, if K A E 5', then A E 5' . (5) Computation by using MGTP is sound and complete with respect to the stable model semantics in the sense that: 5 is an answer set (or stable model) of II if and only if 5 is one of the atoms obtained by removing every literal with the operator K from a model candidate 5' in M(tr(II)) such that 5' satisfies condition (5). Example: _Suppose that the general logic program II consists of the four rules: R +- notR, R +- Q, P +- notQ, Q +- not P. These rules are translated to the following MGTP rules: ~ -,KR,R I KR, Q~R, ~ ~ -,KQ,P I KQ, -,KP, Q I KP. In this example, the first MGTP rule can be further reduced to ~ KR. if we prune the first disjunct by the schema (3). Therefore, the rule has computationally the same effect as the integrity constraint: +- notR. This integrity constraint says that every answer set has to contain R: namely, R should be derived. Now, it is easy to see that M(tr(II)) = {51, 52, 53}' where 51 = {KR,-,KQ,P,KP}, 52 = {KR,KQ,-,KP,Q,R}, and 53 = {KR, KQ, KP}. The only model candidate that satisfies the condition (5) is 52, showing that {Q,R} is the. unique stable model of II. Note that {P} is not a stable model because 51 contains K R but does not contain R. In [Inoue et al., 1992a], a similar translation was also given to extended disjunctive databases which contain classical negation, negation as failure and disjunctions. Our translation method not only provides a simple fixpoint characterization of answer sets, but also is very 3.2.2 Abduction There are many proposals for a logical account of abduction, whose purpose is to generate query explanations. The definition we consider here is similar to that proposed in [Poole et al., 1987J. Let ~ be a set of formulas, r a set of literals and G a closed formula. A set E of ground instances of r is an explanation of G from (~, f) if 1. ~ 2. ~ u E 1= G, and U E is consistent. The computation of explanations of G from (~, r) can be seen as an extension of proof-finding by introducing a set of hypotheses from f that, if they could be proved by preserving the consistency of the augmented theories, would complete the proofs of G. Alternatively, abduction can be characterized by a consequence-finding problem [Inoue 1991b], in which some literals are allowed to be hypothesized (or skipped) instead of proved, so that new theorems consisting of only those skipped literals are derived at the end of deductions instead of just deriving the empty clause. In this sense, abduction can be implemented by an extension of deduction, in particular of a top-down, backward-chaining theorem-proving procedure. For example, Theorist [Poole et al., 1987] and SOL-resolution [Inoue 1991b] are extensions of the Model Elimination procedure [Loveland 1978J. However, there is nothing to prevent us from using a bottom-up, forward-reasoning procedure to implement abduction. In fact, we developed the abductive reasoning system APRICOT /0 [Ohta and Inoue 1990], which consists of a forward-chaining inference engine and the ATMS [de Kleer 1986]. The ATMS is used to keep track of the results of inference in order to avoid both repeated proofs of subgoals and duplicate proofs among different hypotheses deriving the same subgoals. These two reasoning styles for abduction have both merits and demerits, which are complementary to each other. Top-down reasoning is directed to the given goal but may result in redundant proofs. Bottom-up reasoning eliminates redundancy but may prove subgoals unrelated to the proof of the given goal. These facts suggest that it is promising to simulate top-down reasoning using 144 a bottom-up reasoner, or to utilize cashed results in topdown reasoning. This upside-down meta-interpretation [Bry 1990] approach has been attempted for abduction in [Stickel 1991], and has been extended by incorporating consistency checks in [Ohta and Inoue 1992]. We have already developed several parallel abductive systems [Inoue et at., 1992b] using the the bottom-up theorem prover MGTP. We outline four of them below. 1. MGTP+ATMS (Figure 9). This is a parallel implementation of APRICOT /0 [Ohta and Inoue 1990] which utilizes the ATMS for checking consistency. The MGTP is used as a forward-chaining inference engine, and the ATMS keeps a current set of beliefs M, in which each ground atom is associated with some hypotheses. For this architecture, we have developed an upsidedown meta-interpretation method to incorporate the top-down information [Ohta and Inoue 1992]. Parallelism is exploited by executing the parallel ATMS. However, because there is only one channel between the MGTP and the ATMS, the MGTP often has to wait for the results of the ATMS. Thus, the effect of parallel implementation is limited. parallelization depends heavily on how much consistency checking is being performed in parallel at one time. 3. All Model Generation Method. No matter how good the MGTP+MGTP method might be, the system still consists of two different components. The possibilities for parallelization therefore remain limited. In contrast, model generation methods do not separate the inference engine and consistency checking, but realize both functions in a single MGTP. In such a method, the MGTP is used not only as an inference engine but also as a generate-and-test mechanism so that consistency checks are automatically performed. For this purpose, we can utilize the extension and rejection of model candidates supplied by the MGTP. Therefore, multiple model candidates can be kept in distributed' memories instead of keeping one global belief set M, as done in the above two methods, thus great amounts of parallelism can be obtained. The all model generation method is the most direct way to implement reasoning with hypotheses. For each hypothesis H in f, we supply a rule of the form: 2. MGTP+MGTP (Figure 10). -7 This is a parallel version of the method described in [Stickel 1991]. In addition, consistency is checked by calling another M G TP (MGT P _2). In this system, each hypothesis H in f is represented by fact(H, {H}), and each Horn clause in ~ of the form: Al A ... A An::) C, is translated into an MGTP rule of the form: n fact(C, cc( U Ed), i:::=+ where Ei is a set of hypotheses from f on which Ai depends, and the function cc is defined as: cc(E) ={ ~I if if ~ U ~ E is consistent U E is not consistent A current set of beliefs M is kept in the form of fact(A, E) representing a meta-statement that L:; U E 1= A, but is stored in the inference engine (!vI GT P _1) itself. Each time MGT P _1 derives a new ground atom, the consistency of the combined hypotheses is checked by MGT P-2. The parallelism comes from calling H I..,KH, (6) where ..,KH means that H is not assumed to be true in the model. Namely, each hypothesis is assumed either to hold or not to hold. Since this system may generate 21r1 model candidates, the method is often too explosive for several practical applications. 4. Skip Method. To limit the number of generated model candidates as much as possible, we can use a method to delay the case-splitting of hypotheses. This approach is similar to the processing of negation as failure with the MGTP [Inoue et al., 1992a], introduced in the previous subsection. That is, we do not supply any rule of the form (6) for any hypothesis of f, but instead, we introduce hypotheses when they are necessary. When a clause in L:; contains negative occurrences of abducible predicates HI," ., Hm (Hi E f, m 2: 0) and is in the form: Al A ... A Al A HI A ... A Hm ::) C , --..--abducibles we translate it into the following MGTP rule: multiple MGT P -2's at one time. This system achieves more speed-up than the MGTP+ATMS method. However, since Jl.1GT P _1 is not parallelized, the effect of In this translation, each hypothesis in the premise part is skipped instead of being resolved, and is moved to the right-hand side. This operation is 145 Dependencies ATMS MGTP M Current Set of Beliefs Consistency Checks Model Generation Figure 9: MGTP+ATMS Hypotheses MGTP_1 MGTP_2 M Sat / Unsat Model Generation cc Consistency Checks Figure 10: MGTP+MGTP a counterpart to the Skip rule in the top-down Just as in approach defined in [Inoue 1991b]. schema (3) for negation as failure, a model candidate containing both Hand -,KH is rejected by the schema: -,KH, H-t for every hypothesis H . Some results of evaluation of these abductive systems as applied to planning and design problems are described in [Inoue et al., 1992b]. We are now improving their performance for better parallelism. Although we need to investigate further how to avoid possible combinatorial explosion in model candidate construction for the skip method, we conjecture that the skip method (or some variant thereof) will be the most promising from the viewpoint of parallelism. Also, the skip method may be easily combined with negation as failure so that knowledge bases can contain both abducible predicates and negation-as-failure formulas as in the approach of [Inoue 1991a]. 3.3 3.3.1 Program Synthesis by Realizability Interpretation Program Synthesis by MGTP We used Realizability Interpretation (an extension of Curry-Howard Isomorphism) in the area of constructive mathematics [Howard 1980], [Martin 1982] in order to give an executable meaning to proofs obtained by efficient theorem provers. Our approach for combining prover technologies and Realizability Interpretation has the following advantages: • This approach is prover independent and all provers are possibly usable. • Realizability Interpretation has a strong theoretical background. • Realizability Interpretation is general enough to cover concurrent programs. Two systems MGTP and PAPYRUS, developed in ICOT, are used for the experiments on sorting algorithms in order to get practical insights into our approach(Figure 11). A model generation theorem prover (MGTP) implemented in KL1 runs on a parallel machine:Multi-PSI. It searches for proofs of specification expressed as logical formulae. MGTP is a hyper-resolution based bottom up (infers from premises to goal) prover. Thanks to KL1 programming technology, MGTP is simple but works very efficiently if problems satisfy the rangerestrictedness condition. The inference mechanism of MGTP is similar to SATCHMO[Manthey and Bry 1988], in principle. Hyper-resolution has an advantage for program synthesis in that the inference system is constructive. This means that no further restriction is needed to avoid useless searching. PAPYRUS (PArallel Program sYnthesis by Reasoning Upon formal Systems) is a cooperative workbench for formal logic. This system handles the proof trees of user defined logic in Edinburgh Logical Framework(LF)[Harper et al., 1987]. A typed lambda term in LF represents a proof and a program can be extracted from this term by lambda computation. This system treats programs (functions) as the models of a logical formula by user defined Realizability Interpretation. PAPYRUS is an integrated workbench for logic and provides similar functions to PX[Hayashi and Nakano 1988], Nuprl[Constable et aI., 1986], and Elf[Pfenning 1988]. We faced two major problems during research process: • Program extraction from a proof in clausal form, and 146 PAPYRUS , ~ Propositions I Subprograms ProofTrm J--i Realizer ~rogram Problem I Equations I IPropositions I '" ~I I I Goals . MGTP MGTPprover • Demodulator -.• Proof Tree • • Equality Reasoning } Figure 11: Pro.gram Synthesis by MGTP • Incorporation of induction and equality. The first problem relates to the fact that programs' cannot be extracted from proofs obtained by using the excluded middle, as done in classical logic. The rules for transforming formulae into clausal form contains such a prohibited process. This problem can be solved if the program specification is given in clausal form because a proof can be obtained from the clause set without using the excluded middle. The second problem is that all induction schemes are expressed as second-order propositions. In order to handle this, second-order unification will be needed, which still is impracticaL However, it is possible to transform a second-order proposition to a first-order proposition if the program domain is fixed. Proof steps of equality have nothing to do with computation, provers can use efficient algorithms for equality as an attached procedure. 3.3.2 A Logic System for Extr~cting Interactive Processes There has been some research Martin 1982, Sato 1986] and [Howard 1980, [Hayashi and Nakano 1988] into program synthesis from constructive proofs. In this method, an interpretation of formulas is defined, and the consistent proof of the formula can be translated into a program that satisfies the interpretation. Therefore we can identify the formula as the specification of the program, proof as programming, and proof checking as program checking. Though this method has many useful points, the definition of a program in this method is only ",\ TerI~ (function)". Thus it is difficult to synthesize a program as a parallel process by which computers can communicate with the outside world. We proposed a new logic fl, that is, a constructive logic extended by introducing new operators fl and Q. The operator fl is a fixpoint operator on formulae. We can express the non-bounded repetition of inputs and outputs with operators fl and Q. Further, we show a method to synthesize a program as a parallel process like CCS[Milner 1989] from proofs of logic fl. We also show the proof of consistency of Logic fl and the validity of the method to synthesize a program. 3.4 Application of Theorem Proving to Specification Switching System of a We apply a theorem proving technique to the software design of a switching system, whose specifications are modeled by finite state diagrams. The main points of this project are the following: 1) Specification description language Ack, based on a transi tion system. 2) Graphical representation in Ack. 3) Ack interpreter by MGTP. We introduce the protocol specification description language, Ack. It is not necessary to describe all state transitions concretely using Ack, because several state transitions are deduced from one expression by means of theorem proving. Therefore, we can get a complete specification from an ambiguous one. Ack is based on a transition 'system (8, So, A, T), where 8 is a set of state, So (E S) is an initial state, A is a set of actions, and T(T ~ 8 x A x 8) is a set of transition relations. 147 onhook(a) ........ ~......... )idle(a) ..•....•.•.••.;. Figure 13: An interpretation result of Ack specification Figure 12: An example of Ack specification • action onhook(a) from idle(a) to idle(a). Graphical representation in Ack consists of labeled circles and arrows. A circle means a state and an arrow means an action. Both have two colors: black and gray. This means that when a gray colored state transition exists a black colored state transition exists. Textual phrase representation in Ack can be represented by a first order predicate logic by the following. VX3Y(A[X] --+ B[X, Y]). where A[X] and B[X, Y] are conjunctions of the following atomic formulas. state( S) - S means a state. trans(A, So, Sl) - An action A means a state So to a state S1' A[X] corresponds to grayed color state transitions and B[X, Y] corresponds to black color state transitions. The Ack interpreter is described by MGTP. This type offormula is translated into an MGTP formula. A set of models deduced from Ack specification formulae form a complete state transition diagram. Figure 12 shows an example of Ack specification. Rule 1 of Figure 1 means the existence of an action sequence from an initial state idl e( a) such that offhook(a) --+ dial(a,b) --+ offhook(b). This is represented by the following formula. --+ trans( offhook( a), idle( a), dt( a)), trans(dial(a, b), dt(a), rbt(a)), trans( ofihook(b), rbt( a), x( a, b)). Rule 2 of Figure 1 means that the action offhook(a) changes any state to idle(a). It is represented by the following formula. VS( state(S) 1\ state(idle( a)) --+trans( onhook( a), S, idle( a))) Figure 13 shows an interpretation of the result of Figure 12. In this example, the following four transitions are automatically generated. • action onhook(a) from dt(a) to idle(a). • action onhook(a) from rbt(a) to idle(a). • action onhook(a) from x(a, b) to idle(a). 3.5 MENDELS ZONE: A Parallel Program Development System MENDELS ZONE is a software development system for parallel programs. The target parallel programming language is MENDEL, which is a textual form of Petri Nets, MENDEL is then translated into the concurrent logic programming language KLI and executed on the MultiPSI. MENDEL is regarded as a more user-friendly version of the language. MENDEL is convenient for the programmer to use to design cooperating discrete event systems. MENDELS ZONE provides the following functions: 1) Data-flow diagram visualizer [Honiden et al., 1991] 2) Term rewriting system: Metis[Ohsuga et al., 90][Ohsuga et al., 91] 3) Petri Nets and temporal logic based programming environment [Uchihira et al., 90a][Uchihira et al., 90b] For 1), we define the decomposition rule for data-flow diagram and extract the MENDEL component from decomposed data-flow diagrams. A detailed specification process from abstract specification is also defined by a combination of data-flow diagrams and equational formulas. For 2), Metis is a system to supply experimental environment for studying practical techniques for equational reasoning. The policy of developing Metis is enabling us to implement, test, and evaluate the latest techniques for inference as rapidly and freely as possible. The kernel function of Metis is Knuth-Bendix (KB) completion procedure. We adopt Metis as a tool for verifying the MENDEL component. The MENDEL component can be translated into a component of Petri Nets. For 3), following sub-functions are provided: 148 1. Graphic editor The designer constructs each component of Petri Nets using the graphic editor, which provides creation, deletion, and replacement. This editor also supports expansion and reduction of Petri Nets. 2. Method editor The method editor provides several functions specific to Petri Nets. Using the method editor, the designer describes methods (their conditions and actions) in detail using KLl. 3. Component library Reusable component are stored in the component library. The library tool supports browsing and searching for reusable components. 4. Verification and synthesis tool Only the skeletons of Petri Nets structures are automatically retracted (slots and KL1 codes of methods are ignored) since our verification and synthesis are applicable to bounded net. The verification tools verifies whether Petri Nets satisfy given temporal logic constraints. Inference Analogical Reasoning Analogical reasoning is often said to be at the very coreof human problem-solving and has long been studied in the field of artificial intelligence. We treat a general type of analogy, described as follows: when two objects, B (called the base) and T (called the target), share a property S (called the similarity), it is conjectured that T satisfies another property P (called the projected property) which B satisfies as well. In the study of analogy, the following have been central problems: 1) Selection of an object as a base w.r.t a target. gies. The verified Petri Nets are translated into their textual form (MENDEL programs). The MENDEL programs are compiled into KL1 programs, which can be executed on Multi-PSI. During execution, firing methods are displayed on the graphic editor, and values of tokens are displayed on the message window. The designer can check visually that program behaves to satisfy his expectation. Advanced Learning 4.1 2) Selection of pertinent properties for drawing analo- 5. Program execution on Multi-PSI 4 have also investigated the application of minimally multiple generalization for constructive logic pograms learning. In the empirical approach, we have studied automated programming, especially, the logic program transformation and synthesis method based on unfold/fold transformation which is a well-known technique for deriving correct and efficient programs. The following subsections briefly describe these studies and their results. and It is expected that we will, before long, face a software crisis in which the necessary quantity of computer soft,,\Tare cannot be provided even if we were all to engage in software production. In order to avoid this crisis, it is necessary for a computer system itself to produce software or new information adaptively in problem-solving. The aim of the study on advanced inference and learning is to explore the underlying mechanism for such a system. In the current stage in which we have no absolute approach to the goal, we have had to do exhaustive searches. We have taken three different but co-operative approaches: logical, computational and empirical In the logical approach, analogical reasoning has been analyzed formally and mechanisms for analogical reasoning have been explored. In the computational approach, we have studied inventing new predicates, which are one of the lnost serious problems in learning logic programs. \Ale 3) Selection of a property for projection w.r ..t. a certain similarity. Unfortunately, most previous works were only partially successful in answering these questions, by proposing solu tions a priori. Our objective is to clarify, as formally aspossible,the general relationship between those analogical factors T, B, S, and P under a given theory A. To find the relationship bvetween the analogical factors would answer these problems once and for all. In [Arima 1992, Arima 1991], we clarify such a relation and show a general solution. When analyzing analogical reasoning formally based on classical logic, the following are shown to be reasonable: • Analogical reasoning is possible only if a certain form of rule, called the analogy prime rule (APR), is a ded ucti ve theorem of a given theory. If we let S (x) = ~(x,S) and P(x) = II(x,P), then the rule has the following form: vx, s, p. Jatt ( S , p) 1\ Job j ( X, S) 1\ ~ ( X, S) ::) II ( X, p) , where each of Jatt(s,p), Jobj(X,S), ~(x,s) and II(x,p) are formulae in which no variable other than its argument occurs freely. • An analogical conclusion is derived from the APR, together with two particular conjectures: one conjecture is Jatt(S, P) where, from the information about 149 the base case, E(B, S) (= S(B)) and II(B, P) (= P(B)). The other is Jobj(T, S) where, from the information about the target case, E(T, S)( = S(T)). 4.2.2 Minimally Multiple Generalization Machine Learning is one of the most important themes in the area of artificial intelligence. A learning ability is necessary not only for processing and maintaining a large amount of knowledge information but also for realizing a user-friendly interface. We have studied the invention of new predicates is one of the most serious problems in learning logic programs. We have also investigated the application of minimally multiple generalization to the constructive learning of logic programs. Another important problem in learning logic programs is to develop a constructive algorithm for learning. Most learning by induction algorithms, such as Shapiro's model inference system, are based on a search or enumerative method: While search and enumerative methods are often very powerful, they are very expensive. A constructive method is usually more efficient than a search method. In the constructive learning of logic programs, the notion of least generalization [Plotkin 1970] plays a central role. Recently, Arimura proposed a notion of minimally multiple generalization (mmg) [Arimura 1991], a natural extension of least generalization. For example, the pair of heads in a clause in a normal append program is one head in the mmg for the Herbrand model of the program. Thus, mmg can be applied to infer the heads of the target program. Arimura has also given a polynomial time algorithm to compute mmg. We are now investigating an efficient constructive learning method using mmg. 4.2.1 4.3 Also, a candidate based on abduction + deduction is shown for a non-deductive inference system which can yield both conjectures. 4.2 Machine Learning of Logic Programs Predicate Invention Shapiro's model inference gives a very important strategy for learning programs - an incremental hypothesis search using contradiction backtracing. However, his theory assumes that an initial hypothesis language with enough predicates to describe a target model is given to the learner. Furthermore, it is assumed that the teacher knows the intended model of all the predicates. Since this assumption is rather severe and restrictive, for the practical applications of learning logic programs, it should be removed. To construct a learning system without such assumptions, we have to consider the problem of predicates invention. Recently, several approaches to this challenging and difficult problem have been presented [Muggleton and Buntine 1988], and [Ling 1989]. However, most of them do not give sufficient analysis on the computational complexity of the learning process, which is where the hypothesis language is growing. We discussed the problem as nonterminal invention in grammatical inference. As is well known, any context-free grammar can be expressed as a special form of the DCG (definite clause grammar) logic program. Thus, nontermina.l invention in grammatical inference corresponds to predicate invention. We have proposed a polynomial time learning algorithm for the class of simple deterministic languages based on nonterminal invention and contradiction backtracking[Ishizaka 1990]. Since the class of simple deterministic languages strictly includes regular languages, the result is a natural extension of our previous work[Ishizaka 1989]. Logic Program Transformation / Synthesis Automated programming is one important advanced inIn researching ference problem. automatic program transformation and synthesis, the unfold/fold transformation [Burstall and Darlington 1977, Tamaki and Sato 1984] is a well-known program technique to derive correct and efficient programs. Though unfold/fold rules provide a very powerful methodology for program development, the application of those rules needs to be guided by strategies to obtain efficient programs. In unfold/fold transformation, the efficiency improvement is mainly the result of finding the recursive definition of a predicate, by performing folding steps. Introduction of auxiliary predicates often allows folding steps. Thus, invention of new predicates is one of the most important problems in program transformation. On the other hand, unfold/fold transformation is often utilized for logic program synthesis. In those studies, unfold/fold rules are used to eliminate quantifiers by folding to obtain definite clause programs from first order fornmlae. However, in most of those studies, unfold/fold rules were applied nondeterministically and general methods to derive definite clauses were not known. We have studied logic program transformation and synthesis method based on unfold/fold transformation and have obtained the following results. (1) We investigated a strategy of logic program transformation based on unfold/fold rules [Kawamura 1991]. New predicates synthesized automatically to perform folding. We also extended 150 this method to incorporate goal replacement transformation [Tamaki and Sato 1984J. (2) We showed a characterization of classes of first order formulae from which definite clause programs can be derived automatically [Kawamura 1992J. Those formulae are described by Horn clauses extended by universally quantified implicational formulae. A synthesis procedure based on generalized unfold/fold rules [Kanamori and Horiuchi 1987J is given, and with some syntactic restrictions, those formulae successfully transformed into equivalent definite clause programs. 5 Conclusion We have overviewed research and -development of parallel automated reasoning systems at ICOT. The constituent research tasks of three main areas provided us with the following very promising technological results. (1) Parallel Theorem Prover and its implementation techniques on PIM We have presented two versions of a modelgeneration theorem prover MGTP implemented in KL1: MGTP /G for ground models and MGTP /N for non-ground models. We evaluated their performance on the distributed memory multi-processors Multi-PSI and PIM. Range-restricted problems require only matching rather than full unification, and by making full use of the language features of KL1, excellent efficiency was achieved from MGTP /G. To solve non-range-restricted problems by the model generation method, however, MGTP /N is restricted to Horn clause problems, using a set of KL1 metaprogramming tools called the Meta-Library, to support the full unification and the other functions for variable management. To improve the efficiency of the MGTP provers, we developed RAMS and MERC methods that enable us to avoid redundant computations in conjunctive matching. We were able to obtain good performance results by using these methods on PSI. To ease severe time and space requirements in proving hard mathematical theorems (such as condensed detachment problems) by MGTP /N, we proposed the lazy model generation method, which can decrease the time and space complexity of the basic algorithm by several orders of magnitude. Our results show that significant saving in computation and memory can be realized by using the lazy algOl'ithm. For non-Horn ground problems, case splitting was used as the basic seed of OR parallel MGTP /G. This kind of problem is well-suited to MIMD machine such as Multi-PSI, on which it is necessary to make granularity as large as possible to minimize communication costs. We obt'ained an almost linear speedup for the n-queens, pigeon hole, and other problems on Multi-PSI, using a simple allocation scheme for task distribution. For Horn non-ground problems, on the other hand, we had to exploit the AND parallelism inherent to conjunctive matching and subsumption. We found that good performance and scalability were obtained by using the AND parallelization schemeof MGTP/N. In particular, our latest results, obtained with the MGTP /N prover on PIM/m, showed linear speedup on condensed detachment problems, at least up to 128 PEs. The key technique is the lazy model generation method, that avoids the unnecessary computation and use of time and space while maintaining a high running rate. The full unification algorithm, written in KL1 and used in MGTP /N, is one hundred times slower than that written in C on SPARCs. We are considering the incorporation of built-in firmware functions to bridge this gap. But developing KL1 compilation techniques for non-ground models, we believe, will further contribute to parallel logic programming on PIM. Through the development of MGTP provers, we confirmed that KL1 is a powerful tool for the rapid prototyping of concurrent systems, and that parallel automated reasoning systems can be easily and effectively built on the parallel inference machine, PIM. (2) Applications The modal logic prover on MGTP /G realizes two advantages. The first is that the redundancy elimination and parallelization of MGTP /G directly endow the prover with good performance. The second is that direct representation of tableaux rules of modal logic as hyper-resolution clauses are far more suited to adding heuristics for performance. This prover exhibited excellent benchmark results. The basic idea of non-monotonic and abductive systems on MGTP is to use the MGTP as an metainterpreter for each system's special properties, such as nonmonotonic provability (negation as failure) and the consistency of abductive explanations, into formulae having a kind of modality such that MGTP can deal with them within classical logic. The extra requirements for these special properties are thus reduced to "generate-and-test" problems of model candidates that can be efficiently handled by MGTP 151 through the case-splitting of non-unit consequences and rejection of inconsistent model candidates. the Knuth-Bendix (KB) completion procedure. We adopt Metis to verify the components of Petri Nets. We used MGTP for the application of program synthesis in two ways. Only the skeletons of Petri Net structures are automatically retracted (slots and the KLI codes of methods are ignored) since our verification and synthesis are applicable to a bounded net. The verification tool verifies whether Petri Nets satisfy given temporal logic constraints. In one approach, we used Realizability Interpretation( an extension of Curry-Howard Isomorphism), an area of constructive mathematics, to give executable meaning to the proofs obtained by efficient theorem provers. Two systems, MGTP and PAPYRUS, both developed in ICOT, were used for experiments on sorting algorithms to obtain practical insights into our approach. We performed experiments on sorting algorithms and Chinese Reminder problems and succeeded in obtaining ML programs from MGTP proofs. To obtain parallel programs, we proposed a new logic ~l, that is a constructive logic extended by introducing new operators ~ and q. Operator ~ is a fixpoint operator on formulae. We can express the nonbounded repetition of inputs and outputs with operators ~ and q. Furthermore, we 'showed a method of synthesizing "program" as a parallel process, like CCS, from proofs of logic~. We also showed the proof of consistency of Logic ~ and the validity of the method to synthesize "program". Our other approach to synthesize parallel programs by MGTP is the use of temporal logic, in which specifications are modeled by finite state diagrams, as follows. 1) Specification description language Ack, based on a transition system. 2) Graphical representation in Ack. 3) Ack interpreter by MGTP. It is not necessary to describe all state transitions concretely using Ack, because several state transitions are deduced from one expression by theorem proving in temporal logic. Therefore, we can obtain a complete specification from an ambiguous one. Another approach is to use term rewriting systems(Metis). MENDELS ZONE is a software development system for parallel programs. The target parallel programming language is MENDEL, which is a textual form of Petri Nets, that is translated into the concurrent logic programming language KLI and executed on Multi-PSI. We defined the decomposition rules for data-flow diagrams and subsequently extracted programs. Metis provides an experimental environment for studying practical techniques by equational reasoning, of implement, and test. The kernel function of Metis is (3) Advanced Inference and Learning To extend the reasoning power of AR systems, we have taken logical, computational, and empirical approaches. In the logical approach, analogical reasoning, considered to be at the very core of human problemsolving, has been analyzed formally and a mechanism for analogical reasoning has been explored. In this approach, our objective was to clarify a general relationship between those analogical factors T, B, Sand P under a given theory A, as formally as possible. Determining the relationship between the analogical factors would answer these problems once and for all. We clarified the relationship and formulated a general solution for them all. In the computational approach, we studied the inventing of new predicates, one of the most serious problems in the learning of logic programs. We proposed a polynomial time learning algorithm for the class of simple deterministic languages, based on nonterminal invention and contradiction backtracing. Since the class of simple deterministic languages includes regular languages, the result is a natural extension of our previous work. We have also investigated the application of minimally multiple generalization to the constructive learning of logic programs. Recently, Arimura proposed the notion of minimally multiple generalization (mmg) . vVe are now investigating an efficient constructive learning method that uses mmg. In the empirical approach, we have studied automated programming, especially, the logic pTogram transformation and synthesis method based on an unfold/fold transformation, a well-known means of deriving correct and efficient programs. We investigated a strategy for logic program transformation based on unfold/fold rules. New predicates are synthesized automatically to perform folding. We also extended this method to incorporate a goal replacement transformation. We also showed a characterization of the classes of first order formulae, from which definite clause programs can be derived automatically. These formulae are described by Horn clauses, extended by universally quantified implicational formulae. A synthesis procedure based on generalized unfold/fold rules 152 is given, and with some syntactic restrictions, these formulae can be successfully transformed into equivalent definite clause programs. These results contribute to the development of FGCS, not only in AI applications, but also in the foundation of the parallel logic programming that we regard as being the kernel of FGCS. Acknowledgment The research on automated reasoning systems was carried out by the Fifth Research Laboratory at ICOT in tight cooperation with five manufactures. Thanks are firstly due to who have given support and helpful comments, including Dr. Kazuhiro Fuchi, the director of ICOT, and Dr. Koichi Furukawa; the deputy director of ICOT. Many fruitful discussions took place at the meetings of Working Groups: PTP, PAR, ANR, and ALT. We would like to thank the chair persons and all other members of the Working Groups. Special thanks go to many people at the cooperating manufacturers in charge of the joint research programs. [Nitta et al., 1992J K. Nitta, Y. Ohtake, S. Maeda, M. Ono, H. Ohsa¥i and K. Sakane, HELIC-II: a legal resoning system on the parallel inference machine, in Proc. of FGCS'92, Tokyo, 1992. [Stickel 1988J M.E. Stickel, A Prolog Technology Theorem Prover: Implementation by an Extended Prolog Compiler, in Journal of Automated Reasoning 4 pp.353-380, 1988. [McCune 1990J W.W. McCune, OTTER 2.0 Users Guide, Argonne National Laboratory, 1990. [McCune and Wos 1991] W.W. McCune and L. Wos, - . Experiments in Automated Deduction with Condensed Detachment, Argonne National Laboratory, 1991. [Overbeek 1990J R. Overbeek, Challenge Problems, (private communication) 1990. [Wilson and Loveland 1989] D. Wilson and D. Loveland, Incorporating Relevancy Testing in SATCHMO, Technical Report of CS(CS-1989-24), Duke University, 1989. References [Fitting 1983] M. Fitting, Proof Methods for Modal and Intuitionistic Logic, D.Reidel Publishing Co., Dordrecht 1983. [Fuchi 1990J K. Fuchi, Impression on KL1 programming - from my experience with writing parallel provers -, in Proc. of KLl Programming Workshop '90, pp.131-139, 1990 (in Japanese). [Fitting 1988] M. Fitting, "First-Order Modal Tableaux", Journal of Automated Reasoning, Vol.4, No.2, 1988. [Hasegawa et al., 1990J R. Hasegawa, H. Fujita and M. Fujita, A Parallel Theorem Prover in KL1 and Its Application to Program Synthesis, in ItalyJapan-Sweden Workshop '90, ICOT TR-588, 199B. [Koshimura and Hasegawa 1991] M. Koshimura and R. Hasegawa, "Modal Propositional Tableaux in a Model Generation Theorem Prover" , In Proceedings of the Logic Programming Conference '91, Tokyo, 1991 (in Japanese). [Fujita and Hasegawa 1990J H. Fujita and R. Hasegawa, A Model Generation Theorem Prover in KL1 Using Ramified-Stack Algorithm, ICOT TR-606, 1990. [Hasegawa 1991J R. Hasegawa, A Parallel Model Generation Theorem Prover: MGTP and Further Research Plan, in Proc. of the Joint AmericanJapanese Workshop on Theorem Proving, Argonne, Illinois, 1991. [Hasegawa et al., 1992J R. Hasegawa, M. Koshimura and H. Fujita, Lazy Model Generation for Improving the Efficiency of Forward Reasoning Theorem Provers, ICOT TR-751, 1992. [Koshimura et al., 1990J M. Koshimura, H. Fujita and R. Hasegawa, Meta-Programming in KL1, ICOTTR-623, 1990 (in Japanese). [Manthey and Bry 1988J R. Manthey and F. Bry, SATCHMO: a theorem prover implemented in Prolog, in Proc. of CADE 88, Argonne, illinois, 1988. [Smullyan 1968] R.M. Smullyan, First-Order Logic, Vol 43 of Ergebnisse der Mathematik, Springer-Verlag, Berlin, 1968. [Arima 1991] J. Arima, A Logical Analysis of Relevance in Analogy, in Proc. of Workshop on Algorithmic Learning Theory ALT'91, Japanese Society for Artificial Intelligence, 1991. [Arima 1992] J. Arima, Logical Structure of Analogy, in FGCS'92, Tokyo, 1992. [Kohda and Maeda 91a] Y. Kohda and M. Maeda, Strategy Management Shell on a Parallel Machine, IIAS RESEARCH Memorandum IIAS-RM-91-8E, Fujitsu, October 1991. [Kohda and Maeda 1991b] Y. Kohda and M. Maeda, Strategy Management Shell on a Parallel Machine, in poster session of ILPS'91, San Diego, October 1991. 153 [Maeda et al., 1990] M. Maeda, H. Uoi, N. Tokura, Process and Stream Oriented Debugger for GHC programs, Proceedings of Logic Programming Conference 1990, pp.169-178, ICOT, July 1990. [Plotkin 1970] G.D. Plotkin, A note on inductive generalization. In B. Meltzer and D. Michie, editors, lo.lachine Intelligence 5, pp. 153-163. Edinburgh University Press, 1970. [Maeda 1992] M. Maeda, Implementing a Process Oriented Debugger with Reflection and Program Transformation, in Proc. of FGCS'92, Tokyo, 1992. [Burstall and Darlington 1977J R.M. Burstall and J. Darlington, "A Transformation System for Developing Recursive Programs", J.ACM, Vo1.24, No.1, pp.44-67, 1977. [Smith 1984] B.C. Smith, Reflection and Semantics in Lisp, Conference Record of the 11th Annual ACM Symposium on Principles of Programming Languages, pp.23-35, ACM, January 1984. [Sugano 1990] H. Sugano, Meta and Reflective Computation in Logic Programs and its Semantics, Proceedings of the Second Workshop on MetaProgramming in Logic, Leuven, Belgium, pp.19-34, April, 1990. [Sugano 1991] H. Sugano, Modeling Group Reflection in a Simple Concurrent Constraint Language, OOPSLA '91 Workshop on Reflection and Metalevel Architectures in Object-Oriented Programming, 1991. [Tanaka 1991] J. Tanaka, An Experimental Reflective Programming System Written in GHC, Journal of Information Processing, Vol.l4, No.1, pp.74-84, 1991. [Tanaka and Matono 1992] J. Tanaka and F. Matono, Constructing and Collapsing a Reflective Tower in Reflective Guarded Horn Clauses, in Proc. of FGCS'92, Tokyo, 1992. [Arimura 1991] H. Arimura, T. Shinohara and S. Otsuki, Polynomial time inference of unions of tree pattern languages. In S. Arikawa, A. Maruoka, and T. Sato, editors, Proc. ALT '91, pp. 105-114. Ohmsha, 1991. [Ishizaka 1989] H. Ishizaka, Inductive inference of regurar languages based on model inference. International journal of Computer .fo/[athematics, 27:67-83, 1989. [Ishizaka 1990] H. Ishizaka, Polynomial time learnability of simple deterministic languages. Machine Learning, 5(2):151-164, 1990. [Kanamori and Horiuchi 1987J T. Kanamori and K. Horiuchi, "Construction of Logic Programs Based on Generalized Unfold/Fold Rules", Proc. of 4th International Conference on Logic Programming, pp.744-768, Melbourne, 1987. [Kawamura 1991] T. Kawamura, "Derivation of Efficient Logic Programs by Synthesizing New Predicates", Proc. of 1991 International Logic Programming Symposium, pp.611 - 625, San Diego, 1991. [kawamura 1992J T. Kawamura, "Logic Program Synthesis from First Order Logic Specifications", to appear in International Conference on Fifth Generation Computer Systems 1992, Tokyo, 1992. [Tamaki and Sato 1984] H. Tamaki and T. Sato, "Unfold/Fold Transformation of Logic Programs", Proc. of 2nd International Logic Programming Conference, pp.127-138, Uppsala, 1984. [Bry 1990] F. Bry, Query evaluation in recursive databases: bottom-up and top-down reconciled. Data & Knowledge Engineering, 5:289-312, 1990. [de Kleer 1986] J. de Kleer, An assumption-based TMS. Artificial Intelligence, 28:127-162, 1986. [Fujita and Hasegawa 1991J H. Fujita and R. Hasegawa, A model generation theorem prover in KLI using a ramified-stack algorithm. In: Proceedings of the Eighth International Conference on Logic Programming (Paris, France), pp. 535-54:8, MIT Press, Cambridge, MA, 1991. [Gelfond and Lifschitz 1991] M. Gelfond and V. Lifschitz, Classical negation in logic programs and disjunctive databases. New Generation Computing, 9:365-385, 1991. [Ling 1989] X. Ling, Inventing theoretical terms in inductive learning of functions - search and constructive methods. In Zbigniew W. Ras, editor, lo.lethodologies for Intelligent Systems, 4, pp. 332341. North-Holland, October 1989. [Inoue 1988] K. Inoue, Problem solving with hypothetical reasoning, in Proc. of FGCS'88, pp. 1275-1281, Tokyo, 1988. Muggleton [Muggleton and Buntine 1988] S. and W. Buntine, Machine invention of first-order predicates by inverbng resolution. In Proc. 5th International Confe7'ence on lo.lachine Learning, pp. 339-352, 1988. [Inoue 1991aJ K. Inoue, Extended logic programs with default assumptions, in Proc. of the Eighth InternaUonal Conference on Logic Programming (Paris, France), pp. 490-504, MIT Press, Cambridge, MA, 1991. 154 [Inoue 1991b] K. Inoue, Linear resolution for consequence-finding, To appear in: Aritijicial Intelligence, An earlier version appeared as: Consequence-finding based on ordered linear resolution, in Proc. of IJCAI-91, pp. 158-164, Sydney, Australia, 1991. [Inoue et al., 1992a] K. Inoue, M. Koshimura and R. Hasegawa, Embedding negation as failure into a model generation theorem prover, To appear in CADE 92, Saratoga Springs, NY, June 1992. [Inoue et al., 1992b] K. Inoue, Y. Ohta, R. Hasegawa and M. Nakashima, Hypothetical reasoning systems on the MGTP, ICOT-TR 1992 (in Japanese). [Loveland 1978] D.W. Loveland, Automated Theorem Proving: A Logical Basis . . North-Holland, Amsterdam, 1978. [Ohta and Inoue 1990] Y. Ohta and K. Inoue, A forward-chaining multiple context reasoner and its application to logic design, in: Proceedings of the Second IEEE International Conference on Tools for A rt1ficial Intelligence, pp. 386-392, Herndon, VA, 1990. [Ohta and Inoue 1992] Y. Ohta and K. Inoue, A forward-chaining hypothetical reasoner based on upside-down meta-interpretation, in Proc. of FGCS'92, Tokyo, 1992. [Poole et al., 1987J D. Poole, R. Goebel and R. Aleliunas, Theorist: a logical reasoning system for defaults and diagnosis, In: Nick Cercone and Gordon McCalla, editors, The Knowledge Frontier: Essays in the Representation of Knowledge, pp. 331-352, Springer-Verlag, New York, 1987. [Stickel 1991J M.E. Stickel, Upside-down meta-interpretation of the model elimination theorem-proving procedure for deduction and abd.uction, ICOT TR-664, 1991. [Constable et al., 1986J R.1. Constable et aI, Implementing Mathematics with the Nuprt Proof Development System) Prenticd-Hall, NJ, 1986. [Hayashi and Nakano 1988J S. Hayashi and H. Nakano, PX: A Computational Logic) MIT Press, Cambridge, 1988. F. Honsell and [Harper et at., 1987J R. Harper, G. Plotkin, A Framework for Defining Logics, in Symposium on Logic in Computer Science, IEEE, pp. 194-204, 1987. [Pfenning 1988J F. Pfenning, Elf: A Language for Logic Definition and Verified Meta-Programming, in Fourth Annual Symposium on Logic in Computer Science, IEEE, pp. 313-322, 1989. [Takayama 1987J Y. Takayama, Writing-Programs as QJ Proof and Compiling into Prolog Programs, in Proc. of IEEE The Symposium on Logic Programming '87, pp. 278-287, 1987. [Howard 1980] W.A. Howard, "The formulae-as-types notion of construction" , in Essays on Combinatory Logic, Lambda Calculus and Formalism, Academic Press, pp.479-490, 1980. [Martin 1982J P. Martin-Lof, "Constructive mathematics and computer programming", in Logic, Methodology, and Philosophy of Science VI, Cohen, 1.J. et aI, eds., North-Holland, pp.153-179, 1982. [Sato 1986] M. Sato, "QJ: A Constructive Logical System with Types", France-Japan Artificial Intelligence and Computer Science Symposium 86, Tokyo, 1986. [Milner 1989] R. Milner, "Communication and Concurrency", Prentice-Hall International, 1989. [Honiden et al., 1990] S. Honiden et al., An Application of Structural Modeling and Automated Reasoning to Real-Time Systems Design, in The Journal of Real-Time Systems, 1990. [Honiden et at., 1991] S. Honiden et al., An Integration Environment to Put Formal Specification into Practical Use in Real-Time Systems, in Proc. 6th IWSSD, 1991. [Ohsuga et at., 91J A. Ohsuga et al., A Term Rewriting System Generator, in Software Science and Engineering, World Scientific ,1991. [Ohsuga et al., 90] A. Ohsuga et al., Complete Eunification based on an extension of the KnuthBendix Completion Procedure, in Pmc. of Workshop on Word Equations and Related Topics, LNCS 572, 1990. [Uchihira et al., 90aJ N. Uchihira et al., Synthesis of Concurrent Programs: Automated Reasoning Complements Software Reuse, in Proc. of 23th HICSS, 1990. [Uchihira et al., 90bJ N. Uchihira et al., Verification and Synthesis of Concurrent Programs Using Petri Nets and Temporal Logic, in Trans. IEICE, Vol. E73, No. 12, 1990. PROCEEDINGS OF THE INTERNA nONAL CONFERENCE ON FIFTH GENERA nON COMPUTER SYSTEMS 1992 edited by ICOT. © ICOT, 1992 ' 155 Natural Language Processing Software Yuichi Tanaka Sixth RE'sE'arch Laboratory Institute for New Generation Computer Technology 4-28, Mita l-chome. Minato-ku. Tokyo 108. Japan ytanaka@icot.or.jp Abstruct In the Fifth Generation Computer Systems project. the goal of natural language processing (NLP) is to build an intelligent user interface for the proto-type machine of the Fifth Generation. In the initial and intermediate stage of our project. mathematical and linguistic theories of discourse understanding was investigated and we built some experimental systems for the theories. In the final stage. we have built a system of general tools for NLP and, using them. developed experiment.al systems for discourse processing. based on the result and experience of the software development in the past two stages. In the final stage, we have four themes of NLP research and development. The first theme, Language Knowledge-base, is a collection of basic knowledge for NLP including Japanese grammar and Japanese dictionary. In the second theme, Language Tool Box, we have developed several basic tools especially for Japanese processing. Tools are: morphological and syntax analyzers, sentence generator. concordance system, and etc. These two themes form the infrastructure of our NLP systems. Experiment with discourse processing is the third and main theme of our research. We have developed several systems in this field including text generation, discourse structure construction, and dialog systems. The last theme is parallel processing. We have developed an experimental system for cooperative parallel natural language processing in which morphological analysis, syntax analysis, and semantic analysis are integrated in a uniform process in a type inference framework. 1 Introduction To establish an intelligent interface between machine and human, it is necessary to research discourse processing. In discourse processing we include not only discourse un~ derstanding where compter understands the contents of utterances of human and infers the human's intention. Parallel Natural Language Processing Morphological, Syntactic, Semantic Analysis based on Type Inference Natural Language Interface Discourse Processing Systems Linguistic Knowledge-base Language Tool Box Figure 1: Overview of NLP Software but also text generation by which more than one sentellCes expressing speaker's consistent assertion are produced. We put this discourse processing research at the center of our research and development activity. and also develop some supporting tools and data as the infrastructure. Language Knowledge-base is a collection of basic knowledge for natural language processing including Japanese grammar and Japanese dictionary. We have build a Japanese grammar in phrase structure grammar based on unification grammar formalism. ntil now. r 156 there were no Japanese grammar with sufficient size for practical use and usable by every researcher and developer. The purposes of development of this grammar are these two points. It is written in DCG (Definite Clause Grammar) based on the exhaustive investigation of Japanese language phenomena. Also we have developed a .] apanese grammar based on dependency grammar formalism. To reduce ambiguity arisen during analysis. we introduced structural and linguistic constraints on dependency structure based on a new concept 'rank' for each word and word pair. Adding to the Japanese grammar. we have developed a large-scale Japanese dictionary for morphological analysis. It has about 1.50,000 entries including more than 40,000 proper nouns so that it can be used for morphological analysis of newspaper articles. These grammar and dictionary are described in section 2. Language Tool Box is a collection of basic NLP tools especially for Japanese processing. Input and output modules for some experimental NLP systems we made so far, mainly Japanese morphological analyzer. syntax analyzer and sentence generator. were useful for other NLP applications. VVe have refined their user-interface. made programs robust to unexpected inputs. and increased efficiency to make them easier to apply to various applica.tions. Currently. not only input and output tools are included in this collection. but also supporting tools for lexicographers and grammar writers such as concordance system and grammar editor. The description of these tools and their publication will be appeared in section :3. Development of discourse processing systems is the main theme of our research. vVe have collected rules for language phnomena concerning discourse. and developed several experimental systems in this field including text generation, discourse structure construction. and dialog systems. The text generation system produces one or more paragraphs of text concerning to a given theme based on its belief and judgement. rhe discourse structure construction system uses discourse rules as a grammar to construct a tree-like discourse structure of a given text. The experimental dialog systems handle user's intention. situation, and position to remove user's misunderstanding and to produce user friendly responces. These system are described in section 4. As parallel NLP experiment. we have developed a small system for cooperative processing in which morphological analysis. syntax analysis. and semantic analysis are amalgamated into a uniform process in a type inference framework. This system. running on multi-PSI machine. achieves about 12 speed up rate using :32 PEs. Precise description of the system and the experiment will be appeared in section .5. The overview of the whole activity for these four themes is shown in Figure 1. 2 Linguistic Knowledge-base Language Knowledge-base is a collection of basic knowledge for natural language processing including Japanese grammar and Japanese dictionary. We have build a Japanese grammar in phrase structure grammar based on unification grammar formalism. There has been no set of standard Japanese grammar rules which people get and handle easily and quickly. This is an obstacle for researchers in Japanese language processing VI' ho try to make experimental systems to prove 'some ideas or who try to build application systems in various field. Our Japanese grammar has been developed to overcome such obstcles and designed as a standard in a sense that it covers most of the general language phenomena and it is written in a common form to various environment. DCG (Definite Clause Grammar). Also we have developed a Japanese grammar based on dependency grammar formalism. Historically, there have been several Japanese dependency grammar because it is recognized easier to build a dependency grammar rules for Japanese because of loose constraints on word order of Japanese language. Vie introduced structural and linguistic constraints on dependency structure in order to avoid structural ambiguity. These constraints are based on a new concept 'rank' for each word and word pair. .\dding to the Japanese grammar. we have developed a large-scale Japanese dictionary for morphological analysis. It has about 150.000 entries including more than -:1-0.000 proper nouns so that it can be used for morphological analysis of newspaper articles. The precise description of Language Knowledge-base will be presented in [Sano and Fukumoto 92J submitted to IeOT session of this conference. 2.1 Japanese Grammar 2.1.1 Localized Unification Grammar Conventional Japanese grammar for computers are not satisfactory to practical application because they lacked formality. uniformity of precision and exhaustiveness [Kuno and Shibatani 89J [Masuoka 89J [Nitta and Masuoka 89J. Having made an exhaustive investigation, we collected language phenomena and rules to explain those phenomena objectively expressed in a DCG style formal description [Pereira 80J. This description is based on the Unification Grammar formalism [Calder 89J [Carlson 89J [Moens 89J. They covers most of the phenomena appearing in contemporary written text [Sano 89J [Sano et ai. 90J [Sano and Fukumoto 90J. We classified these phenomena according to the complexity of corresponding surface expressions [Sano 91]. Grammar rules are classified also according to their corresponding phnomena. The classification of phenomena (rules) is shown in Table 1. 157 Table 1: Classification of Grammar Rules level 1",2 3",4 5 6 7",8 9 10", 11 12 phenomena single predicate negation / aspect / honorification subject+complement+predicate / topicalization passive / causative modification (to nouns / to verbs) particles (1) / coordination (2) compound sentence / condition particles (2) / coordination (2) / conjunction The syntactic-semantic structure of sentence is shown in Figure 2. In this figure, State-of-affairs (SOA) is the minimum sub-structure of the whole structure. A SOA has a predicate with some cases and optional complements. Composition of one or more SOAs form a description. The semantic contents of a sentence is a description preceded by a Topic. And furthermore the semantics of a sentence contains speaker's intention expressed by .Modal. According to this structure, rules of each level (Table 1 ) are divided into several groups. Rules of outermost group analyze speaker's intention through the expression at the end of sentences. Rules of the second group analyze topic-comment structure, that is a dependency relation between a topicalized noun phrase marked by a particle "wa" and the main predicate. And rules for analyzing description, voice, etc. follow. Sentence will be shown in Figure :3. SYN 1· Cato(SYN 2. X 2 , topic(X 2 , R~~l' { [ } ) I REL21. Fl. (X. Z)) Cat1(SYN 1.X 1, REL 1. F 1, (X. Y)). Cat'2(SYN'2.X2. REL 2.F2 . (Y.Z)). Figure 3: An Example of LUG Grammar Rules 2.1.2 Restricted Dependency Gramar For .Japanese language. there has been many researche:; on dependency grammar because there are no strong constraints of word order in .J apanese [Kodama 87]. In these researches. in order to determine whether a \-vord depends on other. no globa.l informa.tion are used but that of onh' these two words. However. this kind of local informatio~1 is not sufficient to recognize the structure of whole sentence including topic and ellipsis. Consequently. wrong interpretation of a sentence are produced as a result of dependency analysis [Sugimura and Fukumoto 89]. V.je introduced structural and linguistic constraints on dependency structure in order to avoid this kind of structural ambiguity. These constraints are described in terms of rank for each word and word pair. Rank represents strength of dependency between words which reflects global information in a whole sentence [Fukumoto and Sano 90]. Definition of ranks and their constraints are described in [Sano and Fukumoto 92] in detail. Figure 4 shows a structural ambiguity and its resolution. For the sentence "Kare-ga yob'U-to dete-kita. ("When he called framework. Most of the conventional NLP systems have been designed a collection of independently acting modules. Processing in each module is hidden from the outer world, and we use these modules as black-boxes. But since parallel cooperative processing needs internal information being exchanged between modules. we must adopt other framework for parallel NLP. One answer to this problem is to abstract processing mechanism to merge all such processing as morphology, syntax, semantics, and etc. Constraint transformation proposed by Hasida [Hashida 91] is one of the candidates of this framework. We proposed a type inference method [Martin-Lof 84] as another candidates. This type inference mechanism is based on a typed record structure [Sells 85] or a record structure of types similar to 'lb-term [Alt-Kaci and Nasr 86], sorted feature structure [Smolka 88], QUIXOTE [Yasukawa and Yokota 90], order-sorted logic [Schmidt-Schauss 89]. Morphological analysis and syntax analysis is performed by layered stream method [Matsumoto 86]. Roles of process and communication are exchanged in comparison with the method used in PAX [Satoh 90]. This system, running on multi-PSI machine, using a Japanese dictionary with 10,000 nouns, 1000 verbs, 700 concepts, and a Japanese grammar LUG [Sano 91] [Sano and Fukumoto 92], achieves about 12 speed-up rate using 32 processing elements. Figure 9 shows the relation between number of processors (1 '" 32) and processing time in milli second for a 25-word long sentence. Figure 10 shows the relation between reductions and speed-up ratio for various evaluation sentences. The detail of this system will be presented in the paper [Yamasaki 92] submitted to this conference. syn 18 16 14 ,g .. Cii 12 c. = 10 '0 8 CD CD c. (I) 6 4 2 O~~~~--~~~~~~~ Oe+O 2e+6 4e+6 6e+6 8e+6 1e+7 reductions Figure 9: Performance of Experimental System (1) • -_.,,*... o morph+syn+sem morph+syn syn 20 18 16 ,g .. Cii c. = '0 14 12 10 CD CD 8 (I) 6 C. Acknowledgment 4 We wish to thank Dr. Kazuhiro Fuchi, director of Ie aT Research Center, who gave us a chance to research natural language processing, and also Dr. Shunichi Uchida. Manager of Research Division, for his helpful advise on the fundamental organization and direction of our research. 2 O~~-r-r~~--~r-~~~ Oe+O 2e+6 4e+6 6e+6 8e+6 1e+7 reductions Figure 10: Performance of Experimental System (2) 162 References [Abe et al. 91] H. Abe, T. Okunishi, H. Miyoshi, and Y. Obuchi. A Sentence Division Method using Connectives. In Proc. of the 42nd Conference of Information Processing Society of Japan (in Japanese). 1991. pp. 13-15. [Alt-Kaci and Nasr 86] H. Alt-Kaci and R. Nasr. LOGIN: A Logic Programming Language with Builtin Inheritance, The Journal of Logic Programming, Vol. 3, No.3, Oct. 1986. [Aizawa and Ehara 73] T. Aizawa and T. Ehara. Kan.aKanji Conversion by Computer (in Japanese), NHK Technical Research, Vol. 25, No.5, 1973. [Appelt 85a] D. E. Appelt. Planning English Sentences, Cambridge University Press, 1985. [Appelt 85b] D. E. Appelt. Bidirectional Grammar and the Design of Natural Language Generation Systems, In Proc. TINLAP-B5, 1985. [Appelt 87] D. E. Appelt. A Computational Model of Referring, In Proc. IJCAI-B7, 1987. ,[Appelt 88] D. E. Appelt. Planning Natural Language Referring Expressions. In David D. McDonald and Leonard Bole (eds.) , Natural Language Generation Systems. Springer-Verlag, 1988. [Barwise and Perry 83] J. Barwise and J. Perry. Situation and Attitudes, MIT Press, 1983. [Brooks 86] R. A. Brooks. A Robust Layered Control System for a Mobile Robot, IEEE Journal of Robotics and Automation, Vol. Ra-2, No. 1. March, 1986. [Fukumoto and Sano 90] F. Fukumoto, H. Sano. Restricted Dependency Grammar and its Representation. In Proc. The 41st Conference of Information Processing Society of Japan (in Japanese), 1990. [Fukumoto 90] J. Fukumoto. Context Structure Extraction of Japanese Text based on Writer's Assertion. In Research Report of SIG-NL, Information Processing Society of Japan (in Japanese). 78-15, 1990. [Fukumoto and Yasuhara 91] J. Fukumoto and H. Yasuhara. Structural Analysis of Japanese Text. In Research Report of SIG-NL, Information Processing Society of Japan (in Japanese). 85-11, 1991. [Grosz and Sidner 85] B. Grosz and C. L. Sidner. The structures of Discource Structure, Technical Report CSL1, CSLI-85-39, 1985. [Hashida 91] K. Hasida. Aspects of Integration in Natural Language Processing, Computer Software, Japan Society for Software Science and Technology, Vol. 8, No.6. Nov. 1991. [Hovy 85] E. H. Hovy. Integrating Text Planning and Production in Generation. In the Proceedings of the International Joint Conference on Artificial Intelligence. 1985. [Hovy 87] E. H. Hovy. Interpretation in Generation. In the Proceedings of 6th AAAI Conference. 1987. [Hovy 88] E. H. Hovy. Generating Natural Language under Pragmatic Constraints. Lawrence Erlbaum Associates, Publishers, 1988. [Hovy 90a] E. H. Hovy. Unresolved Issues in Paragraph Planning. In Current Research in Natural Language Generation. Academic Press, 1990. [Calder 89] Jonathan Calder, Ewan Klein, Henk Zeevat. Unification Categorial Grammar. In Proc. of the Fourth Conference of. the European Chapter of the ACL, Manchester, 1989. [Hovy 90b] E. H. Hovy. Pragmatics and Natural Language Generation. Artificial Intelligence 43, 1990. pp. 153-197. [Carlson 89] Lauri Carlson. RUG: Regular Unification Grammar. In Proc. of the Fourth Conference of the European Chapter of the ACL, Manchester, 1989. [Ichikawa 78] T. Ichikawa. An Introduction to Japanese Syntax fo·T' Teachers. Kyoiku Shuppan Publishing Co., 1978. [Danlos 84] 1. Danlos. Conceptual and Linguistic Decisions in Generation. In Proc. of the International Conference on Computational Linguistics, 1984. [De Smedt 90] K. J. M. J. De Smedt. Incremental Sentence Generation. NICI Technical Report, 90-01, 1990. [Fujisaki 89] H. Fujisaki. Analysis of Intonation and its Modelling in Japanese Language. Japanese Language and Education of Japanese (in Japanese). Meiji Shoin Publishing Co., 1989, pp. 266-297. [Ikeda et al. 88] T. Ikeda, K. Hatano, H. Fukushima and S. Shigenaga. Generation Method in the Sentence Generator of Language Tool Box (LTB). In Proc. of the 5th Conference of Japan Society for Software Science and Technology (in Japanese), 1988. [Ikeda 91] T. Ikeda. Natural Language Generation System based on the Hierarchy of Semantic Representation (in Japanese). Computer Software, Japan Society for Software Science and Technology, Vol. 8, No.6, Nov. 1991. 163 [Ikeda et al. 92] T. Ikeda, A. Kotani, K. Hagiwara, Y. Kubo. Argument Text Generation System (Dulcinea). In Proc. of FGCS '92, ICOT, Jun. 1992. [Masuoka 89J T. Masuoka, Y. Takubo. Basic Japanese Grammar (in Japanese). Kuroshio Publishing Co .. Tokyo. 1989. [Katoh and Fukuchi 89] Y. Katoh and T. Fukuchi. Tense, . Aspect and Mood (in Japanese). Japanese Example Sentences and Problems for Foreigners 15. Aratake Publishing Co., Tokyo. 1989. [Matsumoto et al. 83aJ Y. Matsumoto. M. Seino. H. Tanaka. Bep Translator (in Japanese). Bulletin of the Electrotechnical Laboratory. Vol. 47. No.8. 1983. [Kempen and Hoenkamp 87] G. Kempen and E. Hoenkamp. An Incremental Procedural Grammar for' Sentence Formulation, Cognitive Science, Vol. 11. 1987. [Matsumoto et al. 83bJ Yuji Matsumoto, H. Tanaka. H. Hirakawa. H. Miyoshi and H. Yasukawa. BUP: A Bottom-up Parser Embedded in Prolog, New Generation Computing, Vol. 1, 1983. [Kinoshita 81] S. Kinoshita. Writing Techniques in Scientific Field (in Japanese). Chuo-Kouron Publishing Co., 1981. pp. 82-88. [Kinoshita et al. 89] S. Kinoshita, K. Ono, T. Ukita and M. Amano. Discourse Structure Extraction in Japanese Text Understanding. In Symposium on Discourse Understanding Model and its Application (in Japanese), Information Processing Society of Japan, 1989. pp. 125-136. [Kodama 87] T. Kodama. Research on Dependency Grammar (in Japanese). Kenkyu-sha, 1987. pp. 161194. [Kubo et al. 88] Y. Kubo, M. Yoshizumi. H. Sano. K. Akasaka and R. Sugimura. Development Environment of the Morphological Analyzer LAX. In Proc. of the 37th Conference of Information Processing Society of Japan' (in Japanese). 1988. pp. 1078-1079. [Kubo 89] Y. Kubo. Composition of Word Semantics in Morphological Analyzer LAX. In Proc. of the 39th Conference of Information Processing Society of Japan (in Japanese). 1989. pp. 598-599. [Kuno and Shibatani 89] S. Kuno, K. Shibatani. New Development in Japanese Linguistics (in Japanese). Kuroshio Publishing Co., Tokyo, 1989. [Littman and Allen 87] D. J. Littman and J. F. Allen. A Plan Recognition Model for Subdialogues in Con- versation, Cognitive Science 11, 1987. pp. 163-200. [Mann and Thompson 86] W. C. Mann and S. A. Thompson. Rhetorical Structure Theory: Description and Construction of Text Structure. In P1'OC. of the Third International Workshop on Text Generation, 1986. In Dordrecht (ed.), Natural LanguagE Generation: New Results in Artificial Intelligena, Psychology, and Linguistics. Martinus Nijhoff Pub- lishers, 1987. [Martin-Lof 84] P. Martin-Lof. Intuitionistic Type Theory - Studies in Proof Thoery, Lecture Notes, 1984. [Matsumoto 86J Y. Matsumoto. A Parallel Parsing System for Natural Language Analysis, Proc. of 3rd 111.ternatioanl Conference on Logic Programming, London, 1986. Lecture Notes in Computer Science 225. pp. 396-409, 1986. [Matsumoto and Sugimura 87J Y. Matsumoto and R. Sugimura. A Parsing System based on Logic Programming. In Proceedings of the International Joint Conference. of Artificial Intelligence. 1987. [Matsumoto 90J Y. Matsumoto and A. Okumura. Programming Searching Problems in Parallel Logic Programming Languages - An Extentioll of Layered Streams -. In Proc. of the I{L1 Programmil/.fj vVorkshop '.90 (in JapanesE). 1990. [Maruyama and Suzuki 91] T. Maruyama and H. Suzuki. Cooperative Sentence Generation in Japanese Dialog based on Simple Principles (in JapanEsE). In Proc. of thE 8th Conferena of Nihon Ninchi Kagaku Kai (in Japanese). 1991. [McKeown 85aJ K. R. McKeown. Text Generation: Using Discourse Strategies and Focus Constraints to Generate Natural Language Text. Cambridge Univer- sity Press. 1985. [McKeown 85bJ K. R. McKeown. Discourse Strategies for Generating Nat ural- Language Text, A rtificial Intelligence 27, 1985. pp. 1-41. [Meteer 90J M. V\". Meteer. The 'Generation Gap' - the Problem of Expressibility in Text Planning. Techn.ical Report. BBN Systems and Technologies Corporation. 1990. [Minami 74J F. Minami. The Structure of Contemporary Japanese Language (in Japanese). Taishu-kan Publishing Co .. 197-1. [Moens 89J Marc Moens. Jonathan Calder. Ewan Klein. Mike Reape. Henk Zeevat. Expressing Generalizations in Unification-based Grammar Formalisms. In Proc. of the FO'urth Conference of the European Chapter of the ACL, Manchester, 1989. 164 [Morioka 87] K. Morioka. Vocabulary Construction (in Japanese). Meiji Shoin Publishing Co., 1987. [Morita 89] Y. Morita. Dictionary of Basic Japanese (in Japanese). Kadokawa Publishing Co., 1989. [Morita and Matsuki 89] Y. Morita and Y. Matsuki. Sentence Types of Japanese (in Japanese). ALK Publishing Co., Tokyo. 1989. [Nagano 86] K. Nagano. Japanese Syntax - a Grammatical Study (in Japanese). Asakura Publishing Co., 1986. [Nakajima and Sugimura 89] A. Nakajima and R. Sugimura. Japanese Morphological Analysis with TRIE Dictionary and Graph Stack. In Proc. of the 39th Conference of Information Processing Society of Japan (in Japanese). 1989. pp. 589-590. [Nitta and Masuoka 89] Y. Nitta and T. Masuoka (eds.), Modality in Japanese (in Japanese). Kuroshio Publishing Co., Tokyo. 1989. [NLRI81] National Language Research Institute. Demonstratives in Japanese (in Japanese). Ministry of Finance. 1981. [NLRI82] National Language Research Institute. Particles and Auxiliary Verbs of Japanese (in Japanese). Shuei Publishing Co., Tokyo. 1982. [NLRI 85] National Language Research Institute. Aspect and Tense of Contemporary Japanese (in Japanese). Shuei Publishing Co., Tokyo. 1985. [NLRI89] National Language Research Institute. Rtsearch and Education of DiscOUl'se (in Japanese). Ministry of Finance. 1989. [Nobukuni 89] Y. Nobukuni. Division Algorithm of Long Sentence, In Proc. of the 39th Conference of In/ormation Processing Society of Japan (in Japanese). 1989. p. 593. [Okumura and Matsumoto 87a] A. Okumura and Y. Matsumoto. Parallel Programming with Layered Streams. In Proc. of the 1987 International Symposium on Logic Programming. San Francisco, September 1987. pp. 224-232 .. [Okumura and Matsumoto 87b] A. Okumura and Y. Matsumoto. Parallel Programming with Layered Streams. In Proc. of the Logic Programming Conference '87 (in Japanese), 1987. pp. 223-232. [Pereira 80] Fernando C. N. Pereira, David H. D. Warren. Definite (!lause Grammars for Language Analysis -- A Survey of the Formalism and a Comparison with Augmented Transition Networks, Artificial Intelligence. Vol. 13, No.3. 1980. pp. 231-278. [Saitoh et al. 91] Y. Saitoh, M. Shibata and J. Fukumoto. Analysis of Relationship of Adjoining Sentences for Context Structure Extraction. In Proc. of the 43rd Conference of Information. Processing Society of Japan (in Japanese). 1991. [Sakuma 88] M. Sakuma. Context and Paragraph. Japanese Linguistics (in Japanese). Vol. 7, No.2. 1988. pp. 27-40. [Sano et al. 88] H. Sano, K. Akas aka, Y. Kubo and R. Sugimura. Morphological Analysis based on Word Formation. In Proc. of the 36th Conference of Infol'":. mation Processing Society of Japan (in Japanese), 1988. [Sano 89] H. Sano. Hierarchical Analysis of Predicate using Contextual Information. In Symposium on Di8course Understanding Model and ds Application (in Japanese), Information Processing Society of Japan, 1989. [Sano et ai. 90] H. Sano, F. Fukumoto, Y. Tanaka. Explanatory Description based Grammar - SFTB (in Japanese), ICOT-Technical Memo, TM-0885, 1990. [Sano and Fukumoto 90] H. Sano, F. Fukumoto. Localized Unification Grammar and its Representation. In Proc. of the 41st Conference of Information Processing Society of Japan (in Japanese), 1990. [Sano 91] H. Sano. User's Guide to SFTB (in Japanese), ICOT, Sep. 1991. [Sano and Fukumoto 92] H. Sano, F. Fukumoto. On a Grammar Formalism, Knowledge Bases and Tools for Natural Language Processing in Logic Programming. In Pmc. of FGCS '92. ICOT, Jun. 1992. [Satoh 90] H. Satoh. Improvement of Parallel Syntax Analyzer P~'\X. In Proc. of KL 1 Programming Jtl:'"orkshop '90 (in Japanese), leOT, Tokyo, 1990. [Schmidt-Schauss 89] M. Schmidt-SchauB. Computational Aspects of an Order-Sorted Logic with Term Declarations, Lecture Notes in Artificial Intelligence, Springer-Verlag, 1989. [Searl 69] J. R. Searl. An Essay in the Philosophy of Language, Cambridge University Press, 1969. [Sells 85] P. Sells. Lectures on Contemporary Syntactic Theories, CSLI Lecture Notes, No.3, 1985. [Shibata et al. 90] M. Shibata, Y. Tanaka and J. Fukumoto. Anaphora Phenomena in Newspaper Editorials. In Proc. of the 40th Conference of Inj'07'mation Processing Society of Japan (in Japanese), 1990. 165 [Shinnou and Suzuki 91] H. Shinnou and H. Suzuki. tTtilization of Sound Information in Incremental Analysis. In Research Report of SIC-NL, Information Processing Society of Japan (in Japanese). 8.5-7. 1991. [Shiraishi et al. 90] T. Shiraishi. Y. Kubo and M. Yoshizumi. Format of Morpheme Dictionary and Dictionary Improvement. In Proc. of the 41st COIIference of Information Processing Society of Japan (in Japanese), 1990. pp. 19:3-194. [Smolka 88] G. Smolka. A Feature Logic with Subsorts. IBM Deutschland, Stuttgart, Germany, LILOC Report, No. 33, May 1988. [Sugimura et al. 88] R. Sugimura, K. Akasaka, Y. Kubo. Y. Matsumoto and H. Sano. LAX - Morphological Analyzer in Logic Programming. In Proc. of tht Logic Programming Conference '88 (in Japanese). 1988. pp. 213-222. [Sugimura and Fukumoto 89] R. Sugimura. F. Fukumoto. Dependency Analysis by Logic Grammar. In Symposium on Discourse Fndtrstanding lVIodel and its Application (in Japanest). Information Processing Society of Japan. 1989. [Suzuki and Tsuchiya 90] H. Suzuki and S. Tsuchiya. Incremental Interpretation of Japanese Ctterance. III Proc. of the 7th Conference of Siholl .'linchi A-agaku Kai (in Japanese). 1990. pp. 46-47. [Tanaka et al. 91] Y. Tanaka. M. Shibata and J. Fukumoto. Repetitive Occurrence Analysis of a v\lord in Context Structure Analysis System. In P1'OC. of the 43rd Conference of Information Processing Society of Japan (in Japanese). 1991. [Teramura et al. 87] H. Teramura, Y. Suzuki. N. Noda and M. Yazawa. Case Study in Japanese Crammar (in Japanese). Outousha Publishing Co.. Tokyo. 1987. [Tokunaga and Inui 91] T. Tokunaga and K. Inui. Survey of" Natural Language Sentence Generation in 1980's. In Journal of Japanese Society for Artificial Intelligence (in Japanese). Vol. 6. Nos. 3-.5. 1991. [Tomita 87] M. Tomita. An Efficient Augmented Context Free Parsing Algorithm. Computational Linguistics 13, 1-2, 31-46. 1987. [Tsujii 89] J. Tsujii. Context Processing. In Symposium on Natural Language Processing (in Japanese). Information Processing Society of Japan. 1988. pp. 7.587. [Ueda and Chikayama 90] K. Ueda and T. Chikayama. Design of the Kernel Language for the Parallel Inference Machine. The Computer Journa1. Vol. 33. No.6. Dec. 1990. pp. 494-.500. [Yamanashi 86] M. Yamanashi. Speech Act Japanese). Taishukan Publishting Co .. 1986. (in [Yamanashi 89] M. Yamanashi. Discourse. Context and Inference. III Symposium. 011 DiscoUl'st l'lIdf I'standing .Hodtl ([lid its .-lpplicatioll (ill Japal/u;(). illformation Processing Society of .Japan. 1989. pp. 1-1:2. [Yamasaki 92] S. Yamasaki. A Parallel Cooperatiw' ~atural Language Processing System Laputa. In Proc. of FCC'S '9:2. ICOT . .Jun. 1992. [Yasukawa and Yokota 90] H. Yasukawa and K. Yokota. The Overview of a Knowledge Representation Language QUIXOTE. IeOT (draft), Oct. 21. 1990. [Yoneda et al. 89] J. ·Yoneda. Y. Kubo. T. Shiraishi and M. Yoshizumi. Interpreter and Debugging E11vironment of LAX. In Proc. of thE 3.9th Con/(:/'enct of Information Processing Society of Japan (in Japanese). 1989. pp. 596-.597. [Yoshida and Hidaka 87] :vI. Yoshida a.nd S. Hiclaka. Studifs on Documentation in Standard Japallf8f (in Japallt8t). ] 987. [Yoshimura tf al. tl2] 1\.. \·oshimura. T. Hidaka and ~l. Yoshida. Ou LOllgest :\iarhillg :\1(-'1 hod clHd vVord Millimizing Mt-'tllOd ill Japauese :\(ol'phologiral Allal~'sis. III RU;fo,.ch RtjJort of Sl(,'-.\L Illformatio11 Processiug Society of J apau (ill JUplll1 f.' ~sigp paraweter 2700 2600 ----~----~----~----~---- ---- : : : : A B I I I I I I I I C -D -- _ I:==g ___ ~ ____ ~ ____ 1 -- --- -- calculator - SA RA Olllli lPSlI mIL Muhi-lPSlI Par a I I e I Par a I I e I 2S00 ~ .::: Ranges of design .......parameter~ 2400 Cos 1 2300 Figure 27: System organization 2100 The system organization of Desq is shown in Figure 27. Desq consists of three subsystems: 2000 1000 2000 3000 4000 SOOO 6000 7000 SOOO 9000 Computation time (sec) Figure 26: Experimental Result 4.5 Design Supporting System based on Deep Reasoning In design, there are many cases in which a designer does not directly design a new device, but rather, changes or improves an old device. Sometimes a designer only changes the parameters of components in a device to satisfy the requirements. The designer, in such cases, knows the structure of the device, and needs to determine the new values of the components. This is common in electronic circuits. Desq (Design supporting system based on qua.litative reasoning) determines valid ranges of the design decisions using qualitative reasoning. Desq uses an envisioning mechanism, which, by using qualitative reasoning, determines all possible behaviors of a system. However, the quaIitative reasoning of Desq Behavior reasoner This subsystem is based on a qualitative reasoning system. Its model building reasoning part builds simultaneous inequalities from initial data using definitions of physical rules and objects. The simultaneous inequalities are a model of a target system. The envisioning part derives all possible behaviors. Design parameter calculator This subsystem calculates ranges of design parameters undefined in initial data. Parallel constraint solver This subsystem solves simultaneous inequalities. It is written in KL1 and is executed on a parallel inference machine. Desq finds the valid ranges of design parameters as follows: (1) Perform envisioning with design parameters whose values are undefined in initial data, 181 (2) Select preferable behaviors from possible behaviors found by envisioning, (3) Calculate the ra.nges of the design parameters that give preferable behaviors. As a.n experiment, Desq successfully determined the valid range of resistance Rb in the DTL circuit in Figure 28. generates the operations that deal with these unforeseen events. It utilizes the Device Model and the Operation Principle Model. The Precondition-Generator generates the preconditions of each operation generated by the Operation-Generator, and, as a result, generates rule-based knowledge for plant control. The SimulationVerifier predicts the plant behavior that will be observed ~hen the plant is operated according to the generated knowledge. It utilizes the Dynamics Model, verifies the knowledge using predicted plant behavior, and gives feedback to the Operation-Generator, if necessary. 5 V --1.....-41.........-+1, Undefined parameter Figure 28: DTL circuit 4.6 A Diagnostic and Control Expert System Based on a Plant Model Currently in the field of diagnosis and control of thermal power plants, the trend in systems is that the more in-. telligent and flexible they become, the more knowledge they need. As for knowledge, conventional diagnostic and control expert systems are based on heuristics stored a priori in knowledge bases. So, they cannot deal with unforeseen events when they occur in a plant. Unforeseen events are abnormal situations which were not expected when the plant was designed. To overcome this limitation, we have focused on model-based reasoning and developed a diagnostic and control expert system based on a plant model. The system (Figure 29) consists of two subsystems: the Shallow Inference Subsystem (SIS) and the Deep Inference Subsystem (DIS). The SIS is a conventional plant control systern based on heuristics, namely shallow knowledge for plant control. It selects and executes plant operations according to the heuristics stored in the knowledge base. The Plant ]I.;[onitor detects occurrences of unforeseen events, and then activates the DIS. The DIS utilizes various kinds of models to realize the thought processes of a skilled human operator and to generate the knowledge for plant control to deal with unforeseen events. It consists of the following modules: the Diagnosor, the Opemtion-Genemtor, the Precondition-Generator, a.nd the Simulation- Verifier. The Diagnosor utilizes the Qualitative Causal ]I.;[odel for plant process parameters to diagnose unforeseen events. The Operation-Generator Figure 29: System Overview The knowledge generated and verified by the DIS is transmitted to the SIS. The SIS, then, executes the plant operations accordingly, and, as a result, the unforeseen events should be taken care of. We have implemented the system on Multi-PSI. To realize a rich experimental environment, we have also implemented a plant simulator on a mini-computer. Both computers are linked by a data transmission line. We have incorporated both a device and a dynamics model for each device of a thermal power plant (to a total of 78). We summarize the experimental results as follows. • The DIS could generate plan control knowledge to deal with unforeseen events. • The SIS executed plant operators according to the generated knowledge and could deal with unforeseen events. • We have demonstrated a fivefold improvement in reasoning time by using Multi-PSI with 16 processor elements. 182 4.7 Adaptive Model-Based Diagnostic System Though traditional rule-based diagnostic approaches that use symptom-failure association rules have been incorporated by many current diagnostic systems, they lack robustness. This is because they cannot deal with unexpected cases not covered by the rules in its Imowledge base. On the other hand, model-based diagnostic systems that use the behavioral specification of a device are more robust than rule-based expert systems. However, in general, many tests are required to reach a conclusive decision because they lack the heuristic knowledge which human experts usually utilize. In order to solve this problem, a model-based diagnostic system has been developed which is adaptable because of its ability to learn from experience [Koseki et al. 1990]. This system consists of several modules as shown in Figure 30. The knowledge base consists of design knowledge and experiential knowledge. The design knowledge represents a correct model of the target device. It consists of a structural description which expresses component interconnections and a behavior description which expresses the behavior of each component. The experiential knowledge is expressed as a failure probability for each component. The diagnosis module utilizes those two kinds of know ledge. Test Pattern Selector / Generator t Symptom Diagnosis Module Test Learning Module Test result Suspects Figure :30: Structure of the System F~gure :31 shows the diagnosis flow of the system. The system keeps a set of suspected components as a suspectlist. It uses an eliminate-not-suspected strategy to reduce the number of suspects in the suspect-list, by repeating the test-and-eliminate cycle. It starts by getting an initial symptom. A symptom is represented as a set of target device input signals and an observed incorrect output signal. It calculates an initial suspect-list from the given initial symptoms. It performs model-based reasoning to obtain a suspect-list using a correct design model and an expected correct output signal. To obtain an expected correct output signal for the given inputs, the system ca.rries out simulation using the correct design model. Figure 31: Diagnosis Flow After obtaining the initial suspect-list, the system repeats a test-and-eliminate cycle, while the number of suspects is greater than one and an effective test exists. A set of tests is generated by the test pattern generator. Among the generated tests, the most cost effective is selected as the next test to be performed. The effectiveness is evaluated by using a minimum entropy technique that utilizes the fault probability distribution. The selected test is suggested and fed into the target device. By feeding the test into the target device, another set of observations are obtained as a test result and are used to eliminate the non-failure components. Learning Mechanism The performance of the test selection mechanism relies on the preciseness of the presumed probability distribution of components. In order to estimate an appropriate probability distribution from a small amount of observation, the system acquires a presumption tree using minimum description length(MDL) criterion. A description length of a presumption tree is defined as the sum of the code length and the loglikelihood of the model. Using the constructed presumption tree, the probability distribution of future events can be presumed appropriately. The algorithm is implemented in KL1 language on a parallel inference machine, Multi-PSI. The experimental results show that the 16 PE implementation is about 11 times as fast as the sequential one. The performance of the adaptive diagnostic system (in terms of the required number of tests) was also examined. The target device was a packet exchange system and its model was comprised of about 70 components. The experimental results show that the number of required tests can be reduced by about 40% on average by using the learned know ledge. 183 4.8 Motif Extraction System One of the important issues in genetic information processing is to find common patterns of sequences in the same category which give functional/structural attributes to proteins. The patterns are called motifs, in biological terms. On Multi PSI, we have developed the motif extraction system shown in Figure 32. In this, a motif is represented by stochastic decision predicates and the optimal motif is searched for by the genetic algorithm with the minimum description lellgth(MDL) principle. Protein DB Motif motif(S,cytochrome_c) with p :- contain("C:XXCH",S). means that if a given sequence contains "CXXCH" it is cytochrome_c with probability p. Minimum Description Length Principle We employ the minimum description length(MDL) principle because it is effective in estimating a good probabilistic model for sample data, including uncertainty avoiding overfitting. The MDL principle suggests that the best stochastic decision predicate minimizes the following value. predicate description length scri ption length + correctness de- The value of the predicate description length indicates the predicate complexity(i.e. smaller values are better). The value of the correctness description length indicates the likelihood of the predicate(i.e. smaller values are better). Therefore, the MDL principle balances the trade-off between the complexity of motif representation and the likelihood of the predicate to sample data. Genetic Algorithm The genetic algorithm is a probabilistic search algorithm which simulates the evolution process. We adopt it to search for the optimal stochastic motif, because there is a combinatorially explosive number of stochastic motifs and it takes enormous computation time to find the optimal stochastic motif by exhaustive searches. The following procedures are performed in order to search for the optimal point of a given function fusing the simple genetic algorithm. 1. Give a binary representation that ranges over the domain of the function f Genetic Algorithm with MDL Principle Motif is represented by binary string. Motif's fittness value is calculated using MDL principle. Figure 32: Motif Extraction System Stochastic Decision Predicate It is difficult to express a motif as an exact symbolic pattern, so we employ the stochastic decision predicate as follows. motif(S,cytochrome_c) with 129/225 :- contain("CXXCH",S). motif(S,others) with 8081/8084. This example means that if S contains a subsequence matched to "CXXCH", then S is cytochrome c with probability ~;;, otherwise S is another protein with probability ~g~!. 2. Create an initial population which consists of a set of binary strings 3. Update the population repeatedly using selection, crossover, and mutation operators 4. Pick up the best binary string in the population after certain generations We apply the simple genetic algorithm to search for the optimal motif representation. Each motif is represented by a 120-bit binary string, with each bit corresponding to one pattern (e.g. "CXXCH"). The 120-bit binary string represents the predicate whose condition part is the conjunction of the patterns containing the corresponding bits. Table 2 is the result of applying the motif extraction system to Cytochrome c in the Protein Sequence Database of the National Biomedical Research Fomidation. This table shows the extracted motifs and their description lengths. CL is a description length of motif complexity, PL is a description length of probabilities, and DL is a description length of motif correctness. 184 Table 2: cytochrome c Motif CXXCH others Compared 8309 8084 Matched 225 8084 Description Length 286.894 (CL DL = 260.209) Correct 129 8081 = 16.288, PL = 10.397, 5.2 Early Experiences As the first programs to run on the experimental parallel inference machine Multi-PSI, ,four programs were developed to solve relatively simple problems. These were demonstrated at the FGCS'88 conference [Ichiyoshi 1989]. They are: Packing Piece Puzzle (Pentomino) 5 5.1 Performance Analysis of Parallel Programs Why Performance Analysis? A rectangular box and a collection of pieces with various shapes are given. The goal is to find all possible ways to pack the pieces into the box. The puzzle is often known as the Pentomino puzzle, when thepieces are all made lip of 5 squares. The program does a top-down OR-parallel all solution search. Shortest Path Problem Along with the development of various application programs, we have been conducting a study of the performance of parallel programs in a more general framework. The main concern is the performance of parallel programs that solve large-scale knowledge information processing problems on large-scale parallel inference machines. Parallel speedup comes from decomposing the whole problem into a number of subproblems and solving them in parallel. Ideally, a parallelized program would run p times faster on p processors than on one processor. There are, however, various overhead factors, such as load imbalance, communication overhead, and (possible) increases in the amount of computation. Knowledge processing type programs are "non-uniform" in (1) that the number and size of subproblems are rarely predictable, (2) that there can be random communication patterns between the subproblems, and (3) that the amount of total computation can depend on the execution order of subproblems. This makes load balancing, communication control, and scheduling important and nontrivial issues in designing parallel knowledge processing programs. The overhead factors could make the effective performance obtained by actually running those programs far worse than the "peak performance" of the machine. The performance gap may not be just a constant factor loss (e.g., 30 % loss), but could widen as the number of processors increases. In fact, in poorly designed parallel programs, the effective-to-peak performance ratio can approach zero as the number of processors increases without limit. If we could understand the behavior of the various overhead factors, we would be able to evaluate parallel programs, identify the most serious bottlenecks, and possibly, remove them. The ultimate goal is to push the horizon of the applicability of large-scale parallel inference machines into a wide variety of areas and problem instances. Given a graph, where each edge has an associated nonnegative cost, and a start node in the graph, the problem is to find the lowest cost path from the start node to every node in the graph (single-source shortest path problem). The program performs a distributed graph algorithm. We used square grid graphs with randomly generated edge costs. Natural Language Parser The problem is to construct all possible parse trees for an English sentence. The program is a PAX parser [Matsumoto 1987], which is essentially a bottom-up chart parsing algorithm. Processes represent chart entries, and are connected by message streams that reflect the data flow in the chart. Tsumego Solver A Tsumego problem is to the game of go what the checkmate problem is to the game of chess. The black stones surrounding the white stones try to capture the latter by suffocating them, while the white tries to survive. The problem is finding out the result assuming that black and white do their best. The result is (1) white is captured, (2) white survives, or (3) there is a tie. The program does a parallel alphabeta search. In the Pentomino program, the parallelism comes from concurrently searching different parts of the search tree. Since disjoint subtrees can be searched totally independently, there is no communication between search subtasks or speculative computation. Thus, load balancing is the key factor in parallel performance. In the first version, we implemented a dynamic load balancing mechanism and attained over 40-fold speedup using 64 processors. The program starts in a processor called the master, which expands the tree and generates search subtasks. Each of the worker processors requests the master processor for a subtask in a demand-driven fashion (i.e., 185 it requests a subtask when it becomes idle). Later improvement of data structures and code tuning led to better sequential performance but lower parallel speedup. It was found that the subtask generation throughput of the master processor could not keep up with the subtask solution throughput ofthe worker processors. A multi-level subtask a.llocation scheme was introduced, resulting in 50 fold speedup on 64 processors [Furuichi el al. 1990]. The load balancing mechanism was separated from the program, and was released to other users as a utility. Several programs have used it. One of them is a parallel iterative deepening A * program for solving the Fifteen puzzle. Although the search tree is very unbalanced because of pruning with a heuristic function, it attained over 100 fold speedup on a 128-processor PIM/m [\i\Tada et al. 1992]. The shortest path program has a lot of inter-process communication, but the communication is between neighboring vertices. A mapping that respects the locality of the original grid graph can keep the amount of inter-]Jrocesso1' communication low. A simple mapping, in which the square graph was divided into as many subgraphs as there are processors, maximized locality. But the parallel speedup was poor, because the computation spread like a wavefront, making only some of the processors busy at any time during execution. By dividing the graph into smaller pieces and mapping a number of pieces from different parts of the graph, processor utilization was increased [Wada and Ichiyoshi 1990]. The natural language parser is a communication intensive program with a non-local communication pattern. The first static mapping of processes showed very little speedup. It was rewritten so that processes migrate to where the necessary data reside to reduce inter-processor communication. It almost halved the execution time [Susaki et al. 1989]. The Tsumego program did parallel alpha- beta searches up to the leaf nodes of the game tree. Sequential alphabeta pruning can halve the effective branching factor of the game tree in the best cases. Simply searching different alternative moves in parallel loses much of this pruning effect. In other words, the parallel version might do a lot of redundant speculative computation. In the Tsumego program, the search tasks of candidate moves are given execution priorities according to the estimated value'of the moves, so as to reduce the amount of speculative computation lOki 1989]. Through the development of these programs, a number of techniques were developed for balancing the load, localizing communication, and reducing the amount of speculative computation. 5.3 Scalability Analysis A deeper understanding of various overheads in parallel execution requires the construction of models and anal- ysis of those models. The results form a robust core of insight into parallel performance. The focus of the research was the scalability of parallel programs. Good parallel programs for utilizing largescale parallel inference machines have performance that scales, i.e., the performance increases in accordance with the increase in the number of processors. For example, two-level load balancing is more scalable than single-level load balancing, because it can use more processors. But deciding how scalable a program is requires some analytical method. As a measure of scalability, we chose the isoefficiency Junction proposed by Kumar and Rao [Kumar et al. 1988]. For a fixed problem instance, the efficiency of a parallel algorithm (the speedup divided by the number of processors) generally decreases as the number of processors increases. The efficiency can often be regained by increasing the problem size. The function J(p) is defined as an isoefficiency function if the problem size (identified with the sequential runtime) has to increase as J(p) to maintain a given constant efficiency E as the number of processors p increases. An isoefficiency function grows at least linearly as p increases (lest the subtask size allocated to each processor approaches zero). Due to various overheads, isoefficiency functions generally have strictly more than linear growth in p. A slow growth rate, such as p log p, in the isoefficiency function would mean a desired efficiency can be obtained by running a problem with a relatively small problem size. On the other hand, a very rapid growth rate such as 2P would indicate that only a very poor use of a large-scale parallel computer would be possible by running a problem with a realistic size. On-demand load balancing was chosen first for analysis. Based on a probabilistic model and explicitly stated assumptions on the nature of the problem, the isoefficiency functions of single-level load balancing and multilevel load balancing were obtained. In a deterministic case (all subtasks have the same running time), the isoefficiency function for single-level load balancing is p2, and that for two-level load balancing is p3/2. The dependence of the isoefficiency functions on the variation in subtask sizes was also investigated, and it was found that if the subtask size is distributed according to an exponential distribution, a logp (respectively, (10gp)3/2) factor is added to the isoefficiency function of single-level (respectively, two-level) load balancing. The details are found in [Kimura et al. 1991]. More recently, we studied the load balance of distributed hash tables. A distributed hash table is a parallelization of a sequential hash table; the table is divided into subtables of equal size, each one of which is allocated to each processor. A number of search operations for the table can be processed concurrently, resulting in increased throughput. The overhead comes mainly from load imbalance and communication overhead. By allo- 186 cating an increasing number of buckets (= subtable size) to each processor, the load is expected to be improved. We set out to determine the necessary rate of increase of subtable size to maintain a good load balance. A very simple static load distribution model was defined and analyzed, and the isoefficiency function (with regard to load imbala.nce) was obtained [Ichiyoshi et al. 1992]. It was found that a relatively moderate growth in subtable size q (q = w((log p) 2)) is sufficient for the average load to approach perfect balance. This means that the distributed hash table is a data structure that can exploit the computational power of highly parallel computers with problems of a reasonable size. 5.4 Program Logic Simulator Placement (KL1) (ESPt) Routing Alignment by 3-DP Alignment by SA Folding Simulation Legal Reasoning (Rule-based engine) (Case-based engine) Go Playing Game Remaining Tasks vVe have experimented with a few techniques for making better use of the computational power of large-scale parallel computers. We have also conducted a scalability analysis for particular instances of both dynamic and static load balancing. The analysis of various parallelizing overheads and the determination of their asymptotic characteristics gives insight into the nature of large-scale parallel processing, and guides us in the design of programs which run on large-scale parallel computers. However, what we have done is a modest exploration of the new world of large-scale parallel computation. The analysis technique must be expanded to include communication overheads and specula.tive computation. Now that PIM machines with hundreds of processors have become operational, the results of asymptotic analysis can be compared to experimental data and their applicability ca.n be evalua.ted. 6 Therefore, we have got accustomed to developing programs in KL1 in a short time. Generally, to develop parallel programs, programmers have to consider the synchronization of each modules. This is troublesome and often causes bugs. However, as KL1 has automated mechanisms to synchronize inferences, we were able to develop parallel programs in a relatively short period of time as follows. Summary of Parallel Application Programs vVe have introduced overviews on parallel application progra.ms and results of performance analysis. We will summarize knowledge processing and parallel processing using PIlVls/KL1. (1) Knowledge Processing by PIM/KL1 vVe have developed parallel intelligent systems such as CAD systems, diagnosis systems, control systems, a ga.me system, and so on. Knowledge technologies used in them are the newest, and these systems are valuable from viewpoint of AI applications, too. Usually, as these technologies need much computation time, it is impossible to solve large problems using sequential machines. Therefore, these systems are appropriate to evaluate effectiveness of parallel inference. vVe have already been experienced in knowledge processing by sequentia.l logic programming languages. t: Size 8k man*month 3 4k 8k 4.9 k 7.5 k 3.7 k 13.7 k 4 4 2 4 2 5 2.5 k 2k 11k 3 6 10 An extended Prolog for system programming. In those cases where the program didn't show high performance, we had to consider another process model in regards to granularity of parallelism. Therefore, we have to design the problem solution model in more detail than when developing it on sequential machines. (2) Two types of Process Programming The programming style of KL1 is different from that of sequential logic programming language. A typical programming style in KL1 is process programming. A process is an object which has internal states and procedures to manipulate those internal states. Each process is connected to other processes by streams. Communication is through these streams. A process structure can be easily realized in KL1 and many problem solving techniques can be modeled by process structures. We observed that two types of KL1 process structure are used in application programs. 1. Static process structure The first type of process structure is a static one. In this, a process structure for problem solving is constructed, then, information is exchanged between processes. The process structure doesn't change until the given problem is solved. Most distributed algorithms have a static process structure. The majority of application programs belong to this type. For example, in the Logic Simulator, an electrical circuit is divided into sub circuits and each sub circuit 187 is represented as a process (Figure 3). In the Protein Sequence Analysis System, two protein sequences are represented as a two dimensional network of KL1 processes (Figure 9). In the Legal Reasoning System, the lefthand side of a case rule is represented as a Rete-like network of KL1 processes (Figure 17). In co-LODEX, design agents are statically mapped onto processors (Figure 22). 2. Dynamic process structure The second type of process structure is a dynamic one. The process structure changes during computation. Typically, the toplevel process forks into subprocesses, each subprocess forks into subsubprocesses, and so on (Figure 33). Usually, this process structure corresponds to a search tree. Application programs such as Pentomino, Fifteen Puzzle and Tsumego belong to this type. Figure 33: A search tree by a dynamic process structure (3) New Paradigm for Parallel Algorithms We developed new programming paradigms w.hile designing parallel programs. Some of the parallel algorithms are not just parallelizations of sequential algorithms, but have desirable properties not present in the base algorithm. In combinatorial optimization programs, a parallel simulated annealing (SA) algorithm (used in the LSI cell placement program and MASCOT), a parallel rule-based annealing (RA) algorithm (used in the High Level Synthesis System), and a parallel genetic algorithm (GA) (used in the Motif Extraction System) were designed. The parallel SA algorithm is not just a parallel version of a sequential SA algorithm. By statically assigning tem.peratures to processors and allowing solutions to move from processor to processor, the solutions compete for lower temperature processors: a better solution has a high possibility of moving to a lower temperature. Thus, the programmer is freed from case-by-case tuning of temperature scheduling. The parallel SA algorithm is also time-homogeneous, an important consequence of which is it does not have the problem in sequential SA that the . solution can be irreversibly trapped in a local minimum at a low temperature. In the parallel RA algorithm, the distribution of the solution costs are monitored, and used to the judge whether or not the equilibrium state has been reached. In the go-playing program, the flying corps idea suited for real-time problem solving was introduced. The task of the flying corps is to investigate the outcome of moves that could result in a potentially large gain (such as capturing a large opponent group or invasion of a large opponent territory) or loss. The investigation of a possibility may take much longer time than allowed in real-time move making and cannot be done by the main corps. (4) Performance by Parallel Inference Some application programs exhibited high performance by parallel execution, such as up to 100-fold speedup using 128 processors. Examples include the logic simulator (LS) (Figure 4), the legal reasoning system (LR) (Figure 18), and MGTP which is a theorem prover developed by the fifth research laboratory of ICOT[Fujita et al. 1991] [Hasegawa et al. 1992]. Understandably, these are the cases where there is a lot of parallelism and parallelization overheads are minimized. The logic simulator (LS), the legal reasoning system (LR), and MGTP have high parallelism coming from the data size (a large number of gates in the logic simulator and a large number of case rules in the legal reasoning system) or problem space size (MGTP). A good load balance was realized by static even data allocation (LS, LR), or by dynamic load allocation (MGTP). Either communication locality was preserved by process clustering (LS), or communication between independent subtasks is small (rule set division in LR or OR-parallel search in MGTP). (5) Load Distribution Paradigm In all our application programs, programs with a static process structure used a static load distribution, while programs with a dynamic process structure used semistatic or dynamic load distribution. In a program with a static process structure, a good load balance can usually be obtained by assigning roughly the same number of processes to each processor. To reduce the communication overhead, it is desirable to respect the locality in the logical process structure. Thus, we first divide the processes into clusters of processes that are close to each other. Then, the clusters are mapped onto the processors. This direct cluster-toprocessor mapping may not attain good load balance, since, at a given point in computation, only part of the process structure has a high level of computational activity. In such a case, it is better to divide the process 188 structure into smaller clusters and map a number of clusters that are far apart from each other on one processor. This multiple mapping scheme is adopted in the shortest path program and the logic simulator. In the three dimensional DP matching program, a succession of alignment problems (sets of three protein sequences to align) are fed into the machine and the alignment is performed in a pipelined fashion, keeping most processors busy all the time. In a program with a dynamic process structure, newly spawned processes can be allocated to processors with a light computational load to balance the load. To maintain low communication overhead, only a small number of processes are selected as candidates of load distribution. For example, in a tree search program, not all search substasks but only those at certain depths are chosen for interprocessor load allocation. The Pentomino puzzle solver, the Fifteen puzzle solver and the Tsumego solver use this on-demand dynamic load balancing scheme. (6) Granularity of Parallelism To obtain high performance by parallel processing, we have to consider the granularity of parallelism. If the size of each subtask is small, it is hard to obtain high performance, because parallelization overheads such as process switching and communication are serious. For example, in the first version of the Logic Simulator, the gates of the electrical circuit were represented as processes communicating with each other via streams. The performance of this version was not high because the task for each process was too small. The second version represented sub circuits as processes (Figure 3), and succeeded in improving the performance. . (7) Programming Environment The.first programs to run on the Multi-PSI were developed before the KL1 implementation on the machine had been built. The user wrote and debugged a program on the sequential PDSS (PIMOS development support system) on a standard hardware. The program was then ported to the the Multi-PSI, with the addition of load distribution pragmas. The only debugging facilities on the Multi-PSI were those developed for debugging the implementation itself, and it was not easy to debug application programs with those facilities. Gradually, the PIMOS operating system [Chikayama 1992] added debugging facilities such as an interactive tracing/spying facility, a static code checker that gives warnings on single-occurrence variables which are often simply misspelled, and a deadlock reporting facility. The deadlock reporting facility identifies perpetually suspended goals and, instead of printing out all of them (possibly very many), it displays only a goal that is most upstream in the data flow. It has been extremely helpful in locating the cause of a perpetual suspension (usually, the culprit is a producer process failing to instantiate the variable on which the reported goal is suspended). Performance monitoring and gathering facility was later added (and is still being enhanced) [Aikawa 1992]. Post-mortem display of processor utilization along the time axis often clearly reveals that one processor is being a' bottleneck at a particular phase of computation. The breakdown of processor time (into computing/ communicating/idling) can give' a hint on how the process structure might be changed to remove the bottleneck. . Sometimes knowledge of KL1 implementation is necessary to interpret the information provided by the facility to tune (sequential as well as parallel) performance. A similar situation exists in performance tuning of application programs on any computers, but the problem seems' to be more serious in a parallel symbolic language like KL1. How to bridge the gap between the programmer's idea of KL1 and the underlying implementation remains a problem in performance debugging/tuning. 7 Conclusion We introduced overviews of parallel application programs and research on performance analysis. Application programs presented here contain interesting technologies from viewpoint of not only parallel processing but knowledge processing. By developing various knowledge processing technologies in KL1 and measuring their performance, we showed that KL1 is a suitable language to realize parallel knowledge processing technologies and that they are executed quickly on PIM. Therefore, PIM and KL1 are appropriate tools to develop large scale intelligent systems. Moreover, we have developed many parallel programming techniques to obtain high performance. We were able to observe their effects actually on the parallel inference machine. These experiences are summarized as guidelines for developing larger application systems. In addition to developing application programs, the performance analysis group analyzed behaviors of parallel programs in a general framework. The results of performance analysis gave us useful information for selecting parallel programming techniques and for predicting their performance when the problem sizes are scaled up. The parallel inference performances presented in this paper were measured on Multi-PSI or PIM/m. We need to cOnipare and analyze the performances on different PIMs as future works. We 'would also. like to develop more utility programs which will help us to develop parallel programs, such as a dynamic load balancer other than the multi-level load balancer. 189 Acknowledgement The research and development of parallel application programs has been carried out by researchers of the seventh research laboratory and cooperating manufacturers with suggestions by members of the PIC, GIP, ADS and KAR working groups. We would like to acknowledge them and their efforts. We also thank Kazuhiro Fuchi, the director of ICOT, and Shunichi Uchida, the manager of the research department. References [Aikawa 1992] S. Aikawa, K. Mayumi, H. Kubo, F. Matsuzawa. ParaGraph: A Graphical Tuning Tool for Multiprocessor Ssytems. In Proc. Int. Conf. on Fifth Generation Computer Systems 1992, ICOT, Tokyo, 1992. [Barton 1990] J. G. Barton, Protein Multiple Alignment and Flexible Pattern Matching. In Methods in Enzymology, Vol.18S (1990), Academic Press, pp. 626645. . [Chikayama 1992] Takashi Chikayama. KL1 and PIMOS. In Proc. Int. Conf. on Fifth Generation Computer Systems 1992, ICOT, Tokyo, 1992. [Date et al. 1992] H. Date, Y. Matsumoto, M. Hoshi, H. Kato, K. Kimura and K. Taki. LSI-CAD Programs on Parallel Inference Machine. In Proc. Int. Conf. on Fifth Generation Computer Systems 1992, ICOT, Tokyo, 1992. [de Kleer 1986] J. de Kleer. An Assumption-Based Truth Maintenance System, Artificial Intelligence 28, (1986), pp.127-162. . [Doyle 1979] J. Doyle. A Truth Maintenance System. Artificial Intelligence 24 (1986). [Falkenhainer 86] B. Falkenhainer, K. D. Forbus, D. Gentner. The Structure-Mapping Engine. In Proc. Fifth National Conference on Arlifical Intelligence, 1986. [Fujita et al. 1991] H. Fujita, et. al. A Model Generation Therem Prover in KL1 Using a Ramified-Stack Algorithm. ICOT TR-606 1991. programs on the Multi-PSI. In Proc. of PPoPP'90, 1990, pp. 50-59. [Goto et al. 1988] Atsuhiro Goto et al. Overview of the Parallel Inference Machine Architecture. In Proc. Int. Conf. on Fifth Generation Computer Systems 1988, ICOT, Tokyo, 1988. [Hasegawa et al. 1992] Hasegawa, R. et al. MGTP: A Parallel Theorem Prover Based on Lazy Model Generation. To appear in Proc. CADE' (System Abstract), 1992. [Hirosawa et al. 1991] Hirosawa, M., Hoshida, M., Ishikawa, M. and T. Toya, T. Multiple Alignment System for Protein Sequences employing 3-dimensional Dynamic Programming. In Proc. Genome Informatics Workshop II, 1991 (in Japanese). [Hirosawa et al. 1992] Hirosawa, H., Feldmann, R.J., Rawn, D., Ishikawa, M., Hoshida, M. and Micheals, G. Folding simulation using Temperature parallel Simulated Annealing. In Proc. Int. Conf. on Fifth Generation Computer System 1992, ICOT, Tokyo, 1992. [Ichiyoshi 1989] N. Ichiyoshi. Parallel logic programming on the Multi-PSI. ICOT TR-487, 1989. (Presented at the Italian-Swedish-Japanese Workshop '90). [lchiyoshi et al. 1992] N. Ichiyoshi and K. Kimura. Asymptotic load balance of distributed hash tables. In Proc. Int. Conf. on Fifth Generation Computer Systems 1992, 1992. [Ishikawa et al. 1991] Ishikawa,M., Hoshida,M., Hirosawa,M., Toya,T., Onizuka,K. and Nitta,K. (1991a) Protein Sequence Analysis by Parallel Inference Machine. Information Processing Society of Japan, TRFI-2S-2, (in Japanese). [Jefferson 1985] D. R. Jefferson. Virtual Time. ACM Transactions on Programming Languages and Systems, Vol.7, No.3 (1985), pp. 404-425. [Kimura et al.1991] K. Kimura and K. Taki. Timehomogeneous Parallel Annealing Algorithm. In Proc. IMACS'91, 1991. pp. 827-828. [F~ui 1989] S. Fukui. Improvement of the Virtual Time Algorithm. Transactions of Information Processing Society of Japan, Vol. 30 , No.12 (1989), pp. 15471554. (in Japanese) [Kimura et al. 1991] K. Kimura and N. Ichiyoshi. Probabilistic analysis of the optimal efficiency of the multilevel dynamic load balancing scheme. In Proc. Sixth Distributed Memory Computing Conference, 1991, pp. 145-152. [Furuichi el ai. 1990] M. Furuichi, K. Taki, and N. Ichiyoshi. A multi-level load balancing scheme for or-parallel exhaustive search [Kitazawa 1985] H. Kitazawa. A Line Search Algorithm with High Wireability For Custom VLSI Design, In Proc. ISCAS'85, 1985. pp.1035-1038. 190 [Koseki et al. 1990] Koseki, Y., Nakakuki, Y., and Tanaka, M., An adaptive model-Based diagnostic system, In Proc. PRICAI'90, Vol. 1 (1990), pp. 104109. [Kumar et al. 1988] V. Kumar, K. Ramesh, and V. N. Rao. Parallel best-first search of state space graphs: A summary of results. In Proc. AAAI-88, 1988, pp. 122-127. [Maruyama 1988] F. Maruyama et al. co-LODEX: a cooperative expert system for logic design. In Proc. Int. Conf. on Fifth Genemtion Computer Systems, ICOT, Tokyo, 1988, pp.1299-1306. [Maruyama 1990] F. Maruyama et al. Logic Design System with Evaluation-Redesign Mechanism. Electronics and Communications in Japan, Part III: Fundamental Electronic Science, Vol. 73, No.5, Scripta Technica, Inc. (1990). [Maruyama 1991] F. Maruyama et al. Solving Combinatorial Constraint Satisfaction and Optimization Problems Using Sufficient Conditions for Constraint Violation. In Proc. the Fourth Int. Symposium on Artificial Intelligence, 1991. [Matsumoto 1987] Y. Matsumoto. A parallel parsing system for natural language analysis. In Proc. Third International Conference on Logic Programming, Lecture1 Notes on Computer Science 225, Springer- Verlag, 1987, pp. 396-409. [Matsumoto et al. 1992] Y. Matsumoto and K. Taki. Parallel logic Simulator based on Time Warp and its Evaluation. In Proc. Int. Conf. on Fifth Genemtion Computer Systems 1992, ICOT, Tokyo, 1992. [Minoda 1992] Y. Minoda et al. A Cooperative Logic Design Expert System on a Multiprocessor. In Proc. Int. Conf. on Fifth Genemtion Computer Systems 1992,ICOT,Tokyo, 1992. [Nakakuki et al. 1990] Nakakuki, Y., Koseki, Y., and Tanaka, M., Inductive learning in probabilistic domain, In Proc. AAAI-90, Vol. 2 (1990), pp. 809-814. [Needleman et al. 1970] Needleman,S.B. and Wunsch,C.D. A General Method Applicable to the Search for Similarities in the Amino Acid Sequences of Two Proteins. J. of Mol. Bioi., 48 (1970), pp. 443-453. [Nitta et al. 1992] K. Nitta et. al. HELIC-II: A Legal Reasoning System on the Parallel Inference Machine. In Proc. Int. Conf. on Fifth Generation Computer Systems 1992, ICOT, Tokyo, 1992. lOki 1989] H. Oki, K. Taki, S. Sei, and M. Furuichi. Implementation and evaluation of parallel Tsumego program on the Multi-PSI. In Proc. the Joint Parallel Processing Symposium (JSPP'89), 1989, pp. 351357. (In Japanese). [Skolnick and Kolinsky 1991] Skolnick, J. and Kolinski,A., Dynamic Monte Carlo Simulation of a New Lattice Model of Globular Protein Folding, Structure and Dynamics, Journal of Molecular Biology, Vol.221, N02, pp.499-531. [Susaki et al. 1989] K. Susaki, H. Sato, R. Sugimura, K. Akasaka, K. Taki, S. Yamazaki, and N. Hirota. Implementation and evaluation of parallel syntax analyzer PAX on the Multi-PSI. In Proc. Joint Parallel Processing Symposium (JSPP'89), 1989, pp. 342-350. (In Japanese). [Uchida et al. 1988] Shunichi Uchida et al. Research and Development of the Parallel Inference System in the Intermediate Stage of the FGCS Project. In Proc. Int. Conf. on Fifth Generation Computer Systems, ICOT, Tokyo, 1988. [Ueda et al. 1978] Ueda, Y., Taketomi, H. and Go, N. (1978) Studies on protein folding, unfolding and fluctuations by computer simulation. A three dimensionallattice model of lysozyme. Bilpolymers Vol.17 pp.1531-1548. [Wada and Ichiyoshi 1990] K. Wada and N. Ichiyoshi. A study of mapping of locally message exchanging algorithms on a loosely-coupled multiprocessor. ICOT TR-587, 1990. [Wada et al. 1992] M. Wada, K. Rokusawa, and N. Ichiyoshi. Parallelization of iterative deepening A* algorithm and its implementation and performance measurement on PIM/m. To appear in Joint Symposium on Parallel Processing JSPP'92 (in Japanese). PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON FIFTH GENERATION COMPUTER SYSTEMS 1992, edited by ICOT. © ICOT, 1992 191 Algorithmic & Knowledge Based Methods Do they "Unify" ? With some Programme Remarks for UNU/IIST* Dines Bj0rner and J0rgen Fischer Nilsson t April 1992 Abstract We examine two approaches to software application development. One is based on the conventional stepwise algorithmic approach typified by the imperative programming language (eg. PASCAL) tradition - but extends it with mathematical techniques for requirements development. The other is the knowledge based systems approach typified by the logic programming (eg. PROLOG) tradition. We contrast techniques and we attempt to find unifying issues and techniques. We propose a Most "Grand" Unifier - in the form of a Partial Evaluator (ie. Meta-interpreter - which establishes relations between the two approaches. The paper finally informs of the UNU/IIST, the United Nations University's International Institute for Software Technology. UNU/IIST shall serve especially the developing world. We outline consequences of the present analysis for the work of the UNU/IIST. The Fifth Generation Computer Project When the first author was invited, in late February, to read this paper at the plenum session of the International Conference on Fifth Generation Computer Systems it was expected that ... UNU/IIST strategies for prompting research and development in the field of computer science, including issues of education, creativity and international collaboration . .. and future prospects of computer science . .. would be covered by this presentation. *Invited paper for the Plenum Session of the International Conference on Fifth Generation Computer Systems, FGCS'92 ICOT, Tokyo, Japan, June 1-5, 1992. t Professor Dines Bj!llrner is Director of UNUJUST: United Nations University's International Institute for Software Technology, Apartado (Post office box) 517, Macau, e-mail: unuiist%uealab%umacmr V 1\ P 3This 'belief' is part of our future research plans. PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON FIFTH GENERATION COMPUTER SYSTEMS 1992 edited by ICOT. © ICOT, 1992 ' 199 THE ROLE OF LOGIC IN COMPUTER SCIENCE AND ARTIFICIAL INTELLIGENCE J. A. Robinson Syracuse University New York 13244-2010, U.S.A. ABSTRACT The modern history of computing begins in the 1930s with the rigorous definition of computation introduced by Godel, Church, Turing, and other logicians. The first universal digital computer was an abstract machine invented in 1936 by Turing as part of his solution of a problem in the foundations of mathematics. In the 1940s Turing's logical abstraction became a reality. Turing himself designed the ACE computer, and another logician-mathematician, von Neumann, headed the design teams which produced the EDV AC and the lAS computers. Computer science started in the 1950s as a discipline in its own right. Logic has always been the foundation of many of its branches: theory of computation, logical design, formal syntax and semantics of programming languages, compiler construction, disci plined programming, program proving, knowledge engineering, inductive learning, database theory, expert systems, theorem proving, logic programming and functional programming. Programming languages such as LISP and PROLOG are formal logics, slightly extended by suitable data structures and a few imperative constructs. Logic will always remain the principal foundation of computer science, but in the quest for artificial intelligence logic will be only one partner in a large consortium of necessary foundational disciplines, along with psychology, neuroscience, neurocomputation, and natural linguistics. 1 -LOGIC AND COMPUTING I expect that digital computing machines will eventually stimulate a considerable interest in symbolic logic. One could communicate with these machines in any language provided it was an exact language. In principle one should be able to communicate in any symbolic logic. A. M. Turing, 1947 The computer is the offspring of logic and technology. Its conception in the mid-1930s occurred in the course of the researches of three great logicians: Kurt Godel, Alonzo Church, and Alan Turing, and its subsequent birth in the mid 1940s was largely due to Turing's practical genius and to the vision and intellectual power of another great logician-mathematician, John von Neumann. Turing and von Neumann played leading roles not only in the design and construction of the first computers but also in laying the general logical foundations for understanding the computation process and for developing computing formalisms. Today, logic continues to be a fertile source of abstract ideas for novel computer architectures: inference machines, dataflow machines, database machines, rewriting machines. It provides a unified view of computer programming, (which is essentially a logical task) and a systematic framework for reasoning about programs. Logic has been important in the theory and design of high-level programming languages. Logical formalisms are the immediate models for two major logic programming language families: Church's lambda ca1cul us for functional programming languages such as LISP, ML, LUCID and MIRANDA, and the Horn-dause-resolution predicate calculus for relational programming languages such as PROLOG, P ARLOG, and GHC. Peter Landin noted over twenty years ago that ALGOL-like languages, too, were merely 'syntactically sugared' only-slightly-augmented versions of Church's lambda-calculus, and recently, another logical formalism, Martin-Lof's Intuitionistic Type Theory, has served (in, for example, Constable's NUPRL) as a very-highlevel programming language, a notable feature of which is that a proof of a program's correctness is an automatic accompaniment of the programwriting process. 200 To design, understand and explain computers and programming languages; to compose and analyze programs and reason correctly and cogently about th.eir properties; these are to practice an abstract logical art based upon (in H. A. Simon's apt phrase) a 'science of the artificial' which studies rational artifacts in abstraction from the engineering details of their physical realization, yet with an eye on their intrinsic efficiency. The formal logician has had to become also an abstract engineer. 1.1 LOGIC AND ARTIFICIAL INTELLIGENCE Logic provides the vocabulary and many of the techniques needed both for analyzing the processes of representation and reasoning and for synthesizing machines that represent' and reason. N. ]. Nilsson, 1991 In artificial intelligence (AI) research, logic has been used (for example, by McCarthy and Nilsson) as a rational model for knowledge representation and (for example by Plotkin and Muggleton) as a guide for the organization of machine inductive inference and learning. It has also been used (for example by Wos, Bledsoe and Stickel)' as the theoretical basis for powerful automated deduction systems which have proved theorems of interest to professional mathematicians. Logic's roles in AI, however, have been more controversial than its roles in the theory and practice of computing. Until the difference (if any) between natural intelligence and artificial intelligence is better understood, and until more experiments have tested the claims both of logic's advocates and of logic's critics concerning its place in AI research, the controversies will continue. 2 LOGIC AND THE ORIGIN OF THE COMPUTER. Logic's dominant role in the' invention of the modern computer is not widely appreciated. The computer as we know it today was invented in 1936, an event triggered by an important logical discovery announced by Kurt Godel in 1930. Godel's discovery decisively affected the outcome of the so-called Hilbert Program. Hilbert's goal was to formalize all of mathematics and then give positive answers to three questions a,bout the resulting formal system: is it consistent? is it complete? it is decidable? Godel found that no sufficiently rich formal system of mathematics can be both consistent and complete. In proving this, Godel invented, and used, a high-level symbolic programming language: the formalism of primitive recursive functions. As part of his proof, he composed an elegant modular functional program (a set of connected definitions of primitive recursive functions and predicates) which constituted a detailed computational presentation of the syntax of a formal system of number theory, with special emphasis on its inference rules and its notion of proof. This computational aspect of his work was auxiliary to his main result, but is enough to have established Godel as the first serious programmer in the modern sense. Godel's computational example inspired Alan Turing a few years later, in 1936, to find an explicit but abstract logical model not only of the computing process, but also of the computer itself. Using these as auxiliary theoretical concepts, Turing disposed of the third of Hilbert's questions by showing that the formal system of mathematics is not decidable. Although his original computer was only an abstract logical concept, during the following decade (1937-1946) Turing 'became a leader in the design, construction and operation of the first real computers. The problem of answering Hilbert's third question was known as the Decision Problem. Turing interpreted it as the challenge either to give an algorithm which correctly decides, for all formal mathematical propositions A and B, whether B is formally provable from A, or to show that is there no such algorithm. Having first clearly characterized what an algorithm is, he found the answer: there is no such algorithm. For our present purposes the vital part of Turing's result is his characterization of what counts as an algorithm. He based it on an analysis of what a 'computing agent' does when making a calculation according to a systematic procedure. He showed that, when boiled down to bare essentials, the activity of such an agent is nothing more than that of (as we would now say) a finitestate automaton which interacts, one at a time, with the finite-state cells comprising an infinite memory. Turing's machines are plausible abstractions from real computers, which, for Turing as for everyone else in the mid-1930s, meant a person who computes. The abstract Turing machine is an idealized model of any possible computational scheme such a human worker could carry out. His great achievement was to show that some Turing machines are 'universal' in that they can exactly mimic the behavior of' any Turing machine whatever. All that is needed is to place a 201 coded description of the given machine in the universal machine's memory together with a coded description of the given machine's initial memory contents. How Turing made use of this universal machine in answering Hilbert's third question is not relevant to our purpose here. The point is that his universal machines are the abstract prototypes of today's stored program general-purpose computers. The coded descri ption of each particular machine is the program which causes the universal machine to act like that particular machine. Abstract and purely logical as it is, Turing's work had an obvious technological interpretation. There is no need to build a separate machine for each computing task. One need build only one machine-a universal machine-and one can make it perform any conceivable computing task simply by writing a suitable program for it. Indeed Turing himself set out to build a universal machine. He began his detailed planning in 1944, when he was still fully engaged in the wartime British code-breaking project at Bletchley Park, and when the war ended in 1945 he moved to the National Physical Laboratory to pursue his goal full time. His real motive was already to investigate the possibility of artificial intelligence, a possibility he had frequently discussed at Bletchley Park with Donald Michie, I. J. Good, and other colleagues. He wanted, as he put it, to build a brain. By 1946 Turing completed his design for the ACE computer, based on his abstract universal machine. In designing the ACE, he was able to draw on his expert knowledge of the sophisticated new electronic digital technology which had been used at Bletchley Park to build special-purpose code-breaking machines (such as the Colossus). In the event, the ACE would not be the first physical universal machine, for there were others who were after the same objective, and who beat NPL to it. Turing's 1936 idea had started others thinking. By 1945 there were several people planning to build a universal machine. One of these was John von Neumann. Turing and von Neumann first met in 1935 when Turing was an unknown 23-year-old Cambridge graduate student. Von Neumann was already famous for his work in many scientific fields, including theoretical physics, logic and set theory, and several other important branches of mathematics. Ten years earlier, he had been one of the leading logicians working on Hilbert's Program, but after Godel's discovery he suspended his specifically logical researches and turned his attention to physics and to mathematics proper. In 1930 he emigrated to Princeton, where he remained for the rest of his life. Turing spent two years (from mid-1936 to mid1938) in Princeton, obtaining a doctorate under Alonzo Church, who in 1936 had independently solved the Decision Problem. Church's method was quite different from Turing's and was not as intuitively convincing. During his stay in Princeton, Turing had many conversations with von Neumann, who was enthusiastic about Turing's work and offered him a job as his research assistant. Turing turned it down in order to resume his research career in Cambridge, but his universal machine had already become an important item in von Neumann's formidable intellectual armory. Then came the war. Both men were soon completely immersed in their absorbing and demanding wartime scientific work. By 1943, von Neumann was deeply involved in many projects, a recurrent theme of which was his search for improved automatic aids to computation. In late 1944 he became a consultant to a University of Pennsylvania group, led by J. P. Eckert and J. W. Mauchly, which was then completing' the construction of the ENIAC computer (which was programmable and electronic, but not universal, and its programs were not stored in the computer's memory). Although he was too late to influence the design of the ENIAC, von Neumann supervised the design of the Eckert-Mauchly group's second computer, the EDV AC. Most of his attention in this period was, however, focussed on designing and constructing his own much more powerful machine in Princeton - the Institute for Advanced Study (lAS) computer. The EDV AC and the lAS machine both exemplified the socalled von Neumann architecture, a key feature of which is the fact that instruction words are stored along with data in the memory of the computer, and are therefore modifiable just like data words, from which they are not intrinsically distinguished. The lAS computer was a success. Many close copies were eventually built in the 19505, both in US government laboratories (the AVIDAC at Argonne National Laboratory, the ILLIAC at the University of Illinois, the JOHNIAC at the Rand 202 Corporation, the MANIAC at the Los Alamos National Laboratory, the ORACLE at the Oak Ridge National Laboratory, and the ORDV AC at the Aberdeen Proving Grounds), and in foreign laboratories (the BESK in Stockholm, the BESM in Moscow, the DASK in Denmark, the PERM in Munich, the SILLIAC in Sydney, the SMIL in Lund, and the WEIZAC in Israel); and there were at least two commercial versions of it (the IBM 701 and the International Telemeter Corporation's TC-1). The EDSAC, a British version of the EDV AC, was running in Cambridge by June 1949, the result of brilliantly fast construction work by M. V. Wilkes following his attendance at a 1946 EDVAC course. Turing's ACE project was, however, greatly slowed down by a combination of British civilservice foot-dragging and his own lack of administrative deviousness, not to mention his growing preoccupation with AI. In May 1948 Turing resigned from NPL in frustration and joined the small computer group at the University of Manchester, whose small but universal machine started useful operation the very next month and thus became the world's first working universal computer. All of Turing's AI experiments, and all of his computational work in developmental biology, took place on this machine and its successors, built by others but according to his own fundamental idea. Von Neumann's style in expounding the design and operation of EDVAC and the lAS machine was to suppress engineering details and to work in terms of an abstract logical description. He discussed both its system architecture and the principles of its programming entirely in such abstract terms. We can today see that von Neumann and Turing were right in following the logical principle that precise e'ngineering details are relatively unimportant in the essential problems of computer design and programming methodology. The ascendancy of logical abstraction over concrete realization has ever since been a guiding principle in computer science, which has kept itself organizationally almost entirely separate from electrical engineering. The reason it has been able to do this is that computation is primarily a logical concept, and only secondarily an engineering one. To compute is to engage in formal reasoning, according to certain formal symbolic rules, and it makes no logical difference how the formulas are physically represented, or how the logical transformations of them are physically realized. Of course no one should underestimate the enormous importance of the role of engineering in the history of the computer. Turing and von Neumann did not. They themselves had a deep and quite expert interest in the very engineering details from which they were abstracting, but they knew that the logical role of computer science is best played in a separate theater. 3 LOGIC AND PROGRAMMING Since coding is not a static process of translation, but rather the technique of providing a dynamic background to control the automatic evolution of a meaning, it has to be viewed as a logical problem and one that represents a new branch of formal logics. J. von Neumann and H. Goldstine, 1947 Much emphasis was placed by both Turing and von Neumann, in their discussions of programming, on the two-dimensional notation known as the flow-diagram. This quickly became a standard logical tool of early programming, and it can still be a useful device in formal reasoning about computations. The later ideas of Hoare, Dijkstra, Floyd, and others on the logical principles of reasoning about programs were anticipated by both Turing (in his 1949 lecture Checking a Large Routine) and von Neumann (in the 1947 Report Planning and Coding of Problems for an Electronic Computing Instrument). They stressed that programming has both a static and a dynamic aspect. The static text of the program itself is essentially an expression in some formal system of logic: a syntactic structure whose properties can be analyzed by logical methods alone. The dynamic process of running the program is part of the semantic meaning of this static text. 3.1 AUTOMATIC PROGRAMMING Turing's friend Christopher Strachey was an early advocate, around 1950, of using the computer itself to translate from high-level 'mathematical' descriptions into low-level 'machine-language' prescriptions. His idea was to try to liberate the programmer from concern with 'how' to compute so as to be able to concentrate on 'what' to compute: in short, to think and write programs in a more natural and human idiom. Ironically, Turing himself was not much interested in this idea, which he had already in 1947 pointed out as an 'obvious' one. In fact, he seems to have had a hacker's pride in his fluent machine-language virtuosity. He was able to think directly and easily in terms of bare bit patterns and of the 203 unorthodox number representations such as the Manchester computer's reverse (i.e., low-order digits first) base-32 notation for integers. In this attitude, he was only the first among many who have stayed aloof from higher-level programming languages and higher-level machine architectures, on the grounds that a real professional must be aware of and work closer to the actual realities of the machine. One senses this attitude, for example, throughout Donald Knuth's monumental treatise on the art of computer programming. It was not until the late 1950s (when FORTRAN and LISP were introduced) that the precise sequential details of how arithmetical and logical expressions are scanned, parsed and evaluated could routinely be ignored by most programmers and left· to the com pu ter to work out. This advance brought an immense simplification of the programming task and a large increase in programmer productivity. There soon followed more ambitious language design projects such as the international ALGOL project, and the theory and practice of programming language design, together with the supporting software technology of interpreters and compilers, quickly became a major topic in computer science. The formal grammar used to define the syntax of ALGOL was not initially accompanied by an equally formal specification of its semantics; but this soon followed. Christopher Strachey and Dana Scott developed a formal 'denotational semantics' for programs, based on a rigorous mathematical interpretation of the previously uninterpreted, purely syntactical, lambda calculus of Church. It was, incidentally, a former student of Church, John Kemeny, who devised the enormously popular 'best-selling' programming language, BASIC. 3.2 DESCRIPTIVE AND IMPERATIVE ASPECTS There are two sharply-contrasting approaches to programming and programming languages: the descriptive approach and the imperative approach. The descriptive approach to programming focusses on the static aspect of a computing plan, namely on the denotative semantics of program expressions. It tries to see the entire program as a timeless mathematical specification which gives the program's output as an explicit function of its input (whence arises the term 'functional' programming). This approach requires the computer to do the work of constructing the described output automatically from the given input according to the given specifications, without any explicit direction from the programmer as to how to do it. The imperative approach focusses on the dynamic aspect of the computing plan, namely on its operational semantics. An imperative program specifies, step by step, what the computer is to do, what its 'flow of control' is to be. In extreme cases, the nature of the outputs of an imperative program might be totally obscure. In such cases one must (virtually or actually) run the program in order to find out what it does, and try to guess the missing functional description of the output in terms of the input. Indeed it is necessary in general to 'flag' a control-flow program with comments and assertions, supplying this missing information, in order to make it possible to make sense of what the program is doing when it is running. Although a purely static, functional program is relatively easy to understand and to prove correct, in general one may have little or no idea of the cost of running it, since that dynamic process is deliberately kept out of sight. On the other hand, although an operational program is relatively difficult to understand and prove correct, its more direct depiction of the actual process of computation makes an assessment of its efficency relatively straightforward. In practice, most commonly-used high-level programming languages-even LISP and PROLOG-have both functional and operational features. Good programming technique requires an understanding of both. Programs written in such languages are often neither wholly descriptive nor wholly imperative. Most programming experts, however, recommend caution and parsimony in the use of imperative constructs. Some even recommend complete abstention. Dijkstra's now-classic Letter to the Editor (of the Communications of the ACM), entitled 'GOTO considered harmful' is one of the earliest and best-known such injunctions. These two kinds of programming were each represented in pure form from the beginning: Gadel's purely descriptive recursive function formalism and Turing's purely imperative notation for the state-transition programs of his machines. 204 3.3 LOGIC AND PROGRAMMING LANGUAGES In the late 1950s at MIT John McCarthy and his group began to program their IBM 704 using symbolic logic directly. Their system, LISP, is the first major example of a logic programming language intended for actual use on a computer. It is essentially Church's lambda calculus, augmented by a simple recursive data structure (ordered pairs), the conditional expression, and an imperative 'sequential construct' for specifying a series of consecutive actions. In the early 1970s Robert Kowalski in Edinburgh and Alain Colmerauer in Marseille showed how to program with another only-slightly-augmented system of symbolic logic, namely - the Horn-clauseresolution form of the predicate calculus. PROLOG is essentially this system of logic, augmented by a sequentializing notion for lists of goals and lists of clauses, a flow-of-control notion consisting of a systematic depth-first, back-tracking enumeration of all deductions permitted by the logic, and a few imperative commands (such as the 'cut'). PROLOG is implemented with great elegance and efficiency using ingenious techniques originated by David H. D. Warren. The princi pal virtue of logic programming in either LISP or PROLOG lies in the ease of writing programs, their intelligibility, and their amenability to metalinguistic reasoning. LISP and PROLOG are usually taken as paradigms of two distinct logic programming styles (functional programming and relational programming) which on closer examination turn out to be only two examples of a single style (deductive programming). The general idea of purely descriptive deductive programming is to construe computation as the systematic reduction of expressions to a normal form. In the case of pure LISP, this means essentially the persistent application of reduction rules for processing function calls (Church's beta-reduction rule), the conditional expression, and the data-structuring operations for ordered pairs. In the case of pure PROLOG, it means essentially the persistent application of the beta-reduction rule, the rule for the distributing AND through OR, the rule for eliminating existential quantifiers from conjunctions of equations, and the rules for simplifying expressions denoting sets. By merging these two formalisms one obtains a unified logical system in which both flavors of programming are available both separately and in combination with each other. My colleague Ernest Sibert and I some years ago implemented an experimental language based on this idea (we called it LOGLISP). Currently we are working on another one, called SUPER, which is meant to illustrate how such reduction logics can be implemented naturally on massively parallel computers like the Connection Machine. LISP, PROLOG and their cousins have thus demonstrated the possibility, indeed the practicality, of using systems of logic directly to program computers. Logic programming is more like the formulation of knowledge in a suitable form to be used as the axioms of automatic deductions by which the computer infers its answers to the user's queries. In this sense this style of programming is a bridge linking computation in general to AI systems in particular. Knowledge is kept deliberately apart (in a 'knowledge base') from the mechanisms which invoke and apply it. Robert Kowalski's well-known equational aphorism 'algorithm = logic + control ' neatly sums up the necessity to pay attention to both descriptive and imperative aspects of a program, while keeping them quite separate from each other so that each aspect can be modified as necessary in an intelligible and disciplined way. The classic split between procedural and declarative knowledge again shows up here: some of the variants of PROLOG (the stream-parallel, commi tted -choice nondeterministic languages such as ICOT's GHC) are openly concerned more with the control of events, sequences and con currencies than on the management of the deduction of answers to queries. The uneasiness caused by this split will remain until some way is found of smoothly blending procedural with declarative within a unified theory of computation. Nevertheless, with the' advent of logic programming in the wide sense, computer science has outgrown the idea that programs can only be the kind of action-plans required by Turing-von Neumann symbol-manipulating robots and their modern descendants. The emphasis is (for the programmer, but not yet for the machine designer) now no longer entirely on controlling the dynamic sequence of such a machine's actions, but increasingly on the static syntax and semantics of logical expressions, and on the corresponding mathematical structure of the data and other objects which are the denotations of the expressions. It is interesting to speculate how different the history of computing might have 205 been if in 1936 Turing had proposed a purely descriptive abstract universal machine rather than the purely imperative one that he actually did propose; or if, for example, Church had done so. We might well now have been talking of 'Church machines' instead of Turing machines. We would be used to thinking of a Church machine as an automaton whose states are the expressions of some formal logic. Each of these expressions denotes some entity, and there is a semantic notion of equivalence among the expressions: equivalence means denoting the same entity. For example, the expressions (23 + 4)/(13 -4), 1.3 + 1.7, Az. (2z + 1)1/2 (4) are equivalent, because they all denote the number three. A Church machine computation is a sequence of its states, starting with some given state and then continuing according to the transition rules of the machine. If the sequence of states eventually reaches a terminal state, and (therefore) the computation stops, then that terminal state (expression) is the output of the machine for the initial state (expression) as input. In general the machine computes, for a given expression, another expression which is equivalent to it and which is as simple as possible. For example, the expression '3' is as simple as possible, and is equivalent to each of the above expressions, and so it would be the output of a computation starting with any of the expressions above. These simple-as-possible expressions are said to be in 'normal form'. The 'program' which determines the transitions of a Church machine through its successive states is a set of 'rewriting' rules together with a criterion for applying some one of them to any expression. A rewriting rule is given by two expressions, called the 'redex' and the 'contractum' of the rule, and applying it to an expression changes (rewrites) it to another expression. The new expression is a copy of the old one, except that the new expression contains an occurrence of the contractum in place of one of the occurrences of the redex. If the initial state is (23 + 4) / (13 - 4) then the transi tions are: (23 + 4)/(13 - 4) 27/(13 -4) 27/9 becomes becomes becomes 27/(13 - 4), 27/9, 3. Or if the initial state is AZ. (2z + 1)1/2 (4), then the trans 1tions are: Az. (2z + 1)1/2 (4) becomes «2 x 4) + 1)1/2 becomes (8 + 1)1/ 2 becomes 91/2 becomes «2 x 4) + 1)1/2 (8 + 1)1/ 2 91/2 3. Most of us are trained in early life to act like a simple purely arithmetical Church machine. We all learn some form of numerical rewriting rules in elementary school, and use them throughout our lives (but of course Church's lambda notation is not taught in elementary school, or indeed at any time except when people later specialize in logic or mathematics; but it ought to be). Since we cannot literally store in our heads all of the infinitely many redex-contractum pairs <23 + 4, 27>, <2+2, 4> etc., infinite sets of these pairs are logically coded into simple finite algorithms. Each algorithm (for addition, subtraction, and so on) yields the contractum for any given redex of its particular type. We hinted earlier that an expression is in normal form if it is as simple as possible. To be sure, that is a common way to think of normal forms, and in many cases it fits the facts. Actually to be in normal form is not necessarily to be in as simple a form as possible. What counts as a normal form will depend on what the rewriting rules are. Normal form is a relative notion: given a set of rewriting rules, an expression in normal form is one which contains no redex. In designing a Church machine care must be taken that no expression is the redex of more than one rule. The machine must also be given a criterion for deciding which rule to apply to an expression which contains distinct redexes, and also for deciding which occurrence of that rule's redexes to replace, in case there are two or more of them. A simple criterion is always to replace the leftmost redex occurring in the expression. A Church machine, then, is a machine whose possible states are all the different expressions of some formal logic and which, when started in some state (i.e., when given some expression of that logic) will 'try' to compute its normal form. The computation mayor may not terminate: this will depend on the rules and on the initial expression. Some of the expressions for some Church machines may have no normal form. Since for all interesting formal logics there are infinitely many expressions, a Church machine is not a finite-state automaton; so in practice the same provision must be made as in the case of the 206 Turing machines for adjoining as much external memory as needed during a computation. this expression and display the result' imperative (as in LISP's classic read-eval-print cycle). Church machines can also serve as a simple model for parallel computation and parallel architectures. One has only to provide a criterion for replacing more than one redex at the same time. In Church's lambda calculus one of the rew~iting rules ('beta reduction') is the logical verSIOn of executing a function call in a highlevel programming language. Logic programming languages based on Horn-clauseresolution can also be implemented as Church machines, at least as far as their static aspects are concerned. 4 LOGIC AND ARTIFICIAL INTELLIGENCE In the early 1960s Peter Landin, then Christopher Strachey's research assistant, undertook to convince computer scientists that not merely LISP, but also ALGOL, and indeed all past, present and future programming languages are essentially the abstract lambda calculus in one or another concrete manifestation. One need add only an abstract version of the 'state' of the computation process and the concept of 'jump' or change of state. Landin's abstract logical model combines declarative programming with procedural programming in an insightful and natural way. Landin's thesis also had a computer-design aspect, in the form of his elegant abstract logic machine (the SECD machine) for executing lambda calculus programs. The SECD m'achine language is the lambda calculus itself: there is no question of 'compiling' programs into a lower-level language (but more recently Peter Henderson has described just such a lower-level SECD machine which executes compiled LISP expressions). Landin's SECD machine is a sophisticated Church machine which uses stacks to keep track of the syntactic structure of the expressions and of the location of the leftmost redex. We must conclude that the descriptive and imperative views of computation are not incompatible with each other. Certainly both are necessary. There is no need for their mutual antipathy. It arises only because enthusiastic extremists on both sides sometimes claim that computing and programming are 'nothing but' the one or the other. The appropriate view is that in all computations we can expect to find both aspects, although in some cases one or the other aspect will dominate and the other may be present in only a minimal way. Even a pure functional program can be viewed as an implicit 'evaluate In AI a controversy sprang up in the late 1960s over essentially this same issue. There was a spirited and enlightening debate over whether knowledge should be represented in procedural or declarative form. The procedural view was mainly associated with Marvin Minsky and his MIT group, represented by Hewitt's PLANNER system and Winograd's application of it to support a rudimentary natural language capability in his simple simulated robot SHRDLU. The declarative view was associated with Stanford's John McCarthy, and was represented by Green's QA3 system and by Kowalski's advocacy of Horn clauses as a logic-based deductive programming language. Kowalski was able to make the strong case that he did because of Colmerauer's development of PROLOG as a practical logic programming language. Eventually Kowalski found an elegant way to end the debate, by pointing out a procedural interpretation for the ostensibly purely declarative Horn clause sentences in logic programs. There is an big epistemological and psychological difference between simply describing a thing and giving instructions for constructing it, which corresponds to the difference between descriptive and imperative programming. One cannot always see how to construct the denotation of an expression efficiently. For example, the meaning of the descriptive expression the smallest integer which is the sum of two cubes in two different ways. seems quite clear. We certainly understand the expression, but those who don't already (probably from reading of Hardy's famous visit to Ramanujan in hospital) know that it denotes the integer 1729 will have to do some work to figure it out for themselves. It is easy to see that 1729 is the sum of two cubes in two different ways if one is shown the two equations 1729 = 13 + 123 1729 = 103 +93 but it needs at least a little work to find them oneself. Then to see that 1729 is the smallest integer with this property, one has to see somehow that all smaller integers lack it, and this means checking each one, either literally, or by some clever shortcut. To find 1729, in the first 207 place, as the denotation of the expression, one has to carry out the all of this work, in some form or another. There are of course many different ways to organize the task, some of which are much more efficient than others, some of which are less efficient, but more intelligible, than others. So to write a general computer program which would automatically and efficiently reduce the expression the smallest integer which is the sum of two cubes in two different ways to the expression '1729' and equally well handle other similar expressions, is not at all a trivial task. 4.1 AI AND PROGRAMMING Automatic programming has never really been that. It is no more than the automatic translation of one program into another. So there must be some kind of program (written by a human, presumably) which starts off the chain of translations. An assembler and a compiler both do the same kind of thing: each accepts as input a program written in one programming language and delivers as output a program written in another programming language, with the assurance that the two programs are equivalent in a suitable sense. The advantage of this technique is of course that the source program is usually more intelligible and easier to write than the target program, and the target program is usually more efficient than the source program because it is typically written in a lower-level language, closer to the realities of the machine which will do the ultimate work. The advent of such automatic translations opened up the design of programming languages to express 'big' ideas in a style 'more like mathematics' (as Christopher Strachey put it). These big ideas are then translated into smaller ideas more appropriate for machine languages. Let us hope that one day we can look back at all the paraphernalia of this program-translation technology, which is so large a part of today's computer science, and see that it was only an interim technology. There is no law of nature which says that machines and machine languages are intrinsically low-level. We must strive towards machines whose 'level' matches our own. Turing and von Neumann both made important contributions to the beginnings of AI, although Turing's contribution is the better known. His 1950 essay Computin~ Machinery and Intelli~ence is surely the most quoted single item in the entire literature of AI, if only because it is the original source of the so-called Turing Test. The recent revival of interest in artificial neural models for AI applications recalls von Neumann's deep interest in computational neuroscience, a field he richly developed in his later years and which was absorbing all his prodigious intellectual energy during his final illness. When he died in early 1957 he left behind an uncompleted manuscript which was posthumously published as the book The Computer and the Brain. 4.2 LOGIC AND PSYCHOLOGY IN AI If a machine is to be able to learn something, it must first be able to be told it. John McCarthy, 1957 I do not mean to say that there is anything wrong with logic; I only object to the assumption that ordinary reasoning is largely based on it. M. L. Minsky, 1985 AI has from the beginning been the arena for an uneasy coexistence between logic and psychology as its leading themes, as epitomized in the contrasting approaches to AI of John McCarthy and Marvin Minsky. McCarthy has maintained since 1957 that AI will come only when we learn how to write programs (as he put it) which have common sense and which can take advice. His putative AI system is a (presumably) very large knowledge base made up of declarative sentences written in some suitable logic (until quite recently he has taken this to be the first order predicate calculus), equipped with an inference engine which can automatically deduce logical consequences of this knowledge. Many wellknown AI problems and ideas have arisen in pursuing this approach: the Frame Problem, Nonmonotonic Reasoning, the Combinatorial Explosion, and so on. This approach demands a lot of work to be done on the epistemological problem of declara ti vel y representing knowledge and on the logical problem of designing suitable inference engines. Today the latter field is one of the flourishing special subfields of AI. Mechanical theoremproving and automated deduction have always been a source of interesting and hard problems. After over three decades of trying, we now ha ve well-understood methods of systematic deduction which are of considerable use in practical applications. 208 Minsky maintains that humans rarely use. logic in their actual thinking and problem solving, but adds that logic is not a good basis even for artificial problem solving-that computer programs based solely on Mc<:arthy'~ lo~ical deductive knowledge-base paradigm wIll fall to displa y intelligence because of their inevi~able computational inefficiencies; that the pre~hcate calculus is not adequate for the representation of most knowledge; and that the exponential complexity of predicate calculus proof procedures will always severely limit what inferences are possible. Because it claims little or nothing, the view can hardly be refuted that humans undoubtedly ar~ in some sense (biological) machines whose design, though largely hidden from us at present and obviously exceedingly complicated, calls for some finite arrangement of material components all built ultimately out of 'mere' atoms and molecules and obeying the laws of physics and chemistry. So there is an abstract design whic~, when physically implemented, produces (m ourselves, and the animals) intelligence. Intelligent machines can, then, b~ built. Indee~, they can, and do routinely, bUild. and repa?r themselves, given a suitable enVIronment In which to do so. Nature has already achieved NInatural intelligence. Its many manifestations serve the AI research community as existence proofs that intelligence can occur in physical systems. Nature has already solved all the AI problems, by sophisticated schemes only a very few of which have yet been understood. 4.3 THE STRONG AI THESIS According to Strong AI, the computer is not merely a t.ool in the study of the mind; rather, the approprIately programmed computer really is a mind, in. the sense. that computers given the right programs can be hterally saId to understand and have other cognitive states. ,. R. Searle, 1980 Turing believed, indeed was the first to propound, the Strong AI thesis that artificial intelligence can be achieved simply by appropriate programming of his universal computer. Turing's Test is simply a detection device, waiting for intelligence to occur in machines: if a machine is one day programmed to carryon fluent and intelligentseeming conversations, will we not, argued Turing, have to agree that this intelligence, or at least this apparent intelligence, is a property of the program? What is the difference between apparent intelligence, and intelligence itself? The Strong AI thesis is also implicit in Mc<:~r~hy's long-pursued project to reconstruct artifiCially something like human intelligence by implementing a suitable formal system. Thus the Turing Test might (on McCarthy's view) eventually be passed by a deductive kn?wle.d~e base, containing a suitable repertory of hngUIStIC and other everyday human knowledge, and an efficient and sophisticated inference engine. The system would certainly have to have. a mastery of (both speaking and understanding). ~atural . language. Also it would have to exhibit to a sufficent degree the phenomenon of 'learning' so as to be capable of augmenting and improving its knowledge base to keep it up-to-date both in t~e small (for example in dialog management) and In the large (for example in keeping up wi.th ~~e news and staying abreast of advances In SCientifiC knowledge). In a recent vigorous defense of the Strong AI thesis, Lenat and Feigenbaum argued that if enough knowledge of the right kind is encoded in the system it will be able to 'take off' and autonomously acquire more through reading books and newspapers, watching TV, taking courses, and talking to people. It is not the least of the attractions of the.Strong AI thesis is that it is empirically testable. We shall know if someone succeeds in building a system of this kind: that indeed is what Turing's Test is for. 4.4 EXPERT SYSTEMS Expert systems are limited-scale attempted practical applications of McCarthy's idea. Some of them (such as the Digital Equipment Corporation's system for c~nfiguring. ': AX computing systems, and the highly speclahzed medical diagnosis systems, such as MYCIN) have been quite useful in limited contexts, but there have not been as many of them as the more enthusiastic proponents of the idea might have wished. The well-known book by Feigenbaum & McCorduck on the Fifth Generation Project was a spirited attempt to stir up enthusiasm for Expert Systems and Knowledge Engineering in the United States by portraying ICOT's mission as a Japanese bid for leadership in this field. There has indeed been much activity in devising specialized systems of applied logic whose axioms collectively represent a body of expert knowledge for some field (such as certain diseases, their symptoms and treatments) and whose deductions represent the process of solving problems posed 209 about that field (such as the problem of diagnosing the probable cause of given observed symptoms in a patient). This, and other, attempts to apply logical methods to problems which call for inference-making, have led to an extensive campaign of reassessment of the basic classicial logics as suitable tools for such a purpose. New, nonclassical logics have been proposed (fuzzy logic, probabilistic logic, temporal logic, various modal logics, logics of belief, logics for causal reationships, and so on) along with systematic methodologies for deploying them (truth maintenance, circumscription, non-monotonic reasoning, and so on). In the process, the notion of what is a logic has been stretched and modified in many different ways, and the current picture is one of busy experimentation with new ideas. coded in the genes. This is not exactly an AI problem. One cannot help wondering whether Turing may have been disappointed, at the end of his life, with his lack of progress towards realizing AI. If one excludes some necessary philosophical clarifications and preliminary methodological discussions, nothing had been achieved beyond his invention of the computer itself. Von Neumann's view of AI was a 'logico-neural' version of the Strong AI thesis, and he acted on it with typical vigor and scientific virtuosity. He sought to for'malize, in an abstract model, aspects of the actual structure and function of the brain and nervous system. In this he was consciously extending and improving the pioneer work of McCullogh and Pitts, who had described their model as 'a logical calculus immanent in nervous activity'. Here again, it was logic which served as at least an approximate model for a serious attack on an ostensibly nonlogical problem. The empirical goal of finding out how the human mind actually works, and the theoretical goal of reproducing its essential features in a machine, are not much closer in the early 1990s than they were in the early 1950s. After forty years of hard work we have 'merely' produced some splendid tools and thoroughly explored plenty of blind alleys. We should not be surprised, or even disappointed. The problem is a very hard one. The same thing can be said about the search for controlled thermonuclear fusion, or for a cancer cure. Our present picture of the human mind is summed up in Minsky's recent book The Society of Mind, which offers a plausible general view of the mind's architecture, based on clues from the physiology of the human brain and nervous system, the computational patterns found useful for the organization of complex semantic information-processing systems, and the sort of insightful interpretation of observed human adult- and child-behavior which Freud and Piaget pioneered. Logic is given little or no role to play in Minsky's view of the mind. Von Neumann's logical study of selfreproduction as an abstract computational phenomenon was not so much an AI investigation as an essay in quasi-biological information processing. It was certainly a triumph of abstract logical formalization of an undeniably computational process. The selfreproduction method evolved by Nature, using the double helix structure of paired complementary coding sequences found in the DNA molecule, is a marvellous solution of the formal problem of self-reproduction. Von Neumann was not aware of the details of Nature's solution when he worked out his own logical, abstract version of it as a purely theoretical construction, shortly before Crick and Watson unravelled the structure of the DNA molecule in 1953. Turing, too, was working at the time of his death on another, closely-related problem of theoretical biology-morphogenesis-in which one must try to account theoretically for the unfolding of complex living structural organizations under the control of the programs Minsky rightly emphasizes (as logicians have long insisted) that the proper role of logic is in the context of justification rather than in the context of discovery. Newell, Simon and Shaw's 1956 well known propositional calculus theoremproving program, the Logic Theorist, illustrates this distinction admirably. The Logic Theorist is a discovery simulator. The goal of their experiment was to make their program discover a proof (of a given propositional formula) by 'heuristic' means, reminiscent (they supposed) of the way a human would attack the same problem. As an algorithmic theorem-prover (one whose goal is to show formally, by any means, and presumably as efficiently as possible, that a given propositional formula is a theorem) their program performed nothing like as well as the best nonheuristic algorithms. The logician Hao Wang soon (1959) rather sharply pointed this out, but it seems that the psychologcial moti v a tion of their investigation had eluded him (as indeed it has many others). They had themselves very much muddled the issue by contrasting their heuristic 4.5 LOGIC AND NEUROCOMPUTATION 210 theorem-proving method with the ridiculously inefficient, purely fictional, 'logical' one of enumerating all possible proofs in lexicographical order and waiting for the first one to turn up with the desired proposition as its conclusion. This presumably was a rhetorical flourish which got out of control. It strongly suggested that they believed it is more efficient to seek proofs heuristically, as in their program, than algorithmically with a guarantee of success. Indeed in the exuberance of their comparison they provocatively coined the wicked but amusing epithet 'British Museum algorithm' for this lexicogaphic-enumeration-of-all-proofs methodthe intended sting in the epithet being that just as, given enough time, a systematic lexicographical enumeration of a.11 possible texts will eventually succeed in listing any given text in the vast British Museum Library, so a logician, given enough time, will eventually succeed in proving any given provable proposition by proceeding along similar lines. Their implicit thesis was that a proof-finding algorithm which is guaranteed to succeed for any provable input is necessarily unintelligent. This may well be so: but that is not the same as saying that it is necessarily inefficient. Interestingly enough, something like this thesis was anticipated by Turing in his 1947 lecture before the London Mathematical Society: ... if a machine is expected to be infallible, it cannot also be intelligent. There are several mathematical theorems which say almost exactly that. 5 CONCLUSION Logic's abstract conceptual gift of the universal computer has needed to be changed remarkably little since 1936. Until very recently, all universal computers have been realizations of the same abstraction. Minor modifications and improvements have been made, the most striking one being internal memories organized into addressable cells, designed to be randomly accessible, rather than merely sequentially searchable (although external memories remain essentially sequential, requiring search). Other improvements consist largely of building into the finite hardware some of the functions which would otherwise have to be carried out by software (although in the recent RISC architectures this trend has actually been reversed). For over fifty years, successive models of the basic machine have been 'merely' faster, cheaper, physically smaller copies of the same device. In the past, then, computer science has pursued an essentially logical quest: to explore the Turing-von Neumann machine's unbounded possibilities. The technological ,challenge, of continuing to improve its physical realizations, has been largely left to the electrical engineers, who have performed miracles. In the future, we must hope that the logician and the engineer will find it possible and natural to work more closely together to devise new kinds of higher-level computing machines which, by making programming easier and more natural, will help to bring artificial intelligence closer. That future has been under way for at least the past decade. Today we are already beginning to explore the possibilities of, for example, the Connection Machine, various kinds of neural network machines, and massively parallel machines for logical knowledge-processing. It is this future that the bold and imaginative Fifth Generation Project has been all about. Japan's ten-year-Iong ICOT-based effort has stimulated (and indeed challenged) many other technologically advanced countries to undertake ambitious logic-based research projects in computer science. As a result of ICOT's international leadership and example, the computing world has been reminded not only of how central the role of logic has been in the past, as generation has followed generation in the modern history of computing, but also of how important a part it will surely play in the generations yet to come. PROCEEDINGS OF THE INTERNATIONAL CONFERENCE O~ FIFTH GENERATION COMPUTER SYSTEMS 1992, edIted by ICOT. © ICOT, 1992 21 I PROGRAMS ARE PREDICATES C.A.R. Hoare Programming Research Group, Oxford University Computing Laboratory, 11 Keble Road, Oxford, OXl 3QD, England. Abstract Requirements to be met by a new engineering product can be captured most directly by a logical predicate describing all its desired and permitted behaviours. The behaviour of a complex product can be described as the logical composition of predicates describing the behaviour of its simpler components. If the composition logically implies the original requirement, then the design will meet its specification. This implication can be mathematically proved before starting the implementation of the components. The same method can be repeated on the design of the components, until they are small enough to be directly implement able. A programming language can be defined as a restricted subset of predicate notation, ensuring that the described behaviour may be efficiently realised by a combination of computer software and hardware. The restrictive notations give rise to a specialised mathematical theory, which is expressed as a collection of algebraic laws useful in the transformation and optimisation of designs. Non-determinism contributes both to reusability of design and to efficiency of implementation. This philosophy is illustrated by application to hardware design, to procedural programs and to PROLOG. It is shown that the procedural reading of logic programs as predicates is different from the declarative reading, but just as logical. For my part, I have been most inspired by the philosophy with which this project approaches the daunting task of writing programs for the new generation of computers and their users. I have long shared the view that the programming task should always begin with a clear and simple statement of requirements and objectives, which can be formalised as a specification of the purposes which the program is required to meet. Such specifications are predicates, with variables standing for values of direct or indirect observations that can be made of the behaviour of the program, including both questions and answers, input and output, stimulus and response. A predicate describes, in a neutral symmetric fashion, all permitted values which those variables may take when the program is executed. The over-riding requirement on a specification is clarity, achieved by a notation of the highest possible modularity and expressive power. If a specification does not obviously describe what is wanted, there is a grave danger that it describes what is not wanted; it can be difficult, expensive, and anyway mathematically impossible to check against this risk. A minimum requirement on a specification language is that it should include in full generality the elementary connectives of Boolean Algebra: conjunction, disjunction, and negation - simple and, or, and not. Conjunction is needed to connect requirements, both of which must be met, for example, • it must control pressure and temperature. 1 Inspiration It is a great honour for me to address this conference which celebrates the completion of the Fifth Generation Computer Systems project in Tokyo. I add my own congratulations to those of your many admirers and followers for the great advances and many achievements made by those who worked on the project. The project started with ambitious and noble goals, aiming not only at radical advances in Computer Technology, but also at the direction of that technology to the wider use and benefit of mankind. Many challenges remain; but the goal is one that inspires the best work of scientists and engineers throughout the ages. Disjunction is needed to allow tolerances in implementation • it may deviate from optimum by one or two degrees. And negation is needed for even more important reasons • it must not explode! As a consequence, it is possible to write a specification like PV -,p which is always true, and so describes every possible observation of every possible product. Such a tolerant 212 specification is easy to satisfy, even by a program that gets into an infinite loop. In fact, such infinite failure will be treated as so serious that the tautologously true specification is the only one that it satisfies. Another inspiring insight which I share with the Fifth Generation project is that programs too are predicates. When given an appropriate reading, a program describes all possible observations of its behaviour under execution, all possible answers that it can give to any possible question. This insight is one of the most convincing justifications for the selection of logic programming as the basic paradigm for the Fifth Generation project. But I believe that the insight is much more general, and can be applied to programs expressed in other languages, and indeed to engineering products described in any meaningful design notation whatsoever. It gives rise to a general philosophy of engineering, which I shall illustrate briefly in this talk by application to hardware design, to conventional sequential programs, and even to the procedural interpretation of PROLOG programs. But it would be wholly invalid to claim that all predicates can be read as programs. Consider a simple but dramatic counter-example, the contradictory predicate logic, this can be assured with mathematical certainty by a proof of the simple implication P & -,p A very simple example of this philosophy is taken from the realm of procedural programming. Here the most important observable values are those which are observed before the program starts and those which are observed after the program is finished. Let us use the variable x to denote the initial value and let x' be the final value of an integer variable, the only one that need concern us now. Let the specification say that the value of the variable must be increased which is always false. No computer program (or anything else) can ever produce an answer which has a property P as well as its negation. So this predicate is not a program, and no processor could translate it into one which gives an answer with this self-contradictory property. Any theory which ascribes to an implement able program a behaviour which is known to be unimplementable must itself be incorrect. A programming language can therefore be identified with only a subset of the predicates of predicate calculus; each predicate in this subset is a precise description of all possible behaviours of some program expressible in the language. The subset is designed to exclude contradictions and all other unimplementable predicates; and the notations of the language are carefully restricted to maintain this exclusion. For example, predicates in PROLOG are restricted to those which are definable by Horn clauses; and in conventional languages, the restrictions are even more severe. In principle, these gross restrictions in expressive power make a programming language less suitable as a notation for describing requirements in a modular fashion at an appropriately high level of abstraction. The gap between a specification language and a programming language is one that must be bridged by the skill of the programmer. Given specification S, the task is to find a program P which satisfies it, in the sense that every possible observation of every possible behaviour of the program P will be among the behaviours described by (and therefore permitted by) the specification S. In f- P =? S. A simple explanation of what it means for a program to meet its specification is one of the main reasons for interpreting both programs 'and specifications within the predicate calculus. Now we can explain the necessity of excluding the contradictory predicate false from a programming notation. It is a theorem of elementary logic that f- false =? S, so false enjoys the miraculous property of satisfying every specification whatsoever. Such miracles do not exist; which is fortunate, because if they did we would never need anything else, certainly not programs nor programming languages nor computers nor fifth generation computer projects. 2 Examples S = (x' > x) Let the program add one to x P = (x:= x + 1) The behavioural reading of this program as a predicate describing its effect is P = (x' = x + 1) i.e., the final value of x is one more than its initial value. Every observation of the behaviour of P in any possible initial state x will satisfy this predicate. Consequently the Validity of the implication i.e., f- x' = x + 1 =? x' > x will ensure that P correctly meets its specification. So does the program x:=x+7, 213 but not x:= 2 xx. To illustrate the generality of my philosophy, my next examples will be drawn from the design of combinational hardware circuits. These can also be interpreted as predicates. A conventional and-gate with two input wires named a and b and a single output wire named x is described by a simple equation x = a A b. The values of the three free variables are observed as voltages on the named wires at the end of a particular cycle of operation. At that time, the voltage on the output wire x is the lesser of the voltages on the input wires a and b. Similarly, an or-gate can be described by a different predicate with different wires interest to the user of the product, and even the option of observing them is removed by enclosure, as it were, in a black box. The variables therefore need to be hidden or removed or abstracted from the predicate describing the observable behaviour of the assembly; and the standard way of eliminating free variables in the predicate calculus is by quantification. In the case of engineering designs, existential quantification is the right choice. It is necessary that there exist an observable value for the hidden variable; but no one cares exactly what value it is. A formal justification is as follows. Let S be the specification for the program P, and let x be the variable to be hidden in P. Clearly, one could never wish to hide a variable which is mentioned in the specification, so clearly x will not occur free in S. Now the designer's original proof obligation without hiding is ~ d = y V c, P S; =} and the proof obligation after hiding is i.e., the voltage on d is the greater of those on y and c. A simple wire is a device that maintains the same voltage at each of its ends, for example x = y. Now consider an .assembly of two components operating in parallel, for example the and-gate together with the or-gate. The two predicates describing the two components have no variables in common; this reflects the fact that there is absolutely no connection between them. Consequently, their simultaneous joint behaviour consists solely of their two independent behaviours, and is correctly described by just the conjunction of the predicates describing their separate behaviours (x=aAb) & (d=yVc) This simple example is a convincing illustration of the principle that parallel composition of components is nothing but conjunction of their predicates, at least in the case when there is no possibility of interaction between them. The principle often remains valid when the components are connected by variables which they share. For example, the wire which connects x with y can be added to the circuit, giving a triple conjunction (x = a A b) & (x = y) & (d = (y V c)). This still accurately describes the behaviour of the whole assembly. The predicate is mathematically equivalent to (d = (a A b) V c) & (x = y = (a A b)). When components are connected together in this way by the sharing of variable names (x and y), the values of the shared variables are usually of no concern or ~ (jx.P) =} S. By the predicate calculus, since x does not occur in S, these two proof obligations are the same. But often quantification simplifies, as in our hardware example, where the formula jx, y. x =a Ab & y =x & d = y V c, reduces to just d = (a A b) V c. This mentions only the visible external wires of the circuit, and probably expresses the intended specification of the little assembly. Unfortunately, not all conjunctions of predicates lead to implement able designs. Consider for example the conjunction of a negation circuit (y = -,x) with the wire (y = x), connecting its output back to its input. In practice, this assembly leads to something like an electrical short circuit, which is completely useless - or even worse than useless, because it will prevent proper operation of any other circuit in its vicinity. So there is no specification (other than the trivial specification true) which a short-circuited design can reasonably satisfy. But in our oversimplified theory, the predicted effect is exactly the opposite. The predicate describing the behaviour of the circuit is a self-contradiction, equivalent to false, which is necessarily unimplementable. One common solution to the problem is to place careful restrictions on the ways in which components can be combined in parallel by conjunction. For example, in combinational circuit design, it is usual to make a rigid distinction between input wires (like a or c) and output wires (like x or d). When two circuits are combined, the output wires of the first of them are allowed to be connected to the input wires of the second, but never 214 the other way round. This restriction is the very one that turns a parallel composition into one of its least interesting special cases, namely sequential composition. This means that the computation of the outputs of the second component has to be delayed until completion of the computation of the outputs of the first component. Another solution is to introduce sufficient new values and variables into the theory to ensure that one can describe all possible ways in which an actual product or assembly can go wrong. In the example of circuits, this requires at least a three-valued logic: in addition to high voltage and low voltage, we introduce an additional value (written 1-, and pronounced "bottom"), which is observed on a wire that is connected simultaneously both to high voltage and to low voltage, i.e., a short circuit. We define the result of any operation on 1to give the answer 1-. Now we can solve the problem of the circuit with feedback, specified by the conjunction x = -'y & y =x In three-valued logic, this is no longer a falsehood: in fact it correctly implies that both the wires x and yare short circuited x = y = 1-. The moral of this example is that predicates describing the behaviour of a design must also be capable of describing all the ways in which the design may go wrong. It is only a theory which correctly models the possibility of error that can offer any assistance in avoiding it. If parallelism is conjunction of predicates, disjunction is equally simply explained as introducing non-determinism into specifications, designs and implementations. If P and Q are predicates, their disjunction (P V Q) describes a product that may behave as P or as Q, but does not determine which it shall be. Consequently, you cannot control or predict the result. If you want (P V Q) to satisfy a specification S, it is necessary (and sufficient) to prove both that P satisfies S and that Q satisfies S. This is exactly the defining principl~ of disjunction in the predicate calculus: it is the least upper bound of the implication ordering. This single principle encapsulates all you will ever need to know about the traditionally vexatious topic of non-determinism. For example, it follows from this principle that non-deterministic specifications are in general easier to implement, because they offer a range of options; but non-deterministic implementations are more difficult to use, because they meet only weaker specifications. Apart from conjunction (which can under certain restrictions be implemented by parallelism), and disjunction (which permits non-deterministic implementation), the remaining important operator of the predicate calculus is negation. What does that correspond to in programming? The answer is: nothing! Arguments about computahility show that it can never be implemented, because the complement of a recursively enumerable set is not in general recursively enumerable. A commonsense argument is equally persuasive. It would certainly be nice and easy to write a program that causes an explosion in the process which it is supposed to control. It would be nice to get a computer to execute the negation of this program, and so ensure that the explosion never occurs. Unfortunately and obviously this is impossible. Negation is obviously the right way to specify the absence of explosion, but it cannot be used in implementation. That is one of the main reasons why implementation is in principle more difficult than specification. Of course, negation can be used in certain parts of programs, for example, in Boolean expressions: but it can never be used to negate the program as a whole. We will see later that PROLOG negation is very different from the kind of Boolean negation used in specifications. The most important feature of a programming lan- . guage is recursion. It is only recursion (or iteration, which is a special case) that permits a program to be shorter than its execution trace. The behaviour of a program defined recursively can most simply be described by using recursion in the definition of the corresponding predicate. Let P(X) be some predicate containing occurrences of a predicate variable X. Then X can be defined recursively by an equation stating that X is a fixed point of P X ~ P(X). But this definition is meaningful only if the equation has a solution; this is guaranteed by the famous Tarski theorem, provided that P(X) is a monotonic function of the predicate variable X. Fortunately, this fact is guaranteed in any programming language which avoids nonmonotonic operators like negation. If there is more than one solution to the defining equation, we need to specify which one we want; and the answer is that we want the weakest solution, the one that is easiest to implement. (Technically, I have assumed that the predicate calculus is a complete lattice: to achieve this I need to embed it into set theory in the obvious way .) The most characteristic feature of computer programs in almost any language is sequential composition. If P and Q are programs, the notation (P,Q) stands for a program which starts like P; but when P terminates, it applies Q to the results produced by P. In a conventional programming language, this is easily defined in predicate notation as relational composition, using conjunction followed by hiding in exactly the same way as our earlier combinational circuit. Let x stand for an observation of the initial state of all variables of a program, and let x' stand for the final state. Either or both of these may take the special value 1-, standing for nontermination or infinite failure, which is one of the worst ways in which a program can go wrong. Each program is a predicate P(x,x') or Q(x,x'), describing a relation 215 between the initial state x and the final state x'. For example, there is an identity program II (a null operation), which terminates without making any change to its initial state. But it can do this only if it starts in a proper state, which is not already failed II ~f (X =I ..L => x' = X). Sequential composition of P and Q in a conventional language means that the initial state of Q is the same as the final state produced by P; however the value of this intermediate state passed from P to Q is hidden by existential quantification, so that the only remaining observable variables are the initial state of P and the final state of Q. More formally, the composition (P, Q) is a predicate with two free variables (x and x') which is defined in terms of P and Q, each of which are also predicates with two free variables (P, Q)(x, x') ~f 3y. P(x, y) & Q(y, x'). Care must be taken in the definition of the programming language to ensure that sequential composition never becomes self-contradictory. A sufficient condition to achieve this is that when either x or x' take the failure value ..L, then the behaviour of the program is entirely unpredictable: anything whatsoever may happen. The condition may be formalised by the statement that for all predicates P which represent a program \lx'.P(..L, x') Also, composition is associative; to follow the pair of operations (P, Q) by R is the same as following P by the pair of operations (Q, R) ((P,Q),R) 3 = (P, (Q,R)). PROLOG In its procedural reading, a PROLOG program also has an initial state and a result; and its behaviour can be described by a predicate defining the relation between these two. Of course this is quite different from the predicate associated with the logical reading. It will be more complicated and perhaps less attractive; but it will have the advantage of accurately describing the behaviour of a computer executing the program, while retaining the possibility of reasoning logically about its consequences. The initial state of a PROLOG program is a substitution, which allocates to each relevant variable a symbolic expression standing for the most general form of value which that variable is known to take. Such a substitution is generally called O. The result 0' of a PROLOG program differs from that of a conventional language. It is not a single substitution, but rather a sequence of answer substitutions, which may be delivered one after the other on request.. For example, the familiar PROLOG program append (X, Y, Z) and \Ix. P(x,..L) => \lx'.P(X, x'). The imposition of this condition does complicate the theory, and it requires the theorist to prove that all programs expressible in the notations of the programming language will satisfy it. For example, the null operation II satisfies it; and for any two predicates P and Q which satisfy the condition, so does their sequential composition (P, Q), and their disjunction P V Q, and even their conjunction (P " Q), provided that they have no variables in common. As a consequence any program written only in these restricted notations will always satisfy the required conditions. Such programs can therefore never be equivalent to false, which certainly does not satisfy these conditions. The only reason for undertaking all this work is to enable us to reason correctly about the properties of programs and the languages in which they are written. The simplest method of reasoning is by symbolic calculation using algebraic equations which have been proved correct in the theory. For example, to compose the null operation II before or after a program P does not change P. Algebraically this is expressed in a law stating that II is the unit of sequential composition (P, IT) = P = (IT, P). may be started in the state Z = [1,2]. It will then produce on demand a sequence of three answer states X X X [], Y [1], [1,2], Y Y [1,2] [2] [ ]. Infinite failure is modelled as before by the special state ..L; when it occurs, it is always the last answer in the sequence. Finite failure is represented by the empty sequence [ ]; and the program NO is defined as one that always fails in this way NO(O,O' ) d:1 (0 =I ..L => Of = [ ]). The program that gives an affirmative answer is the program YES; but the answer it gives is no more than what is known already, packaged as a sequence with only one element Y ES(O, 0' ) ~f (0 = .L => 0' = [0]). 216 A guard in PROLOG is a Boolean condition b applied to the initial state () to give the answer YES or NO b((), e') ~ V e' = [e] & (M) e' = [ ] & (oM). Examples of such conditions are VAR and NONVAR. The effect of the PROLOG or(P; Q) is obtained by just appending the sequence of answers provided by the second operand Q to the sequence provided by the first operand P; and each operand starts in the same initial state (P; Q)((), ()') ~f :lX, Y. P((), X) & Q((), Y) & append(X, Y, e). The definition of append is the same as usual, except for an additional clause which makes the result of infinite failure unpredictable append ([.1], Y, Z) append ([ ], Y, Y) append ([XIX s], Y, [XIZs]) :- append (Xs,Y,Zs). In all good mathematical theories, every definition should be followed by a collection of theorems, describing useful properties of the newly defined concept. Since NO gives no answer, its addition to a list of answers supply by P can make no difference, so NO is the unit of PROLOG semicolon NO;P = P = P;NO. and concat ([ ], [ ]) con cat ([XIXs]' Z) :- append (X, Y, Z) & concat(X s, Y) The idea is much simpler than its formal definition; its simplicity is revealed by the algebraic laws which can be derived from it. Like composition in a conventional language, it is associative and has a unit YES P, (Q,R) = (P, Q),R (YES,P) = P But if the first argument fails finitely, so does its composition with anything else (NO,P) = P; (Q; R). The PROLOG conjunction is very similar to sequential composition, modified systematically to deal with a sequence of results instead of a single one. Each result of the sequence X produced by the first argument P is taken as an initial state for an activation of the second argument Q; and all the sequences produced by Q are concatenated together to. give the overall result of the composition (P, Q)(e, e') ~f :lX, Y. pee, X) & & each (X, Y) con cat (Y, ()') where = NO. However (P, NO) is unequal to NO, because P may fail infinitely; the converse law therefore has to be weakened to an implication NO => (P,NO). Finally, sequential composition distributes leftward through PROLOG disjunction ((P; Q), R) = (P, R); (Q, R). But the complementary law of rightward distribution certainly does not hold. For example, let P always produce answer 1 and let Q always produce answer 2. When R produces many answers, (R, (P; Q)) produces answers Similarly, the associative property of appending lifts to the composition of programs (P; Q); R = (P,YES). 1,2,1,2, ... whereas (R, P); (R, Q) produces 1,1,1, ... ,2,2,2 .... Many of our algebraic laws describe the ways in which PROLOG disjunction and conjunction are similar to their logical reading in a Boolean algebra; and the absence of expected laws also shows clearly where the traditionallogical reading diverges from the procedural one. It is the logical properties of the procedural reading that we are exploring now. The acid test of our procedural semantics for PROLOG is its ability to deal with the non-logical features like the cut (!), which I will treat in a slightly simplified form. A program that has been cut can produce at most one result, namely the first result that it would have produced anyway each ([ ], [ ]) each ([XIXs], [YIY s]) '- Q(X, Y) & each (Xs, Ys) P!((), ()') ~f :lX. pee, X) & trunc (X, ()'). 217 The truncation operation preserves both infinite and finite failure; and otherwise selects the first element of a sequence trunc ([1-], Y) trunc ([ ], [ ]) trunc ([XIX s], [Xl). A program that already produces at most one result is unchanged when cut again P!!=P! If only one result is wanted from a composite program, then in many cases only one result is needed from its components (P; Q)! = (P!; Q!)! (P, Q)! = (P, Q!)! Finally, YES and NO are unaffected by cutting YES! = YES, NO! = NO. PROLOG negation is no more problematic than the cut. It turns a negative answer into a positive one, a non-negative answer into a negative one, and preserves infinite failure rv P((}, 0') *! 3Y. P((}, Y) & neg (Y,O') where A striking difference between PROLOG negation and Boolean negation is expressed in the law that the negation of an infinitely failing program also leads to infinite failure rv true = true. This states that true is a fixed point of negation; since it is the weakest of all predicates, there can be no fixed point weaker than it (J.LX. rv = X) true. This correctly predicts that a program which just calls its own negation recursively will fail to terminate. That concludes my simple account of the basic structures of PROLOG. They are all deterministic in the sense that (in the absence of infinite failure) for any given initial substitution (), there is exactly one answer sequence ()' that can be produced by the program. But the great advantage of reading programs as predicates is the simple way in which non-determinism can be introduced. For example, many researchers have proposed to improve the sequential or of PROLOG. One improvement is to make it commute like true disjunction, and another is to allow parallel execution of both operands, with arbitrary interleaving of their two results. These two advantages can be achieved by the definition (PIIQ)(O,(}') *! 3X, Y. P(O,X) & Q(O, Y) & inter (X, Y, 0') where the definition of interleaving is tedious but routine neg ([1-], Z) neg ([ ], [OJ) neg([XIXs],[ l). The laws governing PROLOG negation of truth values are the same as those for Boolean negation rv YES = NO and rv NO = YES. The classical law of double negation has to be weakened to intuitionistic triple negation rvrvrv P = rv P. Since a negated program gives at most one answer, cutting it makes no difference Finally, there is an astonishing analogue of one of the familiar laws of de Morgan rv (P; Q) = (rv P, rv Q). The right hand side is obviously much more efficient to compute, so this law could be very effective in optimisation. The dual law, however, does not hold. inter inter inter inter ([1-], Y, Z) inter (X, [1-], Z) inter (X, [ ], X) ([ ], Y, Y) ([XIXs]' Y, [XIZ] :- inter (Xs, Y, Z) (X, [YIY s], [YIZ]) :- inter (X, Y s, Z). Because appending is just a special case of interleaving, we know append(X, Y, Z) =} inter (X, Y, Z). Consequently, sequential or is just a special case of parallel or, and is always a valid implementation of it (P; Q) =} (PIIQ). The left hand side of the implication is more deterministic than the right; it is easier to predict and to control; it meets every specification which the right hand side also meets, and maybe more. In short, sequential or is in all ways and in all circumstances better than the parallel or - in all ways except one: it may be slower to implement on a parallel machine. In principle nondeterminism is demonic; it never makes programming easier, and its only possible advantage is an increase in performance. However, in many cases (including this one) non-determinism also simplifies specifications and 218 designs, and facilitates reasoning about them at higher levels of abstraction. My final example is yet another kind of disjunction, one that is characteristic of a commit operation in a constraint language. The answers given are those of exactly one of the two alternatives, the selection being usually non-deterministic: the only exception is in the case when one of the operands fails finitely, in which case the other one is selected. So the only case when the answer is empty is when both operands give an empty answer ( P ~ Q) ~f = [ ]) # [ ]) & P & Q) & (P V Q)) V P(O, -1.) V Q(O, -1.). ( (0' V ((0' (The last two clauses are needed to satisfy the special con di tions described earlier). The definition is almost identical to that of the alternative command in Communicating Sequential Processes, from which I have taken the notation. It permits an implementation which starts executing both P and Q in parallel, and selects the one which first comes up with an answer. If the first elements of P and Q are guards, this gives the effect of flat Guarded Horn Clauses. 4 Conclusion In all branches of applied mathematics and engineering, solutions have to be expressed in notations more restricted than those in which the original problems were formulated, and those in which the solutions are calculated or proved correct. Indeed, that is the very nature of the problem of solving problems. For example, if the problem is • Find the GCD of 3 and 4 a perfectly correct answer is the trivially easy one • the GCD of 3 and 4; but this does not satisfy the implicit requirement that the answer be expressed in a much more restricted notation, namely that of numerals. The proponents of PROLOG have found an extremely ingenious technique to smooth (or maybe obscure) the sharpness of the distinction between notations used for specification and those used for implementation. They actually use the same PROLOG notation for both purposes, by simply giving it two different meanings: a declarative meaning for purposes of specification, and a procedural meaning for purposes of execution. In the case of each particular program the programmer's task is to ensure that these two readings are consistent. Perhaps my investigation of the logical properties of the procedural reading will assist in this task, or at least explain why it is such a difficult one. Clearly, the task would be simpler in a language in which the logical and procedural readings are even closer than they are in PROLOG. This ideal has inspired many excellent proposals in the development of logic and constraint languages. The symmetric parallel version of disjunction is a good example. A successful result of this research is still an engineering compromise between the expressive power needed for simple and perspicuous specification, and operational orientation towards the technology needed for cost-effective implementation. Such a compromise will (I hope) be acceptable and useful, as PROLOG already is, in a wide range of circumstances and applications. In the remaining cases, I would like to maintain as far as possible the inspiration of the Fifth Generation Computing project, and the benefits of a logical approach to programming. To achieve this, I would give greater freedom of expression to those engaged in formalisation of the specification of requirements, and greater freedom of choice to those engaged in the design of efficiently implementable programming languages. This can be achieved only by recognition of the essential dichotomy of the languages used for these two purposes. The dichotomy can be resolved by embedding both languages in the same mathematical theory, and using logical implication to establish correctness. But what I have described is only the beginning,nothing more than a vague pointer to a whole new direction and method of research into programming languages and programming methodology. If any of my audience is looking for a challenge to inspire the next ten years of research, may I suggest this one? If you respond to the challenge, the programming languages of the future will not only permit efficient parallel and even non-deterministic implementations; they will also help the analyst more simply to capture and formalise the requirements of clients and customers; and then help the programmer by systematic design methods to exercise inventive skills in meeting those requirements with high reliability and low cost. I hope I have explained to all of you why I think this is important and exciting. Thank you again for this opportunity to do so. Acknowledgements I am grateful to Mike Spivey, He Jifeng, Robin Milner, John Lloyd, and Alan Bundy for assistance in preparation of this address. PROCEEDINGS OF THE INTERNATIONAL CONFERENCE O~ FIFTH GENERATION COMPUTER SYSTEMS 1992, edIted by ICOT. © ICOT, 1992 219 PANEL: A Springboard for Information Processing in the 21st Century Chairman: Robert A. Kowalski Imperial College of Science, Technology and Medicine Department of Computing, 180 Queen's Gate, London SW7 2BZ, England rak@doc.ic.ac.uk In general terms, the question to be addressed by the panel is simply whether the Fifth Generation technologies, developed at ICOT and other centres throughout the world, will lead the development of information processing in the next century. Considered in isolation, the most characteristic of these technolOgies are: • • • knowledge information processing applications, concurrent and constraint logic programming languages, and parallel computer architectures. But it is the integration of these technologies, using logic programming to implement applications, and using multiple instruction, multiple data (MIMD) parallelism to implement logic programming, which is the most distinguishing characteristic of the Fifth Generation Project. To assess the future prospects of the Fifth Generation technologies, we need to consider the alternatives. Might multi-media, communications, or data process'ing, for example, be more characteristic than artificial intelligence of the applications of the future? Might objectorientation be more characteristic of the languages; and sequential, SIMD, MISD, or massively parallel connectionist computers be more typical of the computer architectures? Certainly many of these technologies have been flourishing during the last few years. Old applications still seem to dominate computing, at the expense of new Artificial Intelligence applications. Object-orientation has emerged as an alternative language paradigm, apparently better suited than logic programming for upgrading existing imperative software. Both conventional and radically new connectionist architectures have made rapid progress, while effective MIMD architectures are only now beginning to appear. But it may be wrong to think of these alternatives as competitors to the Fifth Generation technologies. Advanced database and data processing systems increasingly use Artificial Intelligence techniques for knowledge representation and reasoning. Increasingly many database and programming language systems have begun to combine features of object-orientation and logic programming. At the level of computer architectures too, there seems to be a growing consensus that connectionism complements symbolic processing, in the same way that subsymbolic human perception complements higherlevel human reasoning. But, because it provides the crucial link between applications and computer architectures, it is with the future of computer languages that we must be most concerned. The history of computer languages can be viewed as a slow, but steady evolution away from languages that reflect the structure and behaviour of machines to languages that more directly support human modes of communication. It is relevant to the prospects of logic programming in computing, therefore, that logic programming has begun to have a great influence, in recent years, on models of human languages and human reasoning outside computing. This influence includes contributions to the development of logic itself, to the development of "logic grammars" in computational linguistics, to the modelling of common sense and non-monotonic reasoning in cognitive science, and to the formalisation of legal language and legal reasoning. Thus, if computer languages in the future continue to become more like human languages, as they have in the past, then the future of logic programming in computing, and the future impact of the Fifth Generation technologies in general, must be assured. PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON FIFTH GENERATION COMPUTER SYSTEMS 1992, edited by ICOT. © ICOT, 1992 220 Finding the Best Route for Logic Programming Herve Oallaire OSI 25 Bd de l' Amiral Bruix, 75782 Paris Cedex 16 France gaUaire@ gsi.fr Abstract The panel chainnan has asked us to deal with two questions relating Logic Programming (LP) to computing. They have to do with whether LP is appropriate (the most appropriate?) as a springboard for computing as a whole in the 21st century, or whether it is so only for aspects (characteristics) of computing. I do not think that there is a definite answer to these questions until one discusses the perspective from which they are asked or from which their answer is to be given. In summary, we can be very positive that LP will play an important role, but only if it migrates into other leading environments. 1 Which Perspective To Look From We are asked to talk about directions for the future, for research as well as for development. Clearly, for me, there will not be a Yes/No answer to the questions debated on this panel. I don't shy away, but at the same time there are too many real questions behind the ones we are asked to address. Thus, I will pick the one aspects I am mostly connected to: research on deductive databases and constraint languages, experience in commercial applications development and in building architectures for such commercial developments. Whether these different perspectives lead to a coherent picture is questionable. If I ask the question relative to computing as a whole, I can ask it from the perspective of a researcher, from that of a manufacturer, from that of a buyer of such systems and ask whether LP is the pervasive paradigm that will be the underlying foundation of computing as a whole from each of these perspectives. If I ask the question relative to the characteristics of computing, I can look at computing from the perspective of an end-user, of an application developer (in fact from many such applications, e.g. scientific, business, CAD, decision support, teaching, office support, ... ), of a system developer, of a language developer, of an architecture engineer, of a tool developer (again there are many such tools, e.g. software engineering, application analyst, etc). I can even look at it from the perspective of research in each of the domains related to the perspectives just listed, for example a researcher in user interface systems, a researcher in software engineering, in database languages, in knowledge representation, etc. But the picture is even more complicated than it appears here; indeed I can now add a further dimension to the idea of perspective elaborated upon here. Namely I can ask whether LP is to be seen as the "real thing" or whether it is to be an abstract model essentially. For example, ask whether it is a good encompassing model for all research aspects of computing, for some of them (the perspectives), whether it is a good abstract model for computations, for infonnation systems, for business models, even if they do not appear in this fonn to their users, this being asked for each type of computation carried out in a computing system. Looking at these questions is to study whether LP should be the basis of the view of the world as manipulated at each or some of the following levels: user's level, at system level, at application designer level, at research level, ... or whether it should only be a model of it, i.e. a model in which they basic problems of the world (at that level) are studied, and that the two would match only in some occasions. 2 Global Perspective I think we have to recognise that the world is defini tely never going to be a one level world (ie providing in hardware a direct implementation of the world view); second that the world view will be made of multiple views; third we have to' accept that different views will need different tools to study a version of a problem at that level; and fourth that it may be appropriate to use abstractions to get the appropriate knowledge into play. Consequently, neither LP nor any other paradigm will be the underlying foundation for computing; it is very appropriate however, for each paradigm to ask what its limits are. This is what has been my understanding of most projects around LP in the past ten to fifteen years; trying several angles, pushing to the limits. Developing hardware for example is one such worthwhile effort. 221 3 Model and Research Perspective As a model of computing, from a research perspective, LP will continue to develop as the major candidate for giving a "coherent" view of the world, a seamless integration of the different needs of a computing system for which it has given good models. To come to examples, I believe that LP has made major contributions in the following areas: rule-based programming, with particularly results on deductive databases, on problem solving and AI, specific logics for time and belief, sol utions to problems dealing with negation, to those dealing with constraint programming and to those dealing with concurrent programming. It will continue to do so for quite some time. In some cases it will achieve a dominant position; in others it will not, even if it remains a useful formalism. In the directions of research at ECRC, we have not attempted to get such a unified framework, even though we have tried to use whatever was understood in one area of research into the others (eg, constraints and parallelism, constraints and negation, .. ). LP will not achieve the status of being the unique encompassing model adopted by everyone. Indeed, there are theoretical reasons that have to do with equivalence results and the human intelligence which makes it very unlikely that a given formalism will be accepted as the unique formalism to study. Further, there is the fact that the more we study, the more likely it is that we have to invent formalisms at the right level of abstraction for the problems at hand. Mapping this to existing formalisms is often possible but cumbersome. This has the side advantage that formalisms evolve as they target new abstractions; LP has followed that path. 4 need to keep the continuity with the so-called legacy applications is perhaps even stronger than fads. To propose a new computing paradigm to affect the daily work of any of the professionals (whether they develop new code or use it) is a very risky task. C++ is a C based language; we have no equivalent to a Cobol based logic language. And still, c++ is not a pure object oriented language. The reason why the entity-relationship modeling technique (and research) is successful in the business place is that it has been seen as an extension of the current practices (Cobol, relational) not as a rupture with them. SQL is still far from incorporating extensions that LP can already provide but has not well explained: where are the industrial examples of the recursive rules expressed in LP? what is the benefit (cost, performance, ... ) of stating business rules this way as opposed to programming; and without recursion, or with limited deductive capabilities, relational systems do without logic or just borrow from it; isn't logic too powerful a formalism for many cases? LP, just like AI based technology, has not been presented as an extension of existing engines; rather it has been seen as alternatives to existing solutions, not well integrated with them; it has suffered, like AI from that situation. Are there then new areas where LP can take a major share of the solution space? In the area of constraint languages, there is no true market yet for any such language; and the need for integration to the existing environments is of a rather different nature; it may be sufficient to provide interfaces rather than integration. A not to be overlooked problem, however is that when it is embedded in logic, constraint programming needs a complex engine, that of logic; when it is embedded in C, even if it is less powerful or if it takes more to develop it (hiding its logical basis in some sense), it will appear less risky to the industrial partners who will use or build it. Commercial Perspective As a tool for computing in general, from a business or manufacturer's point of view LP has not achieved the status that we believed it would. Logic has found, at best, some niches where it can be seen as a potential commercial player (there are many Prolog programs embedded in several CASE tools for example, natural language tools are another example). When it comes to the industrial or commercial world things are not so different from those in the academic or research world: the resistance to new ideas is strong too, although for different reasons. Research results being very often unconc1usive when it comes to their actual relevance or benefits in practical terms, only little risk is taken. Fads play an important role in that world where technical matters are secondary to financial or management matters; the object technology is a fad, but fortunately it is more than that and will bring real benefits to those adopting it. We have not explained LP in terms as easy to understand as done in the object world (modularity, encapsulation in particular). The 5 More Efforts Needed Let me mention three areas where success can be reached, given the current results, but where more efforts are needed. Constraint based packages for different business domains, such as transportation, job shop scheduling, personnel assignment, etc will be winners in a competitive world; but pay attention to less ambitious solutions in more traditional languages. Case tools and repositories will use heavily logic based tools, particularly the deductive database technology, when we combine it with the object based technology for what each is good at. Third and perhaps more importantly, there is a big challenge to be won. My appreciation of computing evolution is as follows: there will be new paradigms in terms of "how to get work done by a computer"; this will revolve around some simple notions: applications and systems will be packaged as objects and run as distributed object systems, communicating through messages and events; forerunners of these technologies can 222 already be seen on the desktop (not as distributed tools), such as AppleEvents, OLE and VisualBasic, etc and also in new operating systems or layers just above them (e.g. Chorus, CORBA, NewVave, etc). Applications will be written in whatever formalism is most appropriate for the task they have to solve, provided they offer the right interface to the communication mechanism; these mechanisms will become standardised. I believe that concurrent and constraint logic languages have a very important role to play in expressing how to combine existing applications (objects, modules). If LP had indeed. the role of a conductor for distributed and parallel applications, it would be very exciting; it is possible. Following a very similar analysis, I think that LP rules, particularly when they are declaratively used, are what's needed I to express business rules relating and coordinating business objects as perceived by designers and users. To demonstrate these ideas, more people, knowledgeable in LP need to work on industrial strength products, packaging LP and its extensions and not selling raw engines; then there will be more industrial interest in logic, which in the longer term will trigger and guarantee adequate research levels. This is what I have always argued was needed to be done as a follow up of ECRC research, but I have not argued convincingly. This is what is being done with much enthusiasm by start ups around Prolog, by others around constraint languages, e.g. CHIP; this is what is being started by BULL on such a deductive and object oriented system. Much more risk taking is needed. 6 Conclusion From the above discussion the reader may be left with a somewhat mixed impression as to the future of our field; this is certainly not the intent. The future is bright, provided we understand where it lies. LP will hold its rank in the research as well as in the professional worlds. The major efforts that the 1980's have seen in this domain have played an essential role in preparing this future. The Japanese results, as well as the results obtained in Europe and in the USA, are significant in terms of research and of potential industrial impact. The major efforts, particularly the most systematic one, namely the Fifth Generation Project, may have had goals either too ambitious or not thoroughly understood by many. If we understand where to act, then there is a commercial future for logic. At any rate, research remains a necessity in this area. PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON FIFTH GENERATION COMPUTER SYSTEMS 1992, edited by ICOT. © ICOT, 1992 223 The Role of Logic Programming in the 21st Century Ross Overbeek Mathematics and Computer Science Division Argonne National Laboratory, Argonne, Illinois 60439 overbeek@mcs The Changing Role 1 Logic programming currently plays a relatively minor role in scientific problem-solving. Whether this role will increase in the twenty-first century hinges on one question: When will there be a large and growing number of applications for which the best available software is based on logic programming? It is not enough that there exist a few small, peripheral applications successfully based on logic programming; the virtues of logic programming must be substantial enough to translate into superior applications programs. 1.1 Applications Applications based on logic programming are starting to emerge in three distinct contexts: 1. Applications based on the expressi ve power of logic programming in the dialects that support backtracking and the use of constraints. These applications frequently center on small, but highly structured databases and benefit dramatically from the ability to develop prototypes rapidly. 2. Parallel applications in which the expressive power of the software environment is the key issue. These applications arise from issues of real-time control. As soon as the performance adequately supports the necessary response, the simplicity and elegance of the solution become most important. In this context, dialects of committed-choice logic programming have made valuable contributions. 3. Parallel applications in which performance is the dominant issue. In these applications, successful solutions have been developed in which the upper levels of the algorithm are all implemented in a committed-choice dialect, and the lower layers in C or Fortran. What is striking about these three contexts is that they have not been successfully addressed within a unified framework. Indeed, we are still far from achieving such a framework. 1.2 Unification of Viewpoints Will a successful unification based on logic programming and parallelism emerge as a dominant technology? Two distinct answers to this question arise: No, the use of logic programming will expand within the distinct application areas that are emerging. Logic programming will play an expanding role in the area of information processing (based on complex databases), which will see explosive growth in the Unix/C, workstation, mass software, and networking markets. On the other hand, logic programming will play quite a different role in the context of parallel computation. While an integration of the two roles is theoretically achievable, in practice it will not occur. Yes, a single technology will be adopted that is capable of reducing complexity. Developing such a technology is an extremely difficult task, and it is doubtful that integration could have proceeded substantially faster. Now, however, the fundamental insights required to achieve an integration are beginning to occur. The computational framework of the twenty-first century-a framework dominated by advanced automation, parallel applications, and distributed processing-must be based on a technology that allows simple software solutions. I do not consider these viewpoints to be essentially contradictory; there is an element of truth in each. It seems clear to me that the development and adoption of an integrated solution must be guided by attempts to solve demanding applications requirements. In the short run, this will mean attempts to build systems upon existing, proven technology. The successful development of a unified computational framework based on logic programming will almost certainly not occur unless there is a short-term effort that develops successful a.pplications for the current computing market. However, the complex automation applications that will characterize the next century simply cannot be adequately addressed from within a computational framework that fails to solve the needs of both distributed computation and knowledge information processing. The continued development of logic programming will require a serious effort to produce new solutions to sig- 224 nificant applications-solutions that are better than any existing solutions. The logic programming community has viewed its central goal as the development of an elegant computational paradigm, along with a demonstration that such a paradigm could be realized. Relatively few individuals have taken seriously the task of demonstrating the superiority of the new technology in the context of applications development. It is now time to change this situation. The logic programming community must form relationships with the very best researchers in important application areas, and learn what is required to produce superior software in these areas. 2 My Own Experiences parallel systems. We find ourselves limited, however, because of load-balancing problems, which are difficult to address properly in the context of the tools we chose. We are now rewriting the code using bilingual programming, with the upper levels coded in PCN (a la.nguage deriving much of its basic structure from committedchoice logic programming languages) and its lower levels in C. This app~oach will provide a framework for addressing the parallel processing issues in the most suitable manner, while allowing us to optimize the critical lower-level floating-point computations. This experience seems typical to me, and I believe that future systems will evolve to support this programming paradigm. 3 Summary Let me speak briefly about my own experiences in workBalance between the short-term view and the longering on computational problems associated with the analrange issues relating to an adequate integration is necesysis of biological genomes. Certainly, the advances in sary to achieve success for logic programming. The need molecular biology are leading to a wonderful opportuto create an environment to support distributed applicanity for mankind. In particular, computer scientists can make a significant contribution to our understanding of tions will grow dramatically during the 1990s. Exactly the fundamental processes that sustain life. Molecular biwhen a solution will emerge is still in doubt; however, it ology has also provided a framework for investigating the does seem likely that such an environment will become a utility of technologies like logic programming and parallel fundamental technology in the early twenty-first century. processing. Whether logic programming plays a central role will depend critically on efforts in Japan, Europe, and America I believe that the first successful integrated databases during this decade. If these efforts are not successful, less to support investigations of genomic data will be based elegant solutions will become adopted and entrenched. on logic programming. The reason is that logic programThis issue represents both a grand challenge and a ming offers the ability to do rapid prototyping, to integrand opportunity. Which approach will dominate in grate database access with computation, and to handle complex data. Other approaches simply lack the capa- . the next century has not yet been determined; only the significance of developing the appropriate technology is bilities required to develop successful genomic databases. Current work in Europe, Japan, and America on databases completely clear. to maintain sequence data, mapping data, and metabolic data all convince me that the best systems will emerge Acknowledgments from those groups who base their efforts on logic programming. This work was supported in part by the Applied MatheNow let me move to a second area-parallel processmatical Sciences subprogram of the Office of Energy Reing. Only a very limited set of applications really requires search, U.S. Department of Energy, under Contract 'ATthe use of parallel processing; however, some of these ap31-109-Eng-38. plications are of major importance. As an example, let me cite a project in which I was involved. Our group at Argonne participated in a successful collaboration with Gary Olsen, a biologist at the University of Illinois, and with Hideo Matsuda of Kobe University. Vve were able to create a tool for inferring phylogenetic trees using a maximum likelihood algorithm, and to produce trees that were 30-40 times more complex than any reported in the literature. This work was done using the Intel Touchstone DELTA System, a massively parallel system containing 540 i860 nodes. For a number of reasons, our original code was developed in C. We created a successful tool that exhibited the required performance on both uniprocessors and larger PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON FIFTH GENERATION COMPUTER SYSTEMS 1992, edited by ICOT. © ICOT, 1992 225 Object-Based Versus Logic Programming Peter Wegner Brown University, Box 1910, Providence, RI. 02912 pw@cs.brown.edu Abstract: This position paper argues that mainstream application programming in the 21st century will be object-based rather than logic-based for the following reasons. 1) Object-based programs model application domains more directly than logic progmms. 2) Object-based programs have a more flexible program structure than logic programs. 3) Logic programs can be intractable, in part because the satisfiability problem is NP-complete. 4) Soundness limits the granularity of thinking while completeness limits its scope. 5) Inductive, abductive, probabilistic, and nonmonotonic reasoning sacrifice the certainty of deduction for greater heuristic effectiveness. 6) Extensions to deductive logic like nonmonotonic or probabilistic reasoning are better realized in a general computing environment than as extensions to logic programming languages. 7) Object-based systems are open in the sense of being both reactive and extensible, while logic programs are not reactive and have limited extensibility. 8) The don't-know nondeterminism of Prolog precludes reactiveness, while the don't-care nondeterminism of concurrent logic programs makes them nonlogical. 1. Modeling Power and Computability Object-based programs model application domains more directly than logic programs. Computability is an inadequate measure of modeling capability sfnce all programming languages are equivalent in their computing power. A finer (more discriminating) measure, called "modeling power", is proposed that is closely related to "expressive power", but singles out modeling as the specific form 'of expressiveness being studied. Features of object-based programming that contribute to its modeling power include: • assignment and object identity Objects have an identity that persists when their state changes. Objects with a mutable state capture the dynamically changing properties of real-world objects more directly than mathematical predicates of logic programs. • data abstraction by information hiding Objects specify the abstract properties of data by applicable operations without commitment to a data representation. Data abstraction is a more relevant form of abstraction for modeling than logical abstraction. • messages and communication Messages model communication among objects more effectively than logic variables. The mathematical behavior of individual objects can be captured by algebras or automoata, but communication and synchronization protocols actually used in practical object-based and concurrent systems have no neat mathematical models. These features are singled out because they cannot be easily expressed by logic programs. Shapiro [Shl] defines the comparative expressive power (modeling power) of two languages in terms of the difficulty of mapping programs of one language into the other. Language Ll is said to be more expressive than language L2 if programs of L2 can be easily mapped into those ofLI but the reverse mapping is difficult (according to a complexity metric for language mappings). The specification of comparative expressive power in terms of mappings between languages is not entirely satisfactory. For example, mapping assembly languages into problem-oriented languages is difficult because of lack of design rather than quality of design. However, when applied to two well-structured language classes like object-based and logic languages this approach does appear promising. Since logic programs have a procedural interpretation with goal atoms as procedure calls and logic variables as shared communication channels, logic programming can be viewed as a special (reductive) style of procedure-oriented programming. Though language features like nondeterminism, logic variables, and partially instantiated structures are not directly modeled, the basic structure of logic programs is procedural. In contrast, object-oriented programs in Smalltalk or C++ do not have a direct interpretation as logic programs, since objects and classes cannot be easily modeled. Computational objects that describe behavior by collections of operations sharing a hidden state cannot be easily mapped into logic program counterparts. 2. Limitations of Inference and Nondeterministic Control All deduction follows from the principle that if an element belongs to a set then it belongs to any superset. The Aristotelian syllogism "All humans are mortal, Socrates is human, therefore Socrates is mortal" infers that Socrates belongs to the superset of mortals from the fact that he belongs to the subset of humans. This problem can be specified in Prolog as follows: Prolog clause: mortal(x) f- human(x). Prolog fact: human(Socrates). Prolog goal: mortal(Socrates). The clause "mortal(x) f- human(x)", which specifies that the set of mortals is a superset of the set of humans, allows the goal "mortal(Socrates)" to be proved from the fact "human(Socrates)" . A Prolog clause of the form "P(x) lfQ(x)" asserts that the . set of facts or objects satisfying Q is a subset of those satisfying P, being equivalent to the assertion "For all x, Q(x) implies P(x)". A Prolog goal G(x) is true if there are facts in the data- 226 base that satisfy G by virtue of the set/subset relations implied by- the clauses of the Prolog program. Prolog resolution and unification allows the subset of all database facts satisfying G to be found by set/subset inference. Inferences of the form ltset(x) if subset(x)" are surprisingly powerful, permitting all of mathematics to be expressed in terms of set theory. But the exclusive use of "set if subset" inference for computation and/or thinking is unduly constraining, since both computation and thinking go beyond mere classification. Thinking includes heuristic mechanisms like generalization and free association that go beyond deduction. Nondeterminism is another powerful computation mechanism that limits the expressive power of logic programs. Prolog nondeterminically searches the complete goal tree for solutions that satisfy the goal. In a Prolog program with a predicate P appearing in the clause head of N clauses "P(Ai) ~ Bi" , a goal peA) triggers nondeterministic execution of those bodies Bi for which A unifies with Ai. This execution rule can be specified by a choice statement of the form: choice (Ai/Bi, A2/B2, ... , AN/BN) endchoice nondeterministically execute the bodies Bi of all clauses for which the clause head P(Ai} unifies with the goal peA). Bodies Bi are guarded by patterns Ai that must unify with A for Bi to qualify for execution. This form of nondeterminism is called don't-know nondeterminism because the programmer need not predict which inference paths lead to successful inference of the goal. Prolog programs explore all alternatives until a successful inference path is found and report failure only if no inference path allows the goal to be inferred. The order in which nondeterministic alternatives are explored is determined by the system rather than by the user, though the user can influence execution order by the order of listing alternatives. Depth-first search may cause unnecessary nonterminating computation, while breadth-first search avoids this problem but is usually less efficient. Prolog provides mechanisms like the cut which allows search mechanism's to be tampered with. This extra flexibility undermines the logical purity of Prolog programs. Sequential implementation of don't-know nondeterminism requires backtracking from failed inference paths so that the effects of failed computations become unobservable. Since pro. grams cannot commit to an observable output until a proof is complete, don't-know nondeterminism cannot be used as a computational model for reactive systems that respond to external stimuli and produce incremental output [Sb2]. 3. Intactability and Satis6ability Certain well-formulated problems like the halting problem for Turing machines are noncomputable. Practical computability ~s further restricted by the requirement of tractability. A problem IS tractable if its computation time grows no worse than polynomially with its size and intractable if its computation time grows at least exponentially. The class P of problems computable in polynomial time by a deterministic Turing machine is tractable, while the class NP of problems computable in polynomial time by a nondeterministic Turing machine has solutions checkable in polynomial time though it may take an exponential time to find them [GJ]. The question whether P = NP is open, but the current belief is that NP contains inherently intractable problems, like the satisfiability problem, that are not in P. The satisfiability problem is NP-complete; a polynomial time algorithm for satisfiability would allow all problems in NP to be solved in polynomial time. The fundamental problem of theorem proving, that of finding whether a goal can be satisfied, is therefore intractable unless it turns out that P = NP. The fact that satisfiability is intractable is not unacceptable especially when compared to the fact that computability is undecidable. But in practice exponential blowup arises more frequently in logic programming than undecidability arises in traditional programming. Sometimes the intractability is inherent in the sense that there is no tractable algorithm that solves the problem. But in many cases more careful analysis can yield a tractable algorithm. Consider for example the sorting problem which can be declaratively specified as the problem of finding an ordered permutation. sort(x} :- permutation(x}, ordered(x}. Direct execution of this specification requires n-factorial steps to sort n elements, while more careful anlysis yields algorithms like quicksort that require only n logn steps. High-level specifications of a problem by logic programs can lead to combinatorially intractable algorithms for problems that are combinatorially tractable when more carefully analyzed. The complexity of logic problem solving is often combinatorially unacceptable even when problems do have a solution. The intractability of the satisfiability problem causes some problems in artificial intelligence to become intractable when blindly reduced to logic, and provides a practical reason for being cautiousin the use of logic for problem solving. 4. Soundness, Completeness and Heuristic Reasoning Soundness assures the semantic accuracy of inference, requiring all provable assertions to be true, while completeness guarantees inference power, requiring all true assertions to be provable. However, soundness strongly constrains the granularitv of thinking, while completeness restricts its semantic scope. Sound reasoning cannot yield new knowledge; it can only make implicit knowledge explicit. Uncovering implicit knowledge may require creativity, for example when finding whether P = NP or Fermat's last theorem. But such creativity generally requires insights and constructions that go beyond deductive reasoning. The design and construction of software may likewise be viewed as uncovering implicit knowledge by creative processes that transcend deduction. The demonstration that a given solution is correct may be formally specified by "sound" reasoning, but the process of finding the solution is generally not deductive. Human problem solvers generally make use of heuristics that sacrifice soundness to increase the effectiveness of problem solving. McCarthy suggested supplementing formal systems by a heuristic advice taker as early as 1960 [OR], but this idea has not yet been successfully implemented, presumably because the mechanisms of heuristic problem solving are too difficult to automate. Heuristics that sacrifice soundness to gain inference power include inductive, abductive, and probabilistic forms of reasoning. Induction from a finite set of observations to a general law is central to empirical reasoning but is not deductively sound. Hume's demonstration that induction could not be justified by "pure reason" sent shock waves through nineteenth and twentieth century philosophy. Abductive explanation of effects by their potential causes is another heuristic that sacrifices soundness to permit plausible 227 though uncertain conclusions. Choice of the most probable explanation from a set of potential explanations is yet another form of unsound heuristic inference. Inductive, abductive, and probabilistic reasoning have an empirical justification that sacrifices certainty in the interests of common sense. Completeness limits thinking in a qualitatively different mann~r from soundness. Completeness constrains reasoning by commItment to a predefined (closed) domain of discourse. The requirement that all true assertions be provable requires a closed notion of truth that was shown by Godel to be inadequate for handling naturally occurring open mathematical domains like that of arithmetic. In guaranteeing the semantic adequacy of a set of axioms and rules of inference, completeness limits their semanti~ expressive~ess, making difficult any extension to capture a ncher semantIcs or refinement to capture more detailed semantic properties. Logic programs cannot easily be extended to handle nonformalized, and possibly nonformalizable, knowledge outside specific formalized domains. The notion of completeness for theories differs from that for logic; a theory is complete if it is sufficiently strong to determine the truth or falsity of all its primitive assertions. That is, if every ground atom of the theory is either true or false. Theories about observable domains are generally inductive or abductive generalizations from incomplete data that may be logically completed by uncertain assumptions about the truth or falsity of unobserved and as yet unproved ground atoms (facts) in the domain. For example, the closed-world assumption [GN] assumes that every fact not provable from the axioms is false. Such premature commitment to the falsity of nonprovable ground assertions may have to be revoked when new facts become known, thereby making reasoning based on the closedworld assumption nonmonotonic. Nonmonotonic reasoning is a fundamental extension that transforms logic into a more powerful reasoning mechanism. But there is a sense in which nonmonotonic reasoning violates the foundations of logic and may therefore be viewed as nonlogical. The benefits of extending logic to nonmonotonic reasoning must be weighed against the alternative of completely abandoning formal reasoning and adopting more empirical prinCiples of problem solving, like those of object-oriented programming. Attempts to generalize logic to nonmonotonic or heuristic reasoning, while intellectually interesting, may be pragmatically inappropriate as a means of increasing the power of human or computer problem solving. Such extensions to deductive logic are better realized in a general computing environment than as extensions to logic programming languages. Both complete logics and complete theories require an early commitment to a closed domain of discourse. While the closed-world assumption yields a different form of closedness than that of logical completeness or closed application programs, there is a sense in which these forms of being closed are related. In the next section the term open system is examined to characterize this notion as precisely as possible. 5. Open Systems A system is said to be an open system if its behavior can easily be modified and enhanced, either by interaction of the system with the environment or by programmer modification. 1. A reactive (interactive) system that can accept input from its environment to modify its behavior is an open system. 2. An extensible system whose functionality and/or number of components can be easily extended is an open system. Our definition includes systems that are reactive or extensi- b~e or both, reflecting the fact that a system can be open in many dIfferent ways. Extensibility can be intrinsic by interactive system evolution or extrinsic by programmer modification. Intrin- sic extensibility accords better with biological evolution and :-v ith human leami.ng and development, but extrinsic extensibility IS the more practIcal approach to software evolution. The following characterization of openness explicitly focuses on this distinction: 1. A system that can extend itself by interaction with its environment is an open system. 2. A system that can be extended by' programmer modification (usually because of its modularity) is an open system. Since extrinsic extensibility is extremely important from the point of view of cost-effective life-cycle management, it is viewed as sufficient to qualify a system as being open. While either one of these properties is sufficient to qualify a system as being open, the most flexible open systems are open in both these senses. Object-oriented systems are open systems in both the first and second senses. Objects are reactive server modules that accept messages from their environment and return a result. Systems of objects can be statically extended by modifying the behavior of already defined objects or by introducing new objects. Classes facilitate the abstract definition of behavior shared among a collection of objects, while inheritance allows new behavior to be defined incrementally in terms of how it modifies already defined behavior. Classes have the open/closed property [Me]; they are open when used by subclasses for behavior extension by inheritance, but are closed when used by objects to execute messages. The idea of open/closed subsystems that are both open for clients wishing to extend them and closed for clients wishing to execute them needs to be further explored. Logic languages exhibiting don't-know nondeterminism are not open in the first sense, while soundness and completeness restrict extensibility in the second sense. To realize reactive openness concurrent logic languages abandon don't-know nondeterminism in favor of don't-care nondeterminism, sacrificing logical completeness. Prolog programs can easily be extended by adding clauses and facts so they may be viewed as open in the second sense. But logical extension is very different from object-based extensibility by modifying and adding objects and classes. Because object-based languages directly model their domain of discourse, object-based extensibility generally reflects incremental extensions that arise in practice more directly than logical extension. 6. Don't-Care Nondeterminism Don't-care nondeterminism is explicitly used in concurrent languages to provide selective flexibility at entry points to modules. It is also a key implicit control mechanism for realizing selective flexibility in sequential object-based languages. Access to an object with operations opJ, op2, ... , opN is controlled by an implicit nondetermnistic select statement of the form: select (op1, op2, ... ,opN) endselect Execution in a sequential object-based system is deterministic from the viewpoint of the system as a whole, but is non- 228 deterministic from the viewpoint of each object considered as an isolated system. The object does not know which operation will be executed next, and must be prepared to select the next executable operation on the basis of pattern matching with an incoming message. Since no backtracking can occur, the nondeterminism is don't care (committed choice) nondeterminism. Concurrent porgramming languages like CSP and Ada have explicit don't care nondeterminism realized by guarded commands with guards Gi whose truth causes the associated body Bi to become a candidate for nondeterministic execution: select (GIIIBI, G211B2, ... ,GNlIBN) endselect The keyword select is used in place of the keyword choice to denote selective don't care nondeterminism. while guards are separated from bodies by II in place of I. Guarded commands, originally developed by Dijkstra, govern the selection of alternative operations at entry points of concurrently executable tasks. For example, concurrent access to a buffer with an APPEND operation executable when the buffer is not full and a REMOVE operation executable when the buffer is not empty can be specified as follows: select (notjullIlAPPEND, notemptyliREMOVE) endselect Monitors support unguarded don't-care nondeterminism at the module interface. Selection between APPEND and REMOVE operations of a buffer implemented by a monitor has the following implicit select statement: select (APPEND, REMOVE) endselect The monitor operations wait and signal on internal monitor queues notfull and notempty play the role of guards. Monitors decouple guard conditions from nondeterministic choice, gaining extra flexibility by associating guards with access to resources rather than with module entry. Consider a: concurrent logic program with a predicate P appearing in the head of N clauses of the form "P(Ai) ~ GiIIBi". A goal P(A) triggers nondeterministic execution of those bodies Bi for which A unifies with Ai and the guards Gi are satisfied. This execution rule can be specified by a select statement of the form: select ((AI ;GI )IIBI, (A2;G2)IIB2, ... , (AN;GN)IIBN) endselect Bi is a candidate jor execution if A unifies with Ai and Gi is satisfied Since no backtracking can occur once execution has committed to a particular select alternative, the nodetermini