Book contents
- Frontmatter
- Contents
- Preface
- Introduction
- 1 First-Order Terms and Representations of Data
- 2 First-Order Horn Clauses
- 3 First-Order Hereditary Harrop Formulas
- 4 Typed λ-Terms and Formulas
- 5 Using Quantification at Higher-Order Types
- 6 Mechanisms for Structuring Large Programs
- 7 Computations over λ-Terms
- 8 Unification of λ-Terms
- 9 Implementing Proof Systems
- 10 Computations over Functional Programs
- 11 Encoding a Process Calculus Language
- Appendix The Teyjus System
- Bibliography
- Index
2 - First-Order Horn Clauses
Published online by Cambridge University Press: 05 August 2012
- Frontmatter
- Contents
- Preface
- Introduction
- 1 First-Order Terms and Representations of Data
- 2 First-Order Horn Clauses
- 3 First-Order Hereditary Harrop Formulas
- 4 Typed λ-Terms and Formulas
- 5 Using Quantification at Higher-Order Types
- 6 Mechanisms for Structuring Large Programs
- 7 Computations over λ-Terms
- 8 Unification of λ-Terms
- 9 Implementing Proof Systems
- 10 Computations over Functional Programs
- 11 Encoding a Process Calculus Language
- Appendix The Teyjus System
- Bibliography
- Index
Summary
Chapter 1 discussed the use of first-order terms to represent data. This chapter describes logic programming over such representations using a typed variant of first-order Horn clauses. We begin this presentation by developing a view of logic programming that will allow us to introduce extensions smoothly in later chapters, leading eventually to the full set of logical features that underlie the λProlog language. From this perspective, we will take this paradigm of programming to have two defining characteristics. First, languages within the paradigm provide a relational approach to programming. In particular, relations over data descriptions are defined or axiomatized through formulas that use logical connectives and quantifiers. Second, the paradigm views computation as a search process. In the approach underlying λProlog, this view is realized by according to each logical symbol a fixed search-related interpretation. These interpretations lead, in turn, to specific programming capabilities.
The first two sections that follow provide a more detailed exposition of a general framework for logic programming along the lines just sketched. The rest of the chapter is devoted to presenting first-order Horn clauses as a specific elaboration of this framework.
First-order formulas
The first step toward allowing for the description of relations over objects represented by first-order terms is to ease a restriction on signatures: We permit the target types of constants to be ο. Constants that have this type are called relation or predicate symbols. Well-formed first-order expressions are otherwise constructed in the same fashion as that described in Section 1.3. Expressions that have the type ο in this setting are referred to as first-order atomic formulas.
- Type
- Chapter
- Information
- Programming with Higher-Order Logic , pp. 34 - 74Publisher: Cambridge University PressPrint publication year: 2012