Objectives
The previous Module introduced some of Prolog's data types and
the important concept of unification. This Module introduces another
data type, the structured object. Using this, it is possible
to write simple and useful Prolog programs.
The
Prolog structured object
-
About the use of a Prolog data structure that allows the description
of relationships between pieces of information.
Diagramming
structured objects
- How Prolog structured objects can be drawn as trees. this makes
it easy to understand their structure.
- Querying
structured objects
-
Diagrams of queries can be made in the same way as diagrams of
Prolog's structured objects. The reason for this is simple: Prolog
uses the same data structure for both.
- Queries
with more than one goal and the anonymous variable
- How queries can be comprised on more than one goal. This is important
because the bodies of Prolog rules usually consist of collections
of more than one Prolog goal. In other words, you are well on the
way to writing Prolog rules. This part also shows the use of the
Anonymous Variable.
|