×

Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

The Craft of Prolog
     

The Craft of Prolog

by Richard O'Keefe
 

ISBN-10: 0262512270

ISBN-13: 9780262512275

Pub. Date: 06/19/1990

Publisher: MIT Press

Hacking your program is no substitute for understanding your problem. Prolog is different, but not that different. Elegance is not optional. These are the themes that unify Richard O'Keefe's very personal statement on how Prolog programs should be written. The emphasis in The Craft of Prolog is on using Prolog effectively. It presents a loose collection of topics

Overview

Hacking your program is no substitute for understanding your problem. Prolog is different, but not that different. Elegance is not optional. These are the themes that unify Richard O'Keefe's very personal statement on how Prolog programs should be written. The emphasis in The Craft of Prolog is on using Prolog effectively. It presents a loose collection of topics that build on and elaborate concepts learned in a first course. These may be read in any order following the first chapter, "Basic Topics in Prolog," which provides a basis for the rest of the material in the book.Richard A. O'Keefe is Lecturer in the Department of Computer Science at the Royal Melbourne Institute of Technology. He is also a consultant to Quintus Computer Systems, Inc.Contents: Basic Topics in Prolog. Searching. Where Does the Space Go? Methods of Programming. Data Structure Design. Sequences. Writing Interpreters. Some Notes on Grammar Rules. Prolog Macros. Writing Tokenisers in Prolog. All Solutions.

Product Details

ISBN-13:
9780262512275
Publisher:
MIT Press
Publication date:
06/19/1990
Series:
Logic Programming Series
Edition description:
New Edition
Pages:
416
Product dimensions:
7.00(w) x 9.00(h) x 1.00(d)
Age Range:
18 Years

Table of Contents

Series Foreword
Preface
Introduction
1 Basic Topics in Prolog
1.1 Introduction
1.2 Cases and Structural Induction
1.3 Inputs and Outputs
1.4 ConteXt Arguments
1.5 Difference Lists
1.6 Counters
1.7 Backwards Correctness
2 Searching
2.1 Introduction
2.2 Simple DepthFirst Search
2.3 DepthFirst Search with EXplicit Open Set
2.4 BreadthFirst Search
2.5 A Digression on Queues
2.6 Back to BreadthFirst Search
2.7 Digression: Unpacking the 'queue' Records
2.8 Keeping Track of Visited Nodes
2.9 Local Heuristic Ordering
2.10 Global Heuristic Ordering
2.11 An EXample
2.12 Iterative Deepening
2.13 Returning the Method in your Comments
2.14 EXplain the Method in your Comments
2.15 The Algebra of Binary Relations
3 Where Does The Space Go?
3.1 The Clause Store
3.2 Variables
3.3 BoX Diagrams
3.4 Measuring Space Used
3.5 A Hack
3.6 The Trail
3.7 Choice Points and the Cut
3.8 Uses of the Cut
3.9 Cutting away Clauses
3.10 Pruning Alternative Solutions
3.11 RED Cuts
3.12 GRUE Cuts
3.13 How Far Do Cuts Reach?
3.14 Disjunction and IfThenElse
3.15 'repeat' Loops
3.16 IfThenElse
3.17 Tips
4 Methods of Programming
4.1 The Problem of the Dutch National Flag
4.2 The Problem of Merging Two Ordered Lists
4.3 Computing the Size of a Tree
4.4 The Search for the Small Superset
4.5 Rem's Algorithm for the Recording of Equivalence Classes
4.6 Efficient Data Structures
4.7 Keep It Clean!
5 Data Structure Design
5.1 Introduction
5.2 Writing a SetUnion Predicate
5.3 The Importance of Data Structures
5.4 The Problem of Transitive Closure
5.5 GeneralPrinciples
6 Sequences
6.1 Introduction and Notation
6.2 Representing Sequences
6.3 Conversion
6.4 Computing Functions of Lists
6.5 Naming and Calculating Parts of Sequences
6.6 Tree Traversal
6.7 Selecting a Subsequence
6.8 PrefiXes
6.9 Concatenation
6.10 Mapping
6.11 Crossproducts
6.12 Recurrences
6.13 Metaprograms and Objectoriented Programming
6.14 Quantification
6.15 The Importance of Algebra
6.16 Summary
7 Writing Interpreters
7.1 Introduction
7.2 But First, An Easy Case
7.3 Compiling the Interpreter Away
7.4 Multiple Interpretations
7.5 Writing Simple Prolog Interpreters
7.6 Conditional Cuts
7.7 Augmenting Prolog
7.8 Summary
8 Some Notes on Grammar Rules
8.1 Introduction
8.2 A Brief Description of Grammar Rules
8.3 Phrase/[2,3]
8.4 EXamples
8.5 A Notational Convention
8.6 Perspective on a Problem
9 Prolog Macros
9.1 A Digression about print/1
9.2 How eXpand_term/2 works
9.3 Conditional Reading
9.4 Macros
9.5 Problems
10 Writing Tokenisers in Prolog
10.1 Reading a Sentence
10.2 What Tools Already EXist?
10.3 A Simplified Problem
10.4 Programming Definition 1
10.5 Programming Definition 2
10.6 Character Output
10.7 Tokenising Prolog
11 All Solutions
11.1 Introduction
11.2 Some EXamples
11.3 Standard Predicates
11.4 Clocksin & Mellish
11.5 Doing It Right
11.6 findall/3 Reconsidered
11.7 bagof/3 and setof/3
11.8 How Do bagof/3 and setof/3 work?
11.9 Doing It Differently
11.10 In NU Prolog
Bibliography
IndeX

Customer Reviews

Average Review:

Post to your social network

     

Most Helpful Customer Reviews

See all customer reviews