Logic Programming Framework for Resolution Logics
Total Page:16
File Type:pdf, Size:1020Kb
Logic Programming Framework For Resolution Logics Biao Zhu A thesis submitted to the Faculty of Graduate Studies in partial fulfillment of the requirements for the degree of Master of Science Graduate Programme in Cornputer Science York University Toronto, Ontario May 1999 National tibrary Bibliothèque nationale I*I of Canada du Canada Acquisitions and Acquisitions et Bibliogaphic Services services bibliographiques 395 Wellington Street 395, nie Wellington OttawaON K1AON4 Ottawa ON KIA ON4 Canada Canada The author has granted a non- L'auteur a accordé une licence non exclusive licence allowing the exclusive permettant à la National Library of Canada to Bibliothèque nationale du Canada de reproduce, loan, distribute or sel1 reproduire, prêter, distribuer ou copies of this thesis in rnicroform, vendre des copies de cette thèse sous paper or electronic formats. la forme de microfiche/film, de reproduction sur papier ou sur format électronique. The author retains ownership of the L'auteur conserve la propriété du copyright in this thesis. Neither the droit d'auteur qui protège cette thèse. thesis nor substantiai extracts ftom it Ni la thèse ni des extraits substantiels may be printed or otherwise de celle-ci ne doivent être imprimes reproduced without the authof s ou autrement reproduits sans son permission. autorisation. Logic Programming Framework for Resolution Logics bY Biao Zhu a thesis submitted to the Faculty of Graduate Studies of York University in partial fulfillrnent of the requirernents for the degree of Master of Science Permission has been granted to the LIBRARY OF YORK UNIVERSITY to tend or seIl copies of this thesis, to the NATIONAL LlBRARY OF CANADA to microfilm this thesis and to lenâ or seIl copies of the film, and to UNIVERSITY MICROFILMS to publish an abstract of this thesis. the author resenres other publication rights, and neither the thesis nor extensive extracts from it may be printed or otherwise reproduced without the author's written permission. Abstract Logic programming began in the early 1970's as a direct outgrowth of eadier work in automated theorem proving and artScid intelli- gence. While much work has been done in the area of non-clasaical automated theorem proving, most current logic programming syatems are stU only applicable to classical logic as described, e.g., in Lloyd's "Foundations of Logic Pmgwng'' ([19]). The reason is that a non-dsssicai logic progamming system was believed inherently less &dent than the dassical one and only few consideration bse been given to the construction of such a system. In this the&, a non- classical logic pmgramming framework will be built on the basie of Stachinal<'a theories of reeolution proof systema ([38]) and of knowl- edge representationai formalism of definite formulas ([39]). A defite formula is a non-&usal analogue of a Horn dame and can be defined for classicai logic and various non-classical logics (e.g., the n-valueù Lukasiewicz logic). "Definite formulee are intrinsically non-&usai, but at the same time retain the eyntactic flavor and aigorithmic ad- mtages of Hom Chueas" (d [39]). In this thesis, 1demonstrate how to combine both of these theories to constnict a gendnon-classical logic pmgnimming hmework for reeolution Iogiar. ACKNOWLEDGMENTS First of all, 1 would like to thank my supervisor, Dr. Zbigniew Stachniak, for his supervision, encouragement, patience, and friendship. Without his great help, I would be unable to complete this thesis. Thanks to Dr. Jarek Gryz, Dr. Yves Lesperance, and Dr. George Tourlakis for serving on my Supenrisory Cornmittee. Thanks to Dr. Hector Levesque, Dr. J& Edmonds, Dr. Jia Xu, and PhD candidate David 'Itemaine for their academic help. Thanks to the Graduate Director, Dr. John Amanatides, the Graduate Secrô tary, Lisa Guidi, and ail the technical stdF for their continuous administrative and technical support. Thanks to my family, my father JunkW Zhu, my mother Ximyuan Zhang, my sister Bei Zhu, my fiancee Xin Zhang, for theit generous support and encouragement over the past two years. Thanks to my fiends Donghg Zhong, Quan Zhao, Shirley Sheng, Weiling Zhang, Yuanyuan Wang, Xiaoyan Qian, Junshen Chen, Jonathan Huang, Zusheng Rao, Richard Storey, PULivingston, Jaan Pi11 and many others, for their encouragement and friendship. This thesis is dedicated to the memory of my high school mathematics tacher, Mr. Haiyan Yang. Contents 1 Introduction 1 1.1 A Short History of Classicd Logic Programming ........ 1 1.2 Staternent of Problem ...................... 2 1.3 Overview .............................. 5 2 Mathematical and Logicai Preliminaries 6 2.1 Logical Systems .......................... 6 2.2 Propositional Logics ....................... 11 2.2.1 Propositional Language: Syntax ............. 11 2.2.2 Propositional Language: Semantics ........... 13 2.2.3 Lukasiewicz Logics and Post Logics ........... 17 2.3 First-Order Logics ........................ 19 2.3.1 First-Order Languages: Syntax ............. 19 2.3.2 Rames and Models .................... 22 2.3.3 Unification ........................ 26 2.4 Refhtational Principle ...................... 28 3 Stachniak98Theory of Resolution Proof Systems 30 3.1 Non-Clausal Resolution Principle ................ 30 3.2 Resolution Proof Systems .................... 34 3.2.1 Remlution Counterparts and Resolution Logics .... 37 3.3 First-Order Resolution Proof Systems .............. 41 4 Reasoning with Definite Theories 48 4.1 Polaxity Relations and Definite Formulas ............ 48 4.2 Non-Clausal Reasoning with Definite Formulas ......... 54 4.2.1 IDG-refutation ..................... 55 4.2.2 Existence of DG-refutation (Propositional Case) ... 58 4.2.3 Existence of IDG-rehitation (Fi-Order Case) .... 60 5 Logic Programming Framework for Definite Formulas 66 5.1 Dedarative Semantics ..................... 66 5.1.1 Extended Valuation .................... 68 5.1.2 General Negation Operation ............... 70 5.1.3 Correct Amer and Computed Amer ......... 80 5.2 Theoretical Properties of Computed Answer .......... 81 5.2.1 Soundness of IDG-resolution ............... 81 5.2.2 Completeness of IDGresdution ............. 96 5.3 Independence of Computational Rules .............101 1 Introduction In this chapter, fist of aU, 1 briefly review the history of classical logic pre gramming and outline the importance of logic programming systems for non- classical logics. Then, I state the problems associated with the construction of such systems. Finally, 1 give a brie€ overview of the contents of the re- rnaining parts of this thesis. 1.1 A Short History of Classical Logic Prograrnming Logic programming began in the early 1970's as a direct outgrowth of ear- lier work in automated theorem proving and artificial intelligence. Based on work of Herbrand in 1930 (cf. [14]), there wes much activity in the axea of theorem proving in the early 1960's by Prawitz (cf. [31]), Gilmore (cf- [9]), Davis, Putnam (cf. (71) and others. In 19G5, Robinson published his land- mark paper which introduced the resolution principle, and, since then, the resolution principle has become the inference rule for the majority of theorem proving systems. While much work had been done in theorem proving, until 1972, logic had only been used as a specification or declarative language in cornputer science. In 1972, Kowalski and Colmerauer (cf. [15], [6]) proposeci the idea that logic an be wed as a pmgmmming languuge. The acronym PROLOG (PROgramming in LOGic) was conceiveci, and the fhst PROLOG interpreter waa implemented in the language ALGOGW by Roussel, at Mar- seille in 1972. The advantage of using logic as a programming language is that the language of predicate logic is purely declarative and general-purpose, there is also its simplicity, elegance, and expressiveness. Since the emergence of the standard PROLOG system, a number of its variants have been developed such as PARLOG (cf. [4]), concurrent PRO- LOG (cf. [36]), Quintus PROLOG (cf. [3]), micro-PROLOG (cf. [fi]) and NU-PROLOG (cf. [40]). Currently, most of logic progromming systems are resolution theorem provers; some of them, however, are based on a Mer- ent paradigm such as constraint logic programming systems (cf. [22]). In a majority of these systems, the mat important issuethe efficiency of the system, is achieved by the restriction of the reasoning proceas to formulas in a specific syntactic fom such as Horn clauses, and the use of inference rules and proof techniques which are tded to the selected normal form (cf. [19]). 1.2 Statement of Problem Non-classical logics are investigated and applied by researchers in many areas of Artificial Inteliigence(A1) and cornputer science, such as non-monotonie reasoning (cf. [8]), knowledge representation (cf. [l8]), natural language pro- cessing, program verifkation, and hardware verification (cf. [Il]). Given the interest in non-classical logics in AI, it would be extremely useful to have some logic programming systems for non-classical logics. However, most of the current logic programming eystems are stiil only applicable to classicai logic, although there exists some non-classical reawning systems such as temporal and modal logic programming systems (cf. [28]) and the language GOLOG for non-monotonie reasoning about actions based on the situation dculus (cf. [17]). The reason is that a non-ciassical logic progrrunming system was believed inherently less efficient than a classical one and only few considera- tion has been given to the construction of such a system. As 1 have stated, the efficiency of a