The syntax of Prolog is deceptively simple. The User inputs a series of predicates that have three different meanings - facts to be stored, search goals or questions of the current facts, commands which do one thing. There is also a special kind of rule called a clause which defines conditions underwhich a fact can be true. The second alternative form of query and command is used in our UNSW Prolog only. A functor is a non-numeric constant that is written as if it was a function.
Some commands interpret some of the structures in special ways.
For example, A predicate input as a fact is stored as piece of data, but input as a command or goal it becomes a call to a procedure. An atom can different definitions for different arities.