Knowledge Representation, Reasoning, and the Design of Intelligent Agents

Total Page:16

File Type:pdf, Size:1020Kb

Knowledge Representation, Reasoning, and the Design of Intelligent Agents P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 KNOWLEDGE REPRESENTATION, REASONING, AND THE DESIGN OF INTELLIGENT AGENTS Knowledge representation and reasoning is the foundation of artificial intel- ligence, declarative programming, and the design of knowledge-intensive software systems capable of performing intelligent tasks. Using logical and probabilistic formalisms based on answer-set programming (ASP) and ac- tion languages, this book shows how such systems can be given knowledge about the world and how this knowledge can be used to solve nontrivial com- putational problems. The authors maintain a balance between mathematical analysis and practical design of intelligent agents. All the concepts, such as answering queries, planning, diagnostics, and probabilistic reasoning, are illustrated by programming examples. The text can be used for AI-related undergraduate and graduate classes and by researchers who would like to learn more about ASP and knowledge representation. Dr. Michael Gelfond is a Professor of Computer Science at Texas Tech University. He received his PhD from the Institute of Mathematics of the Academy of Sciences, St. Petersburg, Russia. He is a AAAI fellow and serves as an Area Editor for the International Journal of Theory and Prac- tice of Logic Programming and as an Executive Editor of the Journal of Logic and Computation. In 2004 and 2012 he was the recipient of the award for most influential paper in twenty years by the International Association of Logic Programming. Yulia Kahl is a member of the Texas Action Group and the Knowledge Representation Lab at Texas Tech. She received her Master’s in Computer Science, focusing on the use of ASP for planning. She has also worked as a programmer at IBM. i P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 ii P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 KNOWLEDGE REPRESENTATION, REASONING, AND THE DESIGN OF INTELLIGENT AGENTS The Answer-Set Programming Approach MICHAEL GELFOND Texas Tech University YULIA KAHL University of Texas at El Paso iii P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 32 Avenue of the Americas, New York, NY 10013-2473, USA Cambridge University Press is part of the University of Cambridge. It furthers the University’s mission by disseminating knowledge in the pursuit of education, learning and research at the highest international levels of excellence. www.cambridge.org Information on this title: www.cambridge.org/9781107029569 C Michael Gelfond and Yulia Kahl 2014 This publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. First published 2014 Printed in the United States of America A catalog record for this publication is available from the British Library. Library of Congress Cataloging in Publication Data Gelfond, Michael. Knowledge representation, reasoning, and the design of intelligent agents : the answer-set programming approach / Michael Gelfond, Texas Tech University, Yulia Kahl, University of Texas at El Paso. pages cm Includes bibliographical references and index. ISBN 978-1-107-02956-9 (hardback : alk. paper) 1. Intelligent agents (Computer software) I. Kahl, Yulia, 1970– II. Title. QA76.76.I58G45 2014 006.3–dc23 2013029651 ISBN 978-1-107-02956-9 Hardback Cambridge University Press has no responsibility for the persistence or accuracy of URLs for external or third-party Internet Web sites referred to in this publication and does not guarantee that any content on such Web sites is, or will remain, accurate or appropriate. iv P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 To Lara and Patrick, with love v P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 vi P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 Contents Preface page xiii 1 Logic-Based Approach to Agent Design 1 1.1 Modeling an Intelligent Agent 1 1.2 Simple Family Knowledge Base – an Example 4 1.3 A Historical Comment 6 1.3.1 The Axiomatic Method 6 1.3.2 Logic and Design of Intelligent Agents 7 Summary 8 References and Further Reading 9 Exercises 10 2 Answer Set Prolog (ASP) 11 2.1 Syntax 11 2.2 Semantics 16 2.2.1 Informal Semantics 16 2.2.2 Formal Semantics 21 2.3 A Note on Translation from Natural Language 30 2.4 Properties of ASP Programs 31 Summary 35 References and Further Reading 35 Exercises 36 3 Roots of Answer Set Prolog 40 3.1 First-Order Logic (FOL) 40 3.2 Nonmonotonic Logics 43 3.2.1 Circumscription 44 3.2.2 Autoepistemic Logic 46 3.2.3 Reiter’s Default Theories 47 vii P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 viii Contents 3.3 ASP and Negation in Logic Programming 49 3.3.1 Clark’s Completion 49 3.3.2 Well-Founded Semantics 53 Summary 57 References and Further Reading 57 Exercises 58 4 Creating a Knowledge Base 61 4.1 Reasoning about Family 62 4.1.1 Basic Family Relationships 62 4.1.2 Defining Orphans 66 4.1.3 Defining Ancestors 68 4.2 Reasoning about Electrical Circuits 71 4.3 Hierarchical Information and Inheritance 75 Summary 81 References and Further Reading 82 Exercises 83 5 Representing Defaults 86 5.1 A General Strategy for Representing Defaults 86 5.1.1 Uncaring John 86 5.1.2 Cowardly Students 91 5.1.3 A Special Case 92 5.2 Knowledge Bases with Null Values 93 5.2.1 Course Catalog 93 5.3 Simple Priorities between Defaults 95 5.4 Inheritance Hierarchies with Defaults 99 5.4.1 Submarines Revisited 99 5.4.2 Membership Revisited 100 5.4.3 The Specificity Principle 100 5.5 (*) Indirect Exceptions to Defaults 103 Summary 108 References and Further Reading 108 Exercises 109 6 The Answer-Set Programming Paradigm 114 6.1 Computing Hamiltonian Cycles 115 6.2 Solving Puzzles 121 6.2.1 Sudoku Puzzle 121 6.2.2 Mystery Puzzle 125 P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 Contents ix Summary 127 References and Further Reading 128 Exercises 129 7 Algorithms for Computing Answer Sets 131 7.1 Finding Models of Propositional Formulas 131 7.2 Finding Answer Sets of Logic Programs 136 7.2.1 The First Solver 137 7.2.2 The Second Solver 143 7.2.3 Finding Answer Sets of Disjunctive Programs 147 7.2.4 Answering Queries 148 Summary 149 References and Further Reading 149 Exercises 150 8 Modeling Dynamic Domains 152 8.1 The Blocks World – A Historic Example 152 8.2 A General Solution 162 8.3 AL Syntax 166 8.4 AL Semantics – The Transition Relation 167 8.4.1 States 167 8.4.2 Transitions 171 8.5 Examples 175 8.5.1 The Briefcase Domain 175 8.5.2 The Blocks World Revisited 179 8.5.3 Blocks World with Concurrent Actions 182 8.6 Nondeterminism in AL 184 8.7 Temporal Projection 186 Summary 187 References and Further Reading 188 Exercises 189 9 Planning Agents 192 9.1 Classical Planning with a Given Horizon 192 9.2 Examples of Classical Planning 195 9.2.1 Planning in the Blocks World 195 9.2.2 Igniting the Burner 200 9.2.3 Missionaries and Cannibals 201 9.3 Heuristics 204 9.4 Concurrent Planning 208 9.5 (*) Finding Minimal Plans 209 P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 x Contents Summary 211 References and Further Reading 213 Exercises 214 10 Diagnostic Agents 216 10.1 Recording the History of a Domain 218 10.2 Defining Explanations 220 10.3 Computing Explanations 224 10.4 (*) Finding Minimal Explanations 228 10.5 Importance of New Predicates hpd and obs 229 Summary 231 References and Further Reading 232 Exercises 232 11 Probabilistic Reasoning 235 11.1 Classical Probabilistic Models 235 11.2 The Jungle Story in P-log 238 11.3 Syntax and Semantics of P-log 241 11.4 Representing Knowledge in P-log 251 11.4.1 The Monty Hall Problem 252 11.4.2 Death of a Rat? 255 11.4.3 The Spider Bite 257 11.4.4 The Bayesian Squirrel 260 11.5 (*) P-log + CR-Prolog and the Wandering Robot 263 Summary 266 References and Further Reading 267 Exercises 267 12 The Prolog Programming Language 271 12.1 The Prolog Interpreter 271 12.1.1 Unification 272 12.1.2 SLD Resolution 276 12.1.3 Searching for SLD Derivation – Prolog Control 280 12.1.4 SLDNF Resolution 282 12.2 Programming in Prolog 284 12.2.1 The Basics of Prolog Programming 284 12.2.2 Parts Inventory Program 291 12.2.3 (*) Finding Derivatives of Polynomials 295 Summary 304 References and Further Reading 305 Exercises 305 P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 Contents xi Appendix A: ASP Solver Quick-Start 307 Appendix B: Aspide 310 Appendix C: Introduction to SPARC 314 Appendix D: Code 317 D.1 ASP Encoding of the Igniting the Burner Example 317 D.2 ASP Encoding of the Missionaries and Cannibals Example 320 D.3 ASP Encoding of the Circuit Diagnostic Example 325 Bibliography 331 Index 343 P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 xii P1: WQS Trim: 6in × 9in Top: 0.581in Gutter: 0.75in CUUS2070-FM CUUS2070/Gelfond 978 1 107 02956 9 November 23, 2013 14:49 Preface This is a book about knowledge representation and reasoning (KRR) – a comparatively new branch of science that serves as the foundation of arti- ficial intelligence, declarative programming, and the design of intelligent agents – knowledge-intensive software systems capable of exhibiting in- telligent behavior.
Recommended publications
  • Answer Set Programming: a Tour from the Basics to Advanced Development Tools and Industrial Applications
    Answer Set Programming: A tour from the basics to advanced development tools and industrial applications Nicola Leone and Francesco Ricca Department of Mathematics and Computer Science, University of Calabria, Italy leone,ricca @mat.unical.it { } Abstract. Answer Set Programming (ASP) is a powerful rule-based language for knowledge representation and reasoning that has been developed in the field of logic programming and nonmonotonic reasoning. After more than twenty years from the introduction of ASP, the theoretical properties of the language are well understood and the solving technology has become mature for practical appli- cations. In this paper, we first present the basics of the ASP language, and we then concentrate on its usage for knowledge representation and reasoning in real- world contexts. In particular, we report on the development of some industry-level applications with the ASP system DLV, and we illustrate two advanced develop- ment tools for ASP, namely ASPIDE and JDLV, which speed-up and simplify the implementation of applications. 1 Introduction Answer Set Programming (ASP) [11, 19, 30] is a powerful rule-based language for knowledge representation and reasoning that has been developed in the field of logic programming and nonmonotonic reasoning. ASP features disjunction in rule heads, non monotonic negation in rule bodies [30], aggregate atoms [16] for concise mod- eling of complex combinatorial problems, and weak constraints [12] for the declarative encoding of optimization problems. Computational problems, even of high complexity [19], can be solved in ASP by specifying a logic program, i.e., a set of logic rules, such that its answer sets correspond to solutions, and then, using an answer set solver to find such solutions [38, 34].
    [Show full text]
  • Complexity Results for Probabilistic Answer Set Programming
    International Journal of Approximate Reasoning 118 (2020) 133–154 Contents lists available at ScienceDirect International Journal of Approximate Reasoning www.elsevier.com/locate/ijar Complexity results for probabilistic answer set programming ∗ Denis Deratani Mauá a, , Fabio Gagliardi Cozman b a Institute of Mathematics and Statistics, Universidade de São Paulo, Brazil b Escola Politécnica, Universidade de São Paulo, Brazil a r t i c l e i n f o a b s t r a c t Article history: We analyze the computational complexity of probabilistic logic programming with Received 16 May 2019 constraints, disjunctive heads, and aggregates such as sum and max. We consider Received in revised form 25 October 2019 propositional programs and relational programs with bounded-arity predicates, and look Accepted 9 December 2019 at cautious reasoning (i.e., computing the smallest probability of an atom over all Available online 16 December 2019 probability models), cautious explanation (i.e., finding an interpretation that maximizes the Keywords: lower probability of evidence) and cautious maximum-a-posteriori (i.e., finding a partial Probabilistic logic programming interpretation for a set of atoms that maximizes their lower probability conditional on Answer set programming evidence) under Lukasiewicz’s credal semantics. Computational complexity © 2019 Elsevier Inc. All rights reserved. 1. Introduction Probabilities and logic programming have been combined in a variety of ways [1–8]. A particularly interesting and power- ful combination is offered by probabilistic answer set programming, which exploits the powerful knowledge representation and problem solving toolset of answer set programming [9]. Available surveys describe probabilistic logic programming in detail and go over many promising applications [10–13].
    [Show full text]
  • Answer Set Programming: a Primer?
    Answer Set Programming: A Primer? Thomas Eiter1, Giovambattista Ianni2, and Thomas Krennwallner1 1 Institut fur¨ Informationssysteme, Technische Universitat¨ Wien Favoritenstraße 9-11, A-1040 Vienna, Austria feiter,[email protected] 2 Dipartimento di Matematica, Universita´ della Calabria, I-87036 Rende (CS), Italy [email protected] Abstract. Answer Set Programming (ASP) is a declarative problem solving para- digm, rooted in Logic Programming and Nonmonotonic Reasoning, which has been gaining increasing attention during the last years. This article is a gentle introduction to the subject; it starts with motivation and follows the historical development of the challenge of defining a semantics for logic programs with negation. It looks into positive programs over stratified programs to arbitrary programs, and then proceeds to extensions with two kinds of negation (named weak and strong negation), and disjunction in rule heads. The second part then considers the ASP paradigm itself, and describes the basic idea. It shows some programming techniques and briefly overviews Answer Set solvers. The third part is devoted to ASP in the context of the Semantic Web, presenting some formalisms and mentioning some applications in this area. The article concludes with issues of current and future ASP research. 1 Introduction Over the the last years, Answer Set Programming (ASP) [1–5] has emerged as a declar- ative problem solving paradigm that has its roots in Logic Programming and Non- monotonic Reasoning. This particular way of programming, in a language which is sometimes called AnsProlog (or simply A-Prolog) [6, 7], is well-suited for modeling and (automatically) solving problems which involve common sense reasoning: it has been fruitfully applied to a range of applications (for more details, see Section 6).
    [Show full text]
  • Answer Set Programming
    ANSWER SET PROGRAMMING Tran Cao Son Department of Computer Science New Mexico State University Las Cruces, NM 88011, USA [email protected] http://www.cs.nmsu.edu/~tson October 2005 Answer Set Programming. Acknowledgement This tutorial contains some materials from tutorials on answer set programming and on knowledge representation and logic programming from those provided by • Chitta Baral, available at www.public.asu.edu/~cbaral. • Michael Gelfond, available at www.cs.ttu.ued/~mgelfond. Tran Cao Son 1 Answer Set Programming. Introduction — Answer Set Programming Answer set programming is a new programming paradigm. It is introduced in the late 90’s and manages to attracts the intention of different groups of researchers thanks to its: • declarativeness: programs do not specify how answers are computed; • modularity: programs can be developed incrementally; • expressiveness: answer set programming can be used to solve problems in high 2 complexity classes (e.g. ΣP , Π2P , etc.) Answer set programming has been applied in several areas: reasoning about actions and changes, planning, configuration, wire routing, phylogenetic inference, semantic web, information integration, etc. Tran Cao Son 2 Answer Set Programming. Purpose • Introduce answer set programming • Provide you with some initial references, just in case • ...you get excited about answer set programming Tran Cao Son 3 Answer Set Programming. Outline • Foundation of answer set programming: logic programming with answer set semantics (syntax, semantics, early application). • Answer set programming: general ideas and examples • Application of answer set programming in – Knowledge representation – Constraint satisfaction problem – Combinatoric problems – Reasoning about action and change – Planning and diagnostic reasoning • Current issues Tran Cao Son 4 LOGIC PROGRAMMING AND ANSWER SET SEMANTICS Answer Set Programming.
    [Show full text]
  • A Meta-Programming Technique for Debugging Answer-Set Programs∗
    A Meta-Programming Technique for Debugging Answer-Set Programs∗ Martin Gebser1, Jorg¨ Puhrer¨ 2, Torsten Schaub1, and Hans Tompits2 1 Institut fur¨ Informatik, Universitat¨ Potsdam, Germany, {gebser,torsten}@cs.uni-potsdam.de 2 Institut fur¨ Informationssysteme 184/3, Technische Universitat¨ Wien, Austria, {puehrer,tompits}@kr.tuwien.ac.at Abstract applying such an approach to ASP results in some deci- sive drawbacks, undermining the declarativity of answer- Answer-set programming (ASP) is widely recognised as a vi- able tool for declarative problem solving. However, there is set semantics. In particular, establishing canonical tracing- currently a lack of tools for developing answer-set programs. based techniques for debugging answer-set programs re- In particular, providing tools for debugging answer-set pro- quires also a canonical procedure for answer-set computa- grams has recently been identified as a crucial prerequisite tion, and programmers would have to be familiar with the al- for a wider acceptance of ASP. In this paper, we introduce a gorithm. This would lead to a shift of perspectives in which meta-programming technique for debugging in ASP. The ba- an answer-set program is degraded from a declarative prob- sic question we address is why interpretations expected to be lem description to a set of parameters for a static solving answer sets are not answer sets of the program to debug. We algorithm. Therefore, we argue for declarative debugging thus deal with finding semantical errors of programs. The ex- strategies that are independent of answer-set computation. planations provided by our method are based on an intuitive Indeed, among the few approaches dealing with debug- scheme of errors that relies on a recent characterisation of the answer-set semantics.
    [Show full text]
  • Integrating Answer Set Programming and Constraint Logic Programming
    Integrating Answer Set Programming and Constraint Logic Programming Veena S. Mellarkod and Michael Gelfond and Yuanlin Zhang {veena.s.mellarkod,mgelfond,yzhang}@cs.ttu.edu Texas Tech University Dedicated to Victor Marek on his 65th birthday as a specification for the sets of beliefs to be held by a ra- tional reasoner associated with Π. Such sets, called an- Abstract swer sets of Π, are represented by collections of ground literals. A rule (1) is viewed as a constraint which says We introduce a knowledge representation language that if literals lk+1, . , ln belong to an answer set A of AC(C) extending the syntax and semantics of ASP Π and none of the literals ln+1, . , lm belong to A then and CR-Prolog, give some examples of its use, and A must contain at least one of the literals l , . , l . To present an algorithm, ACsolver, for computing answer 1 k sets of AC(C) programs. The algorithm does not re- form answer sets of Π, the reasoner must satisfy Π’s quire full grounding of a program and combines “clas- rules together with the rationality principle which says: sical” ASP solving methods with constraint logic pro- “Believe nothing you are not forced to believe”. gramming techniques and CR-Prolog based abduction. The AC(C) based approach often allows to solve prob- Given a computational problem P , an ASP programmer lems which are impossible to solve by more traditional • Expresses information relevant to the problem in the ASP solving techniques. We belief that further inves- language of ASP; tigation of the language and development of more effi- cient and reliable solvers for its programs can help to • Reduces P to a query Q requesting computation of substantially expand the domain of applicability of the (parts of) answer sets of Π.
    [Show full text]
  • Towards Flexible Goal-Oriented Logic Programming
    FACULTY OF SCIENCES Towards Flexible Goal-Oriented Logic Programming ir. Benoit Desouter Dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Computer Science Supervisors: prof. dr. ir. Tom Schrijvers prof. dr. ir. Marko van Dooren Department of Applied Mathematics, Computer Science and Statistics Faculty of Sciences, Ghent University ii Acknowledgments As it feels more natural to thank people in the language that we have used on a daily basis during the journey towards completing this PhD thesis, I'll use Dutch for most of the next few pages. In de eerste plaats wil ik mijn promotoren Tom en Marko bedanken. Tom, bedankt voor het geduld als ik occasioneel iets maar half begreep, en om er altijd vertrouwen in te blijven hebben. Je hebt me heel wat kansen aangereikt, waardoor ik van heel wat onderwerpen iets heb opgestoken. Marko, hoewel je er pas halverwege bijkwam, toonde je al snel interesse voor het onderwerp en heb je er vanuit je eigen expertise heel wat aan toegevoegd. Je deur stond altijd voor me open als ik even een tussentijdse statusupdate wou geven. Bedankt voor de babbels over vanalles en nog wat, en om me grondig te betrekken bij het geven van Programmeren 1. Ik heb nog heel wat bijgeleerd over objec- tori¨entatie door jouw visie, slides en codevoorbeelden. Daarnaast ook bedankt om mijn lokale LATEX-goeroe te zijn: niettegenstaande ik LATEX al tien jaar lang gebruik, heb ik voor het precies goed krijgen van deze thesis heel wat nieuwe pakketten en trucjes moeten gebruiken, met regelmatig vreemde out- put of cryptische foutmeldingen tot gevolg die ik niet altijd alleen kon oplossen | of het zou me op zijn minst veel meer tijd gekost hebben.
    [Show full text]
  • CS 252R: Advanced Topics in Programming Languages
    CS 252r: Advanced Topics in Programming Languages Eric K. Zhang [email protected] Fall 2020 Abstract These are notes for Harvard's CS 252r, a graduate seminar class on topics at the intersection of programming languages and artificial intelligence, as taught by Nada Amin1 in Fall 2020. Possible topics include: differentiable programming, interpretable AI, neuro-symbolic systems, reinforcement learning, probabilistic programming, and synthesis. Course description: We will explore programming languages for artificial intelligence. Programming languages drive the way we communicate with computers, including how we make them intelligent and reasonable. In this advanced topic course, we will look at artificial intelligence broadly construed from the point of view of programming languages. We gain clarity of semantics, algorithms and purpose. Contents 1 September 3rd, 20204 1.1 Breakout Discussion: Learning DSLs...........................4 1.2 Program Synthesis.....................................4 1.2.1 Type-Driven Specification [OZ15].........................4 1.2.2 Logic-Based Approaches..............................6 1.2.3 Neural-Guided Search [KMP+18].........................6 1.2.4 Differentiable Programming [BRNR17]......................7 1.3 Breakout Prompts: Applying PL to Improve ML....................7 2 September 8th, 20209 2.1 Probabilistic Programming [vdMPYW18]........................9 2.2 Bayesian Inference Algorithms.............................. 11 3 September 10th, 2020 13 3.1 Breakout Discussion: Perceptual Versus Symbolic...................
    [Show full text]
  • Lifted Unit Propagation
    LIFTED UNIT PROPAGATION by Pashootan Vaezipoor B.Sc., Amirkabir University of Technology, 2008 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE in the School of Computing Science Faculty of Applied Sciences c Pashootan Vaezipoor 2012 SIMON FRASER UNIVERSITY Spring 2012 All rights reserved. However, in accordance with the Copyright Act of Canada, this work may be reproduced without authorization under the conditions for “Fair Dealing.” Therefore, limited reproduction of this work for the purposes of private study, research, criticism, review and news reporting is likely to be in accordance with the law, particularly if cited appropriately. APPROVAL Name: Pashootan Vaezipoor Degree: Master of Science Title of Thesis: Lifted Unit Propagation Examining Committee: Dr. Oliver Schulte Chair Dr. David G. Mitchell, Senior Supervisor Dr. Evgenia Ternovska, Supervisor Dr. James Delgrande, SFU Examiner Date Approved: March 13, 2012 ii Partial Copyright Licence Abstract Recent emergence of effective solvers for propositional satisfiability (SAT) and related problems has led to new methods for solving computationally challenging industrial problems, such as NP- hard search problems in planning, software design, and hardware verification. This has produced a demand for tools which allow users to write high level problem specifications which are automat- ically reduced to SAT. We consider the case of specifications in first order logic with reduction to SAT by grounding. For realistic problems, the resulting SAT instances can be prohibitively large. A key technique in SAT solvers is unit propagation, which often significantly reduces instance size before search for a solution begins. We define ”lifted unit propagation”, which is executed before grounding.
    [Show full text]
  • Complex Optimization in Answer Set Programming
    Complex optimization in answer set programming Author Gebser, Martin, Kaminski, Roland, Schaub, Torsten Published 2011 Journal Title Theory and Practice of Logic Programming DOI https://doi.org/10.1017/S1471068411000329 Copyright Statement © 2011 Association for Logic Programming. The attached file is reproduced here in accordance with the copyright policy of the publisher. Please refer to the journal's website for access to the definitive, published version. Downloaded from http://hdl.handle.net/10072/42896 Griffith Research Online https://research-repository.griffith.edu.au TLP 11 (4–5): 821–839, 2011. C Cambridge University Press 2011 821 doi:10.1017/S1471068411000329 Complex optimization in answer set programming MARTIN GEBSER, ROLAND KAMINSKI and TORSTEN SCHAUB Institut fur¨ Informatik, Universitat¨ Potsdam, Germany Abstract Preference handling and optimization are indispensable means for addressing nontrivial applications in Answer Set Programming (ASP). However, their implementation becomes difficult whenever they bring about a significant increase in computational complexity. As a consequence, existing ASP systems do not offer complex optimization capacities, supporting, for instance, inclusion-based minimization or Pareto efficiency. Rather, such complex criteria are typically addressed by resorting to dedicated modeling techniques, like saturation. Unlike the ease of common ASP modeling, however, these techniques are rather involved and hardly usable by ASP laymen. We address this problem by developing a general implementation technique by means of meta-prpogramming, thus reusing existing ASP systems to capture various forms of qualitative preferences among answer sets. In this way, complex preferences and optimization capacities become readily available for ASP applications. KEYWORDS: Answer Set Programming, Preference Handling, Complex optimization, Meta- Programming 1 Introduction Preferences are often an indispensable means in modeling because they allow for identifying preferred solutions among all feasible ones.
    [Show full text]
  • Answer Set Programming – a Domain in Need of Explanation a Position Paper
    Answer Set Programming – a Domain in Need of Explanation A Position Paper Martin Brain and Marina De Vos Department of Computer Science, University of Bath, United Kingdom {mjb,mdv}@cs.bath.ac.uk Abstract. This paper describes the problems with debugging tools for answer set programming, a declarative programming paradigm. Current approaches are difficult to use on most applications due to the consider- able bottlenecks in communicating the reasons to the user. In this paper we examine the reasons for this and suggest some possible future direc- tions. 1 Introduction One of the long term goals of computer science is creating efficient declarative programming systems. In an ideal world, the user would create a description of what the problem is and the programming system would work out how to solve it, and return the answer. However, as any student of software engineering will note, what the user wants and what the user asks for are often different. In the context of declarative programming languages and other ‘intelligent’ systems, this results in the user trying to understand why the system gave the answer it did. Thus, most practical declarative programming systems rapidly develop tools for explaining why they gave a particular answer. These are normally referred to as ‘debugging’ tools; although they are only superficially related to most procedural debugging tools. Given the strong formal semantics underpinning most declarative programming systems, building a tool to compute (online or offline) the formal argument behind an answer is relatively straight-forward. Although the names vary with the problem domain; proof trees, refutations, traces, arguments and so on, all follow a similar methodology of building a formal structure to explain their answers based on the rules that give the semantics of the language.
    [Show full text]
  • What Is Answer Set Programming?
    What Is Answer Set Programming? Vladimir Lifschitz Department of Computer Sciences University of Texas at Austin 1 University Station C0500 Austin, TX 78712 [email protected] Abstract Their approach is based on the relationship between plans and stable models described in (Subrahmanian & Zaniolo Answer set programming (ASP) is a form of declarative pro- 1995). Soininen & Niemel¨a(1998) applied what is now gramming oriented towards difficult search problems. As an outgrowth of research on the use of nonmonotonic reason- known as answer set programming to the problem of prod- ing in knowledge representation, it is particularly useful in uct configuration. The use of answer set solvers for search knowledge-intensive applications. ASP programs consist of was identified as a new programming paradigm in (Marek rules that look like Prolog rules, but the computational mech- & Truszczy´nski 1999) (the term “answer set programming” anisms used in ASP are different: they are based on the ideas was used for the first time as the title of a part of the collec- that have led to the creation of fast satisfiability solvers for tion where that paper appeared) and in (Niemel¨a1999). propositional logic. An answer set programming language Introduction System LPARSE was originally created as a front-end for the 3 Answer set programming (ASP) is a form of declarative answer set solver SMODELS, and it is now used in the same 4 programming oriented towards difficult, primarily NP-hard, way in most other answer set solvers. search problems. As an outgrowth of research on the use Some rules found in LPARSE programs are traditional of nonmonotonic reasoning in knowledge representation, it “Prolog-style” rules, such as is particularly useful in knowledge-intensive applications.
    [Show full text]