The question consists of two goals . To answer this question, Prolog first finds a course, Subject, for which Norman is the lecturer and then finds out if Fred studies the Subject which was just found. Prolog solves this problem by proceeding left to right and then backtracking . After the first solution is found, Prolog retraces its steps up the tree and looks for alternative solutions. This is also called a clause .
Facts are unit clauses and rules are non-unit clauses .
This symbol is often called the neck symbol. The left hand side of the neck is called the head . The right hand side of the neck is called the body . This statement tells us very little about the book. Often we ascribe to objects a number of attributes.