The Implementation of Prolog :The Implementation of Prolog ( Princeton Legacy Library )

Publication subTitle :The Implementation of Prolog

Publication series :Princeton Legacy Library

Author: Boizumault Patrice;Djamboulian Ara M.;Fattouh Jamal  

Publisher: Princeton University Press‎

Publication year: 2014

E-ISBN: 9781400863440

P-ISBN(Paperback): 9780691087573

Subject: F224.31 Linear Programming;O Mathematical Sciences and Chemical;O221.1 Linear Programming

Keyword: 数理科学和化学

Language: ENG

Access to resources Favorite

Disclaimer: Any content in publications that violate the sovereignty, the constitution or regulations of the PRC is not accepted or approved by CNPIEC.

Description

A semantically well-defined programming language widely used in artificial intelligence, Prolog has greatly influenced other programming languages since its introduction in the late 1970s. A user may find Prolog deceptively easy, however, and there are a number of different implementations. In this book Patrice Boizumault draws from his extensive experience in Prolog implementation to describe for students of all levels the concepts, difficulties, and design limits of a Prolog system.

Boizumault introduces the specific problems posed by the implementation of Prolog, studies and compares different solutions--notably those of the schools of Marseilles and Edinburgh--and concludes with three examples of implementation. Major points of interest include identifying the important differences in implementing unification and resolution; presenting three features of Prolog II--infinite trees, dif, and freeze--that introduce constraints; thoroughly describing Warren's Abstract Machine (WAM); and detailing a Lisp imple-mentation of Prolog.

Originally published in 1993.

The Princeton Legacy Library uses the latest print-on-demand technology to again make available previously out-of-print books from the distinguished backlist of Princeton University Press. These editions preserve the original texts of these important books while presenting them in durable paperback and hardcover editions. The goal of the Princeton Legacy Library is to vastly incr

Chapter

1.1 Definitions

1.2 Robinson's Unification Algorithm

1.3 Prolog's Unification Algorithm

1.4 Solutions

1.5 Implementation

2.1 Refutation on Horn Clauses

2.2 A Particular Resolution Strategy

2.3 Tree Representation

2.4 Implementation of a Pure Prolog Interpreter

3 Improving Prolog Control

3.1 Different Levels of Prolog Control

3.2 Variables Annotation in IC-Prolog

3.3 The Wait Declarations of MU-Prolog

3.4 The Predicate freeze/2 of Prolog-II

3.5 Comparison of Wait and Freeze

3.6 The When Declarations of NU-Prolog

Part II Principles and Techniques of Implementation

4 Control and Stack(s) Management

4.1 Prolog as a Programming Language

4.2 Stack Management

4.3 Restoring the Environments

5 Representation of Terms

5.1 Binding Mechanism

5.2 Structure Sharing

5.3 Structure Copying

6 Deterministic Call Returns

6.1 The Problem

6.2 Solution for Structure Sharing

6.3 Solution for Structure Copying

6.4 Comparisons

7 Last-Call Optimization

7.1 Last-Call Optimization

7.2 Implementation

8 Clause Indexing

8.1 The Concept

8.2 Local Stack Enhancement

9 Compilation of Prolog

9.1 Characteristics of the WAM

9.2 Compilation of a Clauses Set

9.3 Compilation of a Clause

9.4 Extensions

10 The Dif and Freeze Predicates of Prolog-II

10.1 The dif/2 Predicate of Prolog-II

10.2 Implementation Principles

10.3 An Implementation of dif/2 and freeze/2

10.4 Comparison with SICSTUS Prolog

Part II Implementations

11 Mini-Cprolog

11.1 The Coding of Static Structures

11.2 The Working Zone Architecture

11.3 Unification

11.4 Control

11.5 Extensions

12 Mini-WAM

12.1 Structure Copying

12.2 Working Zone Architecture

12.3 Unification

12.4 Control

12.5 Extensions

13 Mini-Prolog-II

13.1 The Working Zone Architecture

13.2 Unification

13.3 Control

13.4 The Delaying Mechanism

13.5 Extensions

14 Built-in Predicates

14.1 Management of the Built-in Predicates

14.2 Input/Output

14.3 Control

14.4 Arithmetic

14.5 Type Tests and Conversion

14.6 Extensions

Conclusion

Appendix A Mini-Cprolog

Appendix B Mini-WAM

Appendix C Mini-Prolog-II

Appendix D Common Part

Bibliography