Prolog
From Wikibooks, the open-content textbooks collection
Welcome to the Prolog wikibook. This book can serve as a textbook or tutorial for anyone who wants to learn the Prolog programming language. No prior programming experience is required. Some basic knowledge of logic can come in handy. For those new to the subject, a short introduction to logic is given, but this is not required reading.
The first chapters of the book (under Basics) describe the central syntax and features of the language. The next section, Programming, explores additional concepts that are useful when programming in Prolog. The chapters under Basics and Programming are meant to be read in order.
The section Built-in Predicates deals with the functions available in many Prolog compilers. These and other chapters can be read in any order.
A note to readers: Feel free to contribute to the book, especially if you are just starting out on Prolog. Just click on edit this page at the top of the page to change the text. If you do not want to contribute directly, any comments you might have will still be greatly appreciated. Just click on discussion at the top of the page to leave comments about the texts (things that were unclear, need further elaboration, etc.), or to ask any question about Prolog. In the end, it's the readers that will (hopefully) help set this book apart from the other Prolog books out there.
Special pages
- What is Prolog?
- History of Prolog
- Introduction to logic
- Glossary
- Built-in predicates
- Frequently Asked Questions
- Frequently Encountered Problems
- Exercises (external link)
Table of contents
Beginning Prolog
Basics:
Programming:
- Cuts and Negation
- Reading and Writing code
- Difference Lists
- Definite Clause Grammars
- Inference Engines
Built-in Predicates:
In-depth Prolog ideas
Advanced Programming:
Data Structures and Algorithms:
Prolog and beyond
- Higher Order Programming
- Constraint Logic Programming
- Definite Clause Grammars
- Combining Languages
- Commented Source Code Library
- A selection of interesting usergroup topics