Skip to main content
Top

1987 | OriginalPaper | Chapter

Definite Programs

Author : John Wylie Lloyd

Published in: Foundations of Logic Programming

Publisher: Springer Berlin Heidelberg

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

This chapter is concerned with the declarative and procedural semantics of definite programs. First, we introduce the concept of the least Herbrand model of a definite program and prove various important properties of such models. Next, we define correct answers, which provide a declarative description of the desired output from a program and a goal. The procedural counterpart of a correct answer is a computed answer, which is defined using SLD-resolution. We prove that every computed answer is correct and that every correct answer is an instance of a computed answer. This establishes the soundness and completeness of SLD-resolution, that is, shows that SLD-resolution produces only and all correct answers. Other important results established are the independence of the computation rule and the fact that any computable function can be computed by a definite program. Two pragmatic aspects of PROLOG implementations are also discussed. These are the omission of the occur check from the unification algorithm and the control facility, cut.

Metadata
Title
Definite Programs
Author
John Wylie Lloyd
Copyright Year
1987
Publisher
Springer Berlin Heidelberg
DOI
https://doi.org/10.1007/978-3-642-83189-8_2