Prolog, like any other programming language contains the five basic elements:
- Name-value System - constants, variables, and a means of describing lists as the basic data "structure".
- Imperatives - logic facts and rules.
- Input/output - very primitive, but the query is the input and the response is the output (full versions of Prolog contain read and print rules).
- Sequencing - is defined by the interpreter locating "applicable" facts and/or rules.
- Conditionals - rules provide the "if-then-else" element of the language.
- Repetition - in the form of recursion in rules.
- Abstraction - primitive; basically all facts and rules with the same identifier are assembled into a function body by the interpreter.
Last Updated 2002/03/26
J.A.N. Lee, 2002.