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
Appendix - The Teyjus System
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
We have presented sample λProlog programs to illustrate various computations throughout this book. Being able to execute and experiment with those programs should help the reader understand the λProlog programming language and the logic underlying it. To that end, this appendix presents a short introduction to the Teyjus implementation of λProlog. This system can be freely downloaded over the web. The various programs presented in the earlier chapters are also available in electronic form from the website associated with this book.
An overview of the Teyjus system
The Teyjus implementation of λProlog is based on two components. One component is the emulator of an abstract or virtual machine that has an instruction set and runtime system that realizes all the high-level computations implicit in a λProlog program. The second component is a compiler that translates λProlog programs into the instructions of the abstract machine.
Another important aspect of the Teyjus system is that it uses the modules language discussed in Chapter 6. A programmer therefore, must, organize the kind and type declarations and the clauses into modules and then attach signatures to such modules in order to mediate their external view. The compiler is responsible for taking a given module of λProlog code, certifying its internal consistency, ensuring that it satisfies its associated signature, and finally, translating it into a byte-code form. This byte-code form consists of a “header” part containing constant and type names and other related data structures as well as a sequence of instructions that can be run on the virtual machine once it has understood the header information. A critical part of the emulator is a loader that can read in such byte-code files and put the emulator in a state where it is ready to respond to user queries. The other part of the emulator is, of course, a byte-code interpreter that steps through instructions in the manner called for by the user input.
- Type
- Chapter
- Information
- Programming with Higher-Order Logic , pp. 277 - 288Publisher: Cambridge University PressPrint publication year: 2012