Module 2
Diagramming structured objects

 

 

Structured objects can be drawn as trees. Each non-terminal node (that is, a node with a branch growing from it) is a functor of a structured object; each terminal node (sometimes known as "leaves" or "leaf nodes") is a term that is atomic or a variable.
 
 

We'll start with a simple example:

     parents('n''pongo', jambo).

 
 

Examples with a structured object within a structured object produce more interesting trees. Take, for example:

     parents(mother('n''pongo'), father(jambo)).

 
 

Finally, we'll have an example using the most extensive case presented above:

     mammal(gorilla, 'n''gola', female, parents(mother('n''pongo'),
                     father(jambo)), 1988).

 

We can see from this example that structured objects can have any number of arguments and don't have to be balanced or symmetrical.

Take time to work through the Self-Test 2