Introduction to Logic Programming

Book description

Logic Programming is a style of programming in which programs take the form of sets of sentences in the language of Symbolic Logic.

Over the years, there has been growing interest in Logic Programming due to applications in deductive databases, automated worksheets, Enterprise Management (business rules), Computational Law, and General Game Playing. This book introduces Logic Programming theory, current technology, and popular applications.

In this volume, we take an innovative, model-theoretic approach to logic programming. We begin with the fundamental notion of datasets, i.e., sets of ground atoms. Given this fundamental notion, we introduce views, i.e., virtual relations; and we define classical logic programs as sets of view definitions, written using traditional Prolog-like notation but with semantics given in terms of datasets rather than implementation. We then introduce actions, i.e., additions and deletions of ground atoms; and we define dynamic logic programs as sets of action definitions.

In addition to the printed book, there is an online version of the text with an interpreter and a compiler for the language used in the text and an integrated development environment for use in developing and deploying practical logic programs.

"This is a book for the 21st century: presenting an elegant and innovative perspective on logic programming. Unlike other texts, it takes datasets as a fundamental notion, thereby bridging the gap between programming languages and knowledge representation languages; and it treats updates on an equal footing with datasets, leading to a sound and practical treatment of action and change." – Bob Kowalski, Professor Emeritus, Imperial College London

"In a world where Deep Learning and Python are the talk of the day, this book is a remarkable development. It introduces the reader to the fundamentals of traditional Logic Programming and makes clear the benefits of using the technology to create runnable specifications for complex systems." – Son Cao Tran, Professor in Computer Science, New Mexico State University

"Excellent introduction to the fundamentals of Logic Programming. The book is well-written and well-structured. Concepts are explained clearly and the gradually increasing complexity of exercises makes it so that one can understand easy notions quickly before moving on to more difficult ideas." – George Younger, student, Stanford University

Table of contents

  1. Preface
  2. Introduction
    1. Introduction
      1. Programming in Logic
      2. Logic Programs as Runnable Specifications
      3. Advantages of Logic Programming
      4. Applications of Logic Programming
      5. Basic Logic Programming
    2. Datasets
      1. Introduction
      2. Conceptualization
      3. Datasets
      4. Example – Sorority World
      5. Example – Kinship
      6. Example – Blocks World
      7. Example – Food World
      8. Reformulation
      9. Exercises
  3. Queries and Updates
    1. Queries
      1. Introduction
      2. Query Syntax
      3. Query Semantics
      4. Safety
      5. Predefined Concepts
      6. Example – Kinship
      7. Example – Map Coloring
      8. Exercises
    2. Updates
      1. Introduction
      2. Update Syntax
      3. Update Semantics
      4. Simultaneous Updates
      5. Example – Kinship
      6. Example – Colors
      7. Exercises
    3. Query Evaluation
      1. Introduction
      2. Evaluating Ground Queries
      3. Matching
      4. Evaluating Queries With Variables
      5. Computational Analysis
      6. Exercises
    4. View Optimization
      1. Introduction
      2. Subgoal Ordering
      3. Subgoal Removal
      4. Rule Removal
      5. Example – Cryptarithmetic
      6. Exercises
  4. View Definitions
    1. View Definitions
      1. Introduction
      2. Syntax
      3. Semantics
      4. Semipositive Programs
      5. Stratified Programs
      6. Exercises
    2. View Evaluation
      1. Introduction
      2. Top-Down Processing of Ground Goals and Rules
      3. Unification
      4. Top-Down Processing of Non-Ground Queries and Rules
      5. Exercises
    3. Examples
      1. Introduction
      2. Example – Kinship
      3. Example – Blocks World
      4. Example – Modular Arithmetic
      5. Example – Directed Graphs
      6. Exercises
    4. Lists, Sets, Trees
      1. Introduction
      2. Example – Peano Arithmetic
      3. Lists
      4. Example – Sorted Lists
      5. Example – Sets
      6. Example – Trees
      7. Exercises
    5. Dynamic Systems
      1. Introduction
      2. Representation
      3. Simulation
      4. Planning
      5. Exercises
    6. Metaknowledge
      1. Introduction
      2. Natural Language Processing
      3. Boolean Logic
      4. Exercises
  5. Operation Definitions
    1. Operations
      1. Introduction
      2. Syntax
      3. Semantics
      4. Exercises
    2. Dynamic Logic Programs
      1. Introduction
      2. Reactive Systems
      3. Closed Systems
      4. Mixed Initiative
      5. Simultaneous Actions
      6. Exercises
    3. Database Management
      1. Introduction
      2. Update With Constraints
      3. Maintaining Materialized Views
      4. Update Through Views
      5. Exercises
    4. Interactive Worksheets
      1. Interactive Worksheets
      2. Example
      3. Page Data
      4. Gestures
      5. Operation Definitions
      6. View Definitions
      7. Semantic Modeling
  6. Conclusion
    1. Variations
      1. Introduction
      2. Logic Production Systems
      3. Constraint Logic Programming
      4. Disjunctive Logic Programming
      5. Existential Logic Programming
      6. Answer Set Programming
      7. Inductive Logic Programming
    2. Predefined Concepts in EpilogJS
      1. Introduction
      2. Relations
      3. Math Functions
      4. String Functions
      5. List Functions
      6. Arithmetic List Functions
      7. Conversion Functions
      8. Aggregates
      9. Operators
    3. Sierra
      1. Introduction
      2. Getting Started
      3. Data (1/2)
      4. Data (2/2)
      5. Queries (1/2)
      6. Queries (2/2)
      7. Updates
      8. View Definitions (1/2)
      9. View Definitions (2/2)
      10. Operation Definitions
      11. Settings
      12. File Management
      13. Conclusion
    4. References
    5. Authors' Biographies
  7. Blank Page (1/4)
  8. Blank Page (2/4)
  9. Blank Page (3/4)
  10. Blank Page (4/4)

Product information

  • Title: Introduction to Logic Programming
  • Author(s): Michael Genesereth, Vinay K. Chaudhri, Ronald Brachman, Francesca Rossi, Peter Stone
  • Release date: February 2020
  • Publisher(s): Morgan & Claypool Publishers
  • ISBN: 9781681737232